This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 7a6c1b19ab12eda975f34295b4542611c3d6d0f7 Author: Andreas Rheinhardt <[email protected]> AuthorDate: Mon Mar 9 13:29:11 2026 +0100 Commit: Andreas Rheinhardt <[email protected]> CommitDate: Tue Jun 23 19:15:58 2026 +0200 fftools/ffmpeg: Remove deprecated -top option Deprecated in commit 5d58a35f983fa0ce028fad593697903aecae9adf on 2023-09-18. Signed-off-by: Andreas Rheinhardt <[email protected]> --- fftools/ffmpeg.h | 14 -------------- fftools/ffmpeg_dec.c | 7 ------- fftools/ffmpeg_demux.c | 12 +----------- fftools/ffmpeg_enc.c | 20 ++------------------ fftools/ffmpeg_mux_init.c | 7 ------- fftools/ffmpeg_opt.c | 5 ----- 6 files changed, 3 insertions(+), 62 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 4301cb73f0..844ba82119 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -52,7 +52,6 @@ #include "libswresample/swresample.h" // deprecated features -#define FFMPEG_OPT_TOP 1 #define FFMPEG_OPT_VSYNC 1 #define FFMPEG_OPT_FILTER_SCRIPT 1 @@ -216,9 +215,6 @@ typedef struct OptionsContext { SpecifierOptList intra_matrices; SpecifierOptList inter_matrices; SpecifierOptList chroma_intra_matrices; -#if FFMPEG_OPT_TOP - SpecifierOptList top_field_first; -#endif SpecifierOptList metadata_map; SpecifierOptList presets; SpecifierOptList copy_initial_nonkeyframes; @@ -428,9 +424,6 @@ enum DecoderFlags { // decoder should override timestamps by fixed framerate // from DecoderOpts.framerate DECODER_FLAG_FRAMERATE_FORCED = (1 << 2), -#if FFMPEG_OPT_TOP - DECODER_FLAG_TOP_FIELD_FIRST = (1 << 3), -#endif DECODER_FLAG_SEND_END_TS = (1 << 4), // force bitexact decoding DECODER_FLAG_BITEXACT = (1 << 5), @@ -494,9 +487,6 @@ typedef struct InputStream { /* framerate forced with -r */ AVRational framerate; -#if FFMPEG_OPT_TOP - int top_field_first; -#endif int fix_sub_duration; @@ -654,10 +644,6 @@ typedef struct OutputStream { Encoder *enc; - /* video only */ -#if FFMPEG_OPT_TOP - int top_field_first; -#endif int bitexact; int bits_per_raw_sample; diff --git a/fftools/ffmpeg_dec.c b/fftools/ffmpeg_dec.c index e424c0b17d..1b37d39e6d 100644 --- a/fftools/ffmpeg_dec.c +++ b/fftools/ffmpeg_dec.c @@ -387,13 +387,6 @@ fail: static int video_frame_process(DecoderPriv *dp, AVFrame *frame, unsigned *outputs_mask) { -#if FFMPEG_OPT_TOP - if (dp->flags & DECODER_FLAG_TOP_FIELD_FIRST) { - av_log(dp, AV_LOG_WARNING, "-top is deprecated, use the setfield filter instead\n"); - frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; - } -#endif - if (frame->format == dp->hwaccel_pix_fmt) { int err = hwaccel_retrieve_data(dp->dec_ctx, frame); if (err < 0) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 46e0d54d25..2d2dd5a82d 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -985,11 +985,7 @@ int ist_use(InputStream *ist, int decoding_needed, ds->dec_opts.flags |= (!!ist->fix_sub_duration * DECODER_FLAG_FIX_SUB_DURATION) | (!!is_unreliable * DECODER_FLAG_TS_UNRELIABLE) | - (!!(d->loop && is_audio) * DECODER_FLAG_SEND_END_TS) -#if FFMPEG_OPT_TOP - | ((ist->top_field_first >= 0) * DECODER_FLAG_TOP_FIELD_FIRST) -#endif - ; + (!!(d->loop && is_audio) * DECODER_FLAG_SEND_END_TS); if (ist->framerate.num) { ds->dec_opts.flags |= DECODER_FLAG_FRAMERATE_FORCED; @@ -1650,12 +1646,6 @@ static int ist_add(const OptionsContext *o, Demuxer *d, AVStream *st, AVDictiona return ret; } } - -#if FFMPEG_OPT_TOP - ist->top_field_first = -1; - opt_match_per_stream_int(ist, &o->top_field_first, ic, st, &ist->top_field_first); -#endif - break; case AVMEDIA_TYPE_AUDIO: { const char *ch_layout_str = NULL; diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index 1ce37d3b29..770533035d 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -283,17 +283,8 @@ int enc_open(void *opaque, const AVFrame *frame) } if (enc_ctx->flags & (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME) || - (frame->flags & AV_FRAME_FLAG_INTERLACED) -#if FFMPEG_OPT_TOP - || ost->top_field_first >= 0 -#endif - ) { - int top_field_first = -#if FFMPEG_OPT_TOP - ost->top_field_first >= 0 ? - ost->top_field_first : -#endif - !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); + (frame->flags & AV_FRAME_FLAG_INTERLACED)) { + int top_field_first = !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); if (enc->id == AV_CODEC_ID_MJPEG) enc_ctx->field_order = top_field_first ? AV_FIELD_TT : AV_FIELD_BB; @@ -805,13 +796,6 @@ static int frame_encode(OutputStream *ost, AVFrame *frame, AVPacket *pkt) if (type == AVMEDIA_TYPE_VIDEO) { frame->quality = e->enc_ctx->global_quality; frame->pict_type = forced_kf_apply(e, &ost->kf, frame); - -#if FFMPEG_OPT_TOP - if (ost->top_field_first >= 0) { - frame->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST; - frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * (!!ost->top_field_first); - } -#endif } else { if (!(e->enc_ctx->codec->capabilities & AV_CODEC_CAP_PARAM_CHANGE) && e->enc_ctx->ch_layout.nb_channels != frame->ch_layout.nb_channels) { diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index abde897bf5..3e185f2175 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -761,13 +761,6 @@ static int new_stream_video(Muxer *mux, const OptionsContext *o, opt_match_per_stream_int(ost, &o->force_fps, oc, st, &ms->force_fps); -#if FFMPEG_OPT_TOP - ost->top_field_first = -1; - opt_match_per_stream_int(ost, &o->top_field_first, oc, st, &ost->top_field_first); - if (ost->top_field_first >= 0) - av_log(ost, AV_LOG_WARNING, "-top is deprecated, use the setfield filter instead\n"); -#endif - #if FFMPEG_OPT_VSYNC *vsync_method = video_sync_method; #else diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 0acbdba41e..c97ddab552 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -2160,11 +2160,6 @@ const OptionDef options[] = { "set hardware device used when filtering", "device" }, // deprecated options -#if FFMPEG_OPT_TOP - { "top", OPT_TYPE_INT, OPT_VIDEO | OPT_EXPERT | OPT_PERSTREAM | OPT_INPUT | OPT_OUTPUT, - { .off = OFFSET(top_field_first) }, - "deprecated, use the setfield video filter", "" }, -#endif #if FFMPEG_OPT_VSYNC { "vsync", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT, { .func_arg = opt_vsync }, _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
