summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* lavc/h264: Add common code for level handlingMark Thompson2018-09-23
| | | | Including a unit test.
* vaapi_encode_mjpeg: Mark as intra-onlyMark Thompson2018-09-23
|
* vaapi_encode_mjpeg: Use CBS to store parameters and write headersMark Thompson2018-09-23
| | | | Also adds greyscale, 4:2:2, 4:4:4 and RGB support.
* lavc/cbs: Add JPEG supportMark Thompson2018-09-23
|
* vaapi_encode_h26[45]: Make the AUD option a booleanMark Thompson2018-09-23
|
* vaapi_encode_h264: Properly set constraint flagsMark Thompson2018-09-23
| | | | | | | | | | | | | | | | | | constraint_set1_flag should be set for constrained baseline and main profiles, because the stream conforms to main profile. constraint_set3_flag should be set for high profile when the stream is intra-only. constraint_set4_flag should always be set for main and high profiles because interlaced encoding is not supported. constraint_set5_flag should be set for main and high profiles when B-frames are not used. Also fix the setting of max_num_ref_frames - use the gop_size value to check for intra-only rather than the constraint flag (which is not necessarily set).
* vaapi_encode: Clean up the packed header configurationMark Thompson2018-09-23
| | | | | | Add a larger warning more clearly explaining the consequences of missing packed header support in the driver. Also only write the extradata if the user actually requests it via the GLOBAL_HEADER flag.
* vaapi_encode: Clean up the GOP structure configurationMark Thompson2018-09-23
| | | | | | Choose what types of reference frames will be used based on what types are available, and make the intra-only mode explicit (GOP size one, which must be used for MJPEG).
* vaapi_encode: Add support for max QP in rate controlMark Thompson2018-09-23
| | | | | | This was added in libva 2.1.0 (VAAPI 1.1.0). Use AVCodecContext.qmax, matching the existing behaviour for qmin, and clean up the defaults so that we only pass min/max when explicitly set.
* vaapi_encode: Clean up rate control configurationMark Thompson2018-09-23
| | | | | | Query which modes are supported and select between VBR and CBR based on that - this removes all of the codec-specific rate control mode selection code.
* vaapi_encode: Always reapply global parameters after the sequence headerMark Thompson2018-09-23
| | | | | | | | The codec sequence headers may contain fields which can overwrite the fine parameters given in the specific settings (e.g. a crude bitrate value vs. the max-rate / target-percentage / etc. values in VAEncMiscParameterRateControl). Always reapply all global parameters after a sequence header to avoid this causing problems.
* vaapi_encode: Clean up the encode quality configurationMark Thompson2018-09-23
|
* vaapi_encode_mpeg2: Add optionsMark Thompson2018-09-23
| | | | | Include the common options, and also named options for setting the profile and level.
* vaapi_encode: Add common options between all encodersMark Thompson2018-09-23
| | | | | The only common option here is low_power - it was previously supported for H.264 only, that specific option is removed.
* vaapi_encode: Choose profiles dynamicallyMark Thompson2018-09-23
| | | | | | | | | | | Previously there was one fixed choice for each codec (e.g. H.265 -> Main profile), and using anything else then required an explicit option from the user. This changes to selecting the profile based on the input format and the set of profiles actually supported by the driver (e.g. P010 input will choose Main 10 profile for H.265 if the driver supports it). The entrypoint and render target format are also chosen dynamically in the same way, removing those explicit selections from the per-codec code.
* configure: Use pkgconfig for VAAPIMark Thompson2018-09-23
| | | | | | | Set the minimum version to 0.35.0 (libva 1.3.0) and remove redundant configure tests. This also allows the proprietary libmfx fork of libva, which always shows the version number 0.99.0 (independent of the actual version).
* avcodec: add native iLBC decoderPaul B Mahol2018-09-23
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/ac3dec: Fix shift signedness in mask creationMichael Niedermayer2018-09-22
| | | | | | | | Fixes: 9924/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EAC3_fuzzer-5473421772193792 Fixes: left shift of 1 by 63 places cannot be represented in type 'long long' Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/eac3dec: Check that channel_map does not contain more than ↵Michael Niedermayer2018-09-22
| | | | | | EAC3_MAX_CHANNELS Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/avpacket: Add missing conversions from side data enum to name.Jun Zhao2018-09-21
| | | | | | Add missing conversions from side data enum to name. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* avcodec/dvdsubdec: Sanity check len in decode_rle()Michael Niedermayer2018-09-19
| | | | | | | | Fixes: Timeout Fixes: 9778/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DVDSUB_fuzzer-5186007132536832 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpeg4videodec: Fix undefined shift in get_amv()Michael Niedermayer2018-09-19
| | | | | | | | Fixes: runtime error: shift exponent -1 is negative Fixes: 9938/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5653783529914368 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpeg4videodec: Check rice_prefix_codeMichael Niedermayer2018-09-19
| | | | | | | | | | Fixes: out of array read Fixes: 10064/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5766801384800256 Fixes: 10225/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5071833448054784 Fixes: 10261/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5115048024866816 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pcx: Check for end of input in pcx_rle_decode() and propagate errorMichael Niedermayer2018-09-19
| | | | | | | | Fixes: Timeout Fixes: 10279/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCX_fuzzer-5729311395414016 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_parse: Fix bistream typoMichael Niedermayer2018-09-19
| | | | | Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: [loongson] optimize get_cabac_inline.Shiyou Yin2018-09-19
| | | | | | This optimization improved h264 decoding performance about 4%(from 74fps to 77fps, tested on loongson 3A3000). Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/zmbv: Check that the decompressed data size is correctMichael Niedermayer2018-09-19
| | | | | | | | | | | | This checks the value exactly for intra frames and checks it against a minimum for inter frames as they can be variable. Fixes: Timeout Fixes: 10182/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ZMBV_fuzzer-6245951174344704 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>
* avcodec/zmbv: Update decomp_len in raw framesMichael Niedermayer2018-09-19
| | | | | | | decomp_len is used in raw frames, so it should not be left at the value from whatever was decoded previously (which may be any other frame) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips: [loongson] refine ff_vc1_inv_trans_8x8_mmi.Shiyou Yin2018-09-19
| | | | | | | Combined 1st and 2nd loop into one inline asm in function ff_vc1_inv_trans_8x8_mmi to reduce memory operation, and made some small optimization in ff_vc1_inv_trans_4x8_mmi. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit 'a2041a6522642859ce64af1c618d6fb90a50d4af'James Almer2018-09-18
|\ | | | | | | | | | | | | * commit 'a2041a6522642859ce64af1c618d6fb90a50d4af': qsvenc: AV_PIX_FMT_QSV path should release frame Merged-by: James Almer <jamrial@gmail.com>
| * qsvenc: AV_PIX_FMT_QSV path should release frameMaxym Dmytrychenko2018-09-18
| | | | | | | | | | | | | | | | | | Fixes high memory usage and prevents over allocation of the frames via proper unref. Can be checked as: -hwaccel qsv -c:v h264_qsv -i ../h264-conformance/CANL2_Sony_E.jsv -c:v h264_qsv -b:v 2000k -y qsv.mp4
* | lavc/libxavs2: remove nonexistent parametershwren2018-09-17
| | | | | | | | Signed-off-by: hwren <hwrenx@126.com>
* | lavc/libdavs2: fix error return codeshwren2018-09-17
| | | | | | | | Signed-off-by: hwren <hwrenx@126.com>
* | lavc/libdavs2: remove unused header fileshwren2018-09-17
| | | | | | | | Signed-off-by: hwren <hwrenx@126.com>
* | avcodec/shorten: Fix bitstream end check in read_header()Michael Niedermayer2018-09-15
| | | | | | | | | | | | | | | | | | Fixes: Timeout Fixes: 9961/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5687856176562176 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>
* | avcodec/dvdsubdec: Avoid branch in decode_run_8bit()Michael Niedermayer2018-09-15
| | | | | | | | | | | | | | Speed improvment 35.5 sec -> 34.7sec Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec: add missing mpegvideo dependencies to SpeedHQ decoderJames Almer2018-09-15
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | Fix typosMichael Bunk2018-09-14
| |
* | Merge commit '2a9e1c122eed66be1b26b747342b848300b226c7'James Almer2018-09-13
|\| | | | | | | | | | | | | * commit '2a9e1c122eed66be1b26b747342b848300b226c7': libfdk-aac: Don't use defined() in a #define Merged-by: James Almer <jamrial@gmail.com>
| * libfdk-aac: Don't use defined() in a #defineMartin Storsjö2018-09-13
| | | | | | | | | | | | | | | | | | | | | | MSVC expands the preprocessor directives differently, making the version check fail in the previous form. Clang can warn about this with -Wexpansion-to-defined (not currently enabled by default): warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] Signed-off-by: Martin Storsjö <martin@martin.st>
* | avcodec/mips: [loongson] fix bug of svq3-watermark failed in fate test.Shiyou Yin2018-09-14
| | | | | | | | | | | | | | | | | | | | | | Failed case: svq3-watermark When minimum loop count of following functions are greater than parameter h passed to them, svq3-watermark failed. 1. ff_put_pixels4_8_mmi 2. ff_avg_pixels4_8_mmi 3. ff_put_pixels4_l2_8_mmi 4. ff_avg_pixels4_l2_8_mmi Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/libaom: fix setting amount of threadsJames Almer2018-09-13
| | | | | | | | | | | | | | | | | | | | | | | | The libaom doxy says that a value of 0 for the threads fields is equivalent to a value of 1, whereas for avctx->thread_count it means the maximum amount of threads possible for the host system. Use av_cpu_count() to get the correct thread count when auto threads is requested. Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/libaomenc: remove AVOption related to frame partitionsJames Almer2018-09-12
| | | | | | | | | | | | | | | | | | Support for it was apparently never in the codebase, and the enum value was recently removed from the public headers [1] [1] https://aomedia.googlesource.com/aom/+/df4ffb73140fe31bebdabd17c1a7b53721e74838 Signed-off-by: James Almer <jamrial@gmail.com>
* | libavcodec/pnm_parser: do not lose skipped parts in reporting of how much ↵Michael Niedermayer2018-09-12
| | | | | | | | | | | | | | | | | | | | | | was consumed Fixes: Timeout Fixes: 9759/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PPM_fuzzer-5655277650051072 Fixes: 9753/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-5764378543521792 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/vp8: Check bitstream input in vp7_fade_frame() before time consuming ↵Michael Niedermayer2018-09-12
| | | | | | | | | | | | operation Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/mjpegdec: simplify rgb index remapingMichael Niedermayer2018-09-12
| |
* | lavc, doc, configure: add libxavs2 video encoder wrapperhwren2018-09-11
| | | | | | | | Signed-off-by: hwren <hwrenx@126.com>
* | Merge commit '7e929dac100916fc45cb95e231025f3439c20156'James Almer2018-09-11
|\| | | | | | | | | | | | | * commit '7e929dac100916fc45cb95e231025f3439c20156': libfdk-aacenc: Allow enabling the ELDv2 profile Merged-by: James Almer <jamrial@gmail.com>
| * libfdk-aacenc: Allow enabling the ELDv2 profileMartin Storsjö2018-09-05
| | | | | | | | | | | | This is a new feature in FDK v2. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '2edaafe5b93832715781851dfe2663da228a05ad'James Almer2018-09-11
|\| | | | | | | | | | | | | * commit '2edaafe5b93832715781851dfe2663da228a05ad': libfdk-aacdec: Allow setting the new dynamic range control effect setting Merged-by: James Almer <jamrial@gmail.com>