summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
...
* lavc/qsvenc: expose low_power as a common option for QSV encoderLinjie Fu2019-04-01
| | | | | | | | Always exposes low_power option for all qsv encoder, and reports a warning if VDENC is not supported in current version of MSDK. Signed-off-by: Linjie Fu <linjie.fu@intel.com> Signed-off-by: Zhong Li <zhong.li@intel.com>
* avcodec/rscc: Check that the to be uncompressed input is large enoughMichael Niedermayer2019-04-01
| | | | | | | | | Fixes: Out of array access Fixes: 13984/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RSCC_fuzzer-5734128093233152 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>
* x86/opusdsp: implement FMA3 accelerated postfilter and deemphasisLynne2019-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | 58893 decicycles in deemphasis_c, 130548 runs, 524 skips 9475 decicycles in deemphasis_fma3, 130686 runs, 386 skips -> 6.21x speedup 24866 decicycles in postfilter_c, 65386 runs, 150 skips 5268 decicycles in postfilter_fma3, 65505 runs, 31 skips -> 4.72x speedup Total decoder speedup: ~14% Deemphasis SIMD based on the following unrolling: const float c1 = CELT_EMPH_COEFF, c2 = c1*c1, c3 = c2*c1, c4 = c3*c1; float state = coeff; for (int i = 0; i < len; i += 4) { y[0] = x[0] + c1*state; y[1] = x[1] + c2*state + c1*x[0]; y[2] = x[2] + c3*state + c1*x[1] + c2*x[0]; y[3] = x[3] + c4*state + c1*x[2] + c2*x[1] + c3*x[0]; state = y[3]; y += 4; x += 4; }
* opusdsp: create and move deemphasis and postfiltering from opus_celtLynne2019-04-01
|
* celt_pvq_init: only build when CONFIG_OPUS_ENCODER is enabledLynne2019-03-31
| | | | The entire function was defined away before.
* x86/opus_dsp: rename to celt_pvqLynne2019-03-31
| | | | Its only used in the encoder and in CELT's PVQ.
* avcodec/ivi: Reduce dereferencing structs in inner loop of ↵Michael Niedermayer2019-03-31
| | | | | | | | | | ivi_process_empty_tile() This speeds the code up by about 15% Testcase: 13779/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO4_fuzzer-5699589711069184 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ivi: Mark band parameter as constMichael Niedermayer2019-03-31
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ivi: fix indention for previous commitMichael Niedermayer2019-03-31
|
* avcodec/ivi: Factor ref_mb check outMichael Niedermayer2019-03-31
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/proresdec2: decode picture header before frame allocationMichael Niedermayer2019-03-31
| | | | | | | | Fixes: Timeout (21sec -> 0.3sec) Fixes: 13716/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PRORES_fuzzer-5755593333145600 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/tiff: Multi-page supportNick Renieris2019-03-31
| | | | | | Option "-page N" (page index N starts from 1) can now be used to specify which TIFF page/subfile to decode. Signed-off-by: Nick Renieris <velocityra@gmail.com>
* avcodec: add Amuse Graphics decoderPaul B Mahol2019-03-31
| | | | This work is sponsored by VideoLAN.
* avcodec/cuviddec: Remove unnecessary stream synchronisationPhilip Langdale2019-03-30
| | | | | | | | We're also doing a sync here after copying the frame to be passed on down the pipleine. And it is also unnecessary. I was able to demonstrate a 33% speedup removing the sync from an example transcode pipeline.
* avcodec/libaomenc: fix default value for row-mt optionJames Almer2019-03-29
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libaomenc: Added more commandline optionsSam John via ffmpeg-devel2019-03-29
| | | | | | | | | | | The following are the newly added options: arnr_max_frames, arnr_strength, aq_mode, denoise_noise_level, denoise_block_size, rc_undershoot_pct, rc_overshoot_pct, minsection_pct, maxsection_pct, frame_parallel, enable_cdef, enable_global_motion, and intrabc. Also added macros for compiling for aom 1.0.0 and fixed the default values. Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/qsvenc: fix hevc vps extradata issuesZhong Li2019-03-29
| | | | | | | | | | | | | cbs trace qsv vps header failed due to some reasons: 1. vps_temporal_id_nesting_flag is not set but spec required it must to be 1 when vps_max_sub_layers_minus1 is equal to 0. 2. vps_num_hrd_parameters is not set and written. 3. other issues in ff_hevc_encode_nal_vps() (fixed in pervious commit_id: 520226b683). Reproduce: ffmpeg -hwaccel qsv -v verbose -c:v h264_qsv -i bbb_sunflower_1080p_30fps_normal.mp4 -vframes 1 -c:v hevc_qsv -bsf:v trace_headers -f null - Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavc/hevc_ps_enc: fix vps nal issuesZhong Li2019-03-29
| | | | | | | 1. write vps_num_hrd_parameters element 2. flush left bits Signed-off-by: Zhong Li <zhong.li@intel.com>
* avcodec/dxv: Check remaining space in CHECKPOINT()Michael Niedermayer2019-03-28
| | | | | | | | Fixes: Timeout (77sec -> 1sec) Fixes: 13407/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXV_fuzzer-5093143018471424 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/qsvenc_h264: remove the privite option trellisZhong Li2019-03-28
| | | | | | | | | | | | | | | | | | There are many problems of current qsv trellis option: 1. Duplicated with AVCodecContext definition 2. MFX_TRELLIS_XXX is introduced by MSDK API 1.17 Currently Without MSDK API checking thus may cause compilation issue. 3. user is inclined to enable trellis when set "-trellis 1", but actually it is to disable since MFX_TRELLIS_OFF is equal to 1. 4. It is too complex for user to enable trellis for every frame(I/P/B). Just simply remove the private option, and switch to the AVCodecContext definition. Compatibility should not a big problem (except can't exact map) since the option name is same as AVCodecContext. Signed-off-by: Zhong Li <zhong.li@intel.com> Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com> Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
* lavc/qsvenc: use the common option "trellis" of AVCodecContextZhong Li2019-03-28
| | | | Signed-off-by: Zhong Li <zhong.li@intel.com>
* qsv: fix the dangerous macro definitionsZhong Li2019-03-28
| | | | | Signed-off-by: Zhong Li <zhong.li@intel.com> Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
* lavc/qsvenc: make the queried libmfx version easily reusedZhong Li2019-03-28
| | | | Signed-off-by: Zhong Li <zhong.li@intel.com>
* lavc/vaapi_h264: Do not set FMO fields.Carl Eugen Hoyos2019-03-28
| | | | | | | | | | | | | | | | | | | The fields are deprecated in current vaapi, setting them to 0 in old versions is fine as FMO is not implemented. Fixes the following warnings: libavcodec/vaapi_h264.c:259:10: warning: 'num_slice_groups_minus1' is deprecated [-Wdeprecated-declarations] .num_slice_groups_minus1 = pps->slice_group_count - 1, ^ libavcodec/vaapi_h264.c:260:10: warning: 'slice_group_map_type' is deprecated [-Wdeprecated-declarations] .slice_group_map_type = pps->mb_slice_group_map_type, ^ libavcodec/vaapi_h264.c:261:10: warning: 'slice_group_change_rate_minus1' is deprecated [-Wdeprecated-declarations] .slice_group_change_rate_minus1 = 0, /* FMO is not implemented */ ^ Reviewed-by: Mark Thompson
* lavc/vaapi_hevc: Do not initialize fields twice.Carl Eugen Hoyos2019-03-28
| | | | | | | | | | | | | | | | | Fixes the following compilation warnings: libavcodec/vaapi_hevc.c:155:21: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] .pic_fields.bits = { ~^~~~ libavcodec/vaapi_hevc.c:125:57: note: previous initialization is here .pic_fields.value = 0, ^ libavcodec/vaapi_hevc.c:175:31: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] .slice_parsing_fields.bits = { ~^~~~ libavcodec/vaapi_hevc.c:126:57: note: previous initialization is here .slice_parsing_fields.value = 0, Reviewed-by: Mark Thompson
* avcodec/hevcdec: Avoid only partly skiping duplicate first slicesMichael Niedermayer2019-03-27
| | | | | | | | | | | | Fixes: NULL pointer dereference and out of array access Fixes: 13871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5746167087890432 Fixes: 13845/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5650370728034304 This also fixes the return code for explode mode Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/h264_levels: add MaxMBPS checking and update fate test.Decai Lin2019-03-27
| | | | | | | | | 1. add MaxMBPS checking for level idc setting to align with AVC spec AnnexA table A-1/A-6 level limits. 2. update h264 level fate test. Signed-off-by: Decai Lin <decai.lin@intel.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
* lavc/bmp: Avoid a heap buffer overwrite for 1bpp input.Carl Eugen Hoyos2019-03-26
| | | | | Found by Mingi Cho, Seoyoung Kim, and Taekyoung Kwon of the Information Security Lab, Yonsei University.
* avcodec/cbs_av1: fix range of values for Mastering Display Color Volume ↵James Almer2019-03-25
| | | | | | Metadata OBUs Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/jpeg2000dec: Skip de-quantization of empty areasMichael Niedermayer2019-03-25
| | | | | | | | Fixes: Timeout (26sec -> 18sec) Fixes: 13448/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-576903098243481 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/prosumer: Check decoded sizeMichael Niedermayer2019-03-25
| | | | | | | | Fixes: Timeout (longer than i had patience for -> 2sec) Fixes: 13205/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PROSUMER_fuzzer-5105644481282048 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpegpicture: Check size of edge_emu_bufferMichael Niedermayer2019-03-25
| | | | | | | | Fixes: OOM Fixes: 13710/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5633152942342144 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/indeo2: Check input size against resolution in ir2_decode_plane()Michael Niedermayer2019-03-25
| | | | | | | | Fixes: Timeout (56 sec -> 14 sec) Fixes: 13708/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO2_fuzzer-5656342004498432 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dxtory: Check slice sizes before allocating imageMichael Niedermayer2019-03-25
| | | | | | | | Fixes: Timeout (26sec -> 2sec) Fixes: 13612/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXTORY_fuzzer-5676845977042944 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/truemotion2: Fix integer overflow in tm2_null_res_block()Michael Niedermayer2019-03-25
| | | | | | | | Fixes: signed integer overflow: 1111638592 - -2122219136 cannot be represented in type 'int' Fixes: 13441/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5732769815068672 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/av1_parser: don't abort parsing the first frame if extradata parsing ↵James Almer2019-03-24
| | | | | | | | | | | fails The first frame contains the sequence header, which is needed to parse every following frame. This fixes parsing streams with broken extradata but correct packet data. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/tiff: do not allow bpp 40 with undefined pixel formatsMichael Niedermayer2019-03-24
| | | | | | | | | | | | | | Fixes: Out of array access, assertion failure Fixes: 13851/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5754570929602560 Fixes: 13869/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5695998313103360 Fixes: 13873/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5077273645940736 Fixes: 13874/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5756396757319680 Fixes: 13877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5741026750234624 Fixes: 13880/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5649148809838592 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/libdavs2: fix frame dumping error descriptionhwrenx2019-03-23
| | | | | Reviewed-by: Steven Liu <lq@chinaffmpeg.org> Signed-off-by: hwrenx <hwrenx@126.com>
* lavc/libdavs2: add davs2_flushhwrenx2019-03-23
| | | | | Reviewed-by: Steven Liu <lq@chinaffmpeg.org> Signed-off-by: hwrenx <hwrenx@126.com>
* Merge commit '0676de935b1e81bc5b5698fef3e7d48ff2ea77ff'James Almer2019-03-22
|\ | | | | | | | | | | | | * commit '0676de935b1e81bc5b5698fef3e7d48ff2ea77ff': arm: Implement a NEON version of 422 h264_h_loop_filter_chroma Merged-by: James Almer <jamrial@gmail.com>
| * arm: Implement a NEON version of 422 h264_h_loop_filter_chromaMartin Storsjö2019-03-21
| | | | | | | | | | | | | | | | Previously, the 420 version was used even for 422. This fixes occasional checkasm failures. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avcodec/hevcdec: decode at most one slice reporting being the first in the ↵James Almer2019-03-20
| | | | | | | | | | | | | | | | | | | | picture Fixes deadlocks when decoding packets containing more than one of the aforementioned slices when using frame threads. Tested-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/arbc: Check nb_segments before allocating and copying frameMichael Niedermayer2019-03-20
| | | | | | | | | | | | | | | | Fixes: Timeout (30sec -> 2sec) Fixes: 13578/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARBC_fuzzer-5685625527730176 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/scpr: Perform frame copy laterMichael Niedermayer2019-03-20
| | | | | | | | | | | | | | Optimization found while looking at 13442/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5758293933293568 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavc/arbc: Use AV_WB24() where applicable.Carl Eugen Hoyos2019-03-20
| |
* | lavc/tiff: Allow decoding of cmyka (five components).Carl Eugen Hoyos2019-03-20
| | | | | | | | Fixes ticket #7675.
* | lavc/truehd_core: Initialize the last bytes of the output buffer.Carl Eugen Hoyos2019-03-20
| | | | | | | | Avoids undeterministic output.
* | lavc/qtrle: Avoid an unaligned 64-bit write.Carl Eugen Hoyos2019-03-20
| | | | | | | | | | pixel_ptr can be increased by 4. Fixes a crash on sparc64.
* | lavc/tiff: Support decoding 16bit cmyk.Carl Eugen Hoyos2019-03-20
| |
* | avcodec/vt_hevc: fix crash if vps_list[0] or sps_list[0] are nullRodger Combs2019-03-19
| | | | | | | | | | | | | | Instead of assuming id 0 is used, use the same logic as used for PPS, where all available entries in the list are emitted. Signed-off-by: Aman Gupta <aman@tmm1.net>