aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* avfilter/buffersink: keep requesting frames if one activation of the graph ↵Marton Balint2025-07-035-7/+18
| | | | | | | | | | | | | | | | | does not provide one A frame graph activation might not produce a frame in the requested sink, so keep on requesting a frame there unless we encounter a filter activation with buffersrc empty error. This makes av_buffersink_get_frame(_flags) work according to its documentation which claims that EAGAIN is only returned if additional frames must be inserted into the graph. Fate changes are because audio frames will have different sizes at segment boundaries, but content is the same. Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter: signal an empty buffersrc with an explicit activate error codeMarton Balint2025-07-034-3/+9
| | | | | | No change in functionality. Signed-off-by: Marton Balint <cus@passwd.hu>
* tests/fate/filter-audio: add anullsink testMarton Balint2025-07-032-0/+9
| | | | | | Tests ticket #11624 with a slight modification. Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/avfilter: make filter_activate_default request frames on behalf of ↵Marton Balint2025-07-031-0/+9
| | | | | | | | | | | | | sinks Sinks without an activate callback have no means to request frames in their input, therefore the default activate callback should do it for them. Fixes ticket #11624. Fixes ticket #10988. Fixes ticket #10990. Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/avfilter: always forward request frame in filter_activate_defaultMarton Balint2025-07-031-0/+11
| | | | | | | Even if all inputs are blocked an activate callback should request a frame on some if its inputs if a frame is requested on any of its outputs. Signed-off-by: Marton Balint <cus@passwd.hu>
* fate/filter-video: add ffprobe test for dual output select filterMarton Balint2025-07-033-0/+32
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/avfilter: fix forwarding EOF for simple API filters in ↵Marton Balint2025-07-031-9/+7
| | | | | | | | | | | | | | filter_activate_default EOF only need to be forwarded back if all outputs have reached EOF. Fixes infinte loop with ffprobe -f lavfi -i "smptebars=d=1,select=n=2:e=1[out0][out1]" Regression since d9e41ead82263e96ebd14d4d88d6e7f858dd944c. Fixes ticket #10959. Fixes ticket #11366. Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/filters: simplify FF_FILTER_FORWARD_WANTED_ANYMarton Balint2025-07-031-3/+1
| | | | | | | | The status check is unneeded because an outlink with a nonzero status should always return 0 for ff_outlink_frame_wanted(). Also use unsigned for index because nb_outputs is unsigned as well. Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter: factorize requesting an input frame from multi output filtersMarton Balint2025-07-036-36/+20
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/rv34: Fix spelling mistakeAndreas Rheinhardt2025-07-031-1/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/rv34: Don't report progress unnecessarilyAndreas Rheinhardt2025-07-031-4/+0
| | | | | | ff_mpv_frame_end() already does it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move loop_filter to {H263Dec,MPVEnc,VC1}ContextAndreas Rheinhardt2025-07-0321-45/+47
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move partitioned_frame to {H263Dec,MPVEnc}ContextAndreas Rheinhardt2025-07-037-20/+21
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg_er: Allow to skip setting partitioned_frame, p[pb]_timeAndreas Rheinhardt2025-07-034-5/+12
| | | | | | | | | | | Instead of setting these unconditionally (they are always zero for H.261, MPEG-1/2, RV30/40, VC-1), add a variant of ff_mpeg_er_frame_start() that sets them and remove setting them from ff_mpeg_er_frame_start(). Also pass these values via parameters instead of reading them from the MPVContext itself. This will allow to move them from MPVContext. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move fields to {H263Dec,MPVEnc}Context when possibleAndreas Rheinhardt2025-07-0325-151/+162
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/flvdec: Binarize h263_flvAndreas Rheinhardt2025-07-033-4/+3
| | | | | | | | | It used to be a tri-state encoding both whether to use FLV picture headers and whether to use the FLV way of encoding escape values, but the former is now unnecessary due to the switch to a function pointer for reading the header. So binarize h263_flv. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ituh263enc: Inline value of h263_flvAndreas Rheinhardt2025-07-033-10/+5
| | | | | | It is always two when we encode FLV1. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h263dec: Use function ptr for decode_picture_headerAndreas Rheinhardt2025-07-038-30/+22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/msmpeg4dec: Move ff_msmpeg4_decode_init() downAndreas Rheinhardt2025-07-031-39/+40
| | | | | | Will avoid a forward declaration lateron. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move SLICE_* defs to h263dec.h, h261dec.cAndreas Rheinhardt2025-07-033-5/+8
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move mb_skip_run to {RV34Dec,MPVEnc}ContextAndreas Rheinhardt2025-07-038-22/+25
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12dec: Put mb_skip_run on the stackAndreas Rheinhardt2025-07-031-12/+11
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move mb_num_left to {H263,RV34}DecContextAndreas Rheinhardt2025-07-037-13/+16
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move fields only used by H.263 decoders to H263DecCtxAndreas Rheinhardt2025-07-0310-80/+86
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12dec: Don't use MPVContext.blockAndreas Rheinhardt2025-07-034-43/+23
| | | | | | | Instead add the necessary blocks directly into Mpeg12SliceContext. This allows to completely remove MPVContext.block. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12dec: Move MpegEncContext.gb to Mpeg12SliceContextAndreas Rheinhardt2025-07-032-107/+104
| | | | | | It was its last user. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Add missing headersAndreas Rheinhardt2025-07-0311-2/+11
| | | | | | | These files currently rely on implicit inclusions of avassert.h and/or mathops.h via get_bits.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12dec: Add Mpeg12SliceContextAndreas Rheinhardt2025-07-033-430/+436
| | | | | | | This is in preparation for removing the GetBitContext from MPVContext. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h263dec: Stop using MpegEncContext.gbAndreas Rheinhardt2025-07-0313-583/+588
| | | | | | | | Add a GetBitContext to H263DecContext instead. This is in preparation for removing MpegEncContext.gb. Also move last_resync_gb to H263DecContext. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h263dec: Don't use MpegEncContext.blockAndreas Rheinhardt2025-07-037-23/+26
| | | | | | | | Instead add the necessary blocks directly to H263DecContext (only six are needed, not 12 as ff_mpv_common_init() currently allocates). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h263dec: Remove redundant block parameter from decode_mbAndreas Rheinhardt2025-07-037-22/+21
| | | | | | | | | | | With the exception of mpeg4_decode_studio_mb(), all decode_mb functions implicitly presumed that the block provided as argument coincides with MpegEncContext.block (they zeroed the latter and then used the former to decode the block); mpeg4_decode_studio_mb() meanwhile did not use the provided block at all (it uses blocks of int32_t). So remove said parameter. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h263dec: Add H263DecContextAndreas Rheinhardt2025-07-0321-2223/+2251
| | | | | | | | | This is in preparation for moving the fields only used by H.263-based decoders from MPVContext to H263DecContext. For now only the decode_mb function pointer has been moved (to be able to switch said callback to use an H263DecContext*). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move dct_precision to Mpeg4DecContextAndreas Rheinhardt2025-07-033-12/+15
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/{h263,mpeg4video}dec: Pass MPVContext*, not Mpeg4DecContext*Andreas Rheinhardt2025-07-034-13/+13
| | | | | | | | | | | The code in h263dec.c is not supposed to know that the MPEG-4 decoder uses an Mpeg4DecContext as private context at all (said context is only exposed in a header so that hardware accelerations can access it and for the parser to use). Passing an MPVContext* directly also allows to remove the indirection via AVCodecContext.priv_data. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg4videodec: Avoid unnecessary indirectionsAndreas Rheinhardt2025-07-031-6/+3
| | | | | | | | | | This basically reverts d4967c04e040b3b2f937cad88599af825147ec94. Said commit was based on the false premise that it would be an aliasing violation to upcast a pointer to structure to a pointer to a bigger structure containing the original structure as its first element, but this is just not true. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move unrestricted_mv to MotionEstContextAndreas Rheinhardt2025-07-037-15/+15
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move flipflop_rounding to {MSMPEG4Dec,MPVEnc}ContextAndreas Rheinhardt2025-07-037-15/+16
| | | | | | Forgotten in 9964212545554d9ae1afaabd23a7f9a361997d01. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12dec: Deduplicate variablesAndreas Rheinhardt2025-07-031-2/+1
| | | | | | | This situation was created in merge commit 71d008ebe4f96974433eecfd3575bc82eb4b06a8. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vc1: Don't use MpegEncContext.blockAndreas Rheinhardt2025-07-033-15/+19
| | | | | | | | Instead add the necessary blocks directly to VC1Context (only six are needed, not 12 as ff_mpv_common_init() currently allocates). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vc1: Stop using MpegEncContext.gbAndreas Rheinhardt2025-07-038-89/+91
| | | | | | | Add a GetBitContext to VC1Context instead. This is in preparation for removing MpegEncContext.gb. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/intrax8: Don't pretend to need more than one int16_t[64]Andreas Rheinhardt2025-07-034-12/+12
| | | | | | Intrax8 needs only a single block. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/rv34: Don't use MpegEncContext.blockAndreas Rheinhardt2025-07-032-4/+4
| | | | | | | These decoders only need a single 4x4 block; put it in RV34DecContext. This is in preparation for removing MpegEncContext.block. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/rv34: Don't use MpegEncContext.gbAndreas Rheinhardt2025-07-034-16/+18
| | | | | | This is in preparation for removing MpegEncContext.gb. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12dec: Remove unused function parameterAndreas Rheinhardt2025-07-031-2/+3
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12dec: Put GetBitContext on the stack where advantageousAndreas Rheinhardt2025-07-031-90/+102
| | | | | | This is in preparation for no longer using MpegEncContext.gb. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h261dec: Don't use MpegEncContext.blockAndreas Rheinhardt2025-07-031-4/+7
| | | | | | | Instead put it into H261DecContext. This is in preparation for removing MpegEncContext.block. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h261dec: Stop using MpegEncContext.gbAndreas Rheinhardt2025-07-031-39/+41
| | | | | | This is in preparation for removing said field from MpegEncContext. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideodec: Remove size expectation from ff_mpv_reconstruct_mbAndreas Rheinhardt2025-07-032-2/+2
| | | | | | | In the common case of decoding 420 content, only six blocks are used and it makes perfect sense for the caller to only have that many. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg_er: Don't use MpegEncContext.blockAndreas Rheinhardt2025-07-032-2/+5
| | | | | | | | | | It is unused (because unquantizing/the idct has been disabled) apart from FF_DEBUG_DCT_COEFF debug code which makes no sense when this function is called via error resilience. So pass a NULL as block when calling ff_mpv_reconstruct_mb() from mpeg_er_decode_mb() and disable the debug code in this scenario. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_dec: Reindent after the previous commitAndreas Rheinhardt2025-07-031-9/+12
| | | | | | Also use dedicated variables for the accesses. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>