From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 869D34D7D3 for ; Mon, 24 Feb 2025 09:44:46 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 667EE68CB44; Mon, 24 Feb 2025 11:44:42 +0200 (EET) Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8520268CA0D for ; Mon, 24 Feb 2025 11:44:36 +0200 (EET) Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Z1bRj3wZgz9smc for ; Mon, 24 Feb 2025 10:44:33 +0100 (CET) Message-ID: <88a19fef-bc71-48d4-b476-8920e3c84e92@gyani.pro> Date: Mon, 24 Feb 2025 15:14:30 +0530 MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org References: <20250223220630.18756-1-jamrial@gmail.com> <20250223220630.18756-4-jamrial@gmail.com> Content-Language: en-US From: Gyan Doshi In-Reply-To: <20250223220630.18756-4-jamrial@gmail.com> X-Rspamd-Queue-Id: 4Z1bRj3wZgz9smc Subject: Re: [FFmpeg-devel] [PATCH 03/30] avcodec: remove deprecated FF_API_DROPCHANGED X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 2025-02-24 03:36 am, James Almer wrote: > Deprecated since 2023-07-15. Can you wait to push till I port this to ffmpeg_dec? Regards, Gyan > > Signed-off-by: James Almer > --- > libavcodec/avcodec.c | 4 --- > libavcodec/avcodec.h | 9 ------- > libavcodec/decode.c | 52 -------------------------------------- > libavcodec/internal.h | 9 ------- > libavcodec/options_table.h | 3 --- > libavcodec/version_major.h | 1 - > 6 files changed, 78 deletions(-) > > diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c > index e7e2c09222..3f97f5d161 100644 > --- a/libavcodec/avcodec.c > +++ b/libavcodec/avcodec.c > @@ -462,10 +462,6 @@ av_cold void ff_codec_close(AVCodecContext *avctx) > > av_bsf_free(&avci->bsf); > > -#if FF_API_DROPCHANGED > - av_channel_layout_uninit(&avci->initial_ch_layout); > -#endif > - > #if CONFIG_LCMS2 > ff_icc_context_uninit(&avci->icc); > #endif > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h > index f6de3c6b42..c35e65868e 100644 > --- a/libavcodec/avcodec.h > +++ b/libavcodec/avcodec.h > @@ -234,15 +234,6 @@ typedef struct RcOverride{ > * Use qpel MC. > */ > #define AV_CODEC_FLAG_QPEL (1 << 4) > -#if FF_API_DROPCHANGED > -/** > - * Don't output frames whose parameters differ from first > - * decoded frame in stream. > - * > - * @deprecated callers should implement this functionality in their own code > - */ > -#define AV_CODEC_FLAG_DROPCHANGED (1 << 5) > -#endif > /** > * Request the encoder to output reconstructed frames, i.e.\ frames that would > * be produced by decoding the encoded bistream. These frames may be retrieved > diff --git a/libavcodec/decode.c b/libavcodec/decode.c > index cac7e620d2..a28279bd36 100644 > --- a/libavcodec/decode.c > +++ b/libavcodec/decode.c > @@ -840,53 +840,6 @@ int ff_decode_receive_frame(AVCodecContext *avctx, AVFrame *frame) > > avctx->frame_num++; > > -#if FF_API_DROPCHANGED > - if (avctx->flags & AV_CODEC_FLAG_DROPCHANGED) { > - > - if (avctx->frame_num == 1) { > - avci->initial_format = frame->format; > - switch(avctx->codec_type) { > - case AVMEDIA_TYPE_VIDEO: > - avci->initial_width = frame->width; > - avci->initial_height = frame->height; > - break; > - case AVMEDIA_TYPE_AUDIO: > - avci->initial_sample_rate = frame->sample_rate ? frame->sample_rate : > - avctx->sample_rate; > - ret = av_channel_layout_copy(&avci->initial_ch_layout, &frame->ch_layout); > - if (ret < 0) > - goto fail; > - break; > - } > - } > - > - if (avctx->frame_num > 1) { > - int changed = avci->initial_format != frame->format; > - > - switch(avctx->codec_type) { > - case AVMEDIA_TYPE_VIDEO: > - changed |= avci->initial_width != frame->width || > - avci->initial_height != frame->height; > - break; > - case AVMEDIA_TYPE_AUDIO: > - changed |= avci->initial_sample_rate != frame->sample_rate || > - avci->initial_sample_rate != avctx->sample_rate || > - av_channel_layout_compare(&avci->initial_ch_layout, &frame->ch_layout); > - break; > - } > - > - if (changed) { > - avci->changed_frames_dropped++; > - av_log(avctx, AV_LOG_INFO, "dropped changed frame #%"PRId64" pts %"PRId64 > - " drop count: %d \n", > - avctx->frame_num, frame->pts, > - avci->changed_frames_dropped); > - ret = AVERROR_INPUT_CHANGED; > - goto fail; > - } > - } > - } > -#endif > return 0; > fail: > av_frame_unref(frame); > @@ -2065,11 +2018,6 @@ int ff_decode_preinit(AVCodecContext *avctx) > return ret; > } > > -#if FF_API_DROPCHANGED > - if (avctx->flags & AV_CODEC_FLAG_DROPCHANGED) > - av_log(avctx, AV_LOG_WARNING, "The dropchanged flag is deprecated.\n"); > -#endif > - > return 0; > } > > diff --git a/libavcodec/internal.h b/libavcodec/internal.h > index 62a37f473f..137fd52745 100644 > --- a/libavcodec/internal.h > +++ b/libavcodec/internal.h > @@ -145,15 +145,6 @@ typedef struct AVCodecInternal { > AVFrame *buffer_frame; > int draining_done; > > -#if FF_API_DROPCHANGED > - /* used when avctx flag AV_CODEC_FLAG_DROPCHANGED is set */ > - int changed_frames_dropped; > - int initial_format; > - int initial_width, initial_height; > - int initial_sample_rate; > - AVChannelLayout initial_ch_layout; > -#endif > - > #if CONFIG_LCMS2 > FFIccContext icc; /* used to read and write embedded ICC profiles */ > #endif > diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h > index c115d8c18c..1711e56cd3 100644 > --- a/libavcodec/options_table.h > +++ b/libavcodec/options_table.h > @@ -74,9 +74,6 @@ static const AVOption avcodec_options[] = { > {"ilme", "interlaced motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_INTERLACED_ME }, INT_MIN, INT_MAX, V|E, .unit = "flags"}, > {"cgop", "closed GOP", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_CLOSED_GOP }, INT_MIN, INT_MAX, V|E, .unit = "flags"}, > {"output_corrupt", "Output even potentially corrupted frames", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_OUTPUT_CORRUPT }, INT_MIN, INT_MAX, V|D, .unit = "flags"}, > -#if FF_API_DROPCHANGED > -{"drop_changed", "Drop frames whose parameters differ from first decoded frame", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_DROPCHANGED }, INT_MIN, INT_MAX, A|V|D | AV_OPT_FLAG_DEPRECATED, .unit = "flags"}, > -#endif > {"flags2", NULL, OFFSET(flags2), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT}, 0, UINT_MAX, V|A|E|D|S, .unit = "flags2"}, > {"fast", "allow non-spec-compliant speedup tricks", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_FAST }, INT_MIN, INT_MAX, V|E, .unit = "flags2"}, > {"noout", "skip bitstream encoding", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_NO_OUTPUT }, INT_MIN, INT_MAX, V|E, .unit = "flags2"}, > diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h > index 3cde4cdd8b..ee3277cb76 100644 > --- a/libavcodec/version_major.h > +++ b/libavcodec/version_major.h > @@ -38,7 +38,6 @@ > */ > > #define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 62) > -#define FF_API_DROPCHANGED (LIBAVCODEC_VERSION_MAJOR < 62) > > #define FF_API_AVFFT (LIBAVCODEC_VERSION_MAJOR < 62) > #define FF_API_FF_PROFILE_LEVEL (LIBAVCODEC_VERSION_MAJOR < 62) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".