summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* avcodec/h264_parse: Move ff_h264_get_profile() to h264_ps.hAndreas Rheinhardt2022-01-26
| | | | | | It is a more fitting place for it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264_*: Remove unnecessary internal.h inclusionsAndreas Rheinhardt2022-01-26
| | | | | | Also remove some other unnecessary headers while at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264dec: Remove unnecessary headersAndreas Rheinhardt2022-01-26
| | | | | | | E.g. the inclusion of parser.h comes from a time when the parser used a H264Context. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264*: Remove unnecessary h264_mvpred.h inclusionsAndreas Rheinhardt2022-01-26
| | | | | | | This is only needed by h264_cabac.c and h264_cavlc.c. Also fix up the other headers while at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/svq3: stop including h264dec.hAnton Khirnov2022-01-26
| | | | | | | The only thing that is actually used directly from there is the PART_NOT_AVAILABLE constant, which can be moved to h264pred.h. Otherwise it only depends on other indirectly included headers.
* lavc/x86/h264_qpel: stop unnecessarily including h264decAnton Khirnov2022-01-26
|
* lavc/vdpau: stop unnecessarily including h264decAnton Khirnov2022-01-26
|
* lavc/h264: move MB_TYPE defs from h264dec.h to h264_parseAnton Khirnov2022-01-26
| | | | Allows to stop including h264dec.h in h264data.c.
* lavc/h264_parse: stop including h264dec.hAnton Khirnov2022-01-26
| | | | | | It is unnecessary and only files that are parts of the decoder (as opposed to standalone code called by the decoder) are allowed to include h264dec.h
* lavc/h264data.h: stop including h264dec.hAnton Khirnov2022-01-26
| | | | This header does not need anything from there.
* lavc/h264: move some shared code from h264dec to h264_parseAnton Khirnov2022-01-26
|
* lavc/h264_parser: add missing headersAnton Khirnov2022-01-26
|
* lavc/h264: replace MAX_DELAYED_PIC_COUNT by H264_MAX_DPB_FRAMESAnton Khirnov2022-01-26
|
* lavc/h264: replace MAX_DELAYED_PIC_COUNT with FF_ARRAY_ELEMS where appropriateAnton Khirnov2022-01-26
|
* lavc/h264dec.h: Move MMCOOpcode to h264_parse.hAnton Khirnov2022-01-26
| | | | | Both parser and decoder use it, so h264_parse is the proper place for it.
* lavc/h264: replace MAX_MMCO_COUNT with H264_MAX_MMCO_COUNTAnton Khirnov2022-01-26
| | | | | | They apparently serve the same purpose; the latter is one larger and has a comment explaining how the value is derived, so seems more trustworthy.
* avcodec/h264dec: Move pack8to16 to its only userAndreas Rheinhardt2022-01-26
| | | | | | Namely to h264_cabac.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264dec: Move find_start_code() to its only userAndreas Rheinhardt2022-01-26
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264_parser: don't alter decoder private dataJames Almer2022-01-24
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* libavcodec/qsvenc: fix a memory leak problemWenbin Chen2022-01-24
| | | | | | | | | | "qf->frame" ref to input frame but it isn't released. av_frame_unref() is added before refering qf->frame to new frame to make sure the previous reference is released. Reported-by: Mark Samuelson <Mark.Samuelson@sonicfoundry.com> Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/qsvenc: Add transform skip to hevc_qsvWenbin Chen2022-01-21
| | | | | | | | | Add transform_skip option to hevc_qsv. By enabling this option, the transform_skip_enabled_flag in PPS will be set to 1. This option is supported on the platform equal or newer than ICL. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/qsvenc: Add low latency P-pyramid support to qsvWenbin Chen2022-01-21
| | | | | | | | | | | Add low latency P-pyramid support to qsv. This feature relates to command line option "-p_strategy". To enable this flag, user also need to set "-bf" to 0. P-strategy has two modes "1-simple" and "2-pyramid". The details of the two models refer to https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#preftype Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/qsvenc: Add DisableDeblockingIdc support to qsvWenbin Chen2022-01-21
| | | | | | | | Add dblk_idc option to 264_qsv and hevc_qsv. Turining on this opion can disable deblocking. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/qsvenc: Add max_frame_size support to hevc_qsvWenbin Chen2022-01-21
| | | | | | | Add max_frame_size support to hevc_qsv as well. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavc/qsvenc_hevc: add -pic_timing_sei optionHaihao Xiang2022-01-18
| | | | | | | | | The SDK may insert picture timing SEI for hevc and the code to set mfx parameter has been added in qsvenc, however the corresponding option is missing in the hevc option array Reviewed-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavc/qsvenc: add encode support for screen content coding extensionHaihao Xiang2022-01-18
| | | | | | Enables HEVC Screen Content Coding extension support on ICL+ platform Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avcodec/libmp3lame: return proper error codesJames Almer2022-01-14
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libopenh264enc: set iEntropyCodingModeFlag by coder optionLimin Wang2022-01-14
| | | | | | | | | | | | | | | For high/main profile, user can choose to use cavlc by specify "-coder cavlc", for default, it'll will use cabac, if it's baseline, we'll use cavlc by specs anyway. ffmpeg -y -f lavfi -i testsrc -c:v libopenh264 -profile:v main -coder cavlc -frames:v 1 -bsf trace_headers -f null - before the patch: entropy_coding_mode_flag 0 = 1 after the patch: entropy_coding_mode_flag 0 = 0 Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/libopenh264enc: make the profile configuablable correctlyLimin Wang2022-01-14
| | | | | | | | | due to the limitations set in d3a7bdd4ac54349aea9150a234478635d50ebd87, you weren't able to use main profile with OpenH264 1.8, or high profile with older versions Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/libopenh264enc: support for colorspace and range informationLimin Wang2022-01-14
| | | | | Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/vp3: Don't output bogus warningAndreas Rheinhardt2022-01-13
| | | | | | | It is perfectly fine to have from one to seven bits left at the end of parsing. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegpicture: Decrease size of encoding_error arrayAndreas Rheinhardt2022-01-13
| | | | | | | | | | | | | The current size is AV_NUM_DATA_POINTERS (i.e. eight). This number is chosen in order to minimize the amount of allocations for AVFrame.extended_(data|buf) for audio; it is meaningless for video for which four is sufficient. So decrease this array in order to minimize what is copied in ff_mpeg_ref_picture() and at the places that copy a whole MpegEncContext. Also do the same for snowenc. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg4videodec: Avoid multiple consecutive av_log()Andreas Rheinhardt2022-01-13
| | | | | | | | These messages belong together, yet they can be torn apart if some other call to av_log() happens between them. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Don't set unrestricted_mv for decodersAndreas Rheinhardt2022-01-13
| | | | | | It is write-only for them. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264pred: ReindentationAndreas Rheinhardt2022-01-13
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264pred: Remove dead > 8 pixels checks for 8bit codecsAndreas Rheinhardt2022-01-13
| | | | | | | | | | | RV40, SVQ3 and VP7/VP8 are eight-bit only, so it makes no sense to check for them in the codepath initializing > eight bit contexts. Move the codec-specific code to a switch located after the eight-bit init code where this is easily possible; and add checks to the macro to enable the compiler to remove the remaining checks when initializing bitdepths > 8 at compile-time. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264pred: Don't compile > 8 bit versions of VP7/8 functionsAndreas Rheinhardt2022-01-13
| | | | | | VP7 and VP8 are eight bit only. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264_slice: Inline H264 codec idAndreas Rheinhardt2022-01-13
| | | | | | This code is only reached by the H.264 decoder. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/svq3: Remove dead topright_samples_available variable, codeAndreas Rheinhardt2022-01-13
| | | | | | Topright samples are always available. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo, svq3: Remove unused next_p_frame_damagedAndreas Rheinhardt2022-01-13
| | | | | | Always zero since 4d2858deac5213eaddfdc06f98379b6325d7b953. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264_slice, mpeg4videodec: Don't use %s to write single charAndreas Rheinhardt2022-01-13
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg4video: Split off data in a header of its ownAndreas Rheinhardt2022-01-13
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/v4l2_context: remove reinit variableMing Qian2022-01-11
| | | | | | | | Cleanup after commit 3fc72c9fc16df3b7edc329ed9eeaaa1e65976c33. Fixes coverity ticket #1497095. Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com> Signed-off-by: Ming Qian <ming.qian@nxp.com>
* libavcodec/qsvdec.c: using queue count to unref frameChen,Wenbin2022-01-12
| | | | | | | | | | MSDK vc1 and av1 sometimes output frame into the same suface, but ffmpeg-qsv assume the surface will be used only once, so it will unref the frame when it receives the output surface. Now change it to unref frame according to queue count. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avcodec/av1dec: honor the requested skip_frame levelJames Almer2022-01-11
| | | | | | | This supports dropping non-intra, non-key, or all frames. Tested-by: nevcairiel Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libdav1d: explicitly set Dav1dSettings.apply_grainJames Almer2022-01-10
| | | | | | Don't depend on its default value being 1, as that could change anytime. Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/flac_parser: use a custom FIFO implementationAnton Khirnov2022-01-10
| | | | | | | | | | | FLAC parser currently uses AVFifoBuffer in a highly non-trivial manner, modifying its "internals" (the whole struct is currently public, but no other code touches its contents directly). E.g. it does not use any av_fifo functions for reading the FIFO contents, but implements its own. Reimplement the needed parts of the AVFifoBuffer API in the FLAC parser, making it completely self-contained. This will allow us to make AVFifoBuffer private.
* avcodec/nvenc: zero-initialize NV_ENC_REGISTER_RESOURCE structTimo Rothenpieler2022-01-10
|
* lavc/qsvenc: add return check for ff_qsv_map_pixfmtLinjie Fu2022-01-10
| | | | | | | | Return an error directly if pixfmt is not supported for encoding, otherwise it may be hidden until query/check in MSDK. Signed-off-by: Linjie Fu <linjie.fu@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avcodec/v4l2_context: send start decode command after dynamic resolution ↵Ming Qian2022-01-09
| | | | | | | | | | | | | | | | | | | change event Fixes decoding of sample https://streams.videolan.org/ffmpeg/incoming/720p60.mp4 on RPi4 after kernel driver commit: staging: bcm2835-codec: Format changed should trigger drain Reference: linux/Documentation/userspace-api/media/v4l/dev-decoder.rst "A source change triggers an implicit decoder drain, similar to the explicit Drain sequence. The decoder is stopped after it completes. The decoding process must be resumed with either a pair of calls to VIDIOC_STREAMOFF and VIDIOC_STREAMON on the CAPTURE queue, or a call to VIDIOC_DECODER_CMD with the V4L2_DEC_CMD_START command." Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com> Signed-off-by: Ming Qian <ming.qian@nxp.com>