Commit Graph

89083 Commits

Author SHA1 Message Date
James Almer
edef07569c Merge commit 'bad7ce1d82f0b7da55086b8c6124eff0d35a1b1a'
* commit 'bad7ce1d82f0b7da55086b8c6124eff0d35a1b1a':
  makedef: Pass EXTERN_PREFIX from configure to makedef

Merged-by: James Almer <jamrial@gmail.com>
2017-11-16 13:12:59 -03:00
James Almer
1146a7a363 Merge commit 'd070b9b703a542429a13db9623109ae20474c775'
* commit 'd070b9b703a542429a13db9623109ae20474c775':
  configure: Coalesce some arch configuration and PIC handling

Merged-by: James Almer <jamrial@gmail.com>
2017-11-16 13:11:52 -03:00
James Almer
b449af20d5 Merge commit '9e48de3cc86c732d9cebd496d6f0a2b7e7732754'
* commit '9e48de3cc86c732d9cebd496d6f0a2b7e7732754':
  configure: Miscellaneous minor changes

Merged-by: James Almer <jamrial@gmail.com>
2017-11-16 13:11:24 -03:00
James Almer
c7812b3bcf Merge commit '5c2a01f064d5ab2b309d25c7f46c6c4471838d90'
* commit '5c2a01f064d5ab2b309d25c7f46c6c4471838d90':
  Makefile: fix distclean target
  configure: fix writing library dependencies to config.sh

This commit is a noop, see
d9ff1e4c8b
e7e7d56a85

Merged-by: James Almer <jamrial@gmail.com>
2017-11-16 13:10:49 -03:00
Martin Storsjö
bad7ce1d82 makedef: Pass EXTERN_PREFIX from configure to makedef
This avoids having to use either "dumpbin -headers" to find out
the current architecture, or pass $ARCH from configure to deduce it.

When configuring with --disable-asm, ARCH is equal to "c", which doesn't
give any indication of what symbol prefix is to be used.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-11-16 16:54:08 +02:00
Aman Gupta
ff8f40a630 avcodec/mpeg12dec: ensure a53_caption_size is reset on malloc failures
Signed-off-by: Aman Gupta <aman@tmm1.net>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-15 18:14:40 -08:00
Aman Gupta
3f1a540204 avcodec/mpeg12dec: parse A53 caption data embedded in SCTE-20 user data
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-15 18:14:39 -08:00
James Almer
f399172d6e avcodec/proresdec: align dequantization matrix buffers
Should fix ticket #6838

Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-15 21:28:36 -03:00
Mark Thompson
6727cfea5e Merge commit '620f88a0b94a651c6cc912b1fb32d308762d59b5'
* commit '620f88a0b94a651c6cc912b1fb32d308762d59b5':
  vaapi_h264: Add missing return value check
  h264_metadata: Fix clearing SEI payload in error case
  cbs_h2645: Fix memory leak on when reading SEI fails
  cbs: Add a missing return value check

This commit is a noop, see
03b1470088
d792613bad
41272e112b
6734eef6b8

Merged-by: Mark Thompson <sw@jkqxz.net>
2017-11-16 00:07:40 +00:00
Mark Thompson
040a92c21f Merge commit 'c77da21e5d15056b8ba060ee5ce9e73f26653612'
* commit 'c77da21e5d15056b8ba060ee5ce9e73f26653612':
  vaapi_h264: Do not use deprecated header type

This commit is a noop, see 32a618a948.

Merged-by: Mark Thompson <sw@jkqxz.net>
2017-11-15 23:55:10 +00:00
Mark Thompson
4251e25272 Merge commit 'ff007e30d8d45ba1ff2b2a4615f1cd5bafb50626'
* commit 'ff007e30d8d45ba1ff2b2a4615f1cd5bafb50626':
  vaapi_h264: Add workaround for bad SEI in old Intel drivers

Merged-by: Mark Thompson <sw@jkqxz.net>
2017-11-15 23:52:21 +00:00
Michael Niedermayer
6d00905f81 avcodec/vc2enc: Clear coef_buf on allocation
Fixes: Use of uninitialized memory
Fixes: assertion failure

Reviewed-by: <atomnuker>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-15 17:31:09 +01:00
Michael Niedermayer
eec67f7b24 avcodec/dvbsubdec: Avoid re-computing clut
Fixes: Timeout
Fixes: 3218/clusterfuzz-testcase-5390672154591232

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-15 17:31:09 +01:00
Michael Niedermayer
380b48fb9f avcodec/h264dec: Fix potential array overread
add padding before scantable arrays

