Commit Graph

90255 Commits

Author SHA1 Message Date
wm4 474194a8d0 avutil/opt: remove ABI hacks
These were needed for ABI compatibility with Libav. We don't need them
anymore.
2018-02-13 04:46:04 +01:00
Ray Tiley c837cd3d4d avdevice/decklink_dec: extract NTSC VANC
This changes how NTSC VANC is extracted from the buffer. In NTSC the vanc data
is interleaved between luma and chroma, and not just the luma as in high
definition resolutions.

In my testing this allows a decklink card encoding valid NTSC closed
captions to pass the caption data to the x264 encoder.

Updated with reviews from Devin Heitmueller and Marton Balint.

Signed-off-by: Ray Tiley <raytiley@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-02-13 00:13:21 +01:00
Marton Balint ce6ce595cf avcodec/mpeg12enc: add support for specifying video_format in the sequence_display_extension
In a recent commit the default was changed from 0 (component) to 5
(unspecified), however some standards require using 0. With this option, the
user will be able to do so.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-02-13 00:13:21 +01:00
Mark Thompson 0018f17f23 Merge commit 'a674b31240e99a369059385b03582b35629d190f'
* commit 'a674b31240e99a369059385b03582b35629d190f':
  build: Ignore generated mpeg12framerate test binary

This commit is a noop, see fb791d2876

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-12 23:12:43 +00:00
Mark Thompson 7ceec9c5ec Merge commit '5b6213ef6bf5e0781c83e86926eb0b33a98dc185'
* commit '5b6213ef6bf5e0781c83e86926eb0b33a98dc185':
  avcodec/vc1dec: fix mby_start for interlaced content

This commit is a noop, see c9f72e4b81

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-12 23:10:09 +00:00
Mark Thompson ccef7a85d6 Merge commit '9b09792c90b580842157ca8ce534be434725a841'
* commit '9b09792c90b580842157ca8ce534be434725a841':
  lavc/qsv: default la_ds to MFX_LOOKAHEAD_DS_UNKNOWN

This commit is a noop: the code in FFmpeg is slightly different and never
contained the invalid value.

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-12 23:05:13 +00:00
Mark Thompson de3be1d09f Merge commit '8bb9824fcbc5a6ebf68391d70a2c4f03447990d2'
* commit '8bb9824fcbc5a6ebf68391d70a2c4f03447990d2':
  qsvenc: AVBR is not supported on non-windows OS

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-12 23:01:24 +00:00
Mark Thompson e9dfc6f900 Merge commit 'e412d683fe0349bb8450645813a23158bb4ebd66'
* commit 'e412d683fe0349bb8450645813a23158bb4ebd66':
  hwcontext: Perform usual uninitialisation on derived frames contexts

This commit is a noop, see 0f93cef2d6

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-12 23:00:13 +00:00
Mark Thompson cfff6d1f77 Merge commit 'caecb85014fc81f8734560a150073627eedab78c'
* commit 'caecb85014fc81f8734560a150073627eedab78c':
  hwcontext: Perform usual initialisation on derived device contexts

This commit is a noop, see 309d660775

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-12 22:59:12 +00:00
Mark Thompson b668a1c8b3 Merge commit 'c6bc18bc121ea66df715123c59f7ef9542c0914a'
* commit 'c6bc18bc121ea66df715123c59f7ef9542c0914a':
  vf_hwupload/hwmap: Support setting a fixed pool size

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-12 22:56:12 +00:00
Mark Thompson 6e050e0085 Merge commit 'e4cdef00263dc8b3c8de9d34ceacd00dc68979c0'
* commit 'e4cdef00263dc8b3c8de9d34ceacd00dc68979c0':
  vf_scale_qsv: Support increasing hardware frame pool size

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-12 22:55:24 +00:00
Mark Thompson a5ed07940c fate: Fix fate-api reference files after AVCodecContext change
Broken by d23fff0d8a.
2018-02-12 22:54:23 +00:00
Mark Thompson b4fca397dd Merge commit 'b128be1748f3920a14a98307265df5f2d3433e1d'
* commit 'b128be1748f3920a14a98307265df5f2d3433e1d':
  vf_*_vaapi: Support increasing hardware frame pool size

Rewritten to apply to common VAAPI code rather than specific filters.

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-12 22:44:28 +00:00
Mark Thompson bcab11a1a2 Merge commit '6d86cef06ba36c0ed591e14a2382e9630059fc5d'
* commit '6d86cef06ba36c0ed591e14a2382e9630059fc5d':
  lavfi: Add support for increasing hardware frame pool sizes

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-12 22:28:12 +00:00
Mark Thompson 9471122a1b Merge commit 'cad739dace55e3446ef7180de688173cd19fb000'
* commit 'cad739dace55e3446ef7180de688173cd19fb000':
  lavc: Add per-thread surfaces in get_hw_frame_parameters()

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-12 22:22:30 +00:00
Mark Thompson d23fff0d8a Merge commit '5b145290df2998a9836a93eb925289c6c8b63af0'
* commit '5b145290df2998a9836a93eb925289c6c8b63af0':
  lavc: Add support for increasing hardware frame pool sizes

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-02-12 22:19:38 +00:00
Carl Eugen Hoyos d401ba6b3d lavf/matroskaenc: Force the minimum value for -reserve_index_space to 2.
Fixes an assertion failure:
Assertion size >= 2 failed at libavformat/matroskaenc.c:298
2018-02-12 22:50:52 +01:00
Richard Shaffer 81d1e1e509 fate: add aac id3v2 demux test
A basic test for demuxing raw AAC (ADTS) with ID3v2 tags.
2018-02-12 22:08:51 +01:00
Richard Shaffer e023334661 libavformat/aac: Parse ID3 tags between ADTS frames.
While rare, ID3 tags may be inserted between ADTS frames. This change enables
parsing them and setting the appropriate metadata updated event flag.
2018-02-12 22:08:49 +01:00
James Almer 192ea5bb77 avformat/Makefile: use individual dependencies for librtmp protocols
Fixes compilation of libavformat when librtmp is enabled but all the
relevant protocols are disabled.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-02-12 11:29:20 -03:00
Rostislav Pehlivanov 50945482a7 h264_idct: enable unmacro on newer NASM versions
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-02-12 10:50:37 +00:00
Diego Biurrun a674b31240 build: Ignore generated mpeg12framerate test binary 2018-02-12 10:04:08 +01:00
Michael Niedermayer 5b6213ef6b avcodec/vc1dec: fix mby_start for interlaced content
Bug-Id: 1100
Bug-Id: ffmpeg/Ticket2531
Cc: libav-stable@libav.org
2018-02-11 23:48:54 -05:00
James Almer 4961ddfd35 Merge commit 'fd36cf6bf6524247a8ff6788c028836fe7d9fd20'
* commit 'fd36cf6bf6524247a8ff6788c028836fe7d9fd20':
  configure: Factorize check_64_bit()

Merged-by: James Almer <jamrial@gmail.com>
2018-02-11 23:18:59 -03:00
James Almer c1c720d527 Merge commit '38434a9ff5b9a1a048f32c1c7e2a9519cf12f8ba'
* commit '38434a9ff5b9a1a048f32c1c7e2a9519cf12f8ba':
  configure: Simplify restrict keyword handling

Merged-by: James Almer <jamrial@gmail.com>
2018-02-11 23:13:17 -03:00
James Almer 35347e7e9b Merge commit '4cf84e254ae75b524e1cacae499a97d7cc9e5906'
* commit '4cf84e254ae75b524e1cacae499a97d7cc9e5906':
  Drop some unnecessary config.h #includes

Merged-by: James Almer <jamrial@gmail.com>
2018-02-11 23:08:48 -03:00
James Almer 8a15ad8a17 Merge commit 'bca41545b371efc34e38d1fa8bb12dba8b614da0'
* commit 'bca41545b371efc34e38d1fa8bb12dba8b614da0':
  configure: Group code that sets the license string with licensing checks

Merged-by: James Almer <jamrial@gmail.com>
2018-02-11 22:59:18 -03:00
James Almer 0a320f7e7a Merge commit '2eb396b175e55e515aa6a13c5b1789a2a18d3935'
* commit '2eb396b175e55e515aa6a13c5b1789a2a18d3935':
  hwcontext: Fix memory leak on derived frame allocation failure

Merged-by: James Almer <jamrial@gmail.com>
2018-02-11 22:50:57 -03:00
James Almer cb2205863b Merge commit '96e476cc9d414e248692c773d9dce736662572b8'
* commit '96e476cc9d414e248692c773d9dce736662572b8':
  hwcontext: Fix documentation for av_hwdevice_ctx_alloc()

This commit is a noop, see 9365dfcbf6

Merged-by: James Almer <jamrial@gmail.com>
2018-02-11 22:49:35 -03:00
James Almer 6c59f05c74 Merge commit '8965e2af921ec5926b26d5ae466ee4104bb5262b'
* commit '8965e2af921ec5926b26d5ae466ee4104bb5262b':
  avpacket: Initialize the allocated padding area in side data

This commit is a noop, see 9cbb3fce59

Merged-by: James Almer <jamrial@gmail.com>
2018-02-11 22:47:47 -03:00
James Almer d0f098a5e0 Merge commit '5085f25ace1e74846a0de3369bedd0e22d1a1bdc'
* commit '5085f25ace1e74846a0de3369bedd0e22d1a1bdc':
  vc1: skip motion compensation when data for last picture is invalid

This commit is a noop. The crash can't be reproduced with ffmpeg.

Merged-by: James Almer <jamrial@gmail.com>
2018-02-11 22:47:05 -03:00
James Almer 87faeb1e68 Merge commit '6829a079444e10818a847e153121fb458cc5c0a8'
* commit '6829a079444e10818a847e153121fb458cc5c0a8':
  qsvdec: Relax the surface vs coded dimension check

Merged-by: James Almer <jamrial@gmail.com>
2018-02-11 22:44:12 -03:00
Ruiling Song 9b09792c90 lavc/qsv: default la_ds to MFX_LOOKAHEAD_DS_UNKNOWN
MFX_LOOKAHEAD_DS_UNKNOWN means auto.
-1 is not a valid value.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-02-12 00:34:45 +01:00
Zhong Li 8bb9824fcb qsvenc: AVBR is not supported on non-windows OS
AVBR is supported from API 1.3 but only available for Windows

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
2018-02-12 00:34:34 +01:00
Muhammad Faiz b7d476b138 fate/libavcodec: add codec_desc test
Remove runtime check at codec_desc.c

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2018-02-12 06:06:37 +07:00
Mark Thompson e412d683fe hwcontext: Perform usual uninitialisation on derived frames contexts 2018-02-11 22:11:10 +00:00
Mark Thompson caecb85014 hwcontext: Perform usual initialisation on derived device contexts
The initialisation should be common.  For libmfx, it was previously
happening in the derivation function and this moves it out.
2018-02-11 22:11:10 +00:00
Mark Thompson c6bc18bc12 vf_hwupload/hwmap: Support setting a fixed pool size
These filters do not directly know whether the API they are using will
support dynamic frame pools, so this is somewhat tricky.  If the user
sets extra_hw_frames, we assume that they are aware of the problem and
set a fixed size based on that.  If not, most cases use dynamic sizing
just like they did previously.  The hardware-reverse-mapping case for
hwmap previously had a large fixed size (64) here, primarily as a hack
for QSV use - this is removed and extra_hw_frames will need to be set
for QSV to work since it requires fixed-size pools (as the other cases
do, and which didn't work before).
2018-02-11 22:11:10 +00:00
Mark Thompson e4cdef0026 vf_scale_qsv: Support increasing hardware frame pool size
The deinterlacer does not change, because it does not allocate any new
frames (for output it uses the same pool as the input).
2018-02-11 22:11:10 +00:00
Mark Thompson b128be1748 vf_*_vaapi: Support increasing hardware frame pool size
Defaults to 10 frames to preserve compatibility, but can allocate
fewer if extra_hw_frames is set explicitly.
2018-02-11 22:11:10 +00:00
Mark Thompson 6d86cef06b lavfi: Add support for increasing hardware frame pool sizes
AVFilterContext.extra_hw_frames functions identically to the field of
the same name in AVCodecContext.
2018-02-11 22:11:06 +00:00
Mark Thompson cad739dace lavc: Add per-thread surfaces in get_hw_frame_parameters()
This number is definitely required when frame threading is enabled, so
add it here rather than forcing all users to handle it themselves.

DXVA2 contained this addition in specific code as well (therefore being
added twice in the internal case) - just remove it from there.
2018-02-11 22:00:48 +00:00
Mark Thompson 5b145290df lavc: Add support for increasing hardware frame pool sizes
AVCodecContext.extra_hw_frames is added to the size of hardware frame
pools created by libavcodec for APIs which require fixed-size pools.
This allows the user to keep references to a greater number of frames
after decode, which may be necessary for some use-cases.

It is also added to the initial_pool_size value returned by
avcodec_get_hw_frames_parameters() if a fixed-size pool is required.
2018-02-11 22:00:33 +00:00
Carl Eugen Hoyos dced1f6cdf lavf/rtpdec: Constify several pointers.
Fixes two warnings:
libavformat/rtpdec.c:155:20: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
libavformat/rtpdec.c:168:20: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
2018-02-11 20:03:33 +01:00
Michael Niedermayer f2318aee8c avcodec/vp3: Error out on invalid num_coeffs in unpack_vlcs()
This fixes a hypothetical integer overflow

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-11 17:20:17 +01:00
Michael Niedermayer 63a4bdbf3b avcodec/mpeg4videodec: Ignore multiple VOL headers
Fixes: Ticket7005

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-11 12:06:04 +01:00
Nekopanda f4d5d7e8de avcodec/mpeg2dec: Fix motion vector rounding for chroma components
In 16x8 motion compensation, for lower 16x8 region, the input to mpeg_motion() for motion_y was "motion_y + 16", which causes wrong rounding. For 4:2:0, chroma scaling for y is dividing by two and rounding toward zero. When motion_y < 0 and motion_y + 16 > 0, the rounding direction of "motion_y" and "motion_y + 16" is different and rounding "motion_y + 16" would be incorrect.

We should input "motion_y" as is to round correctly. I add "is_16x8" flag to do that.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-11 12:04:47 +01:00
Michael Niedermayer 570023eab3 avcodec/vp3: Check eob_run
Fixes: out of array access
Fixes: 5919/clusterfuzz-testcase-minimized-5859311382167552
Fixes: special case for theora (untested due to lack of sample)

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-11 03:04:48 +01:00
Michael Niedermayer 76cc0f0f67 avcodec/utvideodec: Add several out of array read related checks
Fixes: OV_decode_plane.avi

Found-by: GwanYeong Kim <gy741.kim@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-11 03:04:48 +01:00
Michael Niedermayer 66acb63028 avcodec/pafvideo: Check allocated frame size
Fixes: OOM
Fixes: 5549/clusterfuzz-testcase-minimized-5390553567985664

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-02-11 02:49:15 +01:00