aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* swscale/x86/rgb2rgb: Deduplicate ASM constantsAndreas Rheinhardt2025-04-131-2/+2
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/aac{enc,}tab: Deduplicate swb tablesAndreas Rheinhardt2025-04-133-15/+3
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/aacenc: Remove always-false checkAndreas Rheinhardt2025-04-134-12/+10
| | | | | | | The sample rates have already been checked generically via AVCodec.supported_samplerates. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/aes: Use #if checks instead of if (ARCH_X86)Andreas Rheinhardt2025-04-131-2/+3
| | | | | Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/aes: Make aes_init_static() av_coldAndreas Rheinhardt2025-04-131-1/+2
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/motionpixels: Avoid av_unusedAndreas Rheinhardt2025-04-131-1/+1
| | | | | | Easily possible now that -Wdeclaration-after-statement is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hq_hqa: Check size before initializing GetByteContextAndreas Rheinhardt2025-04-131-2/+2
| | | | | | | Enables the compiler to optimize the buf_size assert in bytestream2_init() away. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hq_hqa: Remove implicit always-false checksAndreas Rheinhardt2025-04-131-15/+11
| | | | | | This decoder has explicit checks. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hq_hqa: Check available date before allocating frameAndreas Rheinhardt2025-04-131-0/+3
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hq_hqa: Use ff_vlc_init_from_lengths()Andreas Rheinhardt2025-04-132-301/+216
| | | | | | | | | This allows to avoid the codes table; furthermore, given that the runs fit into seven bits and level into nine, one can put them into one int16_t and use as symbols table in ff_vlc_init_from_lengths(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hq_hqa: Include implicit +1 run in RL VLC tableAndreas Rheinhardt2025-04-132-4/+3
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hq_hqa: Use RL-VLC tableAndreas Rheinhardt2025-04-132-8/+33
| | | | | | This moves indirections to init. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hq_hqadata: Avoid relocationsAndreas Rheinhardt2025-04-132-251/+268
| | | | | | | | | | | | Initialize a list of 128 pointers at decoder init instead of using a const list of pointers (which will be initialized at runtime when libavcodec is loaded when using pic code with Elf); the former takes only 128 bytes (+ a bit of initialization code), the latter 1KiB on 64 bit systems (+3KiB on x64 elf for relocation information). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hq_hqa: Don't zero in small chunks, don't zero twiceAndreas Rheinhardt2025-04-131-4/+3
| | | | | | | | | | | | | | Up until now, hq_decode_block() zeroed every block (of 128 bytes) before decoding a block; yet this is suboptimal for all modes, because all modes need to reset all the blocks they use anyway and so it should be done in one go for all blocks. For the alpha mode (where blocks need not be coded) all blocks are zeroed initially anyway, because decode_block() might not be doing it, so zeroing there again for the coded blocks is a waste. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hq: Include alpha in cbp VLC tableAndreas Rheinhardt2025-04-133-4/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hq{xvlc,_hqadata}: Deduplicate and hardcode cbp tableAndreas Rheinhardt2025-04-137-37/+82
| | | | | | | | | | This table is so small (32 elements amounting to 128 bytes) that it is more efficient size-wise to hardcode it instead of initializing it at runtime. Also stop duplicating it in hq_hqa.o and hqx.o. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Remove always-false checkAndreas Rheinhardt2025-04-121-3/+0
| | | | | | | | avcodec_free_context() only calls ff_codec_close() if there is an AVCodecContext and avcodec_open2() unconditionally dereferences the AVCodecContext*. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h261dec: Set pict_type during initAndreas Rheinhardt2025-04-121-5/+6
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h261dec: Export key frame informationAndreas Rheinhardt2025-04-121-7/+9
| | | | | | Implements ticket #8343. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/asvenc: Use tighter MAX_MB_SIZE constantAndreas Rheinhardt2025-04-121-2/+8
| | | | | | | Also document the constant. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/asvenc: Don't use FF_INPUT_BUFFER_MIN_SIZEAndreas Rheinhardt2025-04-121-2/+2
| | | | | | | | | ASV-1/2 does not really have a header and so using FF_INPUT_BUFFER_MIN_SIZE is wasteful as well as ugly (such bounds should be codec-specific). Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/amfenc_av1: Add B-frame QP controlDmitrii Ovchinnikov2025-04-112-2/+25
|
* avcodec/mediacodecdec: Reset optional fields when parse formatZhao Zhili2025-04-111-0/+2
| | | | | | | | | Parse format can be called multiple times, e.g., when resolution changed. If getInt32 fails, optional member variables will retain their previously set values without modification. This can be a big problem for new resolution with old crop info. This patch reset optional fields to zero when getInt32 failed.
* fftools/ffprobe: Rename AVTextFormatContext variables (w => tfc)softworkz2025-04-111-259/+259
| | | | Signed-off-by: softworkz <softworkz@hotmail.com>
* fftools/ffprobe: Rename writer_print_section_* and WriterContextsoftworkz2025-04-111-184/+179
| | | | | | | separated for better clarity of the preceding commit Signed-off-by: softworkz <softworkz@hotmail.com> ren
* fftools/ffprobe: Change to use textformat apisoftworkz2025-04-112-1720/+144
| | | | Signed-off-by: softworkz <softworkz@hotmail.com>
* fftools/textformat: Extract and generalize textformat api from ffprobe.csoftworkz2025-04-1112-0/+2411
| | | | Signed-off-by: softworkz <softworkz@hotmail.com>
* tests/fate/checkasm: add the aes testJames Almer2025-04-101-0/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/x86/aes: remove a few branchesJames Almer2025-04-103-22/+37
| | | | | | | | | | | | | | | | | | | | | | | | The rounds value is constant and can be one of three hardcoded values, so instead of checking it on every loop, just split the function into three different implementations for each value. Before: aes_decrypt_128_aesni: 93.8 (47.58x) aes_decrypt_192_aesni: 106.9 (49.30x) aes_decrypt_256_aesni: 109.8 (56.50x) aes_encrypt_128_aesni: 93.2 (47.70x) aes_encrypt_192_aesni: 111.1 (48.36x) aes_encrypt_256_aesni: 113.6 (56.27x) After: aes_decrypt_128_aesni: 71.5 (63.31x) aes_decrypt_192_aesni: 96.8 (55.64x) aes_decrypt_256_aesni: 106.1 (58.51x) aes_encrypt_128_aesni: 81.3 (55.92x) aes_encrypt_192_aesni: 91.2 (59.78x) aes_encrypt_256_aesni: 109.0 (58.26x) Signed-off-by: James Almer <jamrial@gmail.com>
* checkasm: hevc_pel: Use helpers for checking for writes out of boundsMartin Storsjö2025-04-101-67/+90
| | | | | | | | This allows catching whether the functions write outside of the designated rectangle, and if run with "checkasm -v", it also prints out on which side of the rectangle the overwrite was. Signed-off-by: Martin Storsjö <martin@martin.st>
* doc/encoders: Document png predMichael Niedermayer2025-04-102-0/+3
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pngenc: set default prediction method to PAETHMichael Niedermayer2025-04-1017-38/+38
| | | | | | | | | | | | this is a good compromise between speed and compression -rw-r----- 1 michael michael 180987 Feb 6 14:29 lena-def.png -rw-r----- 1 michael michael 128430 Feb 6 14:36 lena-pavg.png -rw-r----- 1 michael michael 126269 Feb 6 14:36 lena-pmixed.png -rw-r----- 1 michael michael 180987 Feb 6 14:35 lena-pnone.png -rw-r----- 1 michael michael 127758 Feb 6 14:35 lena-ppaeth.png Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* doc/encoders: Document compression_level for PNGMichael Niedermayer2025-04-101-0/+7
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/osq: avoid undefined negationMichael Niedermayer2025-04-101-1/+1
| | | | | | | | Fixes: negation of -2147483648 cannot be represented in type 'int32_t' (aka 'int'); cast to an unsigned type to negate this value to itself Fixes: 390646659/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-5040277374435328 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/swscale: Do not crash on floatsMichael Niedermayer2025-04-101-1/+1
| | | | | | | | | | Fixes: shift exponent 32 is too large for 32-bit type 'unsigned int' Fixes: division by zero Fixes: 391981061/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-6691017763389440 Fixes: 392929028/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5142088307507200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/output: Fix integer overflow in yuv2gbrp_full_X_c()Michael Niedermayer2025-04-101-3/+3
| | | | | | | | Fixes: signed integer overflow: 1966895953 + 210305024 cannot be represented in type 'int' Fixes: 391921975/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5916798905548800 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1enc: permit 1024 slicesJerome Martinez2025-04-101-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/nvdec_vc1: add marker insertion logicaverne2025-04-091-1/+44
| | | | | | This mirrors existing code in d3dxx and dxva hwaccels Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/dovi_rpuenc: Constify dv_levelsAndreas Rheinhardt2025-04-091-1/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/m[jx]pegdec: Simplify freeing frameAndreas Rheinhardt2025-04-092-7/+2
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* tests/fate/vcodec: Test "default" Huffman tables, tooAndreas Rheinhardt2025-04-0910-46/+46
| | | | | | | | | | | | | | Since 45eeb1f785d6c726181568db341bbf80b43e32c0 optimal Huffman tables are the default (without slice-threading). This made the fate-vsynth*-mjpeg-{trell-,}-huffman tests identical to their corresponding tests without "-huffman". This is of course wasteful, so switch the two tests with "-huffman" counterparts back to the default tables. Also use one of these tests to test slice threaded encoding. It has so far been untested. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avocdec/mjpegenc_huffman: Avoid redundant loopAndreas Rheinhardt2025-04-091-14/+10
| | | | | | There is no point in iterating over the list twice. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mjpegenc_huffman: Make ff_mjpegenc_huffman_compute_bits() staticAndreas Rheinhardt2025-04-093-40/+38
| | | | | | Only used here and in a test tool. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/aacenc_is: Make ff_aac_is_encoding_err() staticAndreas Rheinhardt2025-04-092-26/+21
| | | | | | | Possible since 9b11fefb88c770b9c1d4d4583c61c6abde6c033c. Also remove a now always-zero parameter. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/hevcdsp: Move to x86/hevcAndreas Rheinhardt2025-04-092-4/+4
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/hevcdsp: Move macro to dsp_init.cAndreas Rheinhardt2025-04-092-9/+7
| | | | | | It belongs to the [EQ]PEL_LINKS macros. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/hevc/dsp_init: Reindent after the previous commitsAndreas Rheinhardt2025-04-091-61/+61
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/hevc/dsp_init: Make ff_hevc_put_bi_[eq]?pel* funcs staticAndreas Rheinhardt2025-04-092-137/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | Given that there are actually ASM functions of this type, one can't simply remove the ff_ prefix from the definitions and declare them as static. Yet one can do nearly that if one keeps the ff_ prefix and removes the declarations for the (now static) functions defined in dsp_init.c from hevcdsp.h and if one defines the functions in the correct order (smaller width first) so that no forward declarations are necessary (which was already true). The new declarations avoid nested macros to simplify things. It nevertheless turned out to be beneficial line-wise. (It would be possible to avoid most of these declarations: It is legal to repeat a function declaration without static if the first declaration declared a function as static. So if the macros simply declared all the functions that they call, one could avoid declarations for the functions that are called. While this is legal C, it unfortuntaly clashes with GCC's -Wredundant-decls (which configure enables) and it is also ugly, as these macro definitions would provide declarations used in ff_hevc_dsp_init_x86().) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/hevc/dsp_init: Make ff_hevc_put_[eq]?pel_* staticAndreas Rheinhardt2025-04-092-95/+80
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/hevc/dsp_init: Make ff_hevc_put_uni_[qe]?pel* funcs staticAndreas Rheinhardt2025-04-092-88/+88
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>