See: 522d850e68

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-15 17:31:09 +01:00
Diego Biurrun
d070b9b703 configure: Coalesce some arch configuration and PIC handling 2017-11-15 13:29:41 +01:00
Diego Biurrun
9e48de3cc8 configure: Miscellaneous minor changes
- Move a variable closer to where it is used
- Add an explanatory comment
- Simplify a crosscompile check
- Minor SHFLAGS simplification
- Coalesce some threads tests
2017-11-15 13:29:41 +01:00
Hendrik Leppkes
bff6d98ba3 nvenc: support d3d11 surface input 2017-11-15 10:35:44 +01:00
Hendrik Leppkes
6fcbf39f9e nvenc: factor context push/pop into functions
This reduces code repetition, and will allow adding further push/pop
refinement for D3D11 devices in future commits.
2017-11-15 10:35:39 +01:00
James Almer
d8ea66ab33 avformat/utils: remove usage of AVCodecContext accessors
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-15 01:14:22 -03:00
James Almer
03dae121c0 avfilter/vf_subtitles: remove usage of AVCodecContext accessors
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-15 01:14:22 -03:00
James Almer
21add0c228 avcodec/pthread_frame: remove usage of AVCodecContext accessors
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-15 01:14:22 -03:00
James Almer
e61825d5b4 ffplay: remove usage of AVCodecContext accessors
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-15 01:14:22 -03:00
James Almer
b2731bcd1d ffprobe: remove usage of AVCodecContext accessors
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-15 01:14:22 -03:00
James Almer
e9025beacb ffmpeg: remove usage of AVCodecContext accessors
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-15 01:14:22 -03:00
James Almer
c4131a0613 avcodec: deprecate getters and setters for AVCodecContext and AVCodec fields
The fields can be accessed directly, so these are not needed anymore.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-15 01:14:22 -03:00
Philip Langdale
912ceba61b avcodec: Implement vc1 nvdec hwaccel
This hwaccel is interesting because it also works for wmv3/9 content,
which is not supported by the nvidia parser used by cuviddec.
2017-11-14 19:40:01 -08:00
Philip Langdale
bb4c9d0a8e avcodec: Don't assume separate u and v planes in ff_alloc_picture
alloc_frame_buffer in ff_alloc_picture asserts that the linesize
of planes 1 and 2 are the same. If the pixfmt has a single uv
plane, like NV12, this won't be true.

So, let's only do this check if there are more than 2 planes.

We never hit this with previous hw formats because they don't set
linesize to meaningful values, but the cuda hw format sets the
values based on the underlying data layout.
2017-11-14 19:39:06 -08:00
Sasi Inguva
54f8ac199f lavf/mov.c: Don't correct edit list start to zero, when we can't find a frame before edit list start.
After c2a8f0fcbe this can happen on normal edit lists starting on a B-frame.

Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-14 21:02:31 +01:00
Dale Curtis
01763144dc Avoid corrupting diagnostic state with _Pragma changes.
The macros for ICC and MSVC correctly push and pop the diagnostic
state of the compiler when disabling deprecation warnings. The
ones for clang/gcc should do the same. Without this, if a blanket
deprecation warning is applied to the code base it'll be flipped
back on incorrectly with FF_ENABLE_DEPRECATION_WARNINGS.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-14 20:49:07 +01:00
John Stebbins
57a422ea4c fate/mov: add test for overlapping fragments
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-14 20:49:07 +01:00
Kaustubh Raste
143fc5f6e2 avcodec/mips: Improve hevc non-uni hz and vt mc msa functions
Use mask buffer.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-14 20:48:36 +01:00
Kaustubh Raste
e5f66a9ea4 avcodec/mips: cleanup unused macros
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-14 20:48:36 +01:00
Aman Gupta
034e1f82d9 avcodec: fix whitespace on AVPanScan struct definition 2017-11-14 10:25:29 -08:00
Aman Gupta
91a565e20f avformat/http: fix chunked response w/ multiple_requests=1
Currently if you use the multiple_requests=1 option and try to
receive a chunked-encoded response, http_buf_read() will hang forever.

After this patch, EOF is emulated once a 0-byte final chunk is
received by setting a new flag. This flag is reset in ff_http_do_new_request(),
which is used to make additional requests on the open socket.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-14 07:36:51 -08:00
James Almer
5c2a01f064 Makefile: fix distclean target
It must imply clean. Regression since 7ebe7e8e7a.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-14 10:09:40 -03:00
Michael Niedermayer
58cf31cee7 avcodec/x86/mpegvideodsp: Fix signedness bug in need_emu
Fixes: out of array read
Fixes: 3516/attachment-311488.dat

