summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* avcodec: support for CUVA HDR Vivid metadataLimin Wang2022-03-01
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/setts_bsf: add an option to set output time baseJames Almer2022-02-28
| | | | | | And a relevant constant to use it in expressions. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/setts_bsf: stop repeatedly setting values that don't change between ↵James Almer2022-02-28
| | | | | | packets Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/setts_bsf: add constants to modify packet durationJames Almer2022-02-28
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/setts_bsf: add NEXT_PTS/DTS expression constantsJames Almer2022-02-28
| | | | | | | They correspond to the relevant fields from the packet that follows the one where the expressions are being applied. Signed-off-by: James Almer <jamrial@gmail.com>
* qsvenc: avoid dereferencing the null pointerTong Wu2022-02-28
| | | | | | | The variable AVFrame *frame could be a null pointer, now add a null pointer check to avoid dereferencing the null pointer. Signed-off-by: Tong Wu <tong1.wu@intel.com>
* qsv: add return value check for MFXQueryIMPLTong Wu2022-02-28
| | | | | | | add a return value check for function MFXQueryIMPL to handle the error message. Signed-off-by: Tong Wu <tong1.wu@intel.com>
* libavcodec/qsvenc: add mbbrc to hevc_qsvWenbin Chen2022-02-28
| | | | | | | | Add mbbrc to hevc_qsv For detailed description, please see "mbbrc" part in: https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#mfxextcodingoption2 Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
* libavcodec/qsvenc: add more ChromaFormat support to mjpeg_qsvWenbin Chen2022-02-28
| | | | | | | | ChromaForamt for mjpeg-qsv is always set to yuv420, and this will be wrong when encode other pixel format (for example yuyv422). ChromaFormat is changed to be adaptive to pix_fmt. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
* libavcodec/vaapi_encode: Add async_depth to vaapi_encoder to increase ↵Wenbin Chen2022-02-28
| | | | | | | | | | | | | | | | performance Fix: #7706. After commit 5fdcf85bbffe7451c2, vaapi encoder's performance decrease. The reason is that vaRenderPicture() and vaSyncBuffer() are called at the same time (vaRenderPicture() always followed by a vaSyncBuffer()). Now I changed them to be called in a asynchronous way, which will make better use of hardware. Async_depth is added to increase encoder's performance. The frames that are sent to hardware are stored in a fifo. Encoder will sync output after async fifo is full. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/vaapi_encode: Add new API adaption to vaapi_encodeWenbin Chen2022-02-28
| | | | | | | | | | Add vaSyncBuffer to VAAPI encoder. Old version API vaSyncSurface wait surface to complete. When surface is used for multiple operation, it waits all operations to finish. vaSyncBuffer only wait one channel to finish. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avcodec/libopenjpegenc: Don't clone AVFrame unnecessarilyAndreas Rheinhardt2022-02-25
| | | | | Reviewed-by: Michael Bradshaw <mjbshaw@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h263dec: Avoid copying data when flipping imageAndreas Rheinhardt2022-02-25
| | | | | | | Also remove an unchecked av_frame_make_writable(). Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/movtextdec: add () to CMP() macro to avoid unexpected behaviorMichael Niedermayer2022-02-25
| | | | | Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/libsvtav1: update some options and defaultsJames Almer2022-02-24
| | | | | | And bump the minimum required version to 0.9.0 Signed-off-by: James Almer <jamrial@gmail.com>
* libavcodec, libavdevice: Remove unnecessary includes of version.hMartin Storsjö2022-02-24
| | | | | | | | | | | | | | | xvmc.h used FF_API_* macros before, but they were removed in 1c63aed232febf4404659bf006237ee4f7f17c9c, leaving the include unused. The ones in android_camera.c and mediacodec_wrapper.c have been added due to a misunderstanding, fixed in c0bce367e4932f0fb09195e6978ac1a5a60480a4 and 13b77af2f0b56d6c87bb147947337981c21f4245. The one in mediacodec.c seems to never have been used at all. Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/libsvtav1: fix compilation with old SVT-AV1 buildsJames Almer2022-02-24
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libsvtav1: add a svtav1-params option to pass a list of key=value ↵James Almer2022-02-24
| | | | | | parameters Signed-off-by: James Almer <jamrial@gmail.com>
* Remove unnecessary libavutil/(avutil|common|internal).h inclusionsAndreas Rheinhardt2022-02-24
| | | | | | | | | | Some of these were made possible by moving several common macros to libavutil/macros.h. While just at it, also improve the other headers a bit. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/avassert: Don't include avutil.hAndreas Rheinhardt2022-02-24
| | | | | Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Remove obsolete version.h inclusionsAndreas Rheinhardt2022-02-24
| | | | | | | Forgotten in e7bd47e657bbf9e1ce9915e93bc80cb1a29fb7f3. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/log: Don't include avutil.hAndreas Rheinhardt2022-02-24
| | | | | | | | | | | | It has been included since af5f434f8c0fb3b4ee3b206ebc1946ca660a8abe for deprecation reasons, but removing it has been forgotten after it had served is purpose. So remove it. For convenience, include version.h instead as LIBAVUTIL_VERSION_INT is supposed to be used when creating AVClasses. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/magicyuvenc: Remove unused context variableAndreas Rheinhardt2022-02-23
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/magicyuvenc: Don't modify input frameAndreas Rheinhardt2022-02-23
| | | | | | | | It need not be writable at all. Instead, use temporary buffers for decorrelation. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/magicyuvenc: Add const where appropriateAndreas Rheinhardt2022-02-23
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/magicyuvenc: Avoid unnecessary av_frame_clone()Andreas Rheinhardt2022-02-23
| | | | | | | | | It is unnecessary and unchecked; the intention seems to be to ensure that the frame's data is writable, but it does not provide this. This will be fixed in a latter commit. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* libavcodec/qsvenc_hevc: encode RGB format rawvideoWenbin Chen2022-02-22
| | | | | | | | | | | Add support for hevc_qsv to input RGB format frame. It will transform frame to yuv inside MediaSDK instead of using auto scale. Now hevc_qsv supports directly encoding BGRA and X2RGB10 format. The X2RGB10 correspond to the A2RGB20 format and BGRA correspond to RGB4 format in MediaSDK. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/qsvdec: use the parameter from decodeHeader to configure surfaceWenbin Chen2022-02-22
| | | | | | | | | | | MSDK recognizes both yuv420p10 and yuv420p9 as MFX_FOURCC_P010, but parameters are different. When decode yuv420p9 video, ffmpeg-qsv will use yuv420p10le to configure surface which is different with param from DecoderHeader and this will lead to error. Now change it use param from decoderHeader to configure surface. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avcodec/mips: Fix checkheadersAndreas Rheinhardt2022-02-21
| | | | | | | | | | mips has several headers that are only meant for inclusion in another non-arch specific file; they do not even try to be standalone. So don't test them in checkheaders. Also fix vp9dsp_mips.h, an ordinary header missing some includes. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/aarch64/idct: Add missing stddefAndreas Rheinhardt2022-02-21
| | | | | | Fixes checkheaders on aarch64. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/cabac_functions: Add missing headersAndreas Rheinhardt2022-02-21
| | | | | | | Fixes make checkheaders on PPC, for which no arch-specific header exists that indirectly includes attributes.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/wavpack: do not process only first non-zero field of int32info chunkPaul B Mahol2022-02-20
| | | | Fixes bitexact decoding with high bit depth samples.
* avcodec/msmpeg4dec: Reindent after the previous commitAndreas Rheinhardt2022-02-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/msmpeg4dec: Make initializing VLCs thread-safeAndreas Rheinhardt2022-02-18
| | | | | | | | | | | This automatically makes the remaining mpegvideo-decoders (namely msmpeg4v[1-3], mss2, VC-1, VC-1 Image, WMV-[1-3] and WMV-3 Image) init-threadsafe. These were the last native codecs that were not init-threadsafe; only wrappers for external libraries and for hardware accelerations are now not init-threadsafe. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Decrease the amount of time while holding the lockAndreas Rheinhardt2022-02-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vorbisdec: Mark decoder as init-threadsafeAndreas Rheinhardt2022-02-18
| | | | | | It does not modify any static data in its init function. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ituh263dec: Reindent after the last commitAndreas Rheinhardt2022-02-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ituh263dec: Make initializing VLCs thread-safeAndreas Rheinhardt2022-02-18
| | | | | | | This automatically makes the FLV, H.263, H.263+, Intel H.263, MPEG-4, RealVideo 1.0 and RealVideo 2.0 decoders init-threadsafe. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/alsdec: Mark decoder as init-threadsafeAndreas Rheinhardt2022-02-18
| | | | | | It does not initialize any static data in its init function. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/alsdec, mlz: Check allocationAndreas Rheinhardt2022-02-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/alsdec: Improve code localityAndreas Rheinhardt2022-02-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/alsdec: Return directly upon errorAndreas Rheinhardt2022-02-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/apedec: Mark decoder as init-threadsafeAndreas Rheinhardt2022-02-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/rv40: Make decoder init-threadsafeAndreas Rheinhardt2022-02-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/rv30: Mark decoder as init-threadsafeAndreas Rheinhardt2022-02-18
| | | | | | Init-threadsafe since f697622f687c22392194d6939914c9a6a01ce69e. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/svq3: Mark decoder as init-threadsafeAndreas Rheinhardt2022-02-18
| | | | | | | The only interesting thing done in SVQ3's init function is using zlib, but this is fine: https://zlib.net/zlib_faq.html#faq21 Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vp3: Add missing check for av_mallocJiasheng Jiang2022-02-18
| | | | | | | | | | Since the av_malloc() may fail and return NULL pointer, it is needed that the 's->edge_emu_buffer' should be checked whether the new allocation is success. Fixes: d14723861b ("VP3: fix decoding of videos with stride > 2048") Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
* avcodec/jpeglsdec: Fix if( code styleMichael Niedermayer2022-02-15
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/jpeglsdec: Check get_ur_golomb_jpegls() for errorMichael Niedermayer2022-02-15
| | | | | | | | | | | | | | Fixes: Timeout Fixes: Invalid shift Fixes: 44548/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEGLS_fuzzer-556487680891289 Fixes: 44569/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AMV_fuzzer-6302543246917632 Fixes: 44570/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THP_fuzzer-4550196556595200 Fixes: 44592/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5651610385121280 Fixes: 44571/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5094698987945984 Fixes: 44607/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5341352013987840 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/error_resilience: Remove unused labelAndreas Rheinhardt2022-02-15
| | | | | | | Forgotten in be95df12bb06b183c8d2aea3b0831fdf05466cf3. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>