summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* fftools/ffmpeg_mux_init: make encoder_opts local to ost_add()ffmpeg_encoder_optsAnton Khirnov2024-04-09
| | | | It is no longer needed after this function returns.
* fftools/ffmpeg_mux_init: apply encoder options manuallyAnton Khirnov2024-04-09
| | | | | | | | | | | | | | | Do not pass an options dictionary to the avcodec_open2() in enc_open(). This is cleaner and more robust, as previously various bits of code would try to interpret the contents of the options dictionary, with varying degrees of correctness. Now they can just access the encoder AVCodecContext directly. Cf. 372c78dd42f2b1ca743473b9c32fad71c65919e0 - analogous change for decoding. A non-progressive field order is now written on the container level in interlaced ProRes encoding tests.
* fftools/ffmpeg: rewrite checking whether codec AVOptions have been usedAnton Khirnov2024-04-09
| | | | | | Share the code between encoding and decoding. Instead of checking every stream's options dictionary (which is also used for other purposes), track all used options in a dedicated dictionary.
* lavc/qsvenc: rename the skip_frame private option to qsv_skip_frameAnton Khirnov2024-04-09
| | | | It conflicts with the AVCodecContext option of the same name.
* doc/ffmpeg: document that there can be multiple complex filtergraphsAnton Khirnov2024-04-09
|
* fftools/ffmpeg_filter: implement filtergraph chainingAnton Khirnov2024-04-09
| | | | | | | | | | This allows one complex filtergraph's output to be sent as input to another one, which is useful in certain situations (one is described in the docs). Chaining filtergraphs was already effectively possible by using a wrapped_avframe encoder connected to a loopback decoder, but it is ugly, non-obvious and inefficient.
* fftools/ffmpeg_sched: allow filtergraphs to send to filtergraphsAnton Khirnov2024-04-09
| | | | | Will be useful for filtergraph chaining that will be added in following commits.
* fftools/ffmpeg_filter: change processing order in fg_finalise_bindings()Anton Khirnov2024-04-09
| | | | | | | First bind all inputs in all filtergraphs, only then check that all outputs are bound. Needed by the following commit.
* fftools/ffmpeg_filter: only store complex filtergraphs in global arrayAnton Khirnov2024-04-09
| | | | | Store simple filtergraphs in the stream they feed. Keeping the two separate will be useful in following commits.
* fftools/ffmpeg_filter: drop OutputFilter.ostAnton Khirnov2024-04-09
| | | | | All remaining code accessing it only needs to know whether this filtergraph output has been bound or not.
* fftools/ffmpeg_filter: accept encoder thread count through OutputFilterOptionsAnton Khirnov2024-04-09
| | | | | | Stop digging through encoder options manually. Will allow decoupling filtering from encoding in future commits.
* fftools/ffmpeg_mux: drop OutputFile.formatAnton Khirnov2024-04-09
| | | | | It is no longer used outside of the muxing code (where we can access the muxer directly).
* fftools/ffmpeg_mux: drop OutputFile.shortestAnton Khirnov2024-04-09
| | | | It is no longer needed outside of of_open() and its children.
* fftools/ffmpeg_filter: move most of -apad logic to the muxerAnton Khirnov2024-04-09
| | | | | | The decision whether -apad actually does anything is made based on muxer properties, and so more properly belongs there. Filtering code only receives the result.
* fftools/ffmpeg_filter: pass trim parameters through OutputFilterOptionsAnton Khirnov2024-04-09
| | | | | | Do not read them from OutputStream directly. Will allow decoupling filtering from encoding in future commits.
* fftools/ffmpeg_filter: pass autoscale through OutputFilterOptionsAnton Khirnov2024-04-09
| | | | | | Do not read it from OutputStream directly. Will allow decoupling filtering from encoding in future commits.
* fftools/ffmpeg_filter: pass sws/swr opts through OutputFilterOptionsAnton Khirnov2024-04-09
| | | | | | Do not read them from OutputStream directly. Will allow decoupling filtering from encoding in future commits.
* fftools/ffmpeg_filter: drop an unnecessary use of OutputStreamAnton Khirnov2024-04-09
| | | | OutputFilter.type contains the same information.
* fftools/ffmpeg_filter: add an AVClass to OutputFilterAnton Khirnov2024-04-09
| | | | | | | Use it for logging where appropriate, avoid logging to OutputStream as we do not own it. This is a step towards decoupling filtering from encoding.
* fftools/ffmpeg_filter: simplify retrieving filter typeAnton Khirnov2024-04-09
|
* fftools/ffmpeg_filter: drop a redundant checkAnton Khirnov2024-04-09
| | | | | fg_finalise_bindings() already checks that all filtergraph outputs are connected.
* fftools/ffmpeg_filter: accept a caller-provided output nameAnton Khirnov2024-04-09
| | | | | | Do not construct it from OutputStream manually. Will allow decoupling filtering from encoding in future commits.
* fftools/ffmpeg: drop OutputStream.is_cfrAnton Khirnov2024-04-09
| | | | | It is used in a single place in the filtering code, so it is better to inline it there.
* fftools/ffmpeg_filter: pass vsync method through OutputFilterOptionsAnton Khirnov2024-04-09
| | | | | | Do not read it from OutputStream directly. Will allow decoupling filtering from encoding in future commits.
* fftools/ffmpeg_filter: stop accessing encoder AVCodecContextAnton Khirnov2024-04-09
| | | | | | Pass all the necessary value through OutputFilterOptions. Will allow decoupling filtering from encoding in future commits.
* fftools/ffmpeg_filter: move the MJPEG format selection hack to muxer setupAnton Khirnov2024-04-09
| | | | That, if anywhere, is a more appropriate place for it.
* fftools/ffmpeg_filter: pass enc_timebase through OutputFilterOptionsAnton Khirnov2024-04-09
| | | | | Reduces the need to access OutputStream, which will allow decoupling filtering from encoding in future commits.
* fftools/ffmpeg: warn about ignored -enc_time_base for subtitles earlierAnton Khirnov2024-04-09
| | | | | Can do it as soon as that option is parsed, no need to postpone it until opening the encoder.
* fftools/ffmpeg_filter: pass keep_pix_fmt through OutputFilterOptionsAnton Khirnov2024-04-09
| | | | | Reduces the need to access OutputStream, which will allow decoupling filtering from encoding in future commits.
* fftools/ffmpeg_filter: pass ts offset through OutputFilterOptionsAnton Khirnov2024-04-09
| | | | | Reduces the need to access OutputFile, which will allow decoupling filtering from encoding in future commits.
* fftools/ffmpeg_filter: check that filter type matches output stream typeAnton Khirnov2024-04-09
| | | | For simple filtergraphs. For complex filtergraphs they always match.
* fftools/ffmpeg_filter: stop accessing AVCodecContext.codecAnton Khirnov2024-04-09
| | | | | | | Instead pass the encoder through a newly-added output options struct, analogous to previously added input options. Will allow decoupling filtering from encoding in future commits.
* fftools/ffmpeg_filter: do not pass OutputStream to set_channel_layout()Anton Khirnov2024-04-09
| | | | It only needs a list of allowed layouts and the requested layout.
* lavfi/avfilter: add an "auto" constant to the threads optionAnton Khirnov2024-04-09
| | | | | Analogous to the same constant in avfiltergraph and avcodec. Cf. f599ae88c25.
* lavfi/vf_scale: fix AVOption flags for "size"/"s"Anton Khirnov2024-04-09
|
* x86/ac3dsp: clear the upper 32 bits for input arguments where neededJames Almer2024-04-08
| | | | | | Fixes checkasm on win64. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mpegvideo_dec, h264_slice: Return proper error codesAndreas Rheinhardt2024-04-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12dec: Remove redundant mpeg_enc_ctx_allocatedAndreas Rheinhardt2024-04-08
| | | | | | | | Use context_initialized from the underlying MpegEncContext instead. Also don't check before ff_mpv_common_end() in mpeg_decode_end(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Remove pointless checkAndreas Rheinhardt2024-04-08
| | | | | | Possible since 315c956cbd14f021e49dac7fc0b906fad1672aad. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_dec: Move getting Picture slot into alloc_picture()Andreas Rheinhardt2024-04-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_dec: Factor allocating dummy frame outAndreas Rheinhardt2024-04-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_dec: Remove redundant code to reset keyframe flagAndreas Rheinhardt2024-04-08
| | | | | | These AVFrames are blank and therefore the flag is already unset. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_dec: Remove obsolete current_picture_ptr reuse codeAndreas Rheinhardt2024-04-08
| | | | | | Obsolete since at least 74d623914f02aa79447df43a742efd0929dded04. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12dec: Remove unnecessary FFCodec.closeAndreas Rheinhardt2024-04-08
| | | | | | | The ipu decoder never calls ff_mpv_common_init() or allocates anything else that would need to be freed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_dec: Don't emit non-keyframe warning for H.261Andreas Rheinhardt2024-04-08
| | | | | | | | | H.261 does not have keyframes (or indeed frame types) at all, so this warning is not warranted. Also remove an always-true check while at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12dec: Don't pretend MPEG-1/2 to support alphaAndreas Rheinhardt2024-04-08
| | | | | | | | (FF_PTR_ADD has to be kept although MPEG-1/2 only supports YUV pixel formats because our decoder also supports decoding to AV_PIX_FMT_GRAY8 depending upon CONFIG_GRAY.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12dec: Remove redundant checkAndreas Rheinhardt2024-04-08
| | | | | | This code only gets executed for the first field. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_dec, mpeg12dec: Move MPEG1/2 code to mpeg12dec.cAndreas Rheinhardt2024-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Up until now, ff_mpv_frame_start() offsets the data of the current picture and doubles the linesizes of all pictures if the current picture is field-based so that data and linesize allow to address the current field only. This is done based upon the current picture_structure value. Only two mpegvideo-based decoders ever set this field: mpeg1/2 and VC-1; but the latter only does it after ff_mpv_frame_start() (when using hardware-acceleration and in order to signal it to the DXVA2 hwaccel) in which case no offset is applied in ff_mpv_frame_start(). So only one decoder actually wants this offset*; therefore move the code performing it to mpeg12dec.c. *: VC-1 doubles linesize when using field_mode (not only the picture's linesize, but also uvlinesize and linesize), yet it does not offset anything. This is further proof that this should not be performed generically. Also move MPEG-1/2 specific setting of the top-field-first flag. (The change here implies that the AVFrame in current_picture may have different top-field-first flags than the AVFrame from current_picture_ptr, but this doesn't matter as only the latter's are used.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12: Remove always-false checkAndreas Rheinhardt2024-04-08
| | | | | | Forgotten in 7800cc6e82068c6dfb5af53817f03dfda794c568. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegutils: Move definitions to better placesAndreas Rheinhardt2024-04-08
| | | | | | | | | FRAME_SKIPPED -> h263dec.h CANDIDATE_MB_TYPE_* -> mpegvideoenc.h INPLACE_OFFSET -> mpegvideoenc.h enum OutputFormat -> mpegvideo.h Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>