aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* avcodec/mfenc: propagate error codes properlyDash Santosh3 days1-19/+27
|
* avfilter/scale_d3d11: cleanup return path using fail labelDash Santosh3 days1-26/+24
|
* avcodec/mfenc: add support for D3D11 input surfacesDash Santosh3 days2-29/+185
| | | | | | | | Adds D3D11 input surface support to the MediaFoundation encoder (mfenc), allowing direct encoding of GPU frames without readback to system memory. This improves performance and compatibility when used alongside scale_d3d11. Signed-off-by: Dash Santosh <dash.sathyanarayanan@multicorewareinc.com>
* avfilter: add scale_d3d11 filterDash Santosh3 days6-0/+472
| | | | | | | This commit introduces a new hardware-accelerated video filter, scale_d3d11, which performs scaling and format conversion using Direct3D 11. The filter enables efficient GPU-based scaling and pixel format conversion (p010 to nv12), reducing CPU overhead and latency in video pipelines.
* avcodec/flacdsp: Fix integer-overflow in flac_lpc_33_cDale Curtis3 days1-1/+1
| | | | | | | | This fix copies a couple of casts from surrounding functions. See https://crbug.com/432528781 for stack trace details. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/apv: align APV color format support with latest liboapv versionDariusz Frankiewicz3 days2-1/+25
| | | | | Signed-off-by: Dariusz Frankiewicz <d.frankiewic@samsung.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/avfiltergraph: add logging for filter formatsNiklas Haas4 days1-1/+63
| | | | | | | | | | | | | | There is no convenient way, from the command line, to figure out which formats a filter actually supports. This commit changes that by adding a log output, at debug level, to simply print the list of formats each filter advertises on its links, before any negotiation. Furthermore, we can use the exact same helper function to also print out the corresponding filter links when there is an error during format negotiation. We need to use AV_BRINT_SIZE_UNLIMITED because the default format list for filters like vf_scale is about 1700 characters long, significantly larger than the the 1 kB default buffer.
* avformat/file: add missing null check in Android content resolversfan54 days1-0/+5
| | | | | | | | openFileDescriptor() can return null in certain error conditions. Signed-off-by: sfan5 <sfan5@live.de> Reviewed-by: Kacper Michajłow <kasper93@gmail.com> Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avfilter/vf_vibrance: Update default value of rlum/blumZhao Zhili4 days1-2/+2
| | | | | | | | | | | | | | Fix #9195 It looks like vf_vibrance.c is similar to https://github.com/zachsaw/RenderScripts/blob/master/RenderScripts/ImageProcessingShaders/SweetFX/Vibrance.hlsl and https://github.com/kevinlekiller/kwin-effect-shaders_shaders/blob/main/Vibrance.frag Originall written by Christian Cann Schuldt Jensen ~ CeeJay.dk. They use same matrix coeff. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* swscale/alphablend: don't overread alpha plane on subsampled odd sizeNiklas Haas4 days1-13/+19
| | | | | | | | | | | | | This function overreads the input plane for odd dimensions, because the chroma plane is always rounded up, which means (xy << subsample) + 1 exceeds the actual alpha plane size. To verify: valgrind ffmpeg -pix_fmt yuva420p -f lavfi -i color -vf \ "scale=1x1,format=yuva420p,scale=alphablend=uniform_color,format=yuv420p \ -vframes 1 -f null - Fixes: https://trac.ffmpeg.org/ticket/11692
* lavu/spherical: Add support for Spherical Immersive typeVittorio Giovara4 days5-1/+14
|
* mov: Export frame packing information from pack boxVittorio Giovara4 days1-0/+86
|
* libavformat/mov.c: Fix "statement will never be executed" warningzhaozhenghang4 days1-6/+2
| | | | | | | That occurs when H261, H263, and MPEG4 decoders are disabled. Signed-off-by: zhaozhenghang <15083277223@163.com> Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* tests/fate/mov: add a test muxing multiple stsd entriesJames Almer4 days2-0/+16
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/movenc: support writing more than one STSD entry per trackJames Almer4 days2-4/+50
| | | | | | | | If a packet contains new extradata within a side data entry, save for specific cases it means the coded stream changed. If ignored, upon demuxing every packet from then onwards may be undecodable. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/movenc: allow storing more than one extradata buffer per trackJames Almer4 days2-124/+147
| | | | | | This is in preparation for a following change Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: export the correct initial extratada from samples with ↵James Almer4 days2-4/+18
| | | | | | | | | | multiple stsd The first sample in the stsc box may not refer to the first stsd entry. This is the case in h264/thezerotheorem-cut.mp4, and as such the fate-h264_redundant_pps-side_data test is updated accordingly. Signed-off-by: James Almer <jamrial@gmail.com>
* fate: Add a missing ffprobe dependency for fate-filter-select-ffprobeMartin Storsjö4 days1-2/+3
| | | | | This fixes doing "make fate" without having done a plain "make" before.
* Revert "avformat/tls_openssl: properly get new BIO index"Kacper Michajłow5 days1-14/+4
| | | | | | | | | | | | | | | | | | | | | | | BIO_get_new_index() is static counter meant to get index for custom bio type definition. As we can read in the documentation: > Note that BIO_get_new_index() can only be used 127 times before it > returns an error. We cannot call it repeatedly, because it will fail eventually. To my understanding the index is not needed in our use and we could safely use BIO_TYPE_NONE. Documentation states: > type can be set to either BIO_TYPE_NONE or via BIO_get_new_index() if > a unique type is required for searching (See BIO_find_type(3)) We don't use any search related functions. This reverts commit 816dad231f5b312fd98e81cc6a6cbaf47c1e26a5. Fixes: https://github.com/mpv-player/mpv/issues/16589 Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
* avcodec/cbs_apv_syntax_template: Check tile_data_sizeMichael Niedermayer5 days1-0/+2
| | | | | | | | | | Fixes: heap-buffer-overflow Fixes: 418421333/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APV_fuzzer-6592025183191040 Fixes: 418804929/clusterfuzz-testcase-minimized-ffmpeg_BSF_APV_METADATA_fuzzer-5773904646045696 Fixes: 420737045/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APV_fuzzer-5535272169439232 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/subfile: Initialize end on all casesMichael Niedermayer5 days1-2/+0
| | | | | | | Fixes: use of uninitialized variable Regression since: e29016a9de8cf9a15569bdcea6e68c8e9ba2f299 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/sanm: Check decoded_size for old_codec48Michael Niedermayer5 days1-0/+5
| | | | | | | | | | Fixes: writing over the end of the array Fixes: BIGSLEEP-434637586/payload Regression since: b22ce90d42 Found-by: Google Big Sleep Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* amfenc: Fix for full PA queueAraz Iusubov5 days2-15/+61
| | | | | | | | | | | | | Fixes AMF_INPUT_FULL errors with pre-analysis (PA) enabled. Added wait and poll encoder output to free up internal buffers before submitting new frames. Improves stability and performance by accounting for encoder and analysis stage queue limits (incl. lookahead buffering). Reproduce: ffmpeg.exe -y -r 60 -f lavfi -i testsrc=rate=60:size=3840x2160 -t 10 -pix_fmt yuv420p -an -c:v av1_amf -preset:v high_quality -profile:v main -quality:v high_quality -usage:v high_quality
* avutil/hwcontext_amf: add device cache sizeAraz Iusubov5 days1-1/+3
| | | | | | This change improves pipeline stability and reduces dynamic GPU surface allocations when using AMF with copy_frame = 1. This optimization has no negative effect.
* avfilter/af_afade: rework crossfade activate logicMarton Balint5 days2-87/+80
| | | | | | | | | | | | The new logic should be easier to follow. It also uses ff_inlink_consume_frame() for all simple passthrough operations making custom get_audio_buffer callback unnecessary. Fate changes are because the new logic does not repacketize input audio up until the crossfade. Content is the same. Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/af_afade: fix check_input for empty streamsMarton Balint5 days1-9/+2
| | | | | | | | | | Use ff_outlink_get_status directly to get pending EOF state. Fixes assertion failure with: ffmpeg -lavfi "sine=f=1000:d=2[a];sine=f=440:d=2,atrim=end=0[b];[a][b]acrossfade=d=1" -f framecrc - ffmpeg -lavfi "sine=f=1000:d=2,atrim=end=0[a];sine=f=440:d=2[b];[a][b]acrossfade=d=1" -f framecrc - Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/af_afade: factorize functions generating framesMarton Balint5 days1-95/+111
| | | | | | No change in functionality. Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/trim: consume all available frames and avoid activate rescheduleMarton Balint5 days1-25/+17
| | | | | | There is no benefit in delaying processing all available frames. Signed-off-by: Marton Balint <cus@passwd.hu>
* lavc/vvc: Add max parameter to kth_order_egk_decodeFrank Plowman6 days3-19/+25
| | | | | | | | | | | | | | | Prior to this patch, kth_order_egk_decode could read arbitrarily large values which then overflowed and caused various issues. Patch fixes this by making kth_order_egk_decode falliable, requiring the caller to specify an upper bound and returning an error if the read value would exceed that bound. This patch resolves the same issue as eb52251c0ab025b6b40b28994bc9dc616813b190, but I think this is the proper fix as it also addresses issues with syntax elements besides ff_vvc_num_signalled_palette_entries. Signed-off-by: Frank Plowman <post@frankplowman.com>
* lavc/vvc: Don't discard palette_subblock_data return codeFrank Plowman6 days1-2/+5
| | | | Signed-off-by: Frank Plowman <post@frankplowman.com>
* avformat/dhav: Remove end_ prefix from variable namesMichael Niedermayer6 days1-18/+18
| | | | | | | The end_ prefix is confusing and may have contributed the mixup fixed in the previous commit Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/dhav: fix reference point mixupMichael Niedermayer6 days1-1/+1
| | | | | | | | | | | Fixes: reading the duration from before the start of the allocated buffer. Regression since: 36ec9217e6dca3432304c9d76078d9618247eb0f Fixes: BIGSLEEP-433513232/test Found-by: Google Big Sleep Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* checkasm/h264dsp: Fix stack-buffer-overflow, effective-type violationsAndreas Rheinhardt6 days2-17/+30
| | | | | | | | | | Also ensure that the dst buffers are not too big (they had the right size for >8 bit depths and were therefore too big for eight bit, letting potential buffer overflows in the eight bit version go undetected). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/sanm: Check w, h for subversion < 2Michael Niedermayer6 days1-0/+2
| | | | | | | | | Fixes: 410609432/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SANM_fuzzer-4935159201988608 Fixes: out of array access Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxg: clear AV_INPUT_BUFFER_PADDING_SIZEMichael Niedermayer6 days1-0/+2
| | | | | | | | Fixes: use of uninitialized memory Fixes: 427532813/clusterfuzz-testcase-minimized-ffmpeg_dem_MXG_fuzzer-5661938917113856 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dxvenc: Clear width to linesize not linesize to linesizeMichael Niedermayer6 days1-1/+2
| | | | | | | | Fixes: use of uninitialized memory Fixes: 422217206/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXV_fuzzer-4786889444098048 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/shorten: Clear the additionally allocated space on reallocMichael Niedermayer6 days1-4/+3
| | | | | | | | Fixes: use of uninitialized memory Fixes: 421954767/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-515682786246656 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/vqf: Ensure that comm_chunk is fully readMichael Niedermayer6 days1-1/+3
| | | | | | | | Fixes: use of uninitialized memory Fixes: 412125811/clusterfuzz-testcase-minimized-ffmpeg_dem_VQF_fuzzer-6253774274887680 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfdec: Ensure klv->key is initializedMichael Niedermayer6 days1-1/+3
| | | | | | | | Fixes: read of uninitialized memory Fixes: 391916474/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4935250956845056 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: make sure file_checksum is fully initializedMichael Niedermayer6 days1-1/+3
| | | | | | | | Fixes: use of uninitialized memory Fixes: 394990189/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6431722199908352 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevc/hevcdec: Clean sao_pixel_buffer_v on allocationMichael Niedermayer6 days1-2/+2
| | | | | | | | Fixes: use of uninitialized memory Fixes: 378102648/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5896308499480576 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/asfdec_f: Check amount of value readMichael Niedermayer6 days1-2/+4
| | | | | | | | Fixes: use of uninitialized memory Fixes: 403675492/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_fuzzer-4754281823797248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Set ALS max order to 15 (ALS simple profile)Michael Niedermayer7 days1-1/+3
| | | | | | | | Fixes: Timeout Fixes: 429645375/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5377900448907264 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/alsdec: Allow the user to set a maximum prediction orderMichael Niedermayer7 days1-0/+20
| | | | | | | | | | | | | The only offical profile i could find (ALS simple profile) has a max of 15 while the bitstream allows 1023 which is very slow. We do have a fate sample with 1023 Fixes: Timeout Fixes: 429645375/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5377900448907264 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/hlsenc: limit segments count to search duplicated segments filenamesArtem Smorodin7 days1-1/+1
| | | | | | | | | This linear search has a complexity of O(n). When ffmpeg attempts to parse a playlist containing approximately 100,000 segments, it effectively causes a hang for several minutes. This patch limits the allowed size for duplicate searches to a reasonable value. Now it takes between 0.5 and a few seconds (tested on different devices) instead of several minutes. Signed-off-by: Artem Smorodin <artem.smorodin@dacast.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/movenc: fix HEVC fmp4 HLS init segment for Apple playbackDavid McElroy7 days1-1/+1
| | | | | | | | | | | | | | | | | | | | | | HEVC fmp4 HLS video produced by ffmpeg is currently unplayable on Apple software (Safari, QuickTime, AVFoundation). This is caused by an empty sdtp atom being erroneously written to the fmp4 init segment. The `has_disposable` flag can be set for a track with B-frames, but the init segment contains no actual frames (track->entry == 0). Writing an sdtp atom in this case is incorrect and causes Apple's parsers to reject the file. This patch fixes the issue by ensuring the sdtp atom is only written if track->entry is non-zero. A similar patch was proposed in November 2023 by Jay Zhang, but it was never merged. Link: https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2023-November/317173.html Co-authored-by: Jay Zhang <wangyoucao577@gmail.com> Signed-off-by: David McElroy <david@mcelroy.online> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_libplacebo: composite multiple inputs in linear lightNiklas Haas7 days1-0/+51
| | | | | | | | | | | This gives vastly improved blending results than when blending directly in the desired output colorspace. Overridable by the existing "disable_linear" option. This is functionally similar to combining multiple "libplacebo" filters, but does not rely on the existence of a Vulkan filter link, so it can be used without performance penalty in all circumstances. It's also enabled by default, without requiring special action from the user.
* avfilter/vf_premultiply: use correct premultiplication formulaNiklas Haas7 days1-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous formula was introduced without justification in 6e713841e8, and the only thing Paul had to say about it over IRC was that it was copied from an unspecified source on the internet. I decided to do some testing and came to the conclusion that this term not only produces "illegal" files, but also lowers PSNR score, over the naive implementation without this extra term. Here are the results of a round-trip test, using allrgb/allyuv (respectively) as the input, and fade=alpha=yes:n=256 to cycle through every possible alpha value, comparing the round-trip output against the input: Before patch: PSNR r:26.677431 g:26.677431 b:26.677431 a:inf average:27.926818 min:6.012093 max:55.400791 PSNR y:26.677431 u:21.101981 v:21.101981 a:inf average:23.548981 min:9.013835 max:53.182303 (full) PSNR y:27.348055 u:21.101981 v:21.101981 a:inf average:23.625238 min:9.554991 max:45.652221 (limited) After patch: PSNR r:27.321996 g:27.321996 b:27.321996 a:inf average:28.571384 min:6.012093 max:52.424553 PSNR y:27.321996 u:23.187879 v:23.187879 a:inf average:25.431773 min:9.013835 max:50.199232 (full) PSNR y:27.868544 u:23.187879 v:23.187879 a:inf average:25.515660 min:9.554991 max:45.078298 (limited) It's worth pointing out that previous version sometimes artificially inflates PSNR by producing values that are too high (i.e. RGB > A), such as for the input pair (R = 255, A = 2) which should give R = 2, but actually gives R = 3 under the old logic. As a second evaluation without this shortcoming, here is a comparison against the reference value computed with a floating point format: Before patch: PSNR r:53.600599 g:53.957833 b:53.540948 a:inf average:54.945316 min:50.508901 max:inf (premul only) PSNR r:30.734183 g:30.734183 b:30.734183 a:inf average:31.983570 min:12.058264 max:inf (round-trip) After patch: PSNR r:61.751104 g:65.239091 b:61.339191 a:inf average:63.710714 min:55.441130 max:inf (premul only) PSNR r:32.611851 g:32.611851 b:32.611851 a:inf average:33.861238 min:12.058264 max:inf (round-trip)
* avcodec/dovi_rpudec: skip unknown ext blocks instead of erroring outKacper Michajłow8 days1-5/+6
| | | | | | Should allow for forward compatibility with newer versions. Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
* avcodec/dovi_rpudec: parse RPU forward, don't try to find endKacper Michajłow8 days1-16/+21
| | | | | | | | | | | | | | Instead of scanning backwards for the end of RPU payload, parse it and report if we didn't land at the terminator byte. Current expectation was that we can have additional zero bytes after RPU payload, which were skipped to find playload end. That's not always the case. So loosen this requirement. This fixes files where there is additional non-zeroed padding after the end of the RPU in NALU. Signed-off-by: Kacper Michajłow <kasper93@gmail.com>