Found-by: Insu Yun, Georgia Tech.
Tested-by: wuninsu@gmail.com
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-14 04:54:31 +01:00
Steven Liu
880b299381 avformat/hlsenc: write fmp4 init header after first AV frame
fix ticket id: 6825

Signed-off-by: Steven Liu <lq@onvideo.cn>
Tested-by: Aman Gupta <aman@tmm1.net>
2017-11-14 10:31:26 +08:00
Muhammad Faiz
8329ae781a avutil/crc: use ff_thread_once at av_crc_get_table
Fix tsan warnings.

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-11-14 06:25:05 +07:00
wm4
9283a4f19b avcodec/videotoolbox: fix opaque_ref handling
This is a partial fix - to fix videotoolbox fully (with multithreaded
hwaccel decoding), much more work would be required.

Before this change, an assertion failure would trigger:

  $ ffmpeg -hwaccel videotoolbox -hwaccel_output_format videotoolbox_vld -i h264.ts -f null -y /dev/null
  Assertion (frame->private_ref && frame->private_ref->size == sizeof(FrameDecodeData)) || !(avctx->codec->capabilities & (1 << 1)) failed at libavcodec/decode.c:620

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-13 15:10:07 -08:00
Aman Gupta
b7f963c444 avcodec/videotoolbox: reorder functions to avoid forward declarations
Cosmetic change only.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-13 15:06:50 -08:00
Aman Gupta
5e577c586b avcodec/videotoolbox: fix whitespace
Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-13 14:32:48 -08:00
Aman Gupta
c8b1a151ce avcodec/videotoolboxenc: remove spurious warning
Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-13 14:32:48 -08:00
Aman Gupta
68ef503bb5 avcodec/videotoolbox: pass through hevc param changes to the decoder
This includes the SEI_PREFIX/SEI_SUFFIX NALUs, which can contain
updates like HEVC_SEI_TYPE_ACTIVE_PARAMETER_SETS. Previously, hevc
samples with this SEI present would not playback correctly.

See for example https://github.com/lhc70000/iina/issues/1123

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-13 14:32:48 -08:00
Aman Gupta
3a91b3ae74 avcodec/hevc: implement new decode_params callback for VideoToolbox
Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-13 14:32:48 -08:00
Aman Gupta
bd2d70c0b8 avcodec/videotoolbox: remove unnecessary if statement
Cosmetic change only.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-13 14:32:48 -08:00
Aman Gupta
403d10a8b3 avcodec/videotoolbox: create avcC even when h264 extradata is missing
Removes the avctx->extradata_size requirement when creating avcC/hvcC, since
avctx->extradata is only used in the esds code path.

This fixes an issue where the VideoToolbox decoder would not work unless
avformat_find_stream_info() was called.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-13 14:32:48 -08:00
Aman Gupta
9519983c0f avcodec/videotoolbox: use decode_params to propagate H264 PPS changes and restart on SPS changes
This fixes decoding of H264 video samples with SPS and PPS changes.

See for example https://s3.amazonaws.com/tmm1/videotoolbox/spschange.ts,
which previously stalled the decoder and failed to produce any new frames
after the SPS change.

Also see https://s3.amazonaws.com/tmm1/videotoolbox/ppschange.ts, which
uses multiple PPS and would previously cause VT decode failures.

If the VideoToolbox session needs to be restarted, and
videotoolbox_start() fails for some reason (for instance, if the video
is interlaced and the decoder is running on iOS), avcodec will return
AVERROR_EXTERNAL. This can be used by the API user to switch to another
decoder.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-13 14:32:48 -08:00
Aman Gupta
872add0854 avcodec/h264: implement new decode_params callback for PPS/SPS
This callback will be used by the VideoToolbox H264 hwaccel so that it
can receive SPS and PPS NALUs. VideoToolbox requires PPS changes to be
fed into the decoder session, and for the session to be recreated when
the SPS changes.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-13 14:32:48 -08:00
Aman Gupta
76f169368d avcodec: add decode_params callback to AVHWAccel struct
Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-13 14:32:48 -08:00
Aman Gupta
dad42bc5a1 avcodec/h264, videotoolbox: return AVERROR_INVALIDDATA when no frames are produced
The only reason videotoolbox wouldn't produce frames is if the data fed
to it was invalid, so returning AVERROR_INVALIDDATA makes sense here.

Further, it means AVERROR_EXTERNAL can be used in further commits to signal
fatal VideoToolbox errors, letting the user know that they need to fallback to
another decoder.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-13 14:32:27 -08:00