Paul B Mahol
d19fdc83b3
avfilter/vf_colorbalance: add option to preserve lightness
2019-11-13 13:07:42 +01:00
Limin Wang
09afddf04e
avformat/hlsenc: free the original malloc pointer to avoid error when system function used in the following patch
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
2019-11-13 17:01:34 +08:00
Steven Liu
4e0860e363
avformat/hls: continue to play enabled playlist when have failed playlist
...
fix ticket: 7811
Signed-off-by: Steven Liu <lq@chinaffmpeg.org >
2019-11-13 16:40:09 +08:00
James Almer
cc61466058
avformat: add an AV1 Annex B demuxer
...
Signed-off-by: James Almer <jamrial@gmail.com >
2019-11-12 22:21:51 -03:00
James Almer
97d9cff251
avcodec/libdav1d: export bitstream timing info when available
...
Signed-off-by: James Almer <jamrial@gmail.com >
2019-11-12 22:21:45 -03:00
James Almer
0b8742521f
avcodec/av1_parser: export bitstream timing info when available
...
Based on h264_parser code.
Signed-off-by: James Almer <jamrial@gmail.com >
2019-11-12 22:21:40 -03:00
James Almer
72ec3358f4
avcodec: add an AV1 frame merge bitstream filter
...
This BSF takes Temporal Units split across different AVPackets and merges them
by looking for Temporal Delimiter OBUs.
Signed-off-by: James Almer <jamrial@gmail.com >
2019-11-12 22:21:25 -03:00
James Almer
245cbab556
avcodec/cbs_av1: support one byte long OBUs when the size is not set in the bitstream
...
This will be needed by the next commit, where packets with a single Temporal
Delimiter OBU with no size will need to be parsed
Signed-off-by: James Almer <jamrial@gmail.com >
2019-11-12 22:04:29 -03:00
Paul B Mahol
08c46e40fb
avfilter/vF_colorbalance: rewrite, fixes filtering
2019-11-13 00:22:13 +01:00
Zhao Zhili
20c5f4d835
avutil/frame: fix remove_side_data
...
remove_side_data is supposed to remove a single instance by design.
Since new_side_data() doesn't forbid add multiple instances of the
same type, remove_side_data should deal with that.
Signed-off-by: Marton Balint <cus@passwd.hu >
2019-11-11 22:15:45 +01:00
Aman Gupta
0e49560806
avcodec/arm/mlpdsp: add missing dependency for truehd
...
Signed-off-by: Aman Gupta <aman@tmm1.net >
2019-11-11 11:29:55 -08:00
Limin Wang
72915ca8ba
avformat/mp3dec: replace SAME_HEADER_MASK with MP3_MASK
...
mp3 header bitstream syntax:
header()
{
syncword 12bits bslsf
id 1bit bslsf
layer 2bit bslsf
protection_bit 1bit bslsf
bitrate_index 4bits bslsf
sampling_frequency 2bits bslsf
padding_bit 1bit bslsf
private_bit 1bit bslsf
mode 2bits bslsf
mode_extension 2bits bslsf
copyright 1bit bslsf
original/home 1bit bslsf
emphasis 2bits bslsf
}
if the header is masking with MP3_MASK(0xFFFE0CCF), below fields will be cleared:
protection_bit, bitrate_index, sampling_freqency, mode
with SAME_HEADER_MASK(0xFFFE0C00), extra below fields will be cleared which didn't make
sense:
mode_extension, copyright, original/home, emphasis
As the MP3_MASK is good for same mp3 header masking and is defined in the
header, so it's preferable to remove SAME_HEADER_MASK to keep the masking same.
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-11 20:13:36 +01:00
Limin Wang
529145168b
avformat/mp3dec: cosmetics
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-11 20:13:36 +01:00
Andreas Rheinhardt
b25b6432a7
avcodec/dvdec: Don't use restrict directly to fix build on MSVC
...
004ebd4b
added a function with a parameter that was declared as restrict
and not av_restrict. This is not supported by MSVC as several FATE-boxes
that now fail to build show. So use av_restrict.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
Tested-by: Matthias Troffaes <matthias.troffaes@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-11 14:51:09 +01:00
Limin Wang
66ac7775f7
tests/fate/filter-video: add test for colorlevels
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-11 14:51:09 +01:00
James Almer
3a84081cbd
avcodec/librav1e: free the RaPacket after using it
...
Fixes leaks.
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
2019-11-10 22:31:42 -03:00
Derek Buitenhuis
d8bf24459b
avcodec: Add librav1e encoder
...
Port to the new send/receive API by: James Almer <jamrial@gmail.com >.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com >
2019-11-10 13:55:39 +00:00
Michael Niedermayer
0f89a2293e
avcodec/wmaprodec: get frame during frame decode
...
Fixes: memleak
Fixes: 17615/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA2_fuzzer-5681306024804352
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 >
2019-11-09 18:17:25 +01:00
Michael Niedermayer
10eabb8e40
avcodec/interplayacm: Fix overflow of last unused value
...
Fixes: signed integer overflow: -2147450880 - 65535 cannot be represented in type 'int'
Fixes: 18393/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INTERPLAY_ACM_fuzzer-5667520110919680
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 18:03:38 +01:00
Michael Niedermayer
7786f6c30e
avcodec/adpcm: Fix undefined behavior with negative predictions in IMA OKI
...
Fixes: left shift of negative value -30
Fixes: 18392/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_IMA_OKI_fuzzer-5631771831435264
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 18:03:37 +01:00
Michael Niedermayer
1c63edcdd2
avcodec/cook: Move up and extend block_align check
...
Fixes: signed integer overflow: 2046820356 * 8 cannot be represented in type 'int'
Fixes: 18391/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COOK_fuzzer-5631674666188800
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 18:02:00 +01:00
Michael Niedermayer
00e469fb61
avcodec/sbcdec: Fix integer overflows in sbc_synthesize_four()
...
Fixes: signed integer overflow: 1494495519 + 1494495519 cannot be represented in type 'int'
Fixes: 18347/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SBC_fuzzer-5711714661695488
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 17:59:32 +01:00
Michael Niedermayer
97f778e9c5
avcodec/twinvq: Check block_align
...
Fixes: signed integer overflow: 538976288 * 8 cannot be represented in type 'int'
Fixes: 18348/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_METASOUND_fuzzer-6681325716635648
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 17:59:03 +01:00
Michael Niedermayer
50001cd440
avcodec/cook: Enlarge gain table
...
Fixes: index 25 out of bounds for type 'float [23]'
Fixes: 18355/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COOK_fuzzer-5641398941908992
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 17:55:09 +01:00
Michael Niedermayer
57750bb629
avcodec/cook: Check samples_per_channel earlier
...
Fixes: division by zero
Fixes: 18362/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COOK_fuzzer-5653727679086592
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 17:55:07 +01:00
Michael Niedermayer
de5102fd92
avcodec/atrac3plus: Check split point in fill mode 3
...
Fixes: index 32 out of bounds for type 'int [32]'
Fixes: 18350/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ATRAC3P_fuzzer-5643794862571520
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 17:54:59 +01:00
Michael Niedermayer
55c97a7637
avcodec/wmavoice: Check sample_rate
...
Fixes: left shift of 538976288 by 8 places cannot be represented in type 'int'
Fixes: 18376/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAVOICE_fuzzer-5741645391200256
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 17:27:20 +01:00
Michael Niedermayer
9ea9973959
avcodec/xsubdec: fix overflow in alpha handling
...
Fixes: left shift of 255 by 24 places cannot be represented in type 'int'
Fixes: 18368/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XSUB_fuzzer-5702665442426880
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 17:27:19 +01:00
Michael Niedermayer
32b3c8ce7d
avcodec/iff: Check available space before entering loop in decode_long_vertical_delta2() / decode_long_vertical_delta()
...
Fixes: Timeout (31sec -> 41ms)
Fixes: 18380/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5645210121404416
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 17:26:28 +01:00
Michael Niedermayer
1c038c5c63
avcodec/apedec: Fix integer overflow in filter_3800()
...
Fixes: signed integer overflow: 2117181180 + 60483298 cannot be represented in type 'int'
Fixes: 18344/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5685327791915008
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 17:26:09 +01:00
Michael Niedermayer
be78999266
avcodec/atrac3plusdec: add FF_CODEC_CAP_INIT_CLEANUP
...
Fixes: memleaks
Fixes: 18332/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ATRAC3P_fuzzer-5655654374572032
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 17:21:36 +01:00
Michael Niedermayer
d6fea2ef22
avutil/lfg: Document the AVLFG struct
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 16:10:02 +01:00
Michael Niedermayer
20fad71247
avcodec/decode: Also consider channels in max_samples check
...
Fixes: Timeout (109sec -> 0.6sec)
Fixes: 18309/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INTERPLAY_ACM_fuzzer-6226598168100864
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 16:06:32 +01:00
Michael Niedermayer
17603094d5
avcodec/rasc: Check input size in decode_fint()
...
Fixes: Timeout (11sec -> 42ms)
Fixes: 18287/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-5637866331308032
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 16:02:43 +01:00
Michael Niedermayer
df498cf544
avcodec/ffv1dec: Use a different error message for the slice level CRC
...
This way they can be told apart easily
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 16:02:43 +01:00
Michael Niedermayer
1d1719a44d
avcodec/apedec: Fix undefined integer overflow in long_filter_ehigh_3830()
...
Fixes: signed integer overflow: -1094995529 * 2 cannot be represented in type 'int'
Fixes: 18281/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5692589180715008
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 16:01:47 +01:00
Michael Niedermayer
14d3384cf3
avformat/flvenc: Check pts for mpeg4/h264 (which need the value)
...
Fixes: Ticket8152
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 15:59:38 +01:00
Michael Niedermayer
0c3e1b395b
avcodec/dstdec: Check that AC probabilities are within range
...
ISO/IEC 14496-3:2005(E): "Each entry of P_one[ ][ ] is in the range of 1 to
128, corresponding to a probability of 1/256 to 128/256 of the next error bit (bit E, See Figure 10.5)..."
Fixes: Timeout (42sec ->1sec)
Fixes: 18181/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DST_fuzzer-5736646250594304
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 15:57:34 +01:00
Michael Niedermayer
03ea8d8cd4
avcodec/dstdec: Check read_table() for failure
...
Fixes: Timeout (too long -> 42sec)
Fixes: 18181/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DST_fuzzer-5736646250594304
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 15:57:33 +01:00
Michael Niedermayer
2a8785966c
avcodec/vc1_block: Check input in the block decode loops
...
Fixes: Timeout (196sec -> 2sec)
Fixes: 18026/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1_fuzzer-5640941108461568
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 15:31:06 +01:00
Michael Niedermayer
947732c56d
avcodec/vc1_block: Check for end of bitstream at the top of vc1_decode_i_blocks_adv()
...
Fixes: Timeout (147sec -> 2sec)
Fixes: 17704/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5723851098423296
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 15:25:32 +01:00
Michael Niedermayer
de1d3b0925
tools/target_dec_fuzzer: Adjust threshold for smacker
...
Fixes: Timeout (65sec -> 0.5sec)
Fixes: 18072/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKER_fuzzer-5722709366931456
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 15:23:06 +01:00
Michael Niedermayer
07519f363b
avcodec/hqx: Check the input data against the image size
...
Fixes: Timeout (22 -> 100 ms)
Fixes: 15173/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQX_fuzzer-5662556846292992
Fixes: 17896/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQX_fuzzer-5679312077848576
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 15:20:30 +01:00
Michael Niedermayer
859362a6f0
avcodec/pafvideo: Only clear frame when it was written to
...
This avoids unneeded operations and makes the code faster.
Fixes: Timeout
Fixes: 15724/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAF_VIDEO_fuzzer-5750842205929472 (12sec -> 9sec)
Fixes: 17625/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAF_VIDEO_fuzzer-5640515311108096 (16sec -> 4sec)
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 14:13:34 +01:00
Michael Niedermayer
114ddf6430
avformat/vividas: Fix n_sb_blocks Check
...
Fixes: signed integer overflow: 1540265776 * 2 cannot be represented in type 'int'
Fixes: 18160/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5758808818712576
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 13:46:21 +01:00
Michael Niedermayer
55279d699f
avcodec/snowenc: Set mb_num to avoid ratecontrol floating point divisions by 0.0
...
Fixes: Ticket7990
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 13:46:20 +01:00
Michael Niedermayer
8802e329c8
avcodec/snowenc: Fix 2 undefined shifts
...
Fixes: Ticket7990
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-11-09 13:46:19 +01:00
Steven Liu
bb190ded67
avformat/mlvdec:drop unnecessary check before ff_format_io_close
...
Reviewed-by: Linjie Fu <linjie.fu@intel.com >
Reviewed-by: Jun Zhao <barryjzhao@tencent.com >
Signed-off-by: Steven Liu <lq@chinaffmpeg.org >
2019-11-09 11:27:14 +09:00
James Zern
a605e9ad1e
avcodec/libvpxenc,cosmetics: fix a typo
...
predicition -> prediction
2019-11-08 17:48:29 -08:00
James Zern
a6be42a733
avcodec/libvpxdec.c,cosmetics: bpp -> bpc
...
Signed-off-by: James Zern <jzern@google.com >
2019-11-08 17:42:42 -08:00