summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/decode: Move is_open check to avcodec_receive_frame()Andreas Rheinhardt2025-03-132-3/+3
| | | | | | | It also applies to scenarios where ff_encode_receive_frame() is used. Also remove the redundant av_codec_is_decoder(). Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/cuviddec: use pre-existing chroma format informationTimo Rothenpieler2025-03-131-23/+8
| | | | Fixes #11505
* avcodec/Makefile: remove redundant objectTimo Rothenpieler2025-03-131-1/+0
| | | | | It's already listed in OBJS-$(CONFIG_JNI), which should cover all cases STLIBOBJS does and more.
* avcodec/pthread*: Mark init, free, flush functions as av_coldAndreas Rheinhardt2025-03-123-16/+13
| | | | Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/sbcdec_data: Merge data into headerAndreas Rheinhardt2025-03-124-166/+126
| | | | | | | sbcdec_data.h is only included by sbcdec.c, so this won't cause the data to be included multiple times in the binary. Signed-off-by: Andreas Rheinhardt <[email protected]>
* all: Fix doxy comments wrongly designated as trailing ///<Andreas Rheinhardt2025-03-1215-32/+29
| | | | | | | | | | | The ///< or /**< form of doxygen comments are only to be used when the documentation follows the member and the comment block starts on the same line as the member. This commit fixes wrong uses of them; in particular, this fixes the comment for mb_height in H.264 SPS's structure which was wrongly added to mb_width. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/vc2enc: Avoid excessive inliningAndreas Rheinhardt2025-03-121-2/+7
| | | | | | | | | | There is no reason to inline put_vc2_ue_uint() everywhere; only one call site is actually hot: The one in encode_subband() (which accounts for 35735040 of 35739495 calls to said function in a FATE run). Uninline all the others. Reviewed-by: Lynne <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* fftools/ffmpeg_opt: Remove unused alt_bsfAndreas Rheinhardt2025-03-121-1/+0
| | | | | | | Forgotten in 6325aede08d5c7086b3798cb7041299e1d07f93a. Reviewed-by: James Almer <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avformat/flvdec: Use appropriate error codeZhao Zhili2025-03-121-1/+1
| | | | | Signed-off-by: Zhao Zhili <[email protected]> Reviewed-by: Steven Liu <[email protected]>
* avformat/flvdec: Fix error handling of parse_video_color_infoZhao Zhili2025-03-121-8/+14
| | | | | | | Some error should not be ignored. Signed-off-by: Zhao Zhili <[email protected]> Reviewed-by: Steven Liu <[email protected]>
* avformat/flvdec: Use float for FLVMasteringMetaZhao Zhili2025-03-121-10/+10
| | | | | | | The precision should be enough for primaries and luminance. Signed-off-by: Zhao Zhili <[email protected]> Reviewed-by: Steven Liu <[email protected]>
* avformat/flvdec: Use appropriate types in FLVMetaVideoColorZhao Zhili2025-03-121-9/+9
| | | | | | | This also reduce memory usage. Signed-off-by: Zhao Zhili <[email protected]> Reviewed-by: Steven Liu <[email protected]>
* avformat/flvdec: Remove one level of indentationZhao Zhili2025-03-121-35/+31
| | | | | | | | Also remove the condition of AMF_DATA_TYPE_BOOL when parse color info. There is no AMF_DATA_TYPE_BOOL type in color info. Signed-off-by: Zhao Zhili <[email protected]> Reviewed-by: Steven Liu <[email protected]>
* avformat/flvdec: Put FLVMetaVideoColor inside FLVContext directlyZhao Zhili2025-03-121-13/+24
| | | | | | | | | | | 1. Rename metaVideoColor to meta_color_info 2. Allocated FLVMetaVideoColor together with FLVContext 3. Improve the use of meta_color_info_flag. Do a sequence of strcmp only if meta_color_info_flag is FLV_COLOR_INFO_FLAG_PARSING. 4. Check return value of amf_parse_object(). Signed-off-by: Zhao Zhili <[email protected]> Reviewed-by: Steven Liu <[email protected]>
* avformat/flvdec: Fix use sizeof(AVMasteringDisplayMetadata)Zhao Zhili2025-03-121-6/+13
| | | | | | | | sizeof AVMasteringDisplayMetadata isn't part of ABI. Signed-off-by: Zhao Zhili <[email protected]> Reviewed-by: Steven Liu <[email protected]> Reviewed-by: James Almer <[email protected]>
* tests: Add enhanced-flv-hevc-hdr10 for demux and mux HDR color infoZhao Zhili2025-03-122-0/+104
| | | | | Signed-off-by: Zhao Zhili <[email protected]> Reviewed-by: Steven Liu <[email protected]>
* avcodec/snow: Remove ff_snow_release_buffer()Andreas Rheinhardt2025-03-124-14/+4
| | | | | | Pointless after 7e41f95dce6390f39a5134a25213828ed65fac6b. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/vc2enc: Use LUT to assemble interleaved golomb codeAndreas Rheinhardt2025-03-121-12/+33
| | | | | | | | Up until now, the encoder processed only one bit at a time. With this patch, it is eight bits. Reviewed-by: Lynne <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/ffv1enc_template: Be a bit more verbose on errorMichael Niedermayer2025-03-111-2/+2
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/ffv1: Fix remap and float with golomb riceMichael Niedermayer2025-03-114-79/+113
| | | | | | Sponsored-by: Sovereign Tech Fund Reviewed-by: Lynne <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/ffv1enc: Fix slice coding mode 1 with rgb framesMichael Niedermayer2025-03-112-5/+4
| | | | | Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <[email protected]>
* libavfilter: guard against ff_draw_init/ff_draw_init2 failuresNil Fons Miret2025-03-1112-26/+109
| | | | | | | | | | | The return value of ff_draw_init and ff_draw_init2 are not checked in most usages. However, if they return an error, they don't get to the point where they set the attributes of the FFDrawContext. These functions are typically used in conjunction with ff_draw_color, which checks draw->desc->flags, causing a null pointer dereference. Signed-off-by: Nil Fons Miret <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* hwcontext_vulkan: add support for mapping multiplane images into CUDALynne2025-03-111-102/+160
| | | | | | | | | | | | | This patch refactors the CUDA import code to allow for Vulkan images with multiple planes to be mapped. Currently, a driver bug exists which causes NV12 images to be mapped incorrectly when the memory being mapped contains both planes, the issue has been reported to NVIDIA. yuv420p does work correctly, however. This is still an improvement, as the code used to crash when trying to map the memory, unless disable_multiplane=1 was given as an option.
* lsws/ppc/yuv2rgb_altivec: Fix build in non-VSX environments with Clang v2Brad Smith2025-03-111-1/+1
| | | | v2: test for function if AltiVec is enabled instead of with AltiVec and without VSX
* avcodec/dvdsubenc: Remove pointless wrapperAndreas Rheinhardt2025-03-111-14/+3
| | | | Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/put_bits: Add and use put_bits63()Andreas Rheinhardt2025-03-116-15/+30
| | | | | | | | | | | When using a 64bit PutBitContext (i.e. on x64), put_bits_no_assert() can naturally write up to 63 bits. So one can avoid treating the cases <32bits, 32 bits and <63 bits differently. As it turns out, no user actually wants to write 64 bit at once (maybe except testprograms). Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/vc2enc: Simplify writing dirac golomb codesAndreas Rheinhardt2025-03-111-27/+3
| | | | | | | | | | The earlier code used a loop to determine the number of bits used and called ff_log2() on a power of two (and it would be easy to keep track of the exponent of said power-of-two); neither GCC nor Clang optimized the loop away or avoided the ff_log2(). This patch replaces the loop and the log2 with a single av_log2(). Signed-off-by: Andreas Rheinhardt <[email protected]>
* avutil/vulkan: Remove unused ff_vk_create_avbuf()Andreas Rheinhardt2025-03-112-38/+0
| | | | | | | Unused since aea4d4b423c62aecf326ef3ae1578710faa3eca6. Reviewed-by: Lynne <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avutil/refstruct: Fix documentationAndreas Rheinhardt2025-03-111-5/+5
| | | | | Reviewed-by: Stefano Sabatini <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/exr: use luma+alpha float pixel formatsJames Almer2025-03-102-47/+25
| | | | Signed-off-by: James Almer <[email protected]>
* swscale/input: add support for YAF16 and YAF32James Almer2025-03-103-1/+94
| | | | Signed-off-by: James Almer <[email protected]>
* avutil/pixfmt: add YAF16 and YAF32 pixel formatsJames Almer2025-03-106-1/+86
| | | | Signed-off-by: James Almer <[email protected]>
* avfilter/vsrc_testsrc: add support for semi planar formats to yuvtestsrcJames Almer2025-03-105-0/+47
| | | | Signed-off-by: James Almer <[email protected]>
* swscale: aarch64: Simplify the assignment of lumToYV12Martin Storsjö2025-03-101-4/+2
| | | | | | | | We normally don't need else statements here; the common pattern is to assign lower level SIMD implementations first, then conditionally reassign higher level ones afterwards, if supported. Signed-off-by: Martin Storsjö <[email protected]>
* avcodec/wmaenc: Don't unnecessarily reset AVPacket.sizeAndreas Rheinhardt2025-03-101-1/+0
| | | | | | The packet is unreferenced generically lateron anyway. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/wma: Mark ff_wma_end() as av_coldAndreas Rheinhardt2025-03-101-1/+1
| | | | Signed-off-by: Andreas Rheinhardt <[email protected]>
* all: Use put_bytes_output() instead of put_bits_ptr - pb->bufAndreas Rheinhardt2025-03-105-8/+8
| | | | | | Avoids accessing internals of PutBitContext. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/codec_internal, all: Use macros to set deprecated AVCodec fieldsAndreas Rheinhardt2025-03-10213-834/+451
| | | | | | | | | | | | | | The aim of this is twofold: a) Clang warns when setting a deprecated field in a definition and because several of the widely set AVCodec fields are deprecated, one gets several hundred warnings from Clang for an ordinary build. Yet fortunately Clang (unlike GCC) allows to disable deprecation warnings inside a definition, so that one can create simple macros to set these fields that also suppress deprecation warnings for Clang. This has already been done in fdff1b9cbfd8cf5a9810c29efa4baf13a4786742 for AVCodec.channel_layouts. b) Using macros will allow to easily migrate these fields to internal ones. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/vp8: Remove always-false hwaccel checks for VP7Andreas Rheinhardt2025-03-101-1/+1
| | | | | Reviewed-by: Peter Ross <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/vp8: Move VPx specific functions inside #if CONFIG_VPx blockAndreas Rheinhardt2025-03-101-38/+36
| | | | | | | | where appropriate. Avoids including ff_vp8_decode_frame() when the VP8 decoder is disabled. Reviewed-by: Peter Ross <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/vp8: Move codec-specific init code out of common initAndreas Rheinhardt2025-03-101-24/+24
| | | | | | | | | | While just at it, also move the init functions inside the #if CONFIG_VP?_DECODER (to avoid linking failures). While just at it, also declare these init functions as av_cold and uninline the remaining common init function. Reviewed-by: Peter Ross <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/vp8: Fix wrong #endif commentAndreas Rheinhardt2025-03-101-1/+1
| | | | | Reviewed-by: Peter Ross <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]>
* lavc/vvc: Stricter bound on pps_exp_slice_height_in_ctus_minus1Frank Plowman2025-03-091-1/+1
| | | | | | | | | | When pps_num_exp_slices_in_tile[i] is nonzero, the ith tile is made up of pps_num_exp_slices_in_tile[i] slices stacked atop one another, where the height of the jth slice in the ith tile is given by pps_exp_slice_height_in_ctus_minus1[i][j]. The sum of the heights of the slices in the tile should not exceed the height of the tile itself. Signed-off-by: Frank Plowman <[email protected]>
* avcodec/snow: Remove outdated assertAndreas Rheinhardt2025-03-091-3/+0
| | | | | | | | | It comes from a time before frames were refcounted; it has indeed been added in a follow-up commit to c13e490dce1a66d79e1f053d8a38fb9b2eb53267: "codec_release_buffer: fix handling of non user buffers". This type of check is obsolete now. Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/sbcenc: Don't use deprecated AVCodec.supported_sampleratesAndreas Rheinhardt2025-03-091-3/+5
| | | | Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/sbcenc: Mark sbc_encode_init() as av_coldAndreas Rheinhardt2025-03-091-1/+1
| | | | Signed-off-by: Andreas Rheinhardt <[email protected]>
* avcodec/ffv1: Use dual run coder for fltmapMichael Niedermayer2025-03-082-8/+32
| | | | | | | | | | | This improves compression by 0.1% overall and 44% for the changed table I tried several other things but so far this is the best compromise between complexity and compression This can also be extended to 32 and 64bit floats Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/ffv1: Store remap flag per sliceMichael Niedermayer2025-03-085-4/+16
| | | | | | | | | This allows switching it on conditionally and also for non float, it may improve compression for RGB data that was paletted or other synthetic images Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/ffv1: flip half of float16 and Compactify floatsMichael Niedermayer2025-03-083-0/+71
| | | | | | | | | | | | | | | | | | | | | | | float16 (and more so float32) have many odd values half the values are negative, many are larger than "1.0" and many values are very close to 0. Storing the 16bits as is, looses compression because of the mixture of dense and sparse regions and also many completely unused ones. This simply remaps the 65536 values so no unused values remain This improves compression by about 1.5% for the ACES_OT_VWG_SampleFrames testset (this testset contains all kind of funny values including many images with negative rgb values) The space needed for the map is insignificant compared to the compression gained This patch also flips half the float range as it can be done using the same table. Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/ffv1: Basic float16 supportMichael Niedermayer2025-03-083-3/+20
| | | | | Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <[email protected]>