Aurelien Jacobs
6fd110a094
aptx: implement the aptX HD bluetooth codec
2018-02-09 22:10:55 +01:00
Aurelien Jacobs
96b217f5e8
aptx: do some clipping to match original codec in extreme cases
2018-02-09 22:10:55 +01:00
Aurelien Jacobs
fea8e119a2
aptx: factorize FFABS calculation
2018-02-09 22:10:55 +01:00
Aurelien Jacobs
b7915f8a14
aptx: simplify by pre-calculating factor_max
2018-02-09 22:10:55 +01:00
Muhammad Faiz
5a2abf00f1
avcodec/codec_desc: sort codec_descriptors
...
Use bsearch on avcodec_descriptor_get().
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com >
2018-02-09 17:39:01 +07:00
Michael Niedermayer
08c220d26c
avcodec/huffyuvdec: Check input buffer size
...
Fixes: Timeout
Fixes: 5487/clusterfuzz-testcase-4696837035393024
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 >
2018-02-09 03:01:30 +01:00
Michael Niedermayer
ddd851f7cb
avcodec: Document that init_static_data() is not intended for time consuming operations.
...
Reviewed-by: Muhammad Faiz <mfcc64@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2018-02-08 04:42:40 +01:00
James Almer
36c85d6e77
api: add missing version bumps and APIChanges entries
...
avcodec bump missed in 7e8eba2d87
avformat bump missed in ff46124b0d and
0694d87024
avdevice bump missed in 0fd475704e
Signed-off-by: James Almer <jamrial@gmail.com >
2018-02-06 23:43:01 -03:00
Jérôme Martinez
698d5eb5bf
avcodec/ffv1: Support for RGBA64 and GBRAP16
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2018-02-06 23:07:10 +01:00
Menno
204c7caf0d
avcodec/libopus: support disabling phase inversion.
...
Signed-off-by: Menno <mrdegier@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2018-02-06 23:07:10 +01:00
Josh de Kock
26d879c1ce
lavc/bsf: make BSF iteration the same as other iterators
2018-02-06 18:57:43 +00:00
Josh de Kock
7e8eba2d87
lavc: add new API for iterating codecs and codec parsers
...
Based on an unfinished patch by atomnuker.
2018-02-06 18:50:27 +00:00
Muhammad Faiz
caa4bd7a9f
avcodec/me_cmp: remove ff_me_cmp_init_static()
...
Precalculate and constify ff_square_tab.
Reviewed-by: James Almer <jamrial@gmail.com >
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com >
2018-02-05 22:42:59 +07:00
Michael Niedermayer
118e1b0b33
avcodec/utvideodec: Fix bytes left check in decode_frame()
...
Fixes: out of array read
Fixes: poc-2017.avi
Found-by: GwanYeong Kim <gy741.kim@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2018-02-05 02:54:02 +01:00
Muhammad Faiz
3caecf7ce8
avcodec: do not use init_static_data on some codecs
...
They don't modify AVCodec, no needs to call it at register. They will be
wasteful if these codecs are unused. Instead, call static data initialization
at codecs' init.
Benchmark:
old: 51281340 decicycles in avcodec_register_all, 1 runs, 0 skips
new: 6738960 decicycles in avcodec_register_all, 1 runs, 0 skips
Reviewed-by: wm4 <nfxjfg@googlemail.com >
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com >
2018-02-04 06:11:07 +07:00
Michael Niedermayer
8e50bd61e4
avcodec/wavpack: Fix integer overflow in FFABS
...
Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
Fixes: 5396/clusterfuzz-testcase-minimized-6558555529281536
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-03 21:37:19 +01:00
Jérôme Martinez
e3d946b3f4
avcodec/ffv1enc: mark RGB48 support as non-experimental
...
Remove the 2nd mark, 1st mark was removed in 58e16a4
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2018-02-03 00:22:47 +01:00
Calvin Walton
108958e43d
librsvgdec: Fix frame clearing code
...
The existing code attempts to clear the frame by painting in OVER
mode with transparent black - which is a no-op. As a result if you
have many input frames (e.g. you're using a sequence of svg files),
you'll start to see new frames drawn over old frames as memory gets
re-used.
Switch the code to paint using the CLEAR compositing operator,
which fills every channel with 0 values (setting a source colour
is not required).
2018-02-02 15:36:21 +00:00
Michael Niedermayer
b1bef755f6
avcodec/aacsbr_fixed: Fix overflows in rounding in sbr_hf_assemble()
...
Fixes: runtime error: signed integer overflow: 2052929346 + 204817098 cannot be represented in type 'int'
Fixes: 5275/clusterfuzz-testcase-minimized-5367635958038528
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-02 00:18:24 +01:00
Michael Niedermayer
0a2560a977
avcodec/exr: Fix memleaks in decode_header()
...
Fixes: 4793/clusterfuzz-testcase-minimized-5707366629638144
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-02 00:18:24 +01:00
Rostislav Pehlivanov
61a4ee8ab4
avcodec/vc2enc: prevent bitrate overshoots
...
The rounding caused by the size scaler wasn't compensated for and the
slice sizes grew beyond what is allowed per frame.
Signed-off-by: Rostislav Pehlivanov <rpehlivanov@obe.tv >
2018-01-31 17:29:45 +01:00
Michael Niedermayer
fe1e6c06d0
avcodec/dirac_dwt: Fix several integer overflows
...
Fixes: runtime error: signed integer overflow: -2146071175 + -268479557 cannot be represented in type 'int'
Fixes: 5237/clusterfuzz-testcase-minimized-4569895275593728
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2018-01-30 22:08:32 +01:00
Michael Niedermayer
2ff9f17851
avcodec/indeo5: Do not leave frame_type set to an invalid value
...
Fixes: null pointer dereference
Fixes: 5264/clusterfuzz-testcase-minimized-4621956621008896
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2018-01-30 22:08:32 +01:00
Michael Niedermayer
4a75a75c62
avcodec/hevc_ps: Check log2_sao_offset_scale_*
...
Fixes: 4868/clusterfuzz-testcase-minimized-6236542906400768
Fixes: runtime error: shift exponent 126 is too large for 32-bit 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 >
2018-01-30 22:08:32 +01:00
James Almer
782e066e3e
avcodec/mediacodecdec: use ff_hevc_ps_uninit()
...
Fixes memleaks.
Signed-off-by: James Almer <jamrial@gmail.com >
2018-01-30 13:15:44 -03:00
James Almer
222d7055e2
avcodec/hevc_parser: use ff_hevc_decode_extradata() to parse extradata
...
Signed-off-by: James Almer <jamrial@gmail.com >
2018-01-30 12:13:20 -03:00
Dale Curtis
42323c3e3a
avcodec/mpegaudio_parser: Skip APE tags when parsing mp3 packets.
...
Otherwise the decoder will throw "Missing header" errors when the
packets are sent for decoding.
This is similar to 89a420b71b .
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2018-01-30 05:28:22 +01:00
James Almer
0cc3d830d1
avcodec/Makefile: add missing opus.c dependency to opus encoder
...
Needed for ff_celt_quant_bands and ff_celt_bitalloc.
Signed-off-by: James Almer <jamrial@gmail.com >
2018-01-30 00:32:27 -03:00
James Almer
ede6e7494f
avcodec/mlp_parser: reindent after last commit
...
Signed-off-by: James Almer <jamrial@gmail.com >
2018-01-29 23:09:23 -03:00
James Almer
55ebf707d0
avcodec/mlp_parser: don't try to combine frames when full frames are provided
...
Attempting full frame reconstruction is unnecessary for non raw
containers, so just skip it altogether.
Signed-off-by: James Almer <jamrial@gmail.com >
2018-01-29 23:09:22 -03:00
Michael Niedermayer
d4967c04e0
avcodec/mpeg4videodec: Avoid possibly aliasing violating casts
...
Found-by: kierank
Reviewed-by: Kieran Kunhya <kieran618@googlemail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2018-01-29 04:11:28 +01:00
Michael Niedermayer
4a94ff4ccd
avcodec/get_bits: Document the return code of get_vlc2()
...
Found-by: kierank
Reviewed-by: Kieran Kunhya <kieran618@googlemail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2018-01-29 04:11:28 +01:00
Michael Niedermayer
05f4703a16
avcodec/mpeg4videodec: Check mb_num also against 0
...
The spec implies that 0 is invalid in addition to the existing checks
Found-by: <kierank>
Reviewed-by: Kieran Kunhya <kieran618@googlemail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2018-01-29 04:11:28 +01:00
Martin Vignali
8f9c38b196
avcodec/utvideoenc : add SIMD (avx) for sub_left_prediction
...
asm code by Henrik Gramner
2018-01-28 20:23:11 +01:00
Timo Rothenpieler
932037c6bb
avcodec/nvenc: also clear data pointer after unregistering a resource
...
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org >
2018-01-28 13:05:09 +01:00
Timo Rothenpieler
48e52e4edd
avcodec/nvenc: add some more error case checks
...
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org >
2018-01-28 12:56:31 +01:00
Timo Rothenpieler
32bc4e77f6
avcodec/nvenc: unregister input resource when unmapping
...
Currently the resource is only ever unregistered when the
registered_frames array is fully in use and an unmapped entry is re-used
and cleaned up.
I'm pretty sure the frame will have been cleaned up before that happens,
so I'm kinda surprised this never blew up.
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org >
2018-01-28 12:39:06 +01:00
Timo Rothenpieler
bbe1b21022
avcodec/nvenc: refcount input frame mappings
...
If some logic like vsync in ffmpeg.c duplicates frames, it might pass
the same frame twice, which will result in a crash due it being
effectively mapped and unmapped twice.
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org >
2018-01-28 12:29:24 +01:00
Michael Niedermayer
a026a3efae
avcodec/hevc_cabac: Check prefix so as to avoid invalid shifts in coeff_abs_level_remaining_decode()
...
I suspect that this can be limited tighter, but i failed to find anything
in the spec that would confirm that.
Fixes: 4833/clusterfuzz-testcase-minimized-5302840101699584
Fixes: runtime error: left shift of 134217730 by 4 places 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 >
2018-01-27 04:29:30 +01:00
Michael Niedermayer
1bfc1aa004
avcodec/mjpegdec: Fix integer overflow in DC dequantization
...
Fixes: runtime error: signed integer overflow: -65535 * 65312 cannot be represented in type 'int'
Fixes: 4900/clusterfuzz-testcase-minimized-5769019744321536
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2018-01-27 04:29:30 +01:00
Rodger Combs
7723750475
lavc/aarch64/sbrdsp_neon: fix build on old binutils
2018-01-26 02:42:01 -06:00
Mark Thompson
04e4ab44d7
Merge commit '559370f2c45110afd8308eec7194437736c323d4'
...
* commit '559370f2c45110afd8308eec7194437736c323d4':
qsv: Skip the packet if decoding failure
Merged-by: Mark Thompson <sw@jkqxz.net >
2018-01-25 22:50:38 +00:00
Ruiling, Song
559370f2c4
qsv: Skip the packet if decoding failure
...
MediaSDK may fail to decode some frame, just skip it.
Otherwise, it will keep decoding the failure packet repeatedly
without processing any packet afterwards.
Signed-off-by: Ruiling Song <ruiling.song@intel.com >
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2018-01-25 11:13:34 +01:00
Michael Niedermayer
6e1a167c55
avcodec/dxtory: Fix bits left checks
...
Fixes: Timeout
Fixes: 4863/clusterfuzz-testcase-6347354178322432
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2018-01-23 21:48:31 +01:00
Michael Niedermayer
94d4237a7a
avcodec/hevc_cabac: Move prefix check in coeff_abs_level_remaining_decode() down
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2018-01-23 21:48:31 +01:00
Jorge Ramirez-Ortiz
9b1ec24835
avcodec: v4l2_context: remove unnecessary code
...
Fixes CID 1418358
Signed-off-by: Jorge Ramirez-Ortiz <jramirez@baylibre.com >
2018-01-23 09:56:08 +01:00
Mark Thompson
2e96f52780
v4l2_m2m: Fix integer overflow in timestamp handling
2018-01-22 17:24:36 +01:00
James Almer
388a0f7869
avcodec/mpeg12dec: fix preprocessor check for mpeg1_nvdec hwaccel
...
Signed-off-by: James Almer <jamrial@gmail.com >
2018-01-21 22:57:41 -03:00
Mark Thompson
bda5ad305e
v4l2_m2m: Fix free of the wrong pointer in an error path
...
Fixes CIDs #1427821 and #1427822 .
2018-01-21 23:02:16 +00:00
Michael Niedermayer
56a53340ed
avcodec/truemotion2: Fix integer overflow in TM2_RECALC_BLOCK()
...
Fixes: signed integer overflow: 1477974040 - -1877995504 cannot be represented in type 'int'
Fixes: 4861/clusterfuzz-testcase-minimized-4570316383715328
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2018-01-21 22:51:49 +01:00