Commit Graph

89560 Commits

Author SHA1 Message Date
Mark Thompson c5f3e85792 Changelog: add VAAPI VP8 decoder 2017-11-28 21:37:38 +00:00
Pan Bian f63450c8e4 avformat/mov: return correct value in mov_read_cmov
On some failure paths, the error code is not correctly set.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-28 21:42:48 +01:00
Pan Bian 3f81259f33 avformat/mov: set correct error code in mov_read_custom
In function mov_read_custom(), it returns 0 on the path that av_malloc()
returns a NULL pointer. 0 indicates success. An error code should be
assigned to ret.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-28 21:42:48 +01:00
Mark Reid 62f7f40caa avformat/mxfenc: pass MXFPackage around instead of type
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-28 21:42:48 +01:00
Pan Bian 89f9332fdf avcodec: set correct return value in ff_mpeg_ref_picture
In function ff_mpeg_ref_picture(), it returns 0 on the error path that
the return value of av_buffer_ref() is NULL. 0 indicates success, which
seems to deviate from the fact. Set ret to AVERROR(ENOMEM) to propagate
the error status to the callers.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-28 21:42:48 +01:00
Dale Curtis 96e3407608 Free extradata before reallocating.
Otherwise ff_alloc_extradata() just leaks any existing allocated
memory.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-28 21:42:48 +01:00
Gyan Doshi b3cb9bd43f avfilter/drawbox: rename variable for maximum thickness
The present value name for maximum thickness is 'max' which results in a
parse error of any thickness expression containing 'max(val1,val2)'.

Value renamed to 'fill'. Tested locally and documented.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-28 21:42:48 +01:00
Vittorio Giovara 99e9697e3a stereo3d: Support view type for frame sequence type
Implement detection in h264 and hevc and insertion in framepack filter.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-11-28 14:56:51 -05:00
Vittorio Giovara 45d7be7f93 prores: Always assume limited range
As defined by the specification.
2017-11-28 14:56:51 -05:00
Vittorio Giovara 002db7d49a vf_zscale: Add more supported input properties
Bump the minimum version necessary in the configure file.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-11-28 14:51:45 -05:00
Vittorio Giovara 3e0560b054 vf_zscale: Relax color properties maximum bounds
This simplifies adding new values, which are already validated elsewhere.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-11-28 13:55:47 -05:00
Vittorio Giovara 10db42f117 mov: Support mdcv and clli boxes for mastering display an color light level
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-11-28 12:40:40 -05:00
Vittorio Giovara 755207dc53 prores: Always assume limited range
As defined by the specification.
2017-11-28 12:40:40 -05:00
Aman Gupta b5d56d8ef1 avcodec/videotoolbox: fix SEGV when hwaccel decoding h264 with ffmpeg.c
Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-11-28 08:50:13 -08:00
Karthick J d5d2632e3a avformat/hlsenc: Fixed initial setting for end_pts
This patch fixes Bug #6868
Sometimes end_pts is getting initialized to audio stream's
first pts, while the duration is calculated based on video stream's pts.
In this patch the end_pts is initialized with the correct stream's first pts.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Tested-by: beloko
2017-11-28 20:03:15 +08:00
Anssi Hannula 143552095d avformat/hls: Obey AVProgram discard flags
Currently HLS demuxer only obeys AVStream discard flags but not
AVProgram (which bandwidth variants appear as) discard flags.

Fix that.
2017-11-28 12:47:42 +02:00
Anssi Hannula 1dff9adcb9 avformat/hls: Factor playlist need check to a common function 2017-11-28 12:30:31 +02:00
Rodger Combs 1204ce0b63 lavu/hwcontext_opencl.h: fix build on macOS 2017-11-28 00:23:42 -06:00
James Almer 5f67073b4c avformat/matroskaenc: add missing allocation failure checks for stream durations
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-28 01:23:23 -03:00
James Almer 9924f1bc34 avformat/matroskaenc: move some initialization checks to mkv_init
It's the correct place for them.

Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-27 23:24:34 -03:00
Pan Bian 2ba6d7cb82 ffmpeg: Check read_ffserver_streams() return value
The function avformat_alloc_context() will return a NULL pointer on
failure. However, in function read_ffserver_streams(), its return value
is not validated and the subsequent dereference may result in a bad
memory access bug. Check its return value against NULL and avoid
potential NULL dereference.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-28 01:18:22 +01:00
Pan Bian 5b4baf1506 libavformat/rtpenc_mpegts: check avformat_new_stream() return value
The function avformat_new_stream() returns a NULL pointer on failure.
However, in function rtp_mpegts_write_header(), its return value is not
validated before it is dereferenced. Check the return value against NULL
to avoid potential NULL dereference.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-28 01:18:22 +01:00
Paul B Mahol eb86f72fca avfilter/vf_threshold: use correct linesize
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-27 18:04:39 +01:00
James Almer 9d464dc3fc avformat/matroskaenc: actually enforce the stream limit
Prevents out of array accesses. Adressess ticket #6873

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-27 13:39:55 -03:00
Paul B Mahol 2d1594a8d6 avfilter/af_silenceremove: fix possible crash if supplied duration is negative
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-27 16:34:09 +01:00
Carl Eugen Hoyos b7324950c0 lavd/alsa: Double maximum alsa buffer size.
Fixes recording from ATI Wonder 600 USB adapter, regression since e35c674d.

Reported and analyzed by: Marco Paolieri, paolieri at gmail
2017-11-27 14:05:28 +01:00
Paul B Mahol 9152bda839 avfilter/af_silenceremove: fix logic error in EOF case
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-11-27 13:38:33 +01:00
Tobias Rapp 26c0c84784 avformat/avienc: fix fields-per-frame value for interlaced video streams
Writes one set of field framing information for progressive streams and
two sets for interlaced streams. Fixes ticket #6383.

Unfortunately the OpenDML v1.02 document is not very specific on what
value to use for start_line when frame data is not coming from a
capturing device, so this is just using 0/1 depending on the field order
as a best-effort guess.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2017-11-27 09:13:05 +01:00
Philip Langdale 0e93694e64 avcodec/nvdec: More effort to make vp8 compile with gcc < 4.6
I'm told my prefix work-around wasn't enough to make it compile,
although I'm not sure why; I did some basic testing and that
approach appeared to work, but I'm not in a position to do a
full compile on CentOS 6 so I can't be sure of anything.

I have had it confirmed that the additional change to not use
named initialisers is enough to make it compile, so let's
throw that into the mix too.
2017-11-26 22:21:12 -08:00
Philip Langdale b93d96a07b avcodec/nvdec: Make vp8 initialisation more 'compatible'
Ancient versions of gcc (pre 4.6) can't directly initialise
members of anonymous inner unions/structs by name.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676

Unfortunately, RHEL 6 shipped with one of these ancient
versions and so we're stuck with it until approximately the
heat death of the universe.

Putting explicit braces into the initialisation is possibly a
work-around but the behaviour there was never fully understood
before direct initialisation was made to work.

So, this may or may not work.
2017-11-26 20:52:38 -08:00
Michael Niedermayer 8e7ac4f049 tests/fate-run: Use -bitexact
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-27 03:31:54 +01:00
Michael Niedermayer 97c00edaa0 avcodec/mlpdsp: Fix signed integer overflow, 2nd try
The outputted bits should match what is used in the lossless check

Fixes: runtime error: signed integer overflow: -538697856 * 256 cannot be represented in type 'int'
Fixes: 4326/clusterfuzz-testcase-minimized-5689449645080576

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-27 03:31:54 +01:00
Michael Niedermayer 883de7e8b4 libavformat/mov: Replace duplicate stream_nb check by assert
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-27 03:31:54 +01:00
Michael Niedermayer 9cc926da7d avcodec/h264idct_template: Fix integer overflow in ff_h264_idct8_add
Fixes: signed integer overflow: 452986184 - -2113885312 cannot be represented in type 'int'
Fixes: 4196/clusterfuzz-testcase-minimized-5580648594014208

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-27 03:31:53 +01:00
Michael Niedermayer 3aad94bf2b avcodec/kgv1dec: Check that there is enough input for maximum RLE compression
Fixes: Timeout
Fixes: 4271/clusterfuzz-testcase-4676667768307712

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-27 03:31:53 +01:00
Michael Niedermayer 38f966b222 tests/checkasm/float_dsp: Increase allowed difference for float_dsp.vector_dmul
Tested for 10000 iterations on x86-32

Fixes: Ticket6848

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-27 03:31:53 +01:00
James Almer 1eee394c7c avcodec/vc1dec: fix preprocessor checks and hw_configs lists for the hwaccels
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-26 22:22:17 -03:00
James Almer 921d7af6e9 avcodec/mpeg4videodec: fix preprocessor check for the nvdec hwaccel
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-26 22:21:20 -03:00
Philip Langdale 1da9851e34 avcodec/nvdec: Implement vp8 hwaccel 2017-11-26 14:55:01 -08:00
Mark Thompson f69e9365f6 vaapi_decode: Ignore the profile when not useful
Enables VP8 decoding - the decoder places the the bitstream version
in the profile field, which we want to ignore.
2017-11-26 21:41:19 +00:00
Mark Thompson 40b75a943b vaapi: Add VP8 decode hwaccel 2017-11-26 21:41:19 +00:00
Mark Thompson 9f00fa5369 vp8: Add hwaccel hooks
Also adds some extra fields to the main context structure that may
be needed by a hwaccel decoder.

The current behaviour of the WebP decoder is maintained by adding an
additional field to the VP8 decoder private context to indicate that
it is actually being used as WebP (no hwaccel is supported for that
case).
2017-11-26 21:41:19 +00:00
Mark Thompson efd0612fdc vaapi: Make the decode profile matching more explicit
Also fixes a bug where it could attempt to decode with an unsupported
codec if allow-profile-mismatch was set.
2017-11-26 21:41:19 +00:00
Mark Thompson b0cd14fb1d ffmpeg: Use codec hardware config to configure hwaccels
Removes specific support for all hwaccels supported by the generic code
(DXVA2, D3D11VA, NVDEC, VAAPI and VDPAU).
2017-11-26 21:41:19 +00:00
Mark Thompson 3a71bcc213 lavc: Mark all AVHWAccel structures as const 2017-11-26 21:41:19 +00:00
Mark Thompson da4e02b196 lavc: Delete all fake hwaccels
They are now unused.
2017-11-26 21:41:14 +00:00
Mark Thompson 9bd326ac46 lavc: Remove register mechanism for hwaccels
There is no longer any need for a list of them at runtime, because
decoders now carry the pointers to their associated hwaccels internally.
The file containing external declarations is now used to make the list
of hwaccels for configure.
2017-11-26 21:36:34 +00:00
Mark Thompson 3536a3efb9 lavc: Deprecate av_hwaccel_next() and av_register_hwaccel() 2017-11-26 21:36:31 +00:00
Mark Thompson 67e81d79cc lavc: Use hardware config information in ff_get_format()
This removes the dependency that hardware pixel formats previously had on
AVHWAccel instances, meaning only those which actually do something need
exist after this patch.

Also updates avcodec_default_get_format() to be able to choose hardware
formats if either a matching device has been supplied or no additional
external configuration is required, and avcodec_get_hw_frames_parameters()
to use the hardware config rather than searching the old hwaccel list.

The FF_CODEC_CAP_HWACCEL_REQUIRE_CLASS mechanism is deleted because it
no longer does anything (the codec already contains the pointers to the
matching hwaccels).
2017-11-26 21:35:53 +00:00
Mark Thompson 758fbc54fe lavc: Add hardware config metadata for decoders supporting hardware output
This includes a pointer to the associated hwaccel for decoders using
hwaccels - these will be used later to implement the hwaccel setup
without needing a global list.

Also added is a new file listing all hwaccels as external declarations -
this will be used later to generate the hwaccel list at configure time.
2017-11-26 21:35:53 +00:00