Marton Balint [Tue, 19 Dec 2017 22:49:41 +0000 (23:49 +0100)]
avfilter/vf_framerate: simplify filter
The framerate filter was quite convoluted with some filter_frame /
request_frame logic bugs. It seemed easier to rewrite the whole filter_frame /
request_frame part and also the frame interpolation ratio calculation part in
one step.
Notable changes:
- The filter now only stores 2 frames instead of 3
- filter_frame outputs all the frames it can to be able to handle consecutive
filter_frame calls which previously caused early drops of buffered frames.
- because of this, request_frame is largely simplified and it only outputs
frames on flush. Previously consecuitve request_frame calls could cause the
filter to think it is in flush mode filling its buffer with the same frames
causing a "ghost" effect on the output.
- PTS discontinuities are handled better
- frames with unknown PTS values are now dropped
Jérôme Martinez [Fri, 5 Jan 2018 10:09:01 +0000 (11:09 +0100)]
avcodec/ffv1enc: mark RGB48 support as non-experimental
Resulting bitstream was tested with a conformance checker
using the last draft of FFV1 specifications.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Also the files are already in the wild, and decoder support is
thus needed. And with decoders widely supporting it, there is no
advantage in not allowing it in the encoder.
The exact bitstream format may change in future versions of the
spec, if improvments are found.
Jörn Heusipp [Thu, 11 Jan 2018 08:11:30 +0000 (09:11 +0100)]
avformat/libopenmpt: Update to libopenmpt 0.3 API
libopenmpt 0.3 deprecates openmpt_module_create_from_memory() and
provides a replacement function openmpt_module_create_from_memory2().
Detecting libopenmpt 0.3 can be done at build time via the API
version macros provided by libopenmpt. libopenmpt 0.2 did not provide
all required macros, however libopenmpt documents the required #define
shims that can be safely added for libopenmpt 0.2.
Using openmpt_module_create_from_memory2() instead of
openmpt_module_create_from_memory() avoids the deprecation warning
when building ffmpeg with libopenmpt 0.3.
openmpt_module_create_from_memory2() provides more fine-grained error
reporting and in particular allows distinguishing out-of-memory from
input file parsing errors. Return appropriate ffmpeg errors
accordingly.
libopenmpt 0.3 is ABI and API compatible with applications built
against libopenmpt 0.2. Building ffmpeg with libopenmpt 0.2 is still
supported.
Signed-off-by: Jörn Heusipp <osmanx@problemloesungsmaschine.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
James Almer [Sun, 7 Jan 2018 03:45:37 +0000 (00:45 -0300)]
avcodec: increase AV_INPUT_BUFFER_PADDING_SIZE to 64
AVX-512 support has been introduced, and even if no functions currently
use zmm registers (able to load as much as 64 bytes of consecutive data
per instruction), they will be added eventually.
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Tested-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
Apple's AIFF protocol clearly states that each chucnk which is odd sized a padding should be added.
In the old version of aiffdec adding of padding was done in `get_meta`. And in case of unknown chunk name it was done in defalut case.
The new version has deleted the padding in default case and added padding adding after the switch.
But the new version didn't removed the padding adding in the `get_meta` function so in some cases padding was added twice which leaded to a bug.
Fixes: sample.aiff Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
James Almer [Sun, 7 Jan 2018 20:58:33 +0000 (17:58 -0300)]
configure: don't use SDL.h in check_func_headers when checking for SDL2
check_func_headers() defines a main() function, which clashes with a
redefinition done by said SDL header. Check for SDL_PollEvent using
SDL_events.h only instead, where the redefinition doesn't happen.
James Almer [Thu, 4 Jan 2018 18:35:59 +0000 (15:35 -0300)]
avresample: remove deprecated attribute from the AVAudioResampleContext struct
Having all the public functions marked as deprecated is enough.
This gets rid of a warning spam when compiling any file including
libavresample/avresample.h even when avresample is not enabled, like
it's the case with fftools/cmdutils.c
Fixes: signed integer overflow: 512 + 2147483491 cannot be represented in type 'int' Fixes: 4780/clusterfuzz-testcase-minimized-4709066174627840 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
avcodec/dirac_dwt: Fix overflows in COMPOSE_HAARiH0/COMPOSE_HAARiL0
Fixes: 4830/clusterfuzz-testcase-minimized-5255392054476800 Fixes: signed integer overflow: 2147483646 - -7 cannot be represented in type 'int' Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Fixes: signed integer overflow: 2 + 2147483646 cannot be represented in type 'int' Fixes: 4792/clusterfuzz-testcase-minimized-6322450775146496 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
avcodec/jpeg2000dsp: Fix integer overflows in ict_int()
Fixes: signed integer overflow: 46802 * -71230 cannot be represented in type 'int' Fixes: 4756/clusterfuzz-testcase-minimized-4812495563784192 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
avcodec/h264_slice: Do not attempt to render into frames already output
Fixes: null pointer dereference Fixes: 4698/clusterfuzz-testcase-minimized-5096956322906112
This testcase does not reproduce the issue before 03b82b3ab9883cef017e513c7d0b3b986b3b3e7b
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Aman Gupta [Fri, 29 Dec 2017 01:33:14 +0000 (17:33 -0800)]
lavc/mediacodecdec: switch to new decoding API
Using the new API gives the decoder the ability to produce
N frames per input packet. This is particularly useful with
mpeg2 decoders on some android devices, which automatically
deinterlace video and produce one frame per field.
Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
LongChair [Sat, 6 Jan 2018 08:36:58 +0000 (09:36 +0100)]
avcodec/rkmpp : Fix broken build due to missing control operation
This patch is taking care of https://trac.ffmpeg.org/ticket/6834.
It seems that one of the control operations that was available to get
the free decoders input slots was removed.
There is another control operation to retrieve the used slots. Given
that the input slot count is hardcoded to 4 in mpp at this point,
replacing the old control operation by the other one.
James Almer [Tue, 10 Oct 2017 00:07:31 +0000 (21:07 -0300)]
fate: add PERSIST_RPARAM_A_RExt_Sony_3 hevc conformance test
The PERSIST_RPARAM_A_RExt_Sony_1 bitstream has an out-of-range value
and has therefore been superseded.
It is otherwise identical, and decodes the same.
Fixes: signed integer overflow: 1024 + 2147483640 cannot be represented in type 'int' Fixes: 4671/clusterfuzz-testcase-minimized-6027464343027712 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Misty De Meo [Wed, 3 Jan 2018 08:14:22 +0000 (19:14 +1100)]
aiff: add support for XA ADPCM
Certain AIFF files encode XA ADPCM compressed audio using a chunk
with the tag `APCM`. Aside from this custom chunk type, they're
otherwise standard AIFF files. I've only observed these files in the
Sega Saturn game Sonic Jam so far.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
wm4 [Thu, 4 Jan 2018 16:06:52 +0000 (17:06 +0100)]
http: avoid logging reconnect warning if stream was aborted
If the stream was aborted using the libavformat interrupt callback, we
don't want it to log the reconnect warning. (Exiting after logging this
warning worked well, so this is only for avoiding the ugly warning.)
libavutil/hwcontext_dxva2: Add check for possible errors from GetAdapterDisplayModeEx
This prevents a possible crash in CreateDeviceEx when using faulty
response from GetAdapterDisplayModeEx and allows ffmpeg to fallback to
classic d3d9.