From: Gyan Doshi <ffmpeg@gyani.pro>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 03/30] avcodec: remove deprecated FF_API_DROPCHANGED
Date: Sat, 15 Mar 2025 19:21:27 +0530
Message-ID: <3a042cf5-4a9b-4f4d-869a-45bc6d42bdfa@gyani.pro> (raw)
In-Reply-To: <88a19fef-bc71-48d4-b476-8920e3c84e92@gyani.pro>
On 2025-02-24 03:14 pm, Gyan Doshi wrote:
>
>
> 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?
Patch for replacement posted at
https://ffmpeg.org/pipermail/ffmpeg-devel/2025-March/341210.html
Regards,
Gyan
>
> Regards,
> Gyan
>
>
>>
>> Signed-off-by: James Almer <jamrial@gmail.com>
>> ---
>> 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".
_______________________________________________
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".
next prev parent reply other threads:[~2025-03-15 13:51 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 01/30] avcodec: remove deprecated FF_API_SUBFRAMES James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 02/30] avcodec: remove deprecated FF_API_TICKS_PER_FRAME James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 03/30] avcodec: remove deprecated FF_API_DROPCHANGED James Almer
2025-02-24 9:44 ` Gyan Doshi
2025-03-15 13:51 ` Gyan Doshi [this message]
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 04/30] avcodec: remove deprecated FF_API_AVFFT James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 05/30] avcodec: remove deprecated FF_API_FF_PROFILE_LEVEL James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 06/30] avcodec: remove deprecated FF_API_AVCODEC_CLOSE James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 07/30] avcodec: remove deprecated FF_API_BUFFER_MIN_SIZE James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 08/30] avcodec: remove deprecated FF_API_VDPAU_ALLOC_GET_SET James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 09/30] avcodec: remove deprecated FF_API_QUALITY_FACTOR James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 10/30] avcodec/version_major: postpone some deprecations until the next bump James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 11/30] avdevice: remove deprecated FF_API_BKTR_DEVICE James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 12/30] avdevice: remove deprecated FF_API_OPENGL_DEVICE James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 13/30] avdevice: remove deprecated FF_API_SDL2_DEVICE James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 14/30] avdevice/version_major: postpone some deprecations until the next bump James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 15/30] avformat: remove deprecated FF_API_LAVF_SHORTEST James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 16/30] avformat: remove deprecated FF_API_ALLOW_FLUSH James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 17/30] avformat: remove deprecated FF_API_AVSTREAM_SIDE_DATA James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 18/30] avformat: remove deprecated FF_API_GET_DUR_ESTIMATE_METHOD James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 19/30] avformat/version_major: postpone some deprecations until the next bump James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 20/30] avfilter: remove deprecated FF_API_LINK_PUBLIC James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 21/30] avfilter/version_major: postpone some deprecations until the next bump James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 22/30] avutil: remove deprecated FF_API_HDR_VIVID_THREE_SPLINE James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 23/30] avutil: remove deprecated FF_API_FRAME_PKT James Almer
2025-03-01 17:29 ` Marton Balint
2025-03-02 0:48 ` James Almer
2025-03-02 18:27 ` Marton Balint
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 24/30] avutil: remove deprecated FF_API_INTERLACED_FRAME James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 25/30] avutil: remove deprecated FF_API_FRAME_KEY James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 26/30] avutil: remove deprecated FF_API_PALETTE_HAS_CHANGED James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 27/30] avutil: remove deprecated FF_API_VULKAN_CONTIGUOUS_MEMORY James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 28/30] avutil: remove deprecated FF_API_H274_FILM_GRAIN_VCS James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 29/30] avutil/version_major: postpone some deprecations until the next bump James Almer
2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 30/30] libs: bump major version for all libraries James Almer
2025-03-26 23:41 ` Wang Bin
2025-02-25 12:29 ` [FFmpeg-devel] [PATCH] avutil/frame: Port AVFrame.private_ref to RefStruct API Andreas Rheinhardt
2025-02-25 14:31 ` James Almer
2025-03-15 21:50 ` [FFmpeg-devel] [PATCH 00/31] Major library soname bump Andreas Rheinhardt
2025-03-26 22:50 ` James Almer
2025-03-26 23:01 ` Sean McGovern
2025-03-26 23:28 ` James Almer
2025-03-28 5:07 ` Andreas Rheinhardt
2025-03-28 12:11 ` James Almer
2025-03-28 16:58 ` Andreas Rheinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3a042cf5-4a9b-4f4d-869a-45bc6d42bdfa@gyani.pro \
--to=ffmpeg@gyani.pro \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git