Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 00/31] Major library soname bump
@ 2025-02-23 22:06 James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 01/30] avcodec: remove deprecated FF_API_SUBFRAMES James Almer
                   ` (29 more replies)
  0 siblings, 30 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

It's been a year since the last bump, so lets get rid of old deprecated API
in time for ffmpeg 8.0

James Almer (30):
  avcodec: remove deprecated FF_API_SUBFRAMES
  avcodec: remove deprecated FF_API_TICKS_PER_FRAME
  avcodec: remove deprecated FF_API_DROPCHANGED
  avcodec: remove deprecated FF_API_AVFFT
  avcodec: remove deprecated FF_API_FF_PROFILE_LEVEL
  avcodec: remove deprecated FF_API_AVCODEC_CLOSE
  avcodec: remove deprecated FF_API_BUFFER_MIN_SIZE
  avcodec: remove deprecated FF_API_VDPAU_ALLOC_GET_SET
  avcodec: remove deprecated FF_API_QUALITY_FACTOR
  avcodec/version_major: postpone some deprecations until the next bump
  avdevice: remove deprecated FF_API_BKTR_DEVICE
  avdevice: remove deprecated FF_API_OPENGL_DEVICE
  avdevice: remove deprecated FF_API_SDL2_DEVICE
  avdevice/version_major: postpone some deprecations until the next bump
  avformat: remove deprecated FF_API_LAVF_SHORTEST
  avformat: remove deprecated FF_API_ALLOW_FLUSH
  avformat: remove deprecated FF_API_AVSTREAM_SIDE_DATA
  avformat: remove deprecated FF_API_GET_DUR_ESTIMATE_METHOD
  avformat/version_major: postpone some deprecations until the next bump
  avfilter: remove deprecated FF_API_LINK_PUBLIC
  avfilter/version_major: postpone some deprecations until the next bump
  avutil: remove deprecated FF_API_HDR_VIVID_THREE_SPLINE
  avutil: remove deprecated FF_API_FRAME_PKT
  avutil: remove deprecated FF_API_INTERLACED_FRAME
  avutil: remove deprecated FF_API_FRAME_KEY
  avutil: remove deprecated FF_API_PALETTE_HAS_CHANGED
  avutil: remove deprecated FF_API_VULKAN_CONTIGUOUS_MEMORY
  avutil: remove deprecated FF_API_H274_FILM_GRAIN_VCS
  avutil/version_major: postpone some deprecations until the next bump
  libs: bump major version for all libraries

 configure                              |   22 -
 libavcodec/8bps.c                      |    7 -
 libavcodec/Makefile                    |    2 -
 libavcodec/alsdec.c                    |    6 +-
 libavcodec/amfenc_av1.c                |    8 +-
 libavcodec/amfenc_h264.c               |    8 +-
 libavcodec/amfenc_hevc.c               |    8 +-
 libavcodec/ansi.c                      |   10 -
 libavcodec/apac.c                      |    3 -
 libavcodec/apedec.c                    |    6 +-
 libavcodec/atrac3.c                    |   12 +-
 libavcodec/atrac9dec.c                 |    6 +-
 libavcodec/av1dec.c                    |    6 -
 libavcodec/avcodec.c                   |   12 -
 libavcodec/avcodec.h                   |  196 +---
 libavcodec/avfft.c                     |  268 -----
 libavcodec/avfft.h                     |  149 ---
 libavcodec/bethsoftvideo.c             |    5 -
 libavcodec/bfi.c                       |   10 -
 libavcodec/bintext.c                   |    5 -
 libavcodec/bmvvideo.c                  |    5 -
 libavcodec/bonk.c                      |    3 -
 libavcodec/brenderpix.c                |   12 -
 libavcodec/c93.c                       |    5 -
 libavcodec/cdgraphics.c                |    5 -
 libavcodec/cdtoons.c                   |    5 -
 libavcodec/cinepak.c                   |    7 -
 libavcodec/codec.h                     |   15 -
 libavcodec/cuviddec.c                  |    6 -
 libavcodec/d3d12va_encode_hevc.c       |    6 +-
 libavcodec/dds.c                       |   11 -
 libavcodec/decode.c                    |   90 --
 libavcodec/dfa.c                       |    5 -
 libavcodec/dsicinvideo.c               |    5 -
 libavcodec/dxa.c                       |    5 -
 libavcodec/dynamic_hdr_vivid.c         |   11 -
 libavcodec/encode.c                    |   29 -
 libavcodec/flashsv2enc.c               |    5 +-
 libavcodec/flicvideo.c                 |    5 -
 libavcodec/ftr.c                       |    6 +-
 libavcodec/g723_1dec.c                 |    6 +-
 libavcodec/g729dec.c                   |   12 +-
 libavcodec/gemdec.c                    |    5 -
 libavcodec/h2645_sei.c                 |   11 -
 libavcodec/h264dec.c                   |    6 -
 libavcodec/idcinvideo.c                |    7 -
 libavcodec/imx.c                       |   10 -
 libavcodec/internal.h                  |    9 -
 libavcodec/interplayvideo.c            |    7 -
 libavcodec/jvdec.c                     |   12 -
 libavcodec/kmvc.c                      |   17 -
 libavcodec/libaomenc.c                 |    8 +-
 libavcodec/libkvazaar.c                |    8 +-
 libavcodec/libopenh264enc.c            |    8 +-
 libavcodec/librav1e.c                  |    8 +-
 libavcodec/libspeexdec.c               |    6 +-
 libavcodec/libsvtav1.c                 |    8 +-
 libavcodec/libuavs3d.c                 |   12 -
 libavcodec/libvpxenc.c                 |    8 +-
 libavcodec/libvvenc.c                  |   15 +-
 libavcodec/libx264.c                   |    8 +-
 libavcodec/libx265.c                   |    7 +-
 libavcodec/mfenc.c                     |    5 -
 libavcodec/misc4.c                     |    3 -
 libavcodec/mpeg12dec.c                 |   11 -
 libavcodec/mpegvideo_parser.c          |   10 -
 libavcodec/mscc.c                      |    5 -
 libavcodec/msmpeg4enc.c                |    8 +-
 libavcodec/msrle.c                     |    8 -
 libavcodec/mss1.c                      |    5 -
 libavcodec/msvideo1.c                  |    7 -
 libavcodec/nvenc.c                     |    8 +-
 libavcodec/options_table.h             |   10 +-
 libavcodec/packet.h                    |    4 -
 libavcodec/pafvideo.c                  |    5 -
 libavcodec/pictordec.c                 |    5 -
 libavcodec/psd.c                       |    5 -
 libavcodec/pthread_frame.c             |    5 -
 libavcodec/qdrw.c                      |    5 -
 libavcodec/qpeg.c                      |    7 -
 libavcodec/qtrle.c                     |    8 -
 libavcodec/ratecontrol.c               |    6 -
 libavcodec/rawdec.c                    |   13 +-
 libavcodec/rscc.c                      |    7 -
 libavcodec/sga.c                       |    5 -
 libavcodec/shorten.c                   |    3 -
 libavcodec/smacker.c                   |    5 -
 libavcodec/smc.c                       |    7 -
 libavcodec/targa.c                     |    5 -
 libavcodec/tiertexseqv.c               |    5 -
 libavcodec/tmv.c                       |    5 -
 libavcodec/tscc.c                      |    5 -
 libavcodec/vb.c                        |    5 -
 libavcodec/vc1.c                       |    8 -
 libavcodec/vdpau.c                     |   21 -
 libavcodec/vdpau.h                     |   33 -
 libavcodec/version.h                   |    4 +-
 libavcodec/version_major.h             |   21 +-
 libavcodec/vqavideo.c                  |    5 -
 libavcodec/wavarc.c                    |    3 -
 libavcodec/wmalosslessdec.c            |    6 +-
 libavcodec/wmaprodec.c                 |   18 +-
 libavcodec/wmavoice.c                  |    6 +-
 libavcodec/yop.c                       |    6 -
 libavdevice/Makefile                   |    3 -
 libavdevice/alldevices.c               |    3 -
 libavdevice/bktr.c                     |  366 -------
 libavdevice/lavfi.c                    |   10 -
 libavdevice/opengl_enc.c               | 1325 ------------------------
 libavdevice/opengl_enc_shaders.h       |  188 ----
 libavdevice/pulse_audio_enc.c          |    4 -
 libavdevice/sdl2.c                     |  377 -------
 libavdevice/version.h                  |    2 +-
 libavdevice/version_major.h            |   10 +-
 libavfilter/af_volume.c                |   15 -
 libavfilter/af_volume.h                |    3 -
 libavfilter/avfilter.c                 |   25 -
 libavfilter/avfilter.h                 |   14 -
 libavfilter/buffersrc.c                |   16 -
 libavfilter/f_select.c                 |   11 -
 libavfilter/f_sendcmd.c                |   11 -
 libavfilter/qsvvpp.c                   |    5 -
 libavfilter/setpts.c                   |   11 -
 libavfilter/version.h                  |    2 +-
 libavfilter/version_major.h            |    7 +-
 libavfilter/vf_coreimage.m             |   10 -
 libavfilter/vf_crop.c                  |   15 -
 libavfilter/vf_deinterlace_vaapi.c     |    5 -
 libavfilter/vf_drawtext.c              |   18 -
 libavfilter/vf_eq.c                    |    8 -
 libavfilter/vf_eq.h                    |    6 -
 libavfilter/vf_estdif.c                |    5 -
 libavfilter/vf_field.c                 |    5 -
 libavfilter/vf_fieldhint.c             |   10 -
 libavfilter/vf_fieldmatch.c            |   10 -
 libavfilter/vf_fieldorder.c            |    5 -
 libavfilter/vf_idet.c                  |   32 -
 libavfilter/vf_kerndeint.c             |    5 -
 libavfilter/vf_nnedi.c                 |    5 -
 libavfilter/vf_overlay.c               |   14 -
 libavfilter/vf_overlay.h               |    3 -
 libavfilter/vf_overlay_cuda.c          |   18 -
 libavfilter/vf_scale.c                 |   41 +-
 libavfilter/vf_scale_npp.c             |   54 +-
 libavfilter/vf_separatefields.c        |    5 -
 libavfilter/vf_setparams.c             |   11 -
 libavfilter/vf_swaprect.c              |   17 +-
 libavfilter/vf_telecine.c              |   18 -
 libavfilter/vf_tinterlace.c            |   23 -
 libavfilter/vf_w3fdif.c                |    5 -
 libavfilter/vf_weave.c                 |    6 -
 libavfilter/vsrc_gradients.c           |   11 -
 libavfilter/vsrc_testsrc.c             |    5 -
 libavfilter/yadif_common.c             |   10 -
 libavformat/avformat.c                 |   91 --
 libavformat/avformat.h                 |  120 ---
 libavformat/avformat_internal.h        |    7 -
 libavformat/demux.c                    |   52 -
 libavformat/demux_utils.c              |   12 -
 libavformat/fifo.c                     |    4 -
 libavformat/hlsenc.c                   |    4 -
 libavformat/internal.h                 |   11 -
 libavformat/matroskaenc.c              |   13 -
 libavformat/movenc.c                   |   40 +-
 libavformat/mpegtsenc.c                |    4 -
 libavformat/mux.c                      |   60 --
 libavformat/oggenc.c                   |   20 -
 libavformat/options.c                  |   16 -
 libavformat/options_table.h            |    3 -
 libavformat/seek.c                     |    7 -
 libavformat/tee.c                      |    4 -
 libavformat/tests/fifo_muxer.c         |    4 -
 libavformat/version.h                  |    4 +-
 libavformat/version_major.h            |   10 +-
 libavutil/film_grain_params.h          |   58 +-
 libavutil/frame.c                      |   28 -
 libavutil/frame.h                      |   62 --
 libavutil/hdr_dynamic_vivid_metadata.h |   54 -
 libavutil/hwcontext_vulkan.h           |    5 -
 libavutil/version.h                    |   21 +-
 libpostproc/version.h                  |    2 +-
 libpostproc/version_major.h            |    2 +-
 libswresample/version.h                |    2 +-
 libswresample/version_major.h          |    2 +-
 libswscale/version.h                   |    2 +-
 libswscale/version_major.h             |    2 +-
 186 files changed, 90 insertions(+), 4938 deletions(-)
 delete mode 100644 libavcodec/avfft.c
 delete mode 100644 libavcodec/avfft.h
 delete mode 100644 libavdevice/bktr.c
 delete mode 100644 libavdevice/opengl_enc.c
 delete mode 100644 libavdevice/opengl_enc_shaders.h
 delete mode 100644 libavdevice/sdl2.c

-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 01/30] avcodec: remove deprecated FF_API_SUBFRAMES
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
@ 2025-02-23 22:06 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 02/30] avcodec: remove deprecated FF_API_TICKS_PER_FRAME James Almer
                   ` (28 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2023-05-15.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/alsdec.c         |  6 +-----
 libavcodec/apac.c           |  3 ---
 libavcodec/apedec.c         |  6 +-----
 libavcodec/atrac3.c         | 12 ++----------
 libavcodec/atrac9dec.c      |  6 +-----
 libavcodec/bonk.c           |  3 ---
 libavcodec/codec.h          | 15 ---------------
 libavcodec/ftr.c            |  6 +-----
 libavcodec/g723_1dec.c      |  6 +-----
 libavcodec/g729dec.c        | 12 ++----------
 libavcodec/libspeexdec.c    |  6 +-----
 libavcodec/misc4.c          |  3 ---
 libavcodec/shorten.c        |  3 ---
 libavcodec/version_major.h  |  1 -
 libavcodec/wavarc.c         |  3 ---
 libavcodec/wmalosslessdec.c |  6 +-----
 libavcodec/wmaprodec.c      | 18 +++---------------
 libavcodec/wmavoice.c       |  6 +-----
 18 files changed, 15 insertions(+), 106 deletions(-)

diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 28f2079985..734eec8bf8 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -2190,10 +2190,6 @@ const FFCodec ff_als_decoder = {
     .close          = decode_end,
     FF_CODEC_DECODE_CB(decode_frame),
     .flush          = flush,
-    .p.capabilities =
-#if FF_API_SUBFRAMES
-                      AV_CODEC_CAP_SUBFRAMES |
-#endif
-                      AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
+    .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };
diff --git a/libavcodec/apac.c b/libavcodec/apac.c
index eb05d38636..0ba944b4ca 100644
--- a/libavcodec/apac.c
+++ b/libavcodec/apac.c
@@ -269,9 +269,6 @@ const FFCodec ff_apac_decoder = {
     FF_CODEC_DECODE_CB(apac_decode),
     .close            = apac_close,
     .p.capabilities   = AV_CODEC_CAP_DELAY |
-#if FF_API_SUBFRAMES
-                        AV_CODEC_CAP_SUBFRAMES |
-#endif
                         AV_CODEC_CAP_DR1,
     .caps_internal    = FF_CODEC_CAP_INIT_CLEANUP,
     .p.sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index d75a85f466..5b66b4ed2e 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -1759,11 +1759,7 @@ const FFCodec ff_ape_decoder = {
     .init           = ape_decode_init,
     .close          = ape_decode_close,
     FF_CODEC_DECODE_CB(ape_decode_frame),
-    .p.capabilities =
-#if FF_API_SUBFRAMES
-                      AV_CODEC_CAP_SUBFRAMES |
-#endif
-                      AV_CODEC_CAP_DELAY |
+    .p.capabilities = AV_CODEC_CAP_DELAY |
                       AV_CODEC_CAP_DR1,
     .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
     .flush          = ape_flush,
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 39ddfd9e45..3f804aa81d 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -1027,11 +1027,7 @@ const FFCodec ff_atrac3_decoder = {
     .init             = atrac3_decode_init,
     .close            = atrac3_decode_close,
     FF_CODEC_DECODE_CB(atrac3_decode_frame),
-    .p.capabilities   =
-#if FF_API_SUBFRAMES
-                        AV_CODEC_CAP_SUBFRAMES |
-#endif
-                        AV_CODEC_CAP_DR1,
+    .p.capabilities   = AV_CODEC_CAP_DR1,
     .p.sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
                                                         AV_SAMPLE_FMT_NONE },
     .caps_internal    = FF_CODEC_CAP_INIT_CLEANUP,
@@ -1046,11 +1042,7 @@ const FFCodec ff_atrac3al_decoder = {
     .init             = atrac3_decode_init,
     .close            = atrac3_decode_close,
     FF_CODEC_DECODE_CB(atrac3al_decode_frame),
-    .p.capabilities   =
-#if FF_API_SUBFRAMES
-                        AV_CODEC_CAP_SUBFRAMES |
-#endif
-                        AV_CODEC_CAP_DR1,
+    .p.capabilities   = AV_CODEC_CAP_DR1,
     .p.sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
                                                         AV_SAMPLE_FMT_NONE },
     .caps_internal    = FF_CODEC_CAP_INIT_CLEANUP,
diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c
index e375f46fd0..e37f88500b 100644
--- a/libavcodec/atrac9dec.c
+++ b/libavcodec/atrac9dec.c
@@ -1006,9 +1006,5 @@ const FFCodec ff_atrac9_decoder = {
     FF_CODEC_DECODE_CB(atrac9_decode_frame),
     .flush          = atrac9_decode_flush,
     .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
-    .p.capabilities =
-#if FF_API_SUBFRAMES
-                      AV_CODEC_CAP_SUBFRAMES |
-#endif
-                      AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
+    .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
 };
diff --git a/libavcodec/bonk.c b/libavcodec/bonk.c
index 14b7457a1a..434d56c787 100644
--- a/libavcodec/bonk.c
+++ b/libavcodec/bonk.c
@@ -427,9 +427,6 @@ const FFCodec ff_bonk_decoder = {
     FF_CODEC_DECODE_CB(bonk_decode),
     .close            = bonk_close,
     .p.capabilities   = AV_CODEC_CAP_DELAY |
-#if FF_API_SUBFRAMES
-                        AV_CODEC_CAP_SUBFRAMES |
-#endif
                         AV_CODEC_CAP_DR1,
     .caps_internal    = FF_CODEC_CAP_INIT_CLEANUP,
     .p.sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
diff --git a/libavcodec/codec.h b/libavcodec/codec.h
index f7541ffc42..f509e5d94e 100644
--- a/libavcodec/codec.h
+++ b/libavcodec/codec.h
@@ -80,21 +80,6 @@
  */
 #define AV_CODEC_CAP_SMALL_LAST_FRAME    (1 <<  6)
 
-#if FF_API_SUBFRAMES
-/**
- * Codec can output multiple frames per AVPacket
- * Normally demuxers return one frame at a time, demuxers which do not do
- * are connected to a parser to split what they return into proper frames.
- * This flag is reserved to the very rare category of codecs which have a
- * bitstream that cannot be split into frames without timeconsuming
- * operations like full decoding. Demuxers carrying such bitstreams thus
- * may return multiple frames in a packet. This has many disadvantages like
- * prohibiting stream copy in many cases thus it should only be considered
- * as a last resort.
- */
-#define AV_CODEC_CAP_SUBFRAMES           (1 <<  8)
-#endif
-
 /**
  * Codec is experimental and is thus avoided in favor of non experimental
  * encoders
diff --git a/libavcodec/ftr.c b/libavcodec/ftr.c
index 7cf1b1586f..3e7ab92887 100644
--- a/libavcodec/ftr.c
+++ b/libavcodec/ftr.c
@@ -203,10 +203,6 @@ const FFCodec ff_ftr_decoder = {
     .close          = ftr_close,
     .flush          = ftr_flush,
     .priv_data_size = sizeof(FTRContext),
-    .p.capabilities =
-#if FF_API_SUBFRAMES
-                      AV_CODEC_CAP_SUBFRAMES |
-#endif
-                      AV_CODEC_CAP_DR1,
+    .p.capabilities = AV_CODEC_CAP_DR1,
     .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };
diff --git a/libavcodec/g723_1dec.c b/libavcodec/g723_1dec.c
index 5fe4a21d9b..67a5df55ff 100644
--- a/libavcodec/g723_1dec.c
+++ b/libavcodec/g723_1dec.c
@@ -1118,10 +1118,6 @@ const FFCodec ff_g723_1_decoder = {
     .priv_data_size = sizeof(G723_1_Context),
     .init           = g723_1_decode_init,
     FF_CODEC_DECODE_CB(g723_1_decode_frame),
-    .p.capabilities =
-#if FF_API_SUBFRAMES
-                      AV_CODEC_CAP_SUBFRAMES |
-#endif
-                      AV_CODEC_CAP_DR1,
+    .p.capabilities = AV_CODEC_CAP_DR1,
     .p.priv_class   = &g723_1dec_class,
 };
diff --git a/libavcodec/g729dec.c b/libavcodec/g729dec.c
index bf10a6dd33..7499ed7444 100644
--- a/libavcodec/g729dec.c
+++ b/libavcodec/g729dec.c
@@ -761,11 +761,7 @@ const FFCodec ff_g729_decoder = {
     .init           = decoder_init,
     FF_CODEC_DECODE_CB(decode_frame),
     .close          = decode_close,
-    .p.capabilities =
-#if FF_API_SUBFRAMES
-                      AV_CODEC_CAP_SUBFRAMES |
-#endif
-                      AV_CODEC_CAP_DR1,
+    .p.capabilities = AV_CODEC_CAP_DR1,
 };
 
 const FFCodec ff_acelp_kelvin_decoder = {
@@ -777,9 +773,5 @@ const FFCodec ff_acelp_kelvin_decoder = {
     .init           = decoder_init,
     FF_CODEC_DECODE_CB(decode_frame),
     .close          = decode_close,
-    .p.capabilities =
-#if FF_API_SUBFRAMES
-                      AV_CODEC_CAP_SUBFRAMES |
-#endif
-                      AV_CODEC_CAP_DR1,
+    .p.capabilities = AV_CODEC_CAP_DR1,
 };
diff --git a/libavcodec/libspeexdec.c b/libavcodec/libspeexdec.c
index 84b308490a..46f65ab075 100644
--- a/libavcodec/libspeexdec.c
+++ b/libavcodec/libspeexdec.c
@@ -195,11 +195,7 @@ const FFCodec ff_libspeex_decoder = {
     CODEC_LONG_NAME("libspeex Speex"),
     .p.type         = AVMEDIA_TYPE_AUDIO,
     .p.id           = AV_CODEC_ID_SPEEX,
-    .p.capabilities =
-#if FF_API_SUBFRAMES
-                      AV_CODEC_CAP_SUBFRAMES |
-#endif
-                      AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
+    .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
     .p.wrapper_name = "libspeex",
     .caps_internal  = FF_CODEC_CAP_NOT_INIT_THREADSAFE,
     .priv_data_size = sizeof(LibSpeexContext),
diff --git a/libavcodec/misc4.c b/libavcodec/misc4.c
index 72ac944e54..e91d4dce04 100644
--- a/libavcodec/misc4.c
+++ b/libavcodec/misc4.c
@@ -180,9 +180,6 @@ const FFCodec ff_misc4_decoder = {
     .init             = misc4_init,
     FF_CODEC_DECODE_CB(misc4_decode),
     .p.capabilities   = AV_CODEC_CAP_DR1 |
-#if FF_API_SUBFRAMES
-                        AV_CODEC_CAP_SUBFRAMES |
-#endif
                         AV_CODEC_CAP_CHANNEL_CONF,
     .p.sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16,
                                                         AV_SAMPLE_FMT_NONE },
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 46d3b7a615..852f3efe26 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -817,9 +817,6 @@ const FFCodec ff_shorten_decoder = {
     FF_CODEC_DECODE_CB(shorten_decode_frame),
     .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
                       AV_CODEC_CAP_DELAY |
-#if FF_API_SUBFRAMES
-                      AV_CODEC_CAP_SUBFRAMES |
-#endif
                       AV_CODEC_CAP_DR1,
     .p.sample_fmts  = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
                                                       AV_SAMPLE_FMT_U8P,
diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h
index 35df5eb779..5b30be148c 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_SUBFRAMES           (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_TICKS_PER_FRAME     (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_DROPCHANGED         (LIBAVCODEC_VERSION_MAJOR < 62)
 
diff --git a/libavcodec/wavarc.c b/libavcodec/wavarc.c
index 93b76c43e8..deb5df2097 100644
--- a/libavcodec/wavarc.c
+++ b/libavcodec/wavarc.c
@@ -881,9 +881,6 @@ const FFCodec ff_wavarc_decoder = {
     FF_CODEC_DECODE_CB(wavarc_decode),
     .close            = wavarc_close,
     .p.capabilities   = AV_CODEC_CAP_DR1 |
-#if FF_API_SUBFRAMES
-                        AV_CODEC_CAP_SUBFRAMES |
-#endif
                         AV_CODEC_CAP_DELAY,
     .p.sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
                                                         AV_SAMPLE_FMT_S16P,
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 9559fe1faf..31fc2d2d27 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -1335,11 +1335,7 @@ const FFCodec ff_wmalossless_decoder = {
     .close          = decode_close,
     FF_CODEC_DECODE_CB(decode_packet),
     .flush          = flush,
-    .p.capabilities =
-#if FF_API_SUBFRAMES
-                      AV_CODEC_CAP_SUBFRAMES |
-#endif
-                      AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
+    .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
     .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
     .p.sample_fmts  = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
                                                       AV_SAMPLE_FMT_S32P,
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index a6c4a75632..d1cbadcf8a 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -2100,11 +2100,7 @@ const FFCodec ff_wmapro_decoder = {
     .init           = wmapro_decode_init,
     .close          = wmapro_decode_end,
     FF_CODEC_DECODE_CB(wmapro_decode_packet),
-    .p.capabilities =
-#if FF_API_SUBFRAMES
-                      AV_CODEC_CAP_SUBFRAMES |
-#endif
-                      AV_CODEC_CAP_DR1,
+    .p.capabilities = AV_CODEC_CAP_DR1,
     .flush          = wmapro_flush,
     .p.sample_fmts  = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
                                                       AV_SAMPLE_FMT_NONE },
@@ -2121,11 +2117,7 @@ const FFCodec ff_xma1_decoder = {
     .close          = xma_decode_end,
     FF_CODEC_DECODE_CB(xma_decode_packet),
     .flush          = xma_flush,
-    .p.capabilities =
-#if FF_API_SUBFRAMES
-                      AV_CODEC_CAP_SUBFRAMES |
-#endif
-                      AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
+    .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
     .p.sample_fmts  = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
                                                       AV_SAMPLE_FMT_NONE },
     .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
@@ -2141,11 +2133,7 @@ const FFCodec ff_xma2_decoder = {
     .close          = xma_decode_end,
     FF_CODEC_DECODE_CB(xma_decode_packet),
     .flush          = xma_flush,
-    .p.capabilities =
-#if FF_API_SUBFRAMES
-                      AV_CODEC_CAP_SUBFRAMES |
-#endif
-                      AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
+    .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
     .p.sample_fmts  = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
                                                       AV_SAMPLE_FMT_NONE },
     .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index 39868e02b3..4fa794c8ac 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -2030,11 +2030,7 @@ const FFCodec ff_wmavoice_decoder = {
     .init             = wmavoice_decode_init,
     .close            = wmavoice_decode_end,
     FF_CODEC_DECODE_CB(wmavoice_decode_packet),
-    .p.capabilities   =
-#if FF_API_SUBFRAMES
-                        AV_CODEC_CAP_SUBFRAMES |
-#endif
-                        AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
+    .p.capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
     .caps_internal    = FF_CODEC_CAP_INIT_CLEANUP,
     .flush            = wmavoice_flush,
 };
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 02/30] avcodec: remove deprecated FF_API_TICKS_PER_FRAME
  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 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 03/30] avcodec: remove deprecated FF_API_DROPCHANGED James Almer
                   ` (27 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2023-05-15.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/amfenc_av1.c       |  8 +-------
 libavcodec/amfenc_h264.c      |  8 +-------
 libavcodec/amfenc_hevc.c      |  8 +-------
 libavcodec/avcodec.h          | 17 -----------------
 libavcodec/encode.c           | 14 --------------
 libavcodec/flashsv2enc.c      |  5 ++---
 libavcodec/h264dec.c          |  6 ------
 libavcodec/libaomenc.c        |  8 +-------
 libavcodec/libkvazaar.c       |  8 +-------
 libavcodec/libopenh264enc.c   |  8 +-------
 libavcodec/librav1e.c         |  8 +-------
 libavcodec/libsvtav1.c        |  8 +-------
 libavcodec/libvpxenc.c        |  8 +-------
 libavcodec/libvvenc.c         | 15 +--------------
 libavcodec/libx264.c          |  8 +-------
 libavcodec/libx265.c          |  7 +------
 libavcodec/mfenc.c            |  5 -----
 libavcodec/mpeg12dec.c        | 11 -----------
 libavcodec/mpegvideo_parser.c | 10 ----------
 libavcodec/msmpeg4enc.c       |  8 +-------
 libavcodec/nvenc.c            |  8 +-------
 libavcodec/options_table.h    |  3 ---
 libavcodec/pthread_frame.c    |  5 -----
 libavcodec/ratecontrol.c      |  6 ------
 libavcodec/vc1.c              |  8 --------
 libavcodec/version_major.h    |  1 -
 libavformat/avformat.c        | 11 -----------
 libavformat/demux.c           |  6 ------
 28 files changed, 16 insertions(+), 210 deletions(-)

diff --git a/libavcodec/amfenc_av1.c b/libavcodec/amfenc_av1.c
index 4c815add03..f672585c57 100644
--- a/libavcodec/amfenc_av1.c
+++ b/libavcodec/amfenc_av1.c
@@ -207,13 +207,7 @@ static av_cold int amf_encode_init_av1(AVCodecContext* avctx)
         framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den);
     }
     else {
-FF_DISABLE_DEPRECATION_WARNINGS
-        framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num
-#if FF_API_TICKS_PER_FRAME
-                                     * avctx->ticks_per_frame
-#endif
-                                     );
-FF_ENABLE_DEPRECATION_WARNINGS
+        framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num);
     }
 
     if ((ret = ff_amf_encode_init(avctx)) < 0)
diff --git a/libavcodec/amfenc_h264.c b/libavcodec/amfenc_h264.c
index 1a217350ae..c22241fd68 100644
--- a/libavcodec/amfenc_h264.c
+++ b/libavcodec/amfenc_h264.c
@@ -208,13 +208,7 @@ static av_cold int amf_encode_init_h264(AVCodecContext *avctx)
     if (avctx->framerate.num > 0 && avctx->framerate.den > 0) {
         framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den);
     } else {
-FF_DISABLE_DEPRECATION_WARNINGS
-        framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num
-#if FF_API_TICKS_PER_FRAME
-                                     * avctx->ticks_per_frame
-#endif
-                                     );
-FF_ENABLE_DEPRECATION_WARNINGS
+        framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num);
     }
 
     if ((ret = ff_amf_encode_init(avctx)) != 0)
diff --git a/libavcodec/amfenc_hevc.c b/libavcodec/amfenc_hevc.c
index 3530c453dd..56598939c4 100644
--- a/libavcodec/amfenc_hevc.c
+++ b/libavcodec/amfenc_hevc.c
@@ -173,13 +173,7 @@ static av_cold int amf_encode_init_hevc(AVCodecContext *avctx)
     if (avctx->framerate.num > 0 && avctx->framerate.den > 0) {
         framerate = AMFConstructRate(avctx->framerate.num, avctx->framerate.den);
     } else {
-FF_DISABLE_DEPRECATION_WARNINGS
-        framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num
-#if FF_API_TICKS_PER_FRAME
-                                     * avctx->ticks_per_frame
-#endif
-                                     );
-FF_ENABLE_DEPRECATION_WARNINGS
+        framerate = AMFConstructRate(avctx->time_base.den, avctx->time_base.num);
     }
 
     if ((ret = ff_amf_encode_init(avctx)) < 0)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 403f02d841..f6de3c6b42 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -573,23 +573,6 @@ typedef struct AVCodecContext {
      */
     AVRational framerate;
 
-#if FF_API_TICKS_PER_FRAME
-    /**
-     * For some codecs, the time base is closer to the field rate than the frame rate.
-     * Most notably, H.264 and MPEG-2 specify time_base as half of frame duration
-     * if no telecine is used ...
-     *
-     * Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.
-     *
-     * @deprecated
-     * - decoding: Use AVCodecDescriptor.props & AV_CODEC_PROP_FIELDS
-     * - encoding: Set AVCodecContext.framerate instead
-     *
-     */
-    attribute_deprecated
-    int ticks_per_frame;
-#endif
-
     /**
      * Codec delay.
      *
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index cd10dcf3cd..7935bb971b 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -613,20 +613,6 @@ static int encode_preinit_video(AVCodecContext *avctx)
         return AVERROR(EINVAL);
     }
 
-#if FF_API_TICKS_PER_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    if (avctx->ticks_per_frame && avctx->time_base.num &&
-        avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) {
-        av_log(avctx, AV_LOG_ERROR,
-               "ticks_per_frame %d too large for the timebase %d/%d.",
-               avctx->ticks_per_frame,
-               avctx->time_base.num,
-               avctx->time_base.den);
-        return AVERROR(EINVAL);
-    }
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
     if (avctx->hw_frames_ctx) {
         AVHWFramesContext *frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data;
         if (frames_ctx->format != avctx->pix_fmt) {
diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c
index 6156d00d0d..52fe0a8730 100644
--- a/libavcodec/flashsv2enc.c
+++ b/libavcodec/flashsv2enc.c
@@ -786,7 +786,7 @@ static int optimum_block_height(FlashSV2Context * s)
 static int optimum_use15_7(FlashSV2Context * s)
 {
 #ifndef FLASHSV2_DUMB
-    double ideal = ((double)(s->avctx->bit_rate * s->avctx->time_base.den * s->avctx->ticks_per_frame)) /
+    double ideal = ((double)(s->avctx->bit_rate * s->avctx->time_base.den)) /
         ((double) s->avctx->time_base.num) * s->avctx->frame_num;
     if (ideal + use15_7_threshold < s->total_bits) {
         return 1;
@@ -802,8 +802,7 @@ static int optimum_dist(FlashSV2Context * s)
 {
 #ifndef FLASHSV2_DUMB
     double ideal =
-        s->avctx->bit_rate * s->avctx->time_base.den *
-        s->avctx->ticks_per_frame;
+        s->avctx->bit_rate * s->avctx->time_base.den;
     int dist = pow((s->total_bits / ideal) * color15_7_factor, 3);
     av_log(s->avctx, AV_LOG_DEBUG, "dist: %d\n", dist);
     return dist;
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index 45ebe2656d..829427f99b 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -397,12 +397,6 @@ static av_cold int h264_decode_init(AVCodecContext *avctx)
         return AVERROR_UNKNOWN;
     }
 
-#if FF_API_TICKS_PER_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    avctx->ticks_per_frame = 2;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
     if (!avctx->internal->is_copy) {
         if (avctx->extradata_size > 0 && avctx->extradata) {
             ret = ff_h264_decode_extradata(avctx->extradata, avctx->extradata_size,
diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
index 0f7571ee7a..9a384fcc39 100644
--- a/libavcodec/libaomenc.c
+++ b/libavcodec/libaomenc.c
@@ -1270,13 +1270,7 @@ static int aom_encode(AVCodecContext *avctx, AVPacket *pkt,
         else if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
             duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base);
         else {
-FF_DISABLE_DEPRECATION_WARNINGS
-            duration =
-#if FF_API_TICKS_PER_FRAME
-                avctx->ticks_per_frame ? avctx->ticks_per_frame :
-#endif
-                1;
-FF_ENABLE_DEPRECATION_WARNINGS
+            duration = 1;
         }
 
         switch (frame->color_range) {
diff --git a/libavcodec/libkvazaar.c b/libavcodec/libkvazaar.c
index e82be2a35f..17ef6a5736 100644
--- a/libavcodec/libkvazaar.c
+++ b/libavcodec/libkvazaar.c
@@ -86,13 +86,7 @@ static av_cold int libkvazaar_init(AVCodecContext *avctx)
         cfg->framerate_denom = avctx->framerate.den;
     } else {
         cfg->framerate_num   = avctx->time_base.den;
-FF_DISABLE_DEPRECATION_WARNINGS
-        cfg->framerate_denom = avctx->time_base.num
-#if FF_API_TICKS_PER_FRAME
-            * avctx->ticks_per_frame
-#endif
-            ;
-FF_ENABLE_DEPRECATION_WARNINGS
+        cfg->framerate_denom = avctx->time_base.num;
     }
     cfg->target_bitrate = avctx->bit_rate;
     cfg->vui.sar_width  = avctx->sample_aspect_ratio.num;
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
index 7107c1a679..18150fa3b6 100644
--- a/libavcodec/libopenh264enc.c
+++ b/libavcodec/libopenh264enc.c
@@ -135,13 +135,7 @@ static av_cold int svc_encode_init(AVCodecContext *avctx)
     if (avctx->framerate.num > 0 && avctx->framerate.den > 0) {
         param.fMaxFrameRate = av_q2d(avctx->framerate);
     } else {
-FF_DISABLE_DEPRECATION_WARNINGS
-        param.fMaxFrameRate = 1.0 / av_q2d(avctx->time_base)
-#if FF_API_TICKS_PER_FRAME
-                                  / FFMAX(avctx->ticks_per_frame, 1)
-#endif
-                                  ;
-FF_ENABLE_DEPRECATION_WARNINGS
+        param.fMaxFrameRate = 1.0 / av_q2d(avctx->time_base);
     }
     param.iPicWidth                  = avctx->width;
     param.iPicHeight                 = avctx->height;
diff --git a/libavcodec/librav1e.c b/libavcodec/librav1e.c
index 546d00297d..a1fb1539b6 100644
--- a/libavcodec/librav1e.c
+++ b/libavcodec/librav1e.c
@@ -217,15 +217,9 @@ static av_cold int librav1e_encode_init(AVCodecContext *avctx)
                                    avctx->framerate.den, avctx->framerate.num
                                    });
     } else {
-FF_DISABLE_DEPRECATION_WARNINGS
         rav1e_config_set_time_base(cfg, (RaRational) {
-                                   avctx->time_base.num
-#if FF_API_TICKS_PER_FRAME
-                                   * avctx->ticks_per_frame
-#endif
-                                   , avctx->time_base.den
+                                   avctx->time_base.num, avctx->time_base.den
                                    });
-FF_ENABLE_DEPRECATION_WARNINGS
     }
 
     if ((avctx->flags & AV_CODEC_FLAG_PASS1 || avctx->flags & AV_CODEC_FLAG_PASS2) && !avctx->bit_rate) {
diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index 43fe531fde..40ab489f1f 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -311,13 +311,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param,
         param->frame_rate_denominator = avctx->framerate.den;
     } else {
         param->frame_rate_numerator   = avctx->time_base.den;
-FF_DISABLE_DEPRECATION_WARNINGS
-        param->frame_rate_denominator = avctx->time_base.num
-#if FF_API_TICKS_PER_FRAME
-            * avctx->ticks_per_frame
-#endif
-            ;
-FF_ENABLE_DEPRECATION_WARNINGS
+        param->frame_rate_denominator = avctx->time_base.num;
     }
 
     /* 2 = IDR, closed GOP, 1 = CRA, open GOP */
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 228ede7c84..189774ff03 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -1831,13 +1831,7 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt,
     else if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
         duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base);
     else {
-FF_DISABLE_DEPRECATION_WARNINGS
-        duration =
-#if FF_API_TICKS_PER_FRAME
-            avctx->ticks_per_frame ? avctx->ticks_per_frame :
-#endif
-            1;
-FF_ENABLE_DEPRECATION_WARNINGS
+        duration = 1;
     }
 
     res = vpx_codec_encode(&ctx->encoder, rawimg, timestamp,
diff --git a/libavcodec/libvvenc.c b/libavcodec/libvvenc.c
index ece9badb19..2966c4e2fd 100644
--- a/libavcodec/libvvenc.c
+++ b/libavcodec/libvvenc.c
@@ -128,20 +128,7 @@ static void vvenc_set_framerate(AVCodecContext *avctx, vvenc_config *params)
         params->m_FrameScale = avctx->time_base.num;
     }
 
-FF_DISABLE_DEPRECATION_WARNINGS
-
-#if FF_API_TICKS_PER_FRAME
-    if (avctx->ticks_per_frame == 1) {
-#endif
-        params->m_TicksPerSecond = -1;   /* auto mode for ticks per frame = 1 */
-#if FF_API_TICKS_PER_FRAME
-    } else {
-        params->m_TicksPerSecond =
-            ceil((avctx->time_base.den / (double) avctx->time_base.num) *
-                 (double) avctx->ticks_per_frame);
-    }
-#endif
-FF_ENABLE_DEPRECATION_WARNINGS
+    params->m_TicksPerSecond = -1;   /* auto mode for ticks per frame = 1 */
 }
 
 static int vvenc_parse_vvenc_params(AVCodecContext *avctx, vvenc_config *params)
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 409f45fc7d..2c97913887 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -1317,13 +1317,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
         x4->params.i_fps_den = avctx->framerate.den;
     } else {
         x4->params.i_fps_num = avctx->time_base.den;
-FF_DISABLE_DEPRECATION_WARNINGS
-        x4->params.i_fps_den = avctx->time_base.num
-#if FF_API_TICKS_PER_FRAME
-            * avctx->ticks_per_frame
-#endif
-            ;
-FF_ENABLE_DEPRECATION_WARNINGS
+        x4->params.i_fps_den = avctx->time_base.num;
     }
 
     x4->params.analyse.b_psnr = avctx->flags & AV_CODEC_FLAG_PSNR;
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index db0f0972df..d897707dd7 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -292,12 +292,7 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
         ctx->params->fpsDenom    = avctx->framerate.den;
     } else {
         ctx->params->fpsNum      = avctx->time_base.den;
-FF_DISABLE_DEPRECATION_WARNINGS
-        ctx->params->fpsDenom    = avctx->time_base.num
-#if FF_API_TICKS_PER_FRAME
-                                   * avctx->ticks_per_frame
-#endif
-                                   ;
+        ctx->params->fpsDenom    = avctx->time_base.num;
 FF_ENABLE_DEPRECATION_WARNINGS
     }
     ctx->params->sourceWidth     = avctx->width;
diff --git a/libavcodec/mfenc.c b/libavcodec/mfenc.c
index c062d87f11..c0a7d438ad 100644
--- a/libavcodec/mfenc.c
+++ b/libavcodec/mfenc.c
@@ -660,11 +660,6 @@ static int mf_encv_output_adjust(AVCodecContext *avctx, IMFMediaType *type)
         framerate = avctx->framerate;
     } else {
         framerate = av_inv_q(avctx->time_base);
-#if FF_API_TICKS_PER_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        framerate.den *= avctx->ticks_per_frame;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     }
 
     ff_MFSetAttributeRatio((IMFAttributes *)type, &MF_MT_FRAME_RATE, framerate.num, framerate.den);
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 262e213a61..bd05fe0814 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -970,12 +970,6 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
         if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
             // MPEG-1 fps
             avctx->framerate = ff_mpeg12_frame_rate_tab[s1->frame_rate_index];
-#if FF_API_TICKS_PER_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-            avctx->ticks_per_frame     = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
             avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
         } else { // MPEG-2
             // MPEG-2 fps
@@ -984,11 +978,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
                       ff_mpeg12_frame_rate_tab[s1->frame_rate_index].num * s1->frame_rate_ext.num,
                       ff_mpeg12_frame_rate_tab[s1->frame_rate_index].den * s1->frame_rate_ext.den,
                       1 << 30);
-#if FF_API_TICKS_PER_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-            avctx->ticks_per_frame = 2;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
             switch (s->chroma_format) {
             case 1: avctx->chroma_sample_location = AVCHROMA_LOC_LEFT; break;
diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c
index 2cd0348317..663399a919 100644
--- a/libavcodec/mpegvideo_parser.c
+++ b/libavcodec/mpegvideo_parser.c
@@ -147,11 +147,6 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
                 pc->frame_rate = avctx->framerate = ff_mpeg12_frame_rate_tab[frame_rate_index];
                 bit_rate = (buf[4]<<10) | (buf[5]<<2) | (buf[6]>>6);
                 avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO;
-#if FF_API_TICKS_PER_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-                avctx->ticks_per_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
             }
             break;
         case EXT_START_CODE:
@@ -181,11 +176,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
                         avctx->framerate.num = pc->frame_rate.num * (frame_rate_ext_n + 1);
                         avctx->framerate.den = pc->frame_rate.den * (frame_rate_ext_d + 1);
                         avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO;
-#if FF_API_TICKS_PER_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-                        avctx->ticks_per_frame = 2;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
                     }
                     break;
                 case 0x8: /* picture coding extension */
diff --git a/libavcodec/msmpeg4enc.c b/libavcodec/msmpeg4enc.c
index 5ce4e6e30c..73922879ac 100644
--- a/libavcodec/msmpeg4enc.c
+++ b/libavcodec/msmpeg4enc.c
@@ -284,13 +284,7 @@ void ff_msmpeg4_encode_ext_header(MpegEncContext * s)
     if (s->avctx->framerate.num > 0 && s->avctx->framerate.den > 0)
         fps = s->avctx->framerate.num / s->avctx->framerate.den;
     else {
-FF_DISABLE_DEPRECATION_WARNINGS
-        fps = s->avctx->time_base.den / s->avctx->time_base.num
-#if FF_API_TICKS_PER_FRAME
-            / FFMAX(s->avctx->ticks_per_frame, 1)
-#endif
-            ;
-FF_ENABLE_DEPRECATION_WARNINGS
+        fps = s->avctx->time_base.den / s->avctx->time_base.num;
     }
 
     put_bits(&s->pb, 5, FFMIN(fps, 31)); //yes 29.97 -> 29
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index f9221174f0..85e9261640 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -1794,13 +1794,7 @@ static av_cold int nvenc_setup_encoder(AVCodecContext *avctx)
         ctx->init_encode_params.frameRateDen = avctx->framerate.den;
     } else {
         ctx->init_encode_params.frameRateNum = avctx->time_base.den;
-FF_DISABLE_DEPRECATION_WARNINGS
-        ctx->init_encode_params.frameRateDen = avctx->time_base.num
-#if FF_API_TICKS_PER_FRAME
-            * avctx->ticks_per_frame
-#endif
-            ;
-FF_ENABLE_DEPRECATION_WARNINGS
+        ctx->init_encode_params.frameRateDen = avctx->time_base.num;
     }
 
 #ifdef NVENC_HAVE_UNIDIR_B
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 47da41b0ad..c115d8c18c 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -272,9 +272,6 @@ static const AVOption avcodec_options[] = {
 {"ch_layout", NULL, OFFSET(ch_layout), AV_OPT_TYPE_CHLAYOUT, {.str = NULL }, 0, 0, A|E|D, .unit = "ch_layout"},
 {"rc_max_vbv_use", NULL, OFFSET(rc_max_available_vbv_use), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, 0.0, FLT_MAX, V|E},
 {"rc_min_vbv_use", NULL, OFFSET(rc_min_vbv_overflow_use),  AV_OPT_TYPE_FLOAT, {.dbl = 3 },     0.0, FLT_MAX, V|E},
-#if FF_API_TICKS_PER_FRAME
-{"ticks_per_frame", NULL, OFFSET(ticks_per_frame), AV_OPT_TYPE_INT, {.i64 = 1 }, 1, INT_MAX, A|V|E|D},
-#endif
 {"color_primaries", "color primaries", OFFSET(color_primaries), AV_OPT_TYPE_INT, {.i64 = AVCOL_PRI_UNSPECIFIED }, 1, INT_MAX, V|E|D, .unit = "color_primaries_type"},
 {"bt709",       "BT.709",         0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_BT709 },        INT_MIN, INT_MAX, V|E|D, .unit = "color_primaries_type"},
 {"unknown",     "Unspecified",    0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_UNSPECIFIED },  INT_MIN, INT_MAX, V|E|D, .unit = "color_primaries_type"},
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index d9df0d62a8..6800f38bf3 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -378,11 +378,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
         dst->level   = src->level;
 
         dst->bits_per_raw_sample = src->bits_per_raw_sample;
-#if FF_API_TICKS_PER_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        dst->ticks_per_frame     = src->ticks_per_frame;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         dst->color_primaries     = src->color_primaries;
 
         dst->color_trc   = src->color_trc;
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 86ec7a3443..36fac4665d 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -61,13 +61,7 @@ static AVRational get_fpsQ(AVCodecContext *avctx)
     if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
         return avctx->framerate;
 
-FF_DISABLE_DEPRECATION_WARNINGS
-#if FF_API_TICKS_PER_FRAME
-    return av_div_q((AVRational){1, FFMAX(avctx->ticks_per_frame, 1)}, avctx->time_base);
-#else
     return av_inv_q(avctx->time_base);
-#endif
-FF_ENABLE_DEPRECATION_WARNINGS
 }
 
 static double get_fps(AVCodecContext *avctx)
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index d263c70be7..f4bcf8bf3c 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -418,14 +418,6 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)
            v->s.loop_filter, v->chromaformat, v->broadcast, v->interlace,
            v->tfcntrflag, v->finterpflag);
 
-#if FF_API_TICKS_PER_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    if (v->broadcast) { // Pulldown may be present
-        v->s.avctx->ticks_per_frame = 2;
-    }
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
     v->psf = get_bits1(gb);
     if (v->psf) { //PsF, 6.1.13
         av_log(v->s.avctx, AV_LOG_ERROR, "Progressive Segmented Frame mode: not supported (yet)\n");
diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h
index 5b30be148c..3cde4cdd8b 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_TICKS_PER_FRAME     (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_DROPCHANGED         (LIBAVCODEC_VERSION_MAJOR < 62)
 
 #define FF_API_AVFFT               (LIBAVCODEC_VERSION_MAJOR < 62)
diff --git a/libavformat/avformat.c b/libavformat/avformat.c
index 3801ef5d58..f53299cc40 100644
--- a/libavformat/avformat.c
+++ b/libavformat/avformat.c
@@ -797,11 +797,6 @@ int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt,
                                                    : (ist->codecpar->codec_type == AVMEDIA_TYPE_AUDIO ? (AVRational){0, 1}
                                                                                                       : ist->time_base);
     AVRational enc_tb = ist->time_base;
-#if FF_API_TICKS_PER_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    int ticks_per_frame = dec_ctx ? dec_ctx->ticks_per_frame : 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
     /*
      * Avi is a special case here because it supports variable fps but
@@ -827,9 +822,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
                        (dec_ctx_framerate.num || ist->codecpar->codec_type == AVMEDIA_TYPE_AUDIO))) {
             enc_tb = dec_ctx_tb;
             enc_tb.den *= 2;
-#if FF_API_TICKS_PER_FRAME
-            enc_tb.num *= ticks_per_frame;
-#endif
         }
     } else if (!(ofmt->flags & AVFMT_VARIABLE_FPS)
                && !av_match_name(ofmt->name, "mov,mp4,3gp,3g2,psp,ipod,ismv,f4v")) {
@@ -839,9 +831,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
             || (copy_tb == AVFMT_TBCF_DECODER &&
                 (dec_ctx_framerate.num || ist->codecpar->codec_type == AVMEDIA_TYPE_AUDIO))) {
             enc_tb = dec_ctx_tb;
-#if FF_API_TICKS_PER_FRAME
-            enc_tb.num *= ticks_per_frame;
-#endif
         }
     }
 
diff --git a/libavformat/demux.c b/libavformat/demux.c
index 0e39346f62..c0bfb9cb67 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -1316,12 +1316,6 @@ static int codec_close(FFStream *sti)
 
     avctx_new->pkt_timebase = sti->avctx->pkt_timebase;
 
-#if FF_API_TICKS_PER_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    avctx_new->ticks_per_frame = sti->avctx->ticks_per_frame;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
     avcodec_free_context(&sti->avctx);
     sti->avctx = avctx_new;
 
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 03/30] avcodec: remove deprecated FF_API_DROPCHANGED
  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 ` James Almer
  2025-02-24  9:44   ` Gyan Doshi
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 04/30] avcodec: remove deprecated FF_API_AVFFT James Almer
                   ` (26 subsequent siblings)
  29 siblings, 1 reply; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2023-07-15.

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)
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 04/30] avcodec: remove deprecated FF_API_AVFFT
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (2 preceding siblings ...)
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 03/30] avcodec: remove deprecated FF_API_DROPCHANGED James Almer
@ 2025-02-23 22:06 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 05/30] avcodec: remove deprecated FF_API_FF_PROFILE_LEVEL James Almer
                   ` (25 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2023-09-01.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/Makefile        |   2 -
 libavcodec/avfft.c         | 268 -------------------------------------
 libavcodec/avfft.h         | 149 ---------------------
 libavcodec/version_major.h |   1 -
 4 files changed, 420 deletions(-)
 delete mode 100644 libavcodec/avfft.c
 delete mode 100644 libavcodec/avfft.h

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 9630074205..9a6393d9a1 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -5,7 +5,6 @@ HEADERS = ac3_parser.h                                                  \
           adts_parser.h                                                 \
           avcodec.h                                                     \
           avdct.h                                                       \
-          avfft.h                                                       \
           bsf.h                                                         \
           codec.h                                                       \
           codec_desc.h                                                  \
@@ -31,7 +30,6 @@ OBJS = ac3_parser.o                                                     \
        allcodecs.o                                                      \
        avcodec.o                                                        \
        avdct.o                                                          \
-       avfft.o                                                          \
        packet.o                                                         \
        bitstream.o                                                      \
        bitstream_filters.o                                              \
diff --git a/libavcodec/avfft.c b/libavcodec/avfft.c
deleted file mode 100644
index f6787937f6..0000000000
--- a/libavcodec/avfft.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <stddef.h>
-#include <string.h>
-
-#include "libavutil/attributes.h"
-#include "libavutil/macros.h"
-#include "libavutil/mem.h"
-#include "libavutil/tx.h"
-#include "avfft.h"
-
-typedef struct AVTXWrapper {
-    AVTXContext *ctx;
-    av_tx_fn fn;
-
-    AVTXContext *ctx2;
-    av_tx_fn fn2;
-
-    ptrdiff_t stride;
-    int len;
-    int inv;
-
-    float *tmp;
-    int out_of_place;
-} AVTXWrapper;
-
-/* FFT */
-
-FFTContext *av_fft_init(int nbits, int inverse)
-{
-    int ret;
-    float scale = 1.0f;
-    AVTXWrapper *s = av_mallocz(sizeof(*s));
-    if (!s)
-        return NULL;
-
-    ret = av_tx_init(&s->ctx, &s->fn, AV_TX_FLOAT_FFT, inverse, 1 << nbits,
-                     &scale, AV_TX_INPLACE);
-    if (ret < 0) {
-        av_free(s);
-        return NULL;
-    }
-
-    return (FFTContext *)s;
-}
-
-void av_fft_permute(FFTContext *s, FFTComplex *z)
-{
-    /* Empty */
-}
-
-void av_fft_calc(FFTContext *s, FFTComplex *z)
-{
-    AVTXWrapper *w = (AVTXWrapper *)s;
-    w->fn(w->ctx, z, (void *)z, sizeof(AVComplexFloat));
-}
-
-av_cold void av_fft_end(FFTContext *s)
-{
-    if (s) {
-        AVTXWrapper *w = (AVTXWrapper *)s;
-        av_tx_uninit(&w->ctx);
-        av_tx_uninit(&w->ctx2);
-        av_free(w);
-    }
-}
-
-FFTContext *av_mdct_init(int nbits, int inverse, double scale)
-{
-    int ret;
-    float scale_f = scale;
-    AVTXWrapper *s = av_mallocz(sizeof(*s));
-    if (!s)
-        return NULL;
-
-    ret = av_tx_init(&s->ctx, &s->fn, AV_TX_FLOAT_MDCT, inverse, 1 << (nbits - 1), &scale_f, 0);
-    if (ret < 0) {
-        av_free(s);
-        return NULL;
-    }
-
-    if (inverse) {
-        ret = av_tx_init(&s->ctx2, &s->fn2, AV_TX_FLOAT_MDCT, inverse, 1 << (nbits - 1),
-                         &scale_f, AV_TX_FULL_IMDCT);
-        if (ret < 0) {
-            av_tx_uninit(&s->ctx);
-            av_free(s);
-            return NULL;
-        }
-    }
-
-    return (FFTContext *)s;
-}
-
-void av_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input)
-{
-    AVTXWrapper *w = (AVTXWrapper *)s;
-    w->fn2(w->ctx2, output, (void *)input, sizeof(float));
-}
-
-void av_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input)
-{
-    AVTXWrapper *w = (AVTXWrapper *)s;
-    w->fn(w->ctx, output, (void *)input, sizeof(float));
-}
-
-void av_mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input)
-{
-    AVTXWrapper *w = (AVTXWrapper *)s;
-    w->fn(w->ctx, output, (void *)input, sizeof(float));
-}
-
-av_cold void av_mdct_end(FFTContext *s)
-{
-    if (s) {
-        AVTXWrapper *w = (AVTXWrapper *)s;
-        av_tx_uninit(&w->ctx2);
-        av_tx_uninit(&w->ctx);
-        av_free(w);
-    }
-}
-
-RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans)
-{
-    int ret;
-    float scale = trans == IDFT_C2R ? 0.5f : 1.0f;
-    AVTXWrapper *s;
-
-    /* The other 2 modes are unconventional, do not form an orthogonal
-     * transform, have never been useful, and so they're not implemented. */
-    if (trans != IDFT_C2R && trans != DFT_R2C)
-        return NULL;
-
-    s = av_mallocz(sizeof(*s));
-    if (!s)
-        return NULL;
-
-    ret = av_tx_init(&s->ctx, &s->fn, AV_TX_FLOAT_RDFT, trans == IDFT_C2R,
-                     1 << nbits, &scale, 0x0);
-    if (ret < 0) {
-        av_free(s);
-        return NULL;
-    }
-
-    s->stride = (trans == DFT_C2R) ? sizeof(AVComplexFloat) : sizeof(float);
-    s->len = 1 << nbits;
-    s->inv = trans == IDFT_C2R;
-
-    s->tmp = av_malloc((s->len + 2)*sizeof(float));
-    if (!s->tmp) {
-        av_tx_uninit(&s->ctx);
-        av_free(s);
-        return NULL;
-    }
-
-    return (RDFTContext *)s;
-}
-
-void av_rdft_calc(RDFTContext *s, FFTSample *data)
-{
-    AVTXWrapper *w = (AVTXWrapper *)s;
-    float *src = w->inv ? w->tmp : (float *)data;
-    float *dst = w->inv ? (float *)data : w->tmp;
-
-    if (w->inv) {
-        memcpy(src, data, w->len*sizeof(float));
-
-        src[w->len] = src[1];
-        src[1] = 0.0f;
-    }
-
-    w->fn(w->ctx, dst, (void *)src, w->stride);
-
-    if (!w->inv) {
-        dst[1] = dst[w->len];
-        memcpy(data, dst, w->len*sizeof(float));
-    }
-}
-
-av_cold void av_rdft_end(RDFTContext *s)
-{
-    if (s) {
-        AVTXWrapper *w = (AVTXWrapper *)s;
-        av_tx_uninit(&w->ctx);
-        av_free(w->tmp);
-        av_free(w);
-    }
-}
-
-DCTContext *av_dct_init(int nbits, enum DCTTransformType inverse)
-{
-    int ret;
-    const float scale_map[] = {
-        [DCT_II] = 0.5f,
-        [DCT_III] = 1.0f / (1 << nbits),
-        [DCT_I] = 0.5f,
-        [DST_I] = 2.0f,
-    };
-    static const enum AVTXType type_map[] = {
-        [DCT_II] = AV_TX_FLOAT_DCT,
-        [DCT_III] = AV_TX_FLOAT_DCT,
-        [DCT_I] = AV_TX_FLOAT_DCT_I,
-        [DST_I] = AV_TX_FLOAT_DST_I,
-    };
-
-    AVTXWrapper *s = av_mallocz(sizeof(*s));
-    if (!s)
-        return NULL;
-
-    s->len = (1 << nbits);
-    s->out_of_place = (inverse == DCT_I) || (inverse == DST_I);
-
-    ret = av_tx_init(&s->ctx, &s->fn, type_map[inverse],
-                     (inverse == DCT_III), 1 << (nbits - (inverse == DCT_III)),
-                     &scale_map[inverse], s->out_of_place ? 0 : AV_TX_INPLACE);
-    if (ret < 0) {
-        av_free(s);
-        return NULL;
-    }
-
-    if (s->out_of_place) {
-        s->tmp = av_malloc((1 << (nbits + 1))*sizeof(float));
-        if (!s->tmp) {
-            av_tx_uninit(&s->ctx);
-            av_free(s);
-            return NULL;
-        }
-    }
-
-    return (DCTContext *)s;
-}
-
-void av_dct_calc(DCTContext *s, FFTSample *data)
-{
-    AVTXWrapper *w = (AVTXWrapper *)s;
-    if (w->out_of_place) {
-        memcpy(w->tmp, data, w->len*sizeof(float));
-        w->fn(w->ctx, (void *)data, w->tmp, sizeof(float));
-    } else {
-        w->fn(w->ctx, data, (void *)data, sizeof(float));
-    }
-}
-
-av_cold void av_dct_end(DCTContext *s)
-{
-    if (s) {
-        AVTXWrapper *w = (AVTXWrapper *)s;
-        av_tx_uninit(&w->ctx);
-        av_free(w->tmp);
-        av_free(w);
-    }
-}
diff --git a/libavcodec/avfft.h b/libavcodec/avfft.h
deleted file mode 100644
index e3a0da1eb9..0000000000
--- a/libavcodec/avfft.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVCODEC_AVFFT_H
-#define AVCODEC_AVFFT_H
-
-#include "libavutil/attributes.h"
-#include "version_major.h"
-#if FF_API_AVFFT
-
-/**
- * @file
- * @ingroup lavc_fft
- * FFT functions
- */
-
-/**
- * @defgroup lavc_fft FFT functions
- * @ingroup lavc_misc
- *
- * @{
- */
-
-typedef float FFTSample;
-
-typedef struct FFTComplex {
-    FFTSample re, im;
-} FFTComplex;
-
-typedef struct FFTContext FFTContext;
-
-/**
- * Set up a complex FFT.
- * @param nbits           log2 of the length of the input array
- * @param inverse         if 0 perform the forward transform, if 1 perform the inverse
- * @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_FFT
- */
-attribute_deprecated
-FFTContext *av_fft_init(int nbits, int inverse);
-
-/**
- * Do the permutation needed BEFORE calling ff_fft_calc().
- * @deprecated without replacement
- */
-attribute_deprecated
-void av_fft_permute(FFTContext *s, FFTComplex *z);
-
-/**
- * Do a complex FFT with the parameters defined in av_fft_init(). The
- * input data must be permuted before. No 1.0/sqrt(n) normalization is done.
- * @deprecated use the av_tx_fn value returned by av_tx_init, which also does permutation
- */
-attribute_deprecated
-void av_fft_calc(FFTContext *s, FFTComplex *z);
-
-attribute_deprecated
-void av_fft_end(FFTContext *s);
-
-/**
- * @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_MDCT,
- * with a flag of AV_TX_FULL_IMDCT for a replacement to av_imdct_calc.
- */
-attribute_deprecated
-FFTContext *av_mdct_init(int nbits, int inverse, double scale);
-attribute_deprecated
-void av_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
-attribute_deprecated
-void av_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input);
-attribute_deprecated
-void av_mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
-attribute_deprecated
-void av_mdct_end(FFTContext *s);
-
-/* Real Discrete Fourier Transform */
-
-enum RDFTransformType {
-    DFT_R2C,
-    IDFT_C2R,
-    IDFT_R2C,
-    DFT_C2R,
-};
-
-typedef struct RDFTContext RDFTContext;
-
-/**
- * Set up a real FFT.
- * @param nbits           log2 of the length of the input array
- * @param trans           the type of transform
- *
- * @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_RDFT
- */
-attribute_deprecated
-RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans);
-attribute_deprecated
-void av_rdft_calc(RDFTContext *s, FFTSample *data);
-attribute_deprecated
-void av_rdft_end(RDFTContext *s);
-
-/* Discrete Cosine Transform */
-
-typedef struct DCTContext DCTContext;
-
-enum DCTTransformType {
-    DCT_II = 0,
-    DCT_III,
-    DCT_I,
-    DST_I,
-};
-
-/**
- * Set up DCT.
- *
- * @param nbits           size of the input array:
- *                        (1 << nbits)     for DCT-II, DCT-III and DST-I
- *                        (1 << nbits) + 1 for DCT-I
- * @param type            the type of transform
- *
- * @note the first element of the input of DST-I is ignored
- *
- * @deprecated use av_tx_init from libavutil/tx.h with an appropriate type of AV_TX_FLOAT_DCT
- */
-attribute_deprecated
-DCTContext *av_dct_init(int nbits, enum DCTTransformType type);
-attribute_deprecated
-void av_dct_calc(DCTContext *s, FFTSample *data);
-attribute_deprecated
-void av_dct_end (DCTContext *s);
-
-/**
- * @}
- */
-
-#endif /* FF_API_AVFFT */
-#endif /* AVCODEC_AVFFT_H */
diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h
index ee3277cb76..dd92e1fbc5 100644
--- a/libavcodec/version_major.h
+++ b/libavcodec/version_major.h
@@ -39,7 +39,6 @@
 
 #define FF_API_INIT_PACKET         (LIBAVCODEC_VERSION_MAJOR < 62)
 
-#define FF_API_AVFFT               (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_FF_PROFILE_LEVEL    (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_AVCODEC_CLOSE       (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_BUFFER_MIN_SIZE     (LIBAVCODEC_VERSION_MAJOR < 62)
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 05/30] avcodec: remove deprecated FF_API_FF_PROFILE_LEVEL
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (3 preceding siblings ...)
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 04/30] avcodec: remove deprecated FF_API_AVFFT James Almer
@ 2025-02-23 22:06 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 06/30] avcodec: remove deprecated FF_API_AVCODEC_CLOSE James Almer
                   ` (24 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2023-09-06.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/avcodec.h             | 141 +------------------------------
 libavcodec/d3d12va_encode_hevc.c |   6 +-
 libavcodec/options_table.h       |   4 +-
 libavcodec/version_major.h       |   1 -
 4 files changed, 6 insertions(+), 146 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index c35e65868e..079e457e4d 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1630,155 +1630,16 @@ typedef struct AVCodecContext {
      * See the AV_PROFILE_* defines in defs.h.
      */
      int profile;
-#if FF_API_FF_PROFILE_LEVEL
-    /** @deprecated The following defines are deprecated; use AV_PROFILE_*
-     * in defs.h instead. */
-#define FF_PROFILE_UNKNOWN -99
-#define FF_PROFILE_RESERVED -100
-
-#define FF_PROFILE_AAC_MAIN 0
-#define FF_PROFILE_AAC_LOW  1
-#define FF_PROFILE_AAC_SSR  2
-#define FF_PROFILE_AAC_LTP  3
-#define FF_PROFILE_AAC_HE   4
-#define FF_PROFILE_AAC_HE_V2 28
-#define FF_PROFILE_AAC_LD   22
-#define FF_PROFILE_AAC_ELD  38
-#define FF_PROFILE_MPEG2_AAC_LOW 128
-#define FF_PROFILE_MPEG2_AAC_HE  131
-
-#define FF_PROFILE_DNXHD         0
-#define FF_PROFILE_DNXHR_LB      1
-#define FF_PROFILE_DNXHR_SQ      2
-#define FF_PROFILE_DNXHR_HQ      3
-#define FF_PROFILE_DNXHR_HQX     4
-#define FF_PROFILE_DNXHR_444     5
-
-#define FF_PROFILE_DTS                20
-#define FF_PROFILE_DTS_ES             30
-#define FF_PROFILE_DTS_96_24          40
-#define FF_PROFILE_DTS_HD_HRA         50
-#define FF_PROFILE_DTS_HD_MA          60
-#define FF_PROFILE_DTS_EXPRESS        70
-#define FF_PROFILE_DTS_HD_MA_X        61
-#define FF_PROFILE_DTS_HD_MA_X_IMAX   62
-
-
-#define FF_PROFILE_EAC3_DDP_ATMOS         30
-
-#define FF_PROFILE_TRUEHD_ATMOS           30
-
-#define FF_PROFILE_MPEG2_422    0
-#define FF_PROFILE_MPEG2_HIGH   1
-#define FF_PROFILE_MPEG2_SS     2
-#define FF_PROFILE_MPEG2_SNR_SCALABLE  3
-#define FF_PROFILE_MPEG2_MAIN   4
-#define FF_PROFILE_MPEG2_SIMPLE 5
-
-#define FF_PROFILE_H264_CONSTRAINED  (1<<9)  // 8+1; constraint_set1_flag
-#define FF_PROFILE_H264_INTRA        (1<<11) // 8+3; constraint_set3_flag
-
-#define FF_PROFILE_H264_BASELINE             66
-#define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
-#define FF_PROFILE_H264_MAIN                 77
-#define FF_PROFILE_H264_EXTENDED             88
-#define FF_PROFILE_H264_HIGH                 100
-#define FF_PROFILE_H264_HIGH_10              110
-#define FF_PROFILE_H264_HIGH_10_INTRA        (110|FF_PROFILE_H264_INTRA)
-#define FF_PROFILE_H264_MULTIVIEW_HIGH       118
-#define FF_PROFILE_H264_HIGH_422             122
-#define FF_PROFILE_H264_HIGH_422_INTRA       (122|FF_PROFILE_H264_INTRA)
-#define FF_PROFILE_H264_STEREO_HIGH          128
-#define FF_PROFILE_H264_HIGH_444             144
-#define FF_PROFILE_H264_HIGH_444_PREDICTIVE  244
-#define FF_PROFILE_H264_HIGH_444_INTRA       (244|FF_PROFILE_H264_INTRA)
-#define FF_PROFILE_H264_CAVLC_444            44
-
-#define FF_PROFILE_VC1_SIMPLE   0
-#define FF_PROFILE_VC1_MAIN     1
-#define FF_PROFILE_VC1_COMPLEX  2
-#define FF_PROFILE_VC1_ADVANCED 3
-
-#define FF_PROFILE_MPEG4_SIMPLE                     0
-#define FF_PROFILE_MPEG4_SIMPLE_SCALABLE            1
-#define FF_PROFILE_MPEG4_CORE                       2
-#define FF_PROFILE_MPEG4_MAIN                       3
-#define FF_PROFILE_MPEG4_N_BIT                      4
-#define FF_PROFILE_MPEG4_SCALABLE_TEXTURE           5
-#define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION      6
-#define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE     7
-#define FF_PROFILE_MPEG4_HYBRID                     8
-#define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME         9
-#define FF_PROFILE_MPEG4_CORE_SCALABLE             10
-#define FF_PROFILE_MPEG4_ADVANCED_CODING           11
-#define FF_PROFILE_MPEG4_ADVANCED_CORE             12
-#define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
-#define FF_PROFILE_MPEG4_SIMPLE_STUDIO             14
-#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE           15
-
-#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0   1
-#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1   2
-#define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION  32768
-#define FF_PROFILE_JPEG2000_DCINEMA_2K              3
-#define FF_PROFILE_JPEG2000_DCINEMA_4K              4
-
-#define FF_PROFILE_VP9_0                            0
-#define FF_PROFILE_VP9_1                            1
-#define FF_PROFILE_VP9_2                            2
-#define FF_PROFILE_VP9_3                            3
-
-#define FF_PROFILE_HEVC_MAIN                        1
-#define FF_PROFILE_HEVC_MAIN_10                     2
-#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE          3
-#define FF_PROFILE_HEVC_REXT                        4
-#define FF_PROFILE_HEVC_SCC                         9
-
-#define FF_PROFILE_VVC_MAIN_10                      1
-#define FF_PROFILE_VVC_MAIN_10_444                 33
-
-#define FF_PROFILE_AV1_MAIN                         0
-#define FF_PROFILE_AV1_HIGH                         1
-#define FF_PROFILE_AV1_PROFESSIONAL                 2
-
-#define FF_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT            0xc0
-#define FF_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT 0xc1
-#define FF_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT         0xc2
-#define FF_PROFILE_MJPEG_HUFFMAN_LOSSLESS                0xc3
-#define FF_PROFILE_MJPEG_JPEG_LS                         0xf7
-
-#define FF_PROFILE_SBC_MSBC                         1
-
-#define FF_PROFILE_PRORES_PROXY     0
-#define FF_PROFILE_PRORES_LT        1
-#define FF_PROFILE_PRORES_STANDARD  2
-#define FF_PROFILE_PRORES_HQ        3
-#define FF_PROFILE_PRORES_4444      4
-#define FF_PROFILE_PRORES_XQ        5
-
-#define FF_PROFILE_ARIB_PROFILE_A 0
-#define FF_PROFILE_ARIB_PROFILE_C 1
-
-#define FF_PROFILE_KLVA_SYNC 0
-#define FF_PROFILE_KLVA_ASYNC 1
-
-#define FF_PROFILE_EVC_BASELINE             0
-#define FF_PROFILE_EVC_MAIN                 1
-#endif
 
     /**
      * Encoding level descriptor.
      * - encoding: Set by user, corresponds to a specific level defined by the
      *   codec, usually corresponding to the profile level, if not specified it
-     *   is set to FF_LEVEL_UNKNOWN.
+     *   is set to AV_LEVEL_UNKNOWN.
      * - decoding: Set by libavcodec.
      * See AV_LEVEL_* in defs.h.
      */
      int level;
-#if FF_API_FF_PROFILE_LEVEL
-    /** @deprecated The following define is deprecated; use AV_LEVEL_UNKOWN
-     * in defs.h instead. */
-#define FF_LEVEL_UNKNOWN -99
-#endif
 
 #if FF_API_CODEC_PROPS
     /**
diff --git a/libavcodec/d3d12va_encode_hevc.c b/libavcodec/d3d12va_encode_hevc.c
index 644aeab7df..4b2e7a60ba 100644
--- a/libavcodec/d3d12va_encode_hevc.c
+++ b/libavcodec/d3d12va_encode_hevc.c
@@ -673,10 +673,10 @@ static int d3d12va_encode_hevc_init(AVCodecContext *avctx)
 
     if (avctx->profile == AV_PROFILE_UNKNOWN)
         avctx->profile = priv->profile;
-    if (avctx->level == FF_LEVEL_UNKNOWN)
+    if (avctx->level == AV_LEVEL_UNKNOWN)
         avctx->level = priv->level;
 
-    if (avctx->level != FF_LEVEL_UNKNOWN && avctx->level & ~0xff) {
+    if (avctx->level != AV_LEVEL_UNKNOWN && avctx->level & ~0xff) {
         av_log(avctx, AV_LOG_ERROR, "Invalid level %d: must fit "
                "in 8-bit unsigned integer.\n", avctx->level);
         return AVERROR(EINVAL);
@@ -731,7 +731,7 @@ static const AVOption d3d12va_encode_hevc_options[] = {
 
     { "level", "Set level (general_level_idc)",
       OFFSET(level), AV_OPT_TYPE_INT,
-      { .i64 = FF_LEVEL_UNKNOWN }, FF_LEVEL_UNKNOWN, 0xff, FLAGS, "level" },
+      { .i64 = AV_LEVEL_UNKNOWN }, AV_LEVEL_UNKNOWN, 0xff, FLAGS, "level" },
 
 #define LEVEL(name, value) name, NULL, 0, AV_OPT_TYPE_CONST, \
       { .i64 = value }, 0, 0, FLAGS, "level"
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 1711e56cd3..c525cde80a 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -221,8 +221,8 @@ static const AVOption avcodec_options[] = {
 {"profile", NULL, OFFSET(profile), AV_OPT_TYPE_INT, {.i64 = AV_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E|CC, .unit = "avctx.profile"},
 {"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, .unit = "avctx.profile"},
 {"main10",  NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_PROFILE_HEVC_MAIN_10 }, INT_MIN, INT_MAX, V|E, .unit = "avctx.profile"},
-{"level", "encoding level, usually corresponding to the profile level, codec-specific", OFFSET(level), AV_OPT_TYPE_INT, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E|CC, .unit = "avctx.level"},
-{"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, .unit = "avctx.level"},
+{"level", "encoding level, usually corresponding to the profile level, codec-specific", OFFSET(level), AV_OPT_TYPE_INT, {.i64 = AV_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E|CC, .unit = "avctx.level"},
+{"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, .unit = "avctx.level"},
 {"lowres", "decode at 1= 1/2, 2=1/4, 3=1/8 resolutions", OFFSET(lowres), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, V|A|D},
 {"cmp", "full-pel ME compare function", OFFSET(me_cmp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, .unit = "cmp_func"},
 {"subcmp", "sub-pel ME compare function", OFFSET(me_sub_cmp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, .unit = "cmp_func"},
diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h
index dd92e1fbc5..b43aa2a2db 100644
--- a/libavcodec/version_major.h
+++ b/libavcodec/version_major.h
@@ -39,7 +39,6 @@
 
 #define FF_API_INIT_PACKET         (LIBAVCODEC_VERSION_MAJOR < 62)
 
-#define FF_API_FF_PROFILE_LEVEL    (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_AVCODEC_CLOSE       (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_BUFFER_MIN_SIZE     (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_VDPAU_ALLOC_GET_SET (LIBAVCODEC_VERSION_MAJOR < 62)
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 06/30] avcodec: remove deprecated FF_API_AVCODEC_CLOSE
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (4 preceding siblings ...)
  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 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 07/30] avcodec: remove deprecated FF_API_BUFFER_MIN_SIZE James Almer
                   ` (23 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2024-02-09.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/avcodec.c       |  8 --------
 libavcodec/avcodec.h       | 18 ------------------
 libavcodec/version_major.h |  1 -
 3 files changed, 27 deletions(-)

diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index 3f97f5d161..755da184e5 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -493,14 +493,6 @@ av_cold void ff_codec_close(AVCodecContext *avctx)
     avctx->active_thread_type = 0;
 }
 
-#if FF_API_AVCODEC_CLOSE
-int avcodec_close(AVCodecContext *avctx)
-{
-    ff_codec_close(avctx);
-    return 0;
-}
-#endif
-
 static const char *unknown_if_null(const char *str)
 {
     return str ? str : "unknown";
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 079e457e4d..5def718fc7 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2234,24 +2234,6 @@ int avcodec_parameters_to_context(AVCodecContext *codec,
  */
 int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
 
-#if FF_API_AVCODEC_CLOSE
-/**
- * Close a given AVCodecContext and free all the data associated with it
- * (but not the AVCodecContext itself).
- *
- * Calling this function on an AVCodecContext that hasn't been opened will free
- * the codec-specific data allocated in avcodec_alloc_context3() with a non-NULL
- * codec. Subsequent calls will do nothing.
- *
- * @deprecated Do not use this function. Use avcodec_free_context() to destroy a
- * codec context (either open or closed). Opening and closing a codec context
- * multiple times is not supported anymore -- use multiple codec contexts
- * instead.
- */
-attribute_deprecated
-int avcodec_close(AVCodecContext *avctx);
-#endif
-
 /**
  * Free all allocated data in the given subtitle struct.
  *
diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h
index b43aa2a2db..38c12650c1 100644
--- a/libavcodec/version_major.h
+++ b/libavcodec/version_major.h
@@ -39,7 +39,6 @@
 
 #define FF_API_INIT_PACKET         (LIBAVCODEC_VERSION_MAJOR < 62)
 
-#define FF_API_AVCODEC_CLOSE       (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_BUFFER_MIN_SIZE     (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_VDPAU_ALLOC_GET_SET (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_QUALITY_FACTOR      (LIBAVCODEC_VERSION_MAJOR < 62)
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 07/30] avcodec: remove deprecated FF_API_BUFFER_MIN_SIZE
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (5 preceding siblings ...)
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 06/30] avcodec: remove deprecated FF_API_AVCODEC_CLOSE James Almer
@ 2025-02-23 22:06 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 08/30] avcodec: remove deprecated FF_API_VDPAU_ALLOC_GET_SET James Almer
                   ` (22 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2024-02-20.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/avcodec.h       | 11 -----------
 libavcodec/version_major.h |  1 -
 2 files changed, 12 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 5def718fc7..6b68afe93a 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -187,17 +187,6 @@ struct AVCodecParameters;
  * @{
  */
 
-#if FF_API_BUFFER_MIN_SIZE
-/**
- * @ingroup lavc_encoding
- * minimum encoding buffer size
- * Used to avoid some checks during header writing.
- * @deprecated Unused: avcodec_receive_packet() does not work
- *             with preallocated packet buffers.
- */
-#define AV_INPUT_BUFFER_MIN_SIZE 16384
-#endif
-
 /**
  * @ingroup lavc_encoding
  */
diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h
index 38c12650c1..9a30ba5910 100644
--- a/libavcodec/version_major.h
+++ b/libavcodec/version_major.h
@@ -39,7 +39,6 @@
 
 #define FF_API_INIT_PACKET         (LIBAVCODEC_VERSION_MAJOR < 62)
 
-#define FF_API_BUFFER_MIN_SIZE     (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_VDPAU_ALLOC_GET_SET (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_QUALITY_FACTOR      (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_V408_CODECID        (LIBAVCODEC_VERSION_MAJOR < 62)
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 08/30] avcodec: remove deprecated FF_API_VDPAU_ALLOC_GET_SET
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (6 preceding siblings ...)
  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 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 09/30] avcodec: remove deprecated FF_API_QUALITY_FACTOR James Almer
                   ` (21 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2024-03-07.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/vdpau.c         | 21 ---------------------
 libavcodec/vdpau.h         | 33 ---------------------------------
 libavcodec/version_major.h |  1 -
 3 files changed, 55 deletions(-)

diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index 0dd5641603..6dcc7cb531 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -62,20 +62,6 @@ static int vdpau_error(VdpStatus status)
     }
 }
 
-#if FF_API_VDPAU_ALLOC_GET_SET
-AVVDPAUContext *av_alloc_vdpaucontext(void)
-{
-FF_DISABLE_DEPRECATION_WARNINGS
-    return av_vdpau_alloc_context();
-FF_ENABLE_DEPRECATION_WARNINGS
-}
-
-#define MAKE_ACCESSORS(str, name, type, field) \
-    type av_##name##_get_##field(const str *s) { return s->field; } \
-    void av_##name##_set_##field(str *s, type v) { s->field = v; }
-MAKE_ACCESSORS(AVVDPAUContext, vdpau_hwaccel, AVVDPAU_Render2, render2)
-#endif
-
 int av_vdpau_get_surface_parameters(AVCodecContext *avctx,
                                     VdpChromaType *type,
                                     uint32_t *width, uint32_t *height)
@@ -402,13 +388,6 @@ int ff_vdpau_add_buffer(struct vdpau_picture_context *pic_ctx,
     return 0;
 }
 
-#if FF_API_VDPAU_ALLOC_GET_SET
-AVVDPAUContext *av_vdpau_alloc_context(void)
-{
-    return av_mallocz(sizeof(VDPAUHWContext));
-}
-#endif
-
 int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device,
                           VdpGetProcAddress *get_proc, unsigned flags)
 {
diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
index 8021c25761..da77c5daed 100644
--- a/libavcodec/vdpau.h
+++ b/libavcodec/vdpau.h
@@ -93,28 +93,6 @@ typedef struct AVVDPAUContext {
     AVVDPAU_Render2 render2;
 } AVVDPAUContext;
 
-#if FF_API_VDPAU_ALLOC_GET_SET
-/**
- * @brief allocation function for AVVDPAUContext
- *
- * Allows extending the struct without breaking API/ABI
- * @deprecated use av_vdpau_bind_context() instead
- */
-attribute_deprecated
-AVVDPAUContext *av_alloc_vdpaucontext(void);
-
-/**
- * @deprecated render2 is public and can be accessed directly
- */
-attribute_deprecated
-AVVDPAU_Render2 av_vdpau_hwaccel_get_render2(const AVVDPAUContext *);
-/**
- * @deprecated render2 is public and can be accessed directly
- */
-attribute_deprecated
-void av_vdpau_hwaccel_set_render2(AVVDPAUContext *, AVVDPAU_Render2);
-#endif
-
 /**
  * Associate a VDPAU device with a codec context for hardware acceleration.
  * This function is meant to be called from the get_format() codec callback,
@@ -155,17 +133,6 @@ int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device,
 int av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type,
                                     uint32_t *width, uint32_t *height);
 
-#if FF_API_VDPAU_ALLOC_GET_SET
-/**
- * Allocate an AVVDPAUContext.
- *
- * @return Newly-allocated AVVDPAUContext or NULL on failure.
- * @deprecated use av_vdpau_bind_context() instead
- */
-attribute_deprecated
-AVVDPAUContext *av_vdpau_alloc_context(void);
-#endif
-
 /** @} */
 
 #endif /* AVCODEC_VDPAU_H */
diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h
index 9a30ba5910..dba07a0078 100644
--- a/libavcodec/version_major.h
+++ b/libavcodec/version_major.h
@@ -39,7 +39,6 @@
 
 #define FF_API_INIT_PACKET         (LIBAVCODEC_VERSION_MAJOR < 62)
 
-#define FF_API_VDPAU_ALLOC_GET_SET (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_QUALITY_FACTOR      (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_V408_CODECID        (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_CODEC_PROPS         (LIBAVCODEC_VERSION_MAJOR < 63)
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 09/30] avcodec: remove deprecated FF_API_QUALITY_FACTOR
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (7 preceding siblings ...)
  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 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 10/30] avcodec/version_major: postpone some deprecations until the next bump James Almer
                   ` (20 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2024-03-29.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/packet.h        | 4 ----
 libavcodec/version_major.h | 1 -
 2 files changed, 5 deletions(-)

diff --git a/libavcodec/packet.h b/libavcodec/packet.h
index c1f1ad7b43..71bc2e0575 100644
--- a/libavcodec/packet.h
+++ b/libavcodec/packet.h
@@ -356,10 +356,6 @@ enum AVPacketSideDataType {
     AV_PKT_DATA_NB
 };
 
-#if FF_API_QUALITY_FACTOR
-#define AV_PKT_DATA_QUALITY_FACTOR AV_PKT_DATA_QUALITY_STATS //DEPRECATED
-#endif
-
 /**
  * This structure stores auxiliary information for decoding, presenting, or
  * otherwise processing the coded stream. It is typically exported by demuxers
diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h
index dba07a0078..2abc6a9190 100644
--- a/libavcodec/version_major.h
+++ b/libavcodec/version_major.h
@@ -39,7 +39,6 @@
 
 #define FF_API_INIT_PACKET         (LIBAVCODEC_VERSION_MAJOR < 62)
 
-#define FF_API_QUALITY_FACTOR      (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_V408_CODECID        (LIBAVCODEC_VERSION_MAJOR < 62)
 #define FF_API_CODEC_PROPS         (LIBAVCODEC_VERSION_MAJOR < 63)
 
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 10/30] avcodec/version_major: postpone some deprecations until the next bump
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (8 preceding siblings ...)
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 09/30] avcodec: remove deprecated FF_API_QUALITY_FACTOR James Almer
@ 2025-02-23 22:06 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 11/30] avdevice: remove deprecated FF_API_BKTR_DEVICE James Almer
                   ` (19 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

They are either too recent, or need more work before they can be removed.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/version_major.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h
index 2abc6a9190..b4f4936786 100644
--- a/libavcodec/version_major.h
+++ b/libavcodec/version_major.h
@@ -37,15 +37,15 @@
  * at once through the bump. This improves the git bisect-ability of the change.
  */
 
-#define FF_API_INIT_PACKET         (LIBAVCODEC_VERSION_MAJOR < 62)
+#define FF_API_INIT_PACKET         (LIBAVCODEC_VERSION_MAJOR < 63)
 
-#define FF_API_V408_CODECID        (LIBAVCODEC_VERSION_MAJOR < 62)
+#define FF_API_V408_CODECID        (LIBAVCODEC_VERSION_MAJOR < 63)
 #define FF_API_CODEC_PROPS         (LIBAVCODEC_VERSION_MAJOR < 63)
 
 // reminder to remove the OMX encoder on next major bump
-#define FF_CODEC_OMX               (LIBAVCODEC_VERSION_MAJOR < 62)
+#define FF_CODEC_OMX               (LIBAVCODEC_VERSION_MAJOR < 63)
 // reminder to remove Sonic Lossy/Lossless encoders on next major bump
-#define FF_CODEC_SONIC_ENC         (LIBAVCODEC_VERSION_MAJOR < 62)
+#define FF_CODEC_SONIC_ENC         (LIBAVCODEC_VERSION_MAJOR < 63)
 // reminder to remove Sonic decoder on next-next major bump
 #define FF_CODEC_SONIC_DEC         (LIBAVCODEC_VERSION_MAJOR < 63)
 
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 11/30] avdevice: remove deprecated FF_API_BKTR_DEVICE
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (9 preceding siblings ...)
  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 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 12/30] avdevice: remove deprecated FF_API_OPENGL_DEVICE James Almer
                   ` (18 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2024-02-02.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 configure                   |  14 --
 libavdevice/Makefile        |   1 -
 libavdevice/alldevices.c    |   1 -
 libavdevice/bktr.c          | 366 ------------------------------------
 libavdevice/version_major.h |   2 -
 5 files changed, 384 deletions(-)
 delete mode 100644 libavdevice/bktr.c

diff --git a/configure b/configure
index f76f946dfe..33d37cf590 100755
--- a/configure
+++ b/configure
@@ -2285,11 +2285,6 @@ HEADERS_LIST="
     cdio_paranoia_paranoia_h
     cuda_h
     dispatch_dispatch_h
-    dev_bktr_ioctl_bt848_h
-    dev_bktr_ioctl_meteor_h
-    dev_ic_bt8xx_h
-    dev_video_bktr_ioctl_bt848_h
-    dev_video_meteor_ioctl_meteor_h
     direct_h
     dirent_h
     dxgidebug_h
@@ -2299,8 +2294,6 @@ HEADERS_LIST="
     io_h
     linux_dma_buf_h
     linux_perf_event_h
-    machine_ioctl_bt848_h
-    machine_ioctl_meteor_h
     malloc_h
     opencv2_core_core_c_h
     OpenGL_gl3_h
@@ -3744,7 +3737,6 @@ avfoundation_indev_suggest="coregraphics applicationservices"
 avfoundation_indev_extralibs="-framework Foundation"
 audiotoolbox_outdev_deps="audiotoolbox pthreads"
 audiotoolbox_outdev_extralibs="-framework AudioToolbox -framework CoreAudio"
-bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
 caca_outdev_deps="libcaca"
 decklink_deps_any="libdl LoadLibrary"
 decklink_indev_deps="decklink threads"
@@ -7251,12 +7243,6 @@ check_cpp_condition vfwcap_defines vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER"
 
 check_type "dshow.h" IBaseFilter
 
-# check for ioctl_meteor.h, ioctl_bt848.h and alternatives
-check_headers "dev/bktr/ioctl_meteor.h dev/bktr/ioctl_bt848.h"                   ||
-    check_headers "machine/ioctl_meteor.h machine/ioctl_bt848.h"                 ||
-    check_headers "dev/video/meteor/ioctl_meteor.h dev/video/bktr/ioctl_bt848.h" ||
-    check_headers "dev/ic/bt8xx.h"
-
 if check_struct sys/soundcard.h audio_buf_info bytes; then
     enable_sanitized sys/soundcard.h
 else
diff --git a/libavdevice/Makefile b/libavdevice/Makefile
index c30449201d..f35e6c4427 100644
--- a/libavdevice/Makefile
+++ b/libavdevice/Makefile
@@ -18,7 +18,6 @@ OBJS-$(CONFIG_ALSA_OUTDEV)               += alsa_enc.o alsa.o
 OBJS-$(CONFIG_ANDROID_CAMERA_INDEV)      += android_camera.o
 OBJS-$(CONFIG_AUDIOTOOLBOX_OUTDEV)       += audiotoolbox.o
 OBJS-$(CONFIG_AVFOUNDATION_INDEV)        += avfoundation.o
-OBJS-$(CONFIG_BKTR_INDEV)                += bktr.o
 OBJS-$(CONFIG_CACA_OUTDEV)               += caca.o
 OBJS-$(CONFIG_DECKLINK_OUTDEV)           += decklink_enc.o decklink_enc_c.o decklink_common.o
 OBJS-$(CONFIG_DECKLINK_INDEV)            += decklink_dec.o decklink_dec_c.o decklink_common.o
diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c
index 3f0e6101a5..ce28eac8b8 100644
--- a/libavdevice/alldevices.c
+++ b/libavdevice/alldevices.c
@@ -32,7 +32,6 @@ extern const FFOutputFormat ff_alsa_muxer;
 extern const FFInputFormat  ff_android_camera_demuxer;
 extern const FFOutputFormat ff_audiotoolbox_muxer;
 extern const FFInputFormat  ff_avfoundation_demuxer;
-extern const FFInputFormat  ff_bktr_demuxer;
 extern const FFOutputFormat ff_caca_muxer;
 extern const FFInputFormat  ff_decklink_demuxer;
 extern const FFOutputFormat ff_decklink_muxer;
diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c
deleted file mode 100644
index eed75a9a92..0000000000
--- a/libavdevice/bktr.c
+++ /dev/null
@@ -1,366 +0,0 @@
-/*
- * *BSD video grab interface
- * Copyright (c) 2002 Steve O'Hara-Smith
- * based on
- *           Linux video grab interface
- *           Copyright (c) 2000, 2001 Fabrice Bellard
- * and
- *           simple_grab.c Copyright (c) 1999 Roger Hardiman
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "libavformat/demux.h"
-#include "libavformat/internal.h"
-#include "libavutil/file_open.h"
-#include "libavutil/internal.h"
-#include "libavutil/log.h"
-#include "libavutil/mem.h"
-#include "libavutil/opt.h"
-#include "libavutil/parseutils.h"
-#include "libavutil/time.h"
-#if HAVE_DEV_BKTR_IOCTL_METEOR_H && HAVE_DEV_BKTR_IOCTL_BT848_H
-# include <dev/bktr/ioctl_meteor.h>
-# include <dev/bktr/ioctl_bt848.h>
-#elif HAVE_MACHINE_IOCTL_METEOR_H && HAVE_MACHINE_IOCTL_BT848_H
-# include <machine/ioctl_meteor.h>
-# include <machine/ioctl_bt848.h>
-#elif HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H && HAVE_DEV_VIDEO_BKTR_IOCTL_BT848_H
-# include <dev/video/meteor/ioctl_meteor.h>
-# include <dev/video/bktr/ioctl_bt848.h>
-#elif HAVE_DEV_IC_BT8XX_H
-# include <dev/ic/bt8xx.h>
-#endif
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <sys/time.h>
-#include <signal.h>
-#include <stdint.h>
-#include "avdevice.h"
-
-typedef struct VideoData {
-    AVClass *class;
-    int video_fd;
-    int tuner_fd;
-    int width, height;
-    uint64_t per_frame;
-    int standard;
-    char *framerate;  /**< Set by a private option. */
-} VideoData;
-
-
-#define PAL 1
-#define PALBDGHI 1
-#define NTSC 2
-#define NTSCM 2
-#define SECAM 3
-#define PALN 4
-#define PALM 5
-#define NTSCJ 6
-
-/* PAL is 768 x 576. NTSC is 640 x 480 */
-#define PAL_HEIGHT 576
-#define SECAM_HEIGHT 576
-#define NTSC_HEIGHT 480
-
-#ifndef VIDEO_FORMAT
-#define VIDEO_FORMAT NTSC
-#endif
-
-static const int bktr_dev[] = { METEOR_DEV0, METEOR_DEV1, METEOR_DEV2,
-    METEOR_DEV3, METEOR_DEV_SVIDEO };
-
-uint8_t *video_buf;
-size_t video_buf_size;
-uint64_t last_frame_time;
-volatile sig_atomic_t nsignals;
-
-
-static void catchsignal(int signal)
-{
-    nsignals++;
-    return;
-}
-
-static av_cold int bktr_init(const char *video_device, int width, int height,
-    int format, int *video_fd, int *tuner_fd, int idev, double frequency)
-{
-    struct meteor_geomet geo;
-    int h_max;
-    long ioctl_frequency;
-    char *arg;
-    int c;
-    struct sigaction act, old;
-    int ret;
-    char errbuf[128];
-
-    if (idev < 0 || idev > 4)
-    {
-        arg = getenv ("BKTR_DEV");
-        if (arg)
-            idev = atoi (arg);
-        if (idev < 0 || idev > 4)
-            idev = 1;
-    }
-
-    if (format < 1 || format > 6)
-    {
-        arg = getenv ("BKTR_FORMAT");
-        if (arg)
-            format = atoi (arg);
-        if (format < 1 || format > 6)
-            format = VIDEO_FORMAT;
-    }
-
-    if (frequency <= 0)
-    {
-        arg = getenv ("BKTR_FREQUENCY");
-        if (arg)
-            frequency = atof (arg);
-        if (frequency <= 0)
-            frequency = 0.0;
-    }
-
-    memset(&act, 0, sizeof(act));
-    sigemptyset(&act.sa_mask);
-    act.sa_handler = catchsignal;
-    sigaction(SIGUSR1, &act, &old);
-
-    *tuner_fd = avpriv_open("/dev/tuner0", O_RDONLY);
-    if (*tuner_fd < 0)
-        av_log(NULL, AV_LOG_ERROR, "Warning. Tuner not opened, continuing: %s\n", strerror(errno));
-
-    *video_fd = avpriv_open(video_device, O_RDONLY);
-    if (*video_fd < 0) {
-        ret = AVERROR(errno);
-        av_strerror(ret, errbuf, sizeof(errbuf));
-        av_log(NULL, AV_LOG_ERROR, "%s: %s\n", video_device, errbuf);
-        return ret;
-    }
-
-    geo.rows = height;
-    geo.columns = width;
-    geo.frames = 1;
-    geo.oformat = METEOR_GEO_YUV_422 | METEOR_GEO_YUV_12;
-
-    switch (format) {
-    case PAL:   h_max = PAL_HEIGHT;   c = BT848_IFORM_F_PALBDGHI; break;
-    case PALN:  h_max = PAL_HEIGHT;   c = BT848_IFORM_F_PALN;     break;
-    case PALM:  h_max = PAL_HEIGHT;   c = BT848_IFORM_F_PALM;     break;
-    case SECAM: h_max = SECAM_HEIGHT; c = BT848_IFORM_F_SECAM;    break;
-    case NTSC:  h_max = NTSC_HEIGHT;  c = BT848_IFORM_F_NTSCM;    break;
-    case NTSCJ: h_max = NTSC_HEIGHT;  c = BT848_IFORM_F_NTSCJ;    break;
-    default:    h_max = PAL_HEIGHT;   c = BT848_IFORM_F_PALBDGHI; break;
-    }
-
-    if (height <= h_max / 2)
-        geo.oformat |= METEOR_GEO_EVEN_ONLY;
-
-    if (ioctl(*video_fd, METEORSETGEO, &geo) < 0) {
-        ret = AVERROR(errno);
-        av_strerror(ret, errbuf, sizeof(errbuf));
-        av_log(NULL, AV_LOG_ERROR, "METEORSETGEO: %s\n", errbuf);
-        return ret;
-    }
-
-    if (ioctl(*video_fd, BT848SFMT, &c) < 0) {
-        ret = AVERROR(errno);
-        av_strerror(ret, errbuf, sizeof(errbuf));
-        av_log(NULL, AV_LOG_ERROR, "BT848SFMT: %s\n", errbuf);
-        return ret;
-    }
-
-    c = bktr_dev[idev];
-    if (ioctl(*video_fd, METEORSINPUT, &c) < 0) {
-        ret = AVERROR(errno);
-        av_strerror(ret, errbuf, sizeof(errbuf));
-        av_log(NULL, AV_LOG_ERROR, "METEORSINPUT: %s\n", errbuf);
-        return ret;
-    }
-
-    video_buf_size = width * height * 12 / 8;
-
-    video_buf = (uint8_t *)mmap((caddr_t)0, video_buf_size,
-        PROT_READ, MAP_SHARED, *video_fd, (off_t)0);
-    if (video_buf == MAP_FAILED) {
-        ret = AVERROR(errno);
-        av_strerror(ret, errbuf, sizeof(errbuf));
-        av_log(NULL, AV_LOG_ERROR, "mmap: %s\n", errbuf);
-        return ret;
-    }
-
-    if (frequency != 0.0) {
-        ioctl_frequency  = (unsigned long)(frequency*16);
-        if (ioctl(*tuner_fd, TVTUNER_SETFREQ, &ioctl_frequency) < 0)
-            av_log(NULL, AV_LOG_ERROR, "TVTUNER_SETFREQ: %s\n", strerror(errno));
-    }
-
-    c = AUDIO_UNMUTE;
-    if (ioctl(*tuner_fd, BT848_SAUDIO, &c) < 0)
-        av_log(NULL, AV_LOG_ERROR, "TVTUNER_SAUDIO: %s\n", strerror(errno));
-
-    c = METEOR_CAP_CONTINOUS;
-    ioctl(*video_fd, METEORCAPTUR, &c);
-
-    c = SIGUSR1;
-    ioctl(*video_fd, METEORSSIGNAL, &c);
-
-    return 0;
-}
-
-static void bktr_getframe(uint64_t per_frame)
-{
-    uint64_t curtime;
-
-    curtime = av_gettime_relative();
-    if (!last_frame_time
-        || ((last_frame_time + per_frame) > curtime)) {
-        if (!usleep(last_frame_time + per_frame + per_frame / 8 - curtime)) {
-            if (!nsignals)
-                av_log(NULL, AV_LOG_INFO,
-                       "SLEPT NO signals - %d microseconds late\n",
-                       (int)(av_gettime_relative() - last_frame_time - per_frame));
-        }
-    }
-    nsignals = 0;
-    last_frame_time = curtime;
-}
-
-
-/* note: we support only one picture read at a time */
-static int grab_read_packet(AVFormatContext *s1, AVPacket *pkt)
-{
-    VideoData *s = s1->priv_data;
-
-    if (av_new_packet(pkt, video_buf_size) < 0)
-        return AVERROR(EIO);
-
-    bktr_getframe(s->per_frame);
-
-    pkt->pts = av_gettime();
-    memcpy(pkt->data, video_buf, video_buf_size);
-
-    return video_buf_size;
-}
-
-static int grab_read_header(AVFormatContext *s1)
-{
-    VideoData *s = s1->priv_data;
-    AVStream *st;
-    AVRational framerate;
-    int ret = 0;
-
-    av_log(s1, AV_LOG_WARNING, "bktr input is deprecated and will be removed. "
-           "Please contact the developers if you are interested in maintaining it.\n");
-
-    if (!s->framerate)
-        switch (s->standard) {
-        case PAL:   s->framerate = av_strdup("pal");  break;
-        case NTSC:  s->framerate = av_strdup("ntsc"); break;
-        case SECAM: s->framerate = av_strdup("25");   break;
-        default:
-            av_log(s1, AV_LOG_ERROR, "Unknown standard.\n");
-            ret = AVERROR(EINVAL);
-            goto out;
-        }
-    if ((ret = av_parse_video_rate(&framerate, s->framerate)) < 0) {
-        av_log(s1, AV_LOG_ERROR, "Could not parse framerate '%s'.\n", s->framerate);
-        goto out;
-    }
-
-    st = avformat_new_stream(s1, NULL);
-    if (!st) {
-        ret = AVERROR(ENOMEM);
-        goto out;
-    }
-    avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in use */
-
-    s->per_frame = ((uint64_t)1000000 * framerate.den) / framerate.num;
-
-    st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
-    st->codecpar->format = AV_PIX_FMT_YUV420P;
-    st->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO;
-    st->codecpar->width = s->width;
-    st->codecpar->height = s->height;
-    st->avg_frame_rate = framerate;
-
-    if (bktr_init(s1->url, s->width, s->height, s->standard,
-                  &s->video_fd, &s->tuner_fd, -1, 0.0) < 0) {
-        ret = AVERROR(EIO);
-        goto out;
-    }
-
-    nsignals = 0;
-    last_frame_time = 0;
-
-out:
-    return ret;
-}
-
-static int grab_read_close(AVFormatContext *s1)
-{
-    VideoData *s = s1->priv_data;
-    int c;
-
-    c = METEOR_CAP_STOP_CONT;
-    ioctl(s->video_fd, METEORCAPTUR, &c);
-    close(s->video_fd);
-
-    c = AUDIO_MUTE;
-    ioctl(s->tuner_fd, BT848_SAUDIO, &c);
-    close(s->tuner_fd);
-
-    munmap((caddr_t)video_buf, video_buf_size);
-
-    return 0;
-}
-
-#define OFFSET(x) offsetof(VideoData, x)
-#define DEC AV_OPT_FLAG_DECODING_PARAM
-static const AVOption options[] = {
-    { "standard", "", offsetof(VideoData, standard), AV_OPT_TYPE_INT, {.i64 = VIDEO_FORMAT}, PAL, NTSCJ, AV_OPT_FLAG_DECODING_PARAM, .unit = "standard" },
-    { "PAL",      "", 0, AV_OPT_TYPE_CONST, {.i64 = PAL},   0, 0, AV_OPT_FLAG_DECODING_PARAM, .unit = "standard" },
-    { "NTSC",     "", 0, AV_OPT_TYPE_CONST, {.i64 = NTSC},  0, 0, AV_OPT_FLAG_DECODING_PARAM, .unit = "standard" },
-    { "SECAM",    "", 0, AV_OPT_TYPE_CONST, {.i64 = SECAM}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, .unit = "standard" },
-    { "PALN",     "", 0, AV_OPT_TYPE_CONST, {.i64 = PALN},  0, 0, AV_OPT_FLAG_DECODING_PARAM, .unit = "standard" },
-    { "PALM",     "", 0, AV_OPT_TYPE_CONST, {.i64 = PALM},  0, 0, AV_OPT_FLAG_DECODING_PARAM, .unit = "standard" },
-    { "NTSCJ",    "", 0, AV_OPT_TYPE_CONST, {.i64 = NTSCJ}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, .unit = "standard" },
-    { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(width), AV_OPT_TYPE_IMAGE_SIZE, {.str = "vga"}, 0, 0, DEC },
-    { "framerate", "", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC },
-    { NULL },
-};
-
-static const AVClass bktr_class = {
-    .class_name = "BKTR grab indev",
-    .item_name  = av_default_item_name,
-    .option     = options,
-    .version    = LIBAVUTIL_VERSION_INT,
-    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
-};
-
-const FFInputFormat ff_bktr_demuxer = {
-    .p.name         = "bktr",
-    .p.long_name    = NULL_IF_CONFIG_SMALL("video grab"),
-    .p.flags        = AVFMT_NOFILE,
-    .p.priv_class   = &bktr_class,
-    .priv_data_size = sizeof(VideoData),
-    .read_header    = grab_read_header,
-    .read_packet    = grab_read_packet,
-    .read_close     = grab_read_close,
-};
diff --git a/libavdevice/version_major.h b/libavdevice/version_major.h
index 50f577f295..b7dbe28b4d 100644
--- a/libavdevice/version_major.h
+++ b/libavdevice/version_major.h
@@ -33,8 +33,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-// reminder to remove the bktr device on next major bump
-#define FF_API_BKTR_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
 // reminder to remove the opengl device on next major bump
 #define FF_API_OPENGL_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
 // reminder to remove the sdl2 device on next major bump
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 12/30] avdevice: remove deprecated FF_API_OPENGL_DEVICE
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (10 preceding siblings ...)
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 11/30] avdevice: remove deprecated FF_API_BKTR_DEVICE James Almer
@ 2025-02-23 22:06 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 13/30] avdevice: remove deprecated FF_API_SDL2_DEVICE James Almer
                   ` (17 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2024-02-28.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 configure                        |    5 +-
 libavdevice/Makefile             |    1 -
 libavdevice/alldevices.c         |    1 -
 libavdevice/opengl_enc.c         | 1325 ------------------------------
 libavdevice/opengl_enc_shaders.h |  188 -----
 libavdevice/version_major.h      |    2 -
 6 files changed, 1 insertion(+), 1521 deletions(-)
 delete mode 100644 libavdevice/opengl_enc.c
 delete mode 100644 libavdevice/opengl_enc_shaders.h

diff --git a/configure b/configure
index 33d37cf590..9a003aa453 100755
--- a/configure
+++ b/configure
@@ -2296,7 +2296,6 @@ HEADERS_LIST="
     linux_perf_event_h
     malloc_h
     opencv2_core_core_c_h
-    OpenGL_gl3_h
     poll_h
     pthread_np_h
     sys_hwprobe_h
@@ -3761,8 +3760,6 @@ lavfi_indev_deps="avfilter"
 libcdio_indev_deps="libcdio"
 libdc1394_indev_deps="libdc1394"
 openal_indev_deps="openal"
-opengl_outdev_deps="opengl"
-opengl_outdev_suggest="sdl2"
 oss_indev_deps_any="sys_soundcard_h"
 oss_outdev_deps_any="sys_soundcard_h"
 pulse_indev_deps="libpulse"
@@ -7863,7 +7860,7 @@ enabled zoompan_filter      && prepend avfilter_deps "swscale"
 enabled lavfi_indev         && prepend avdevice_deps "avfilter"
 
 #FIXME
-enabled_any sdl2_outdev opengl_outdev && enabled sdl2 &&
+enabled_any sdl2_outdev && enabled sdl2 &&
     add_cflags $(filter_out '-Dmain=SDL_main' $sdl2_cflags)
 
 enabled opus_decoder    && prepend avcodec_deps "swresample"
diff --git a/libavdevice/Makefile b/libavdevice/Makefile
index f35e6c4427..d09bfb95f9 100644
--- a/libavdevice/Makefile
+++ b/libavdevice/Makefile
@@ -34,7 +34,6 @@ OBJS-$(CONFIG_JACK_INDEV)                += jack.o timefilter.o
 OBJS-$(CONFIG_KMSGRAB_INDEV)             += kmsgrab.o
 OBJS-$(CONFIG_LAVFI_INDEV)               += lavfi.o
 OBJS-$(CONFIG_OPENAL_INDEV)              += openal-dec.o
-OBJS-$(CONFIG_OPENGL_OUTDEV)             += opengl_enc.o
 OBJS-$(CONFIG_OSS_INDEV)                 += oss_dec.o oss.o
 OBJS-$(CONFIG_OSS_OUTDEV)                += oss_enc.o oss.o
 OBJS-$(CONFIG_PULSE_INDEV)               += pulse_audio_dec.o \
diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c
index ce28eac8b8..c2e525b7b9 100644
--- a/libavdevice/alldevices.c
+++ b/libavdevice/alldevices.c
@@ -44,7 +44,6 @@ extern const FFInputFormat  ff_jack_demuxer;
 extern const FFInputFormat  ff_kmsgrab_demuxer;
 extern const FFInputFormat  ff_lavfi_demuxer;
 extern const FFInputFormat  ff_openal_demuxer;
-extern const FFOutputFormat ff_opengl_muxer;
 extern const FFInputFormat  ff_oss_demuxer;
 extern const FFOutputFormat ff_oss_muxer;
 extern const FFInputFormat  ff_pulse_demuxer;
diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
deleted file mode 100644
index 93d3959880..0000000000
--- a/libavdevice/opengl_enc.c
+++ /dev/null
@@ -1,1325 +0,0 @@
-/*
- * Copyright (c) 2014 Lukasz Marek
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-//TODO: support for more formats
-//TODO: support for more systems.
-//TODO: implement X11, Windows, Mac OS native default window. SDL 1.2 doesn't allow to render to custom thread.
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stddef.h>
-
-#include "config.h"
-
-#if HAVE_WINDOWS_H
-#include <windows.h>
-#endif
-#if HAVE_OPENGL_GL3_H
-#include <OpenGL/gl3.h>
-#elif HAVE_ES2_GL_H
-#include <ES2/gl.h>
-#else
-#include <GL/gl.h>
-#include <GL/glext.h>
-#endif
-#if HAVE_GLXGETPROCADDRESS
-#include <GL/glx.h>
-#endif
-
-#if CONFIG_SDL2
-#include <SDL.h>
-#endif
-
-#include "libavutil/common.h"
-#include "libavutil/frame.h"
-#include "libavutil/mem.h"
-#include "libavutil/pixdesc.h"
-#include "libavutil/log.h"
-#include "libavutil/opt.h"
-#include "libavutil/avassert.h"
-#include "libavformat/avformat.h"
-#include "libavformat/internal.h"
-#include "libavformat/mux.h"
-#include "libavdevice/avdevice.h"
-#include "opengl_enc_shaders.h"
-
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-
-/* FF_GL_RED_COMPONENT is used for planar pixel types.
- * Only red component is sampled in shaders.
- * On some platforms GL_RED is not available and GL_LUMINANCE have to be used,
- * but since OpenGL 3.0 GL_LUMINANCE is deprecated.
- * GL_RED produces RGBA = value, 0, 0, 1.
- * GL_LUMINANCE produces RGBA = value, value, value, 1.
- * Note: GL_INTENSITY may also be used which produce RGBA = value, value, value, value. */
-#if defined(GL_RED)
-#define FF_GL_RED_COMPONENT GL_RED
-#elif defined(GL_LUMINANCE)
-#define FF_GL_RED_COMPONENT GL_LUMINANCE
-#else
-#define FF_GL_RED_COMPONENT 0x1903; //GL_RED
-#endif
-
-/* Constants not defined for iOS */
-#define FF_GL_UNSIGNED_BYTE_3_3_2 0x8032
-#define FF_GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
-#define FF_GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
-#define FF_GL_UNPACK_ROW_LENGTH          0x0CF2
-
-/* MinGW exposes only OpenGL 1.1 API */
-#define FF_GL_ARRAY_BUFFER                0x8892
-#define FF_GL_ELEMENT_ARRAY_BUFFER        0x8893
-#define FF_GL_STATIC_DRAW                 0x88E4
-#define FF_GL_FRAGMENT_SHADER             0x8B30
-#define FF_GL_VERTEX_SHADER               0x8B31
-#define FF_GL_COMPILE_STATUS              0x8B81
-#define FF_GL_LINK_STATUS                 0x8B82
-#define FF_GL_INFO_LOG_LENGTH             0x8B84
-typedef void   (APIENTRY *FF_PFNGLACTIVETEXTUREPROC) (GLenum texture);
-typedef void   (APIENTRY *FF_PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
-typedef void   (APIENTRY *FF_PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
-typedef void   (APIENTRY *FF_PFNGLBUFFERDATAPROC) (GLenum target, ptrdiff_t size, const GLvoid *data, GLenum usage);
-typedef void   (APIENTRY *FF_PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
-typedef GLint  (APIENTRY *FF_PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const char *name);
-typedef void   (APIENTRY *FF_PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
-typedef void   (APIENTRY *FF_PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, uintptr_t pointer);
-typedef GLint  (APIENTRY *FF_PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const char *name);
-typedef void   (APIENTRY *FF_PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
-typedef void   (APIENTRY *FF_PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
-typedef void   (APIENTRY *FF_PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef GLuint (APIENTRY *FF_PFNGLCREATEPROGRAMPROC) (void);
-typedef void   (APIENTRY *FF_PFNGLDELETEPROGRAMPROC) (GLuint program);
-typedef void   (APIENTRY *FF_PFNGLUSEPROGRAMPROC) (GLuint program);
-typedef void   (APIENTRY *FF_PFNGLLINKPROGRAMPROC) (GLuint program);
-typedef void   (APIENTRY *FF_PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
-typedef void   (APIENTRY *FF_PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, char *infoLog);
-typedef void   (APIENTRY *FF_PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
-typedef GLuint (APIENTRY *FF_PFNGLCREATESHADERPROC) (GLenum type);
-typedef void   (APIENTRY *FF_PFNGLDELETESHADERPROC) (GLuint shader);
-typedef void   (APIENTRY *FF_PFNGLCOMPILESHADERPROC) (GLuint shader);
-typedef void   (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* *string, const GLint *length);
-typedef void   (APIENTRY *FF_PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
-typedef void   (APIENTRY *FF_PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, char *infoLog);
-
-typedef struct FFOpenGLFunctions {
-    FF_PFNGLACTIVETEXTUREPROC glActiveTexture;                     //Require GL ARB multitexture
-    FF_PFNGLGENBUFFERSPROC glGenBuffers;                           //Require GL_ARB_vertex_buffer_object
-    FF_PFNGLDELETEBUFFERSPROC glDeleteBuffers;                     //Require GL_ARB_vertex_buffer_object
-    FF_PFNGLBUFFERDATAPROC glBufferData;                           //Require GL_ARB_vertex_buffer_object
-    FF_PFNGLBINDBUFFERPROC glBindBuffer;                           //Require GL_ARB_vertex_buffer_object
-    FF_PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation;             //Require GL_ARB_vertex_shader
-    FF_PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray; //Require GL_ARB_vertex_shader
-    FF_PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer;         //Require GL_ARB_vertex_shader
-    FF_PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation;           //Require GL_ARB_shader_objects
-    FF_PFNGLUNIFORM1FPROC glUniform1f;                             //Require GL_ARB_shader_objects
-    FF_PFNGLUNIFORM1IPROC glUniform1i;                             //Require GL_ARB_shader_objects
-    FF_PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv;               //Require GL_ARB_shader_objects
-    FF_PFNGLCREATEPROGRAMPROC glCreateProgram;                     //Require GL_ARB_shader_objects
-    FF_PFNGLDELETEPROGRAMPROC glDeleteProgram;                     //Require GL_ARB_shader_objects
-    FF_PFNGLUSEPROGRAMPROC glUseProgram;                           //Require GL_ARB_shader_objects
-    FF_PFNGLLINKPROGRAMPROC glLinkProgram;                         //Require GL_ARB_shader_objects
-    FF_PFNGLGETPROGRAMIVPROC glGetProgramiv;                       //Require GL_ARB_shader_objects
-    FF_PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog;             //Require GL_ARB_shader_objects
-    FF_PFNGLATTACHSHADERPROC glAttachShader;                       //Require GL_ARB_shader_objects
-    FF_PFNGLCREATESHADERPROC glCreateShader;                       //Require GL_ARB_shader_objects
-    FF_PFNGLDELETESHADERPROC glDeleteShader;                       //Require GL_ARB_shader_objects
-    FF_PFNGLCOMPILESHADERPROC glCompileShader;                     //Require GL_ARB_shader_objects
-    FF_PFNGLSHADERSOURCEPROC glShaderSource;                       //Require GL_ARB_shader_objects
-    FF_PFNGLGETSHADERIVPROC glGetShaderiv;                         //Require GL_ARB_shader_objects
-    FF_PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog;               //Require GL_ARB_shader_objects
-} FFOpenGLFunctions;
-
-#define OPENGL_ERROR_CHECK(ctx) \
-{\
-    GLenum err_code; \
-    if ((err_code = glGetError()) != GL_NO_ERROR) { \
-        av_log(ctx, AV_LOG_ERROR, "OpenGL error occurred in '%s', line %d: %d\n", __func__, __LINE__, err_code); \
-        goto fail; \
-    } \
-}\
-
-typedef struct OpenGLVertexInfo
-{
-    float x, y, z;    ///<Position
-    float s0, t0;     ///<Texture coords
-} OpenGLVertexInfo;
-
-/* defines 2 triangles to display */
-static const GLushort g_index[6] =
-{
-    0, 1, 2,
-    0, 3, 2,
-};
-
-typedef struct OpenGLContext {
-    AVClass *class;                    ///< class for private options
-
-#if CONFIG_SDL2
-    SDL_Window *window;
-    SDL_GLContext glcontext;
-#endif
-    FFOpenGLFunctions glprocs;
-
-    int inited;                        ///< Set to 1 when write_header was successfully called.
-    uint8_t background[4];             ///< Background color
-    int no_window;                     ///< 0 for create default window
-    char *window_title;                ///< Title of the window
-
-    /* OpenGL implementation limits */
-    GLint max_texture_size;            ///< Maximum texture size
-    GLint max_viewport_width;          ///< Maximum viewport size
-    GLint max_viewport_height;         ///< Maximum viewport size
-    int non_pow_2_textures;            ///< 1 when non power of 2 textures are supported
-    int unpack_subimage;               ///< 1 when GL_EXT_unpack_subimage is available
-
-    /* Current OpenGL configuration */
-    GLuint program;                    ///< Shader program
-    GLuint vertex_shader;              ///< Vertex shader
-    GLuint fragment_shader;            ///< Fragment shader for current pix_pmt
-    GLuint texture_name[4];            ///< Textures' IDs
-    GLuint index_buffer;               ///< Index buffer
-    GLuint vertex_buffer;              ///< Vertex buffer
-    OpenGLVertexInfo vertex[4];        ///< VBO
-    GLint projection_matrix_location;  ///< Uniforms' locations
-    GLint model_view_matrix_location;
-    GLint color_map_location;
-    GLint chroma_div_w_location;
-    GLint chroma_div_h_location;
-    GLint texture_location[4];
-    GLint position_attrib;             ///< Attibutes' locations
-    GLint texture_coords_attrib;
-
-    GLfloat projection_matrix[16];     ///< Projection matrix
-    GLfloat model_view_matrix[16];     ///< Modev view matrix
-    GLfloat color_map[16];             ///< RGBA color map matrix
-    GLfloat chroma_div_w;              ///< Chroma subsampling w ratio
-    GLfloat chroma_div_h;              ///< Chroma subsampling h ratio
-
-    /* Stream information */
-    GLenum format;
-    GLenum type;
-    int width;                         ///< Stream width
-    int height;                        ///< Stream height
-    enum AVPixelFormat pix_fmt;        ///< Stream pixel format
-    int picture_width;                 ///< Rendered width
-    int picture_height;                ///< Rendered height
-    int window_width;
-    int window_height;
-
-    int warned;
-} OpenGLContext;
-
-static const struct OpenGLFormatDesc {
-    enum AVPixelFormat fixel_format;
-    const char * const * fragment_shader;
-    GLenum format;
-    GLenum type;
-} opengl_format_desc[] = {
-    { AV_PIX_FMT_YUV420P,    &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUV444P,    &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUV422P,    &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUV410P,    &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUV411P,    &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUV440P,    &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUV420P16,  &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_YUV422P16,  &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_YUV444P16,  &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_YUVA420P,   &FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR, FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUVA444P,   &FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR, FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUVA422P,   &FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR, FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUVA420P16, &FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR, FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_YUVA422P16, &FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR, FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_YUVA444P16, &FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR, FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_RGB24,      &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGB, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_BGR24,      &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGB, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_0RGB,       &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGBA, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_RGB0,       &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGBA, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_0BGR,       &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGBA, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_BGR0,       &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGBA, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_RGB565,     &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGB, GL_UNSIGNED_SHORT_5_6_5 },
-    { AV_PIX_FMT_BGR565,     &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGB, GL_UNSIGNED_SHORT_5_6_5 },
-    { AV_PIX_FMT_RGB555,     &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGBA, FF_GL_UNSIGNED_SHORT_1_5_5_5_REV },
-    { AV_PIX_FMT_BGR555,     &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGBA, FF_GL_UNSIGNED_SHORT_1_5_5_5_REV },
-    { AV_PIX_FMT_RGB8,       &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGB, FF_GL_UNSIGNED_BYTE_3_3_2 },
-    { AV_PIX_FMT_BGR8,       &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGB, FF_GL_UNSIGNED_BYTE_2_3_3_REV },
-    { AV_PIX_FMT_RGB48,      &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGB, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_BGR48,      &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGB, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_ARGB,       &FF_OPENGL_FRAGMENT_SHADER_RGBA_PACKET, GL_RGBA, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_RGBA,       &FF_OPENGL_FRAGMENT_SHADER_RGBA_PACKET, GL_RGBA, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_ABGR,       &FF_OPENGL_FRAGMENT_SHADER_RGBA_PACKET, GL_RGBA, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_BGRA,       &FF_OPENGL_FRAGMENT_SHADER_RGBA_PACKET, GL_RGBA, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_RGBA64,     &FF_OPENGL_FRAGMENT_SHADER_RGBA_PACKET, GL_RGBA, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_BGRA64,     &FF_OPENGL_FRAGMENT_SHADER_RGBA_PACKET, GL_RGBA, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_GBRP,       &FF_OPENGL_FRAGMENT_SHADER_RGB_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_GBRP16,     &FF_OPENGL_FRAGMENT_SHADER_RGB_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_GBRAP,      &FF_OPENGL_FRAGMENT_SHADER_RGBA_PLANAR, FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_GBRAP16,    &FF_OPENGL_FRAGMENT_SHADER_RGBA_PLANAR, FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_GRAY8,      &FF_OPENGL_FRAGMENT_SHADER_GRAY,        FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_GRAY16,     &FF_OPENGL_FRAGMENT_SHADER_GRAY,        FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_NONE,       NULL }
-};
-
-static av_cold int opengl_prepare_vertex(AVFormatContext *s);
-static int opengl_draw(AVFormatContext *h, void *intput, int repaint, int is_pkt);
-static av_cold int opengl_init_context(OpenGLContext *opengl);
-
-static av_cold void opengl_deinit_context(OpenGLContext *opengl)
-{
-    glDeleteTextures(4, opengl->texture_name);
-    opengl->texture_name[0] = opengl->texture_name[1] =
-    opengl->texture_name[2] = opengl->texture_name[3] = 0;
-    if (opengl->glprocs.glUseProgram)
-        opengl->glprocs.glUseProgram(0);
-    if (opengl->glprocs.glDeleteProgram) {
-        opengl->glprocs.glDeleteProgram(opengl->program);
-        opengl->program = 0;
-    }
-    if (opengl->glprocs.glDeleteShader) {
-        opengl->glprocs.glDeleteShader(opengl->vertex_shader);
-        opengl->glprocs.glDeleteShader(opengl->fragment_shader);
-        opengl->vertex_shader = opengl->fragment_shader = 0;
-    }
-    if (opengl->glprocs.glBindBuffer) {
-        opengl->glprocs.glBindBuffer(FF_GL_ARRAY_BUFFER, 0);
-        opengl->glprocs.glBindBuffer(FF_GL_ELEMENT_ARRAY_BUFFER, 0);
-    }
-    if (opengl->glprocs.glDeleteBuffers) {
-        opengl->glprocs.glDeleteBuffers(2, &opengl->index_buffer);
-        opengl->vertex_buffer = opengl->index_buffer = 0;
-    }
-}
-
-static int opengl_resize(AVFormatContext *h, int width, int height)
-{
-    int ret = 0;
-    OpenGLContext *opengl = h->priv_data;
-    opengl->window_width = width;
-    opengl->window_height = height;
-    if (opengl->inited) {
-        if (opengl->no_window &&
-            (ret = avdevice_dev_to_app_control_message(h, AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER, NULL , 0)) < 0) {
-            av_log(opengl, AV_LOG_ERROR, "Application failed to prepare window buffer.\n");
-            goto end;
-        }
-        if ((ret = opengl_prepare_vertex(h)) < 0)
-            goto end;
-        ret = opengl_draw(h, NULL, 1, 0);
-    }
-  end:
-    return ret;
-}
-
-static int opengl_control_message(AVFormatContext *h, int type, void *data, size_t data_size)
-{
-    OpenGLContext *opengl = h->priv_data;
-    switch(type) {
-    case AV_APP_TO_DEV_WINDOW_SIZE:
-        if (data) {
-            AVDeviceRect *message = data;
-            return opengl_resize(h, message->width, message->height);
-        }
-        return AVERROR(EINVAL);
-    case AV_APP_TO_DEV_WINDOW_REPAINT:
-        return opengl_resize(h, opengl->window_width, opengl->window_height);
-    }
-    return AVERROR(ENOSYS);
-}
-
-#if CONFIG_SDL2
-static int opengl_sdl_process_events(AVFormatContext *h)
-{
-    OpenGLContext *opengl = h->priv_data;
-    AVDeviceRect message;
-    SDL_Event event;
-    SDL_PumpEvents();
-    while (SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) > 0) {
-        switch (event.type) {
-        case SDL_QUIT:
-            return AVERROR(EIO);
-        case SDL_KEYDOWN:
-            switch (event.key.keysym.sym) {
-            case SDLK_ESCAPE:
-            case SDLK_q:
-                return AVERROR(EIO);
-            }
-            return 0;
-        case SDL_WINDOWEVENT:
-            switch(event.window.event) {
-            case SDL_WINDOWEVENT_RESIZED:
-            case SDL_WINDOWEVENT_SIZE_CHANGED:
-                SDL_GL_GetDrawableSize(opengl->window, &message.width, &message.height);
-                return opengl_control_message(h, AV_APP_TO_DEV_WINDOW_SIZE, &message, sizeof(AVDeviceRect));
-            default:
-                break;
-            }
-        }
-    }
-    return 0;
-}
-
-static int av_cold opengl_sdl_create_window(AVFormatContext *h)
-{
-    OpenGLContext *opengl = h->priv_data;
-    AVDeviceRect message;
-    if (SDL_Init(SDL_INIT_VIDEO)) {
-        av_log(opengl, AV_LOG_ERROR, "Unable to initialize SDL: %s\n", SDL_GetError());
-        return AVERROR_EXTERNAL;
-    }
-    opengl->window = SDL_CreateWindow(opengl->window_title,
-                                      SDL_WINDOWPOS_UNDEFINED,
-                                      SDL_WINDOWPOS_UNDEFINED,
-                                      opengl->window_width, opengl->window_height,
-                                      SDL_WINDOW_RESIZABLE | SDL_WINDOW_OPENGL);
-    if (!opengl->window) {
-        av_log(opengl, AV_LOG_ERROR, "Unable to create default window: %s\n", SDL_GetError());
-        return AVERROR_EXTERNAL;
-    }
-    opengl->glcontext = SDL_GL_CreateContext(opengl->window);
-    if (!opengl->glcontext) {
-        av_log(opengl, AV_LOG_ERROR, "Unable to create OpenGL context on default window: %s\n", SDL_GetError());
-        return AVERROR_EXTERNAL;
-    }
-    SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
-    SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
-    SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
-    SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);
-    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
-    av_log(opengl, AV_LOG_INFO, "SDL driver: '%s'.\n", SDL_GetCurrentVideoDriver());
-    SDL_GL_GetDrawableSize(opengl->window, &message.width, &message.height);
-    return opengl_control_message(h, AV_APP_TO_DEV_WINDOW_SIZE, &message, sizeof(AVDeviceRect));
-}
-
-static int av_cold opengl_sdl_load_procedures(OpenGLContext *opengl)
-{
-    FFOpenGLFunctions *procs = &opengl->glprocs;
-
-#define LOAD_OPENGL_FUN(name, type) \
-    procs->name = (type)SDL_GL_GetProcAddress(#name); \
-    if (!procs->name) { \
-        av_log(opengl, AV_LOG_ERROR, "Cannot load OpenGL function: '%s'\n", #name); \
-        return AVERROR(ENOSYS); \
-    }
-
-    LOAD_OPENGL_FUN(glActiveTexture, FF_PFNGLACTIVETEXTUREPROC)
-    LOAD_OPENGL_FUN(glGenBuffers, FF_PFNGLGENBUFFERSPROC)
-    LOAD_OPENGL_FUN(glDeleteBuffers, FF_PFNGLDELETEBUFFERSPROC)
-    LOAD_OPENGL_FUN(glBufferData, FF_PFNGLBUFFERDATAPROC)
-    LOAD_OPENGL_FUN(glBindBuffer, FF_PFNGLBINDBUFFERPROC)
-    LOAD_OPENGL_FUN(glGetAttribLocation, FF_PFNGLGETATTRIBLOCATIONPROC)
-    LOAD_OPENGL_FUN(glGetUniformLocation, FF_PFNGLGETUNIFORMLOCATIONPROC)
-    LOAD_OPENGL_FUN(glUniform1f, FF_PFNGLUNIFORM1FPROC)
-    LOAD_OPENGL_FUN(glUniform1i, FF_PFNGLUNIFORM1IPROC)
-    LOAD_OPENGL_FUN(glUniformMatrix4fv, FF_PFNGLUNIFORMMATRIX4FVPROC)
-    LOAD_OPENGL_FUN(glCreateProgram, FF_PFNGLCREATEPROGRAMPROC)
-    LOAD_OPENGL_FUN(glDeleteProgram, FF_PFNGLDELETEPROGRAMPROC)
-    LOAD_OPENGL_FUN(glUseProgram, FF_PFNGLUSEPROGRAMPROC)
-    LOAD_OPENGL_FUN(glLinkProgram, FF_PFNGLLINKPROGRAMPROC)
-    LOAD_OPENGL_FUN(glGetProgramiv, FF_PFNGLGETPROGRAMIVPROC)
-    LOAD_OPENGL_FUN(glGetProgramInfoLog, FF_PFNGLGETPROGRAMINFOLOGPROC)
-    LOAD_OPENGL_FUN(glAttachShader, FF_PFNGLATTACHSHADERPROC)
-    LOAD_OPENGL_FUN(glCreateShader, FF_PFNGLCREATESHADERPROC)
-    LOAD_OPENGL_FUN(glDeleteShader, FF_PFNGLDELETESHADERPROC)
-    LOAD_OPENGL_FUN(glCompileShader, FF_PFNGLCOMPILESHADERPROC)
-    LOAD_OPENGL_FUN(glShaderSource, FF_PFNGLSHADERSOURCEPROC)
-    LOAD_OPENGL_FUN(glGetShaderiv, FF_PFNGLGETSHADERIVPROC)
-    LOAD_OPENGL_FUN(glGetShaderInfoLog, FF_PFNGLGETSHADERINFOLOGPROC)
-    LOAD_OPENGL_FUN(glEnableVertexAttribArray, FF_PFNGLENABLEVERTEXATTRIBARRAYPROC)
-    LOAD_OPENGL_FUN(glVertexAttribPointer, FF_PFNGLVERTEXATTRIBPOINTERPROC)
-
-    return 0;
-
-#undef LOAD_OPENGL_FUN
-}
-#endif /* CONFIG_SDL2 */
-
-#if defined(__APPLE__)
-static int av_cold opengl_load_procedures(OpenGLContext *opengl)
-{
-    FFOpenGLFunctions *procs = &opengl->glprocs;
-
-#if CONFIG_SDL2
-    if (!opengl->no_window)
-        return opengl_sdl_load_procedures(opengl);
-#endif
-
-    procs->glActiveTexture = glActiveTexture;
-    procs->glGenBuffers = glGenBuffers;
-    procs->glDeleteBuffers = glDeleteBuffers;
-    procs->glBufferData = glBufferData;
-    procs->glBindBuffer = glBindBuffer;
-    procs->glGetAttribLocation = glGetAttribLocation;
-    procs->glGetUniformLocation = glGetUniformLocation;
-    procs->glUniform1f = glUniform1f;
-    procs->glUniform1i = glUniform1i;
-    procs->glUniformMatrix4fv = glUniformMatrix4fv;
-    procs->glCreateProgram = glCreateProgram;
-    procs->glDeleteProgram = glDeleteProgram;
-    procs->glUseProgram = glUseProgram;
-    procs->glLinkProgram = glLinkProgram;
-    procs->glGetProgramiv = glGetProgramiv;
-    procs->glGetProgramInfoLog = glGetProgramInfoLog;
-    procs->glAttachShader = glAttachShader;
-    procs->glCreateShader = glCreateShader;
-    procs->glDeleteShader = glDeleteShader;
-    procs->glCompileShader = glCompileShader;
-    procs->glShaderSource = glShaderSource;
-    procs->glGetShaderiv = glGetShaderiv;
-    procs->glGetShaderInfoLog = glGetShaderInfoLog;
-    procs->glEnableVertexAttribArray = glEnableVertexAttribArray;
-    procs->glVertexAttribPointer = (FF_PFNGLVERTEXATTRIBPOINTERPROC) glVertexAttribPointer;
-    return 0;
-}
-#else
-static int av_cold opengl_load_procedures(OpenGLContext *opengl)
-{
-    FFOpenGLFunctions *procs = &opengl->glprocs;
-
-#if HAVE_GLXGETPROCADDRESS
-#define SelectedGetProcAddress glXGetProcAddress
-#elif HAVE_WGLGETPROCADDRESS
-#define SelectedGetProcAddress wglGetProcAddress
-#endif
-
-#define LOAD_OPENGL_FUN(name, type) \
-    procs->name = (type)SelectedGetProcAddress(#name); \
-    if (!procs->name) { \
-        av_log(opengl, AV_LOG_ERROR, "Cannot load OpenGL function: '%s'\n", #name); \
-        return AVERROR(ENOSYS); \
-    }
-
-#if CONFIG_SDL2
-    if (!opengl->no_window)
-        return opengl_sdl_load_procedures(opengl);
-#endif
-
-    LOAD_OPENGL_FUN(glActiveTexture, FF_PFNGLACTIVETEXTUREPROC)
-    LOAD_OPENGL_FUN(glGenBuffers, FF_PFNGLGENBUFFERSPROC)
-    LOAD_OPENGL_FUN(glDeleteBuffers, FF_PFNGLDELETEBUFFERSPROC)
-    LOAD_OPENGL_FUN(glBufferData, FF_PFNGLBUFFERDATAPROC)
-    LOAD_OPENGL_FUN(glBindBuffer, FF_PFNGLBINDBUFFERPROC)
-    LOAD_OPENGL_FUN(glGetAttribLocation, FF_PFNGLGETATTRIBLOCATIONPROC)
-    LOAD_OPENGL_FUN(glGetUniformLocation, FF_PFNGLGETUNIFORMLOCATIONPROC)
-    LOAD_OPENGL_FUN(glUniform1f, FF_PFNGLUNIFORM1FPROC)
-    LOAD_OPENGL_FUN(glUniform1i, FF_PFNGLUNIFORM1IPROC)
-    LOAD_OPENGL_FUN(glUniformMatrix4fv, FF_PFNGLUNIFORMMATRIX4FVPROC)
-    LOAD_OPENGL_FUN(glCreateProgram, FF_PFNGLCREATEPROGRAMPROC)
-    LOAD_OPENGL_FUN(glDeleteProgram, FF_PFNGLDELETEPROGRAMPROC)
-    LOAD_OPENGL_FUN(glUseProgram, FF_PFNGLUSEPROGRAMPROC)
-    LOAD_OPENGL_FUN(glLinkProgram, FF_PFNGLLINKPROGRAMPROC)
-    LOAD_OPENGL_FUN(glGetProgramiv, FF_PFNGLGETPROGRAMIVPROC)
-    LOAD_OPENGL_FUN(glGetProgramInfoLog, FF_PFNGLGETPROGRAMINFOLOGPROC)
-    LOAD_OPENGL_FUN(glAttachShader, FF_PFNGLATTACHSHADERPROC)
-    LOAD_OPENGL_FUN(glCreateShader, FF_PFNGLCREATESHADERPROC)
-    LOAD_OPENGL_FUN(glDeleteShader, FF_PFNGLDELETESHADERPROC)
-    LOAD_OPENGL_FUN(glCompileShader, FF_PFNGLCOMPILESHADERPROC)
-    LOAD_OPENGL_FUN(glShaderSource, FF_PFNGLSHADERSOURCEPROC)
-    LOAD_OPENGL_FUN(glGetShaderiv, FF_PFNGLGETSHADERIVPROC)
-    LOAD_OPENGL_FUN(glGetShaderInfoLog, FF_PFNGLGETSHADERINFOLOGPROC)
-    LOAD_OPENGL_FUN(glEnableVertexAttribArray, FF_PFNGLENABLEVERTEXATTRIBARRAYPROC)
-    LOAD_OPENGL_FUN(glVertexAttribPointer, FF_PFNGLVERTEXATTRIBPOINTERPROC)
-
-    return 0;
-
-#undef SelectedGetProcAddress
-#undef LOAD_OPENGL_FUN
-}
-#endif
-
-static void opengl_make_identity(float matrix[16])
-{
-    memset(matrix, 0, 16 * sizeof(float));
-    matrix[0] = matrix[5] = matrix[10] = matrix[15] = 1.0f;
-}
-
-static void opengl_make_ortho(float matrix[16], float left, float right,
-                              float bottom, float top, float nearZ, float farZ)
-{
-    float ral = right + left;
-    float rsl = right - left;
-    float tab = top + bottom;
-    float tsb = top - bottom;
-    float fan = farZ + nearZ;
-    float fsn = farZ - nearZ;
-
-    memset(matrix, 0, 16 * sizeof(float));
-    matrix[0] = 2.0f / rsl;
-    matrix[5] = 2.0f / tsb;
-    matrix[10] = -2.0f / fsn;
-    matrix[12] = -ral / rsl;
-    matrix[13] = -tab / tsb;
-    matrix[14] = -fan / fsn;
-    matrix[15] = 1.0f;
-}
-
-static av_cold int opengl_read_limits(AVFormatContext *h)
-{
-    OpenGLContext *opengl = h->priv_data;
-    static const struct{
-        const char *extension;
-        int major;
-        int minor;
-    } required_extensions[] = {
-        { "GL_ARB_multitexture",         1, 3 },
-        { "GL_ARB_vertex_buffer_object", 1, 5 }, //GLX_ARB_vertex_buffer_object
-        { "GL_ARB_vertex_shader",        2, 0 },
-        { "GL_ARB_fragment_shader",      2, 0 },
-        { "GL_ARB_shader_objects",       2, 0 },
-        { NULL,                          0, 0 }
-    };
-    int i, major, minor;
-    const char *extensions, *version;
-
-    version = glGetString(GL_VERSION);
-    extensions = glGetString(GL_EXTENSIONS);
-    if (!version || !extensions) {
-        av_log(h, AV_LOG_ERROR, "No OpenGL context initialized for the current thread\n");
-        return AVERROR(ENOSYS);
-    }
-
-    av_log(h, AV_LOG_DEBUG, "OpenGL version: %s\n", version);
-    if (sscanf(version, "%d.%d", &major, &minor) != 2)
-        return AVERROR(ENOSYS);
-
-    for (i = 0; required_extensions[i].extension; i++) {
-        if (major < required_extensions[i].major &&
-            (major == required_extensions[i].major && minor < required_extensions[i].minor) &&
-            !strstr(extensions, required_extensions[i].extension)) {
-            av_log(h, AV_LOG_ERROR, "Required extension %s is not supported.\n",
-                   required_extensions[i].extension);
-            av_log(h, AV_LOG_DEBUG, "Supported extensions are: %s\n", extensions);
-            return AVERROR(ENOSYS);
-        }
-    }
-    glGetIntegerv(GL_MAX_TEXTURE_SIZE, &opengl->max_texture_size);
-    glGetIntegerv(GL_MAX_VIEWPORT_DIMS, &opengl->max_viewport_width);
-    opengl->non_pow_2_textures = major >= 2 || strstr(extensions, "GL_ARB_texture_non_power_of_two");
-#if defined(GL_ES_VERSION_2_0)
-    opengl->unpack_subimage = !!strstr(extensions, "GL_EXT_unpack_subimage");
-#else
-    opengl->unpack_subimage = 1;
-#endif
-
-    av_log(h, AV_LOG_DEBUG, "Non Power of 2 textures support: %s\n", opengl->non_pow_2_textures ? "Yes" : "No");
-    av_log(h, AV_LOG_DEBUG, "Unpack Subimage extension support: %s\n", opengl->unpack_subimage ? "Yes" : "No");
-    av_log(h, AV_LOG_DEBUG, "Max texture size: %dx%d\n", opengl->max_texture_size, opengl->max_texture_size);
-    av_log(h, AV_LOG_DEBUG, "Max viewport size: %dx%d\n",
-           opengl->max_viewport_width, opengl->max_viewport_height);
-
-    OPENGL_ERROR_CHECK(opengl);
-    return 0;
-  fail:
-    return AVERROR_EXTERNAL;
-}
-
-static const char* opengl_get_fragment_shader_code(enum AVPixelFormat format)
-{
-    int i;
-    for (i = 0; i < FF_ARRAY_ELEMS(opengl_format_desc); i++) {
-        if (opengl_format_desc[i].fixel_format == format)
-            return *opengl_format_desc[i].fragment_shader;
-    }
-    return NULL;
-}
-
-static int opengl_type_size(GLenum type)
-{
-    switch(type) {
-    case GL_UNSIGNED_SHORT:
-    case FF_GL_UNSIGNED_SHORT_1_5_5_5_REV:
-    case GL_UNSIGNED_SHORT_5_6_5:
-        return 2;
-    case GL_UNSIGNED_BYTE:
-    case FF_GL_UNSIGNED_BYTE_3_3_2:
-    case FF_GL_UNSIGNED_BYTE_2_3_3_REV:
-    default:
-        break;
-    }
-    return 1;
-}
-
-static av_cold void opengl_get_texture_params(OpenGLContext *opengl)
-{
-    int i;
-    for (i = 0; i < FF_ARRAY_ELEMS(opengl_format_desc); i++) {
-        if (opengl_format_desc[i].fixel_format == opengl->pix_fmt) {
-            opengl->format = opengl_format_desc[i].format;
-            opengl->type = opengl_format_desc[i].type;
-            break;
-        }
-    }
-}
-
-static void opengl_compute_display_area(AVFormatContext *s)
-{
-    AVRational sar, dar; /* sample and display aspect ratios */
-    OpenGLContext *opengl = s->priv_data;
-    AVStream *st = s->streams[0];
-    AVCodecParameters *par = st->codecpar;
-
-    /* compute overlay width and height from the codec context information */
-    sar = st->sample_aspect_ratio.num ? st->sample_aspect_ratio : (AVRational){ 1, 1 };
-    dar = av_mul_q(sar, (AVRational){ par->width, par->height });
-
-    /* we suppose the screen has a 1/1 sample aspect ratio */
-    /* fit in the window */
-    if (av_cmp_q(dar, (AVRational){ opengl->window_width, opengl->window_height }) > 0) {
-        /* fit in width */
-        opengl->picture_width = opengl->window_width;
-        opengl->picture_height = av_rescale(opengl->picture_width, dar.den, dar.num);
-    } else {
-        /* fit in height */
-        opengl->picture_height = opengl->window_height;
-        opengl->picture_width = av_rescale(opengl->picture_height, dar.num, dar.den);
-    }
-}
-
-static av_cold void opengl_get_texture_size(OpenGLContext *opengl, int in_width, int in_height,
-                                            int *out_width, int *out_height)
-{
-    if (opengl->non_pow_2_textures) {
-        *out_width = in_width;
-        *out_height = in_height;
-    } else {
-        int max = FFMIN(FFMAX(in_width, in_height), opengl->max_texture_size);
-        unsigned power_of_2 = 1;
-        while (power_of_2 < max)
-            power_of_2 *= 2;
-        *out_height = power_of_2;
-        *out_width = power_of_2;
-        av_log(opengl, AV_LOG_DEBUG, "Texture size calculated from %dx%d into %dx%d\n",
-               in_width, in_height, *out_width, *out_height);
-    }
-}
-
-static av_cold void opengl_fill_color_map(OpenGLContext *opengl)
-{
-    const AVPixFmtDescriptor *desc;
-    int shift;
-    enum AVPixelFormat pix_fmt = opengl->pix_fmt;
-
-    /* We need order of components, not exact position, some minor HACKs here */
-    if (pix_fmt == AV_PIX_FMT_RGB565 || pix_fmt == AV_PIX_FMT_BGR555 ||
-        pix_fmt == AV_PIX_FMT_BGR8   || pix_fmt == AV_PIX_FMT_RGB8)
-        pix_fmt = AV_PIX_FMT_RGB24;
-    else if (pix_fmt == AV_PIX_FMT_BGR565 || pix_fmt == AV_PIX_FMT_RGB555)
-        pix_fmt = AV_PIX_FMT_BGR24;
-
-    desc = av_pix_fmt_desc_get(pix_fmt);
-    if (!(desc->flags & AV_PIX_FMT_FLAG_RGB))
-        return;
-
-#define FILL_COMPONENT(i) { \
-        shift = (desc->comp[i].depth - 1) >> 3; \
-        opengl->color_map[(i << 2) + (desc->comp[i].offset >> shift)] = 1.0; \
-    }
-
-    memset(opengl->color_map, 0, sizeof(opengl->color_map));
-    FILL_COMPONENT(0);
-    FILL_COMPONENT(1);
-    FILL_COMPONENT(2);
-    if (desc->flags & AV_PIX_FMT_FLAG_ALPHA)
-        FILL_COMPONENT(3);
-
-#undef FILL_COMPONENT
-}
-
-static av_cold GLuint opengl_load_shader(OpenGLContext *opengl, GLenum type, const char *source)
-{
-    GLuint shader = opengl->glprocs.glCreateShader(type);
-    GLint result;
-    if (!shader) {
-        av_log(opengl, AV_LOG_ERROR, "glCreateShader() failed\n");
-        return 0;
-    }
-    opengl->glprocs.glShaderSource(shader, 1, &source, NULL);
-    opengl->glprocs.glCompileShader(shader);
-
-    opengl->glprocs.glGetShaderiv(shader, FF_GL_COMPILE_STATUS, &result);
-    if (!result) {
-        char *log;
-        opengl->glprocs.glGetShaderiv(shader, FF_GL_INFO_LOG_LENGTH, &result);
-        if (result) {
-            if ((log = av_malloc(result))) {
-                opengl->glprocs.glGetShaderInfoLog(shader, result, NULL, log);
-                av_log(opengl, AV_LOG_ERROR, "Compile error: %s\n", log);
-                av_free(log);
-            }
-        }
-        goto fail;
-    }
-    OPENGL_ERROR_CHECK(opengl);
-    return shader;
-  fail:
-    opengl->glprocs.glDeleteShader(shader);
-    return 0;
-}
-
-static av_cold int opengl_compile_shaders(OpenGLContext *opengl, enum AVPixelFormat pix_fmt)
-{
-    GLint result;
-    const char *fragment_shader_code = opengl_get_fragment_shader_code(pix_fmt);
-
-    if (!fragment_shader_code) {
-        av_log(opengl, AV_LOG_ERROR, "Provided pixel format '%s' is not supported\n",
-               av_get_pix_fmt_name(pix_fmt));
-        return AVERROR(EINVAL);
-    }
-
-    opengl->vertex_shader = opengl_load_shader(opengl, FF_GL_VERTEX_SHADER,
-                                               FF_OPENGL_VERTEX_SHADER);
-    if (!opengl->vertex_shader) {
-        av_log(opengl, AV_LOG_ERROR, "Vertex shader loading failed.\n");
-        goto fail;
-    }
-    opengl->fragment_shader = opengl_load_shader(opengl, FF_GL_FRAGMENT_SHADER,
-                                                 fragment_shader_code);
-    if (!opengl->fragment_shader) {
-        av_log(opengl, AV_LOG_ERROR, "Fragment shader loading failed.\n");
-        goto fail;
-    }
-
-    opengl->program = opengl->glprocs.glCreateProgram();
-    if (!opengl->program)
-        goto fail;
-
-    opengl->glprocs.glAttachShader(opengl->program, opengl->vertex_shader);
-    opengl->glprocs.glAttachShader(opengl->program, opengl->fragment_shader);
-    opengl->glprocs.glLinkProgram(opengl->program);
-
-    opengl->glprocs.glGetProgramiv(opengl->program, FF_GL_LINK_STATUS, &result);
-    if (!result) {
-        char *log;
-        opengl->glprocs.glGetProgramiv(opengl->program, FF_GL_INFO_LOG_LENGTH, &result);
-        if (result) {
-            log = av_malloc(result);
-            if (!log)
-                goto fail;
-            opengl->glprocs.glGetProgramInfoLog(opengl->program, result, NULL, log);
-            av_log(opengl, AV_LOG_ERROR, "Link error: %s\n", log);
-            av_free(log);
-        }
-        goto fail;
-    }
-
-    opengl->position_attrib = opengl->glprocs.glGetAttribLocation(opengl->program, "a_position");
-    opengl->texture_coords_attrib = opengl->glprocs.glGetAttribLocation(opengl->program, "a_textureCoords");
-    opengl->projection_matrix_location = opengl->glprocs.glGetUniformLocation(opengl->program, "u_projectionMatrix");
-    opengl->model_view_matrix_location = opengl->glprocs.glGetUniformLocation(opengl->program, "u_modelViewMatrix");
-    opengl->color_map_location = opengl->glprocs.glGetUniformLocation(opengl->program, "u_colorMap");
-    opengl->texture_location[0] = opengl->glprocs.glGetUniformLocation(opengl->program, "u_texture0");
-    opengl->texture_location[1] = opengl->glprocs.glGetUniformLocation(opengl->program, "u_texture1");
-    opengl->texture_location[2] = opengl->glprocs.glGetUniformLocation(opengl->program, "u_texture2");
-    opengl->texture_location[3] = opengl->glprocs.glGetUniformLocation(opengl->program, "u_texture3");
-    opengl->chroma_div_w_location = opengl->glprocs.glGetUniformLocation(opengl->program, "u_chroma_div_w");
-    opengl->chroma_div_h_location = opengl->glprocs.glGetUniformLocation(opengl->program, "u_chroma_div_h");
-
-    OPENGL_ERROR_CHECK(opengl);
-    return 0;
-  fail:
-    opengl->glprocs.glDeleteShader(opengl->vertex_shader);
-    opengl->glprocs.glDeleteShader(opengl->fragment_shader);
-    opengl->glprocs.glDeleteProgram(opengl->program);
-    opengl->fragment_shader = opengl->vertex_shader = opengl->program = 0;
-    return AVERROR_EXTERNAL;
-}
-
-static av_cold int opengl_configure_texture(OpenGLContext *opengl, GLuint texture,
-                                            GLsizei width, GLsizei height)
-{
-    if (texture) {
-        int new_width, new_height;
-        opengl_get_texture_size(opengl, width, height, &new_width, &new_height);
-        glBindTexture(GL_TEXTURE_2D, texture);
-        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-        glTexImage2D(GL_TEXTURE_2D, 0, opengl->format, new_width, new_height, 0,
-                     opengl->format, opengl->type, NULL);
-        OPENGL_ERROR_CHECK(NULL);
-    }
-    return 0;
-  fail:
-    return AVERROR_EXTERNAL;
-}
-
-static av_cold int opengl_prepare_vertex(AVFormatContext *s)
-{
-    OpenGLContext *opengl = s->priv_data;
-    int tex_w, tex_h;
-
-    if (opengl->window_width > opengl->max_viewport_width || opengl->window_height > opengl->max_viewport_height) {
-        opengl->window_width = FFMIN(opengl->window_width, opengl->max_viewport_width);
-        opengl->window_height = FFMIN(opengl->window_height, opengl->max_viewport_height);
-        av_log(opengl, AV_LOG_WARNING, "Too big viewport requested, limited to %dx%d", opengl->window_width, opengl->window_height);
-    }
-    glViewport(0, 0, opengl->window_width, opengl->window_height);
-    opengl_make_ortho(opengl->projection_matrix,
-                      - (float)opengl->window_width  / 2.0f, (float)opengl->window_width  / 2.0f,
-                      - (float)opengl->window_height / 2.0f, (float)opengl->window_height / 2.0f,
-                      1.0f, -1.0f);
-    opengl_make_identity(opengl->model_view_matrix);
-
-    opengl_compute_display_area(s);
-
-    opengl->vertex[0].z = opengl->vertex[1].z = opengl->vertex[2].z = opengl->vertex[3].z = 0.0f;
-    opengl->vertex[0].x = opengl->vertex[1].x = - (float)opengl->picture_width / 2.0f;
-    opengl->vertex[2].x = opengl->vertex[3].x =   (float)opengl->picture_width / 2.0f;
-    opengl->vertex[1].y = opengl->vertex[2].y = - (float)opengl->picture_height / 2.0f;
-    opengl->vertex[0].y = opengl->vertex[3].y =   (float)opengl->picture_height / 2.0f;
-
-    opengl_get_texture_size(opengl, opengl->width, opengl->height, &tex_w, &tex_h);
-
-    opengl->vertex[0].s0 = 0.0f;
-    opengl->vertex[0].t0 = 0.0f;
-    opengl->vertex[1].s0 = 0.0f;
-    opengl->vertex[1].t0 = (float)opengl->height / (float)tex_h;
-    opengl->vertex[2].s0 = (float)opengl->width  / (float)tex_w;
-    opengl->vertex[2].t0 = (float)opengl->height / (float)tex_h;
-    opengl->vertex[3].s0 = (float)opengl->width  / (float)tex_w;
-    opengl->vertex[3].t0 = 0.0f;
-
-    opengl->glprocs.glBindBuffer(FF_GL_ARRAY_BUFFER, opengl->vertex_buffer);
-    opengl->glprocs.glBufferData(FF_GL_ARRAY_BUFFER, sizeof(opengl->vertex), opengl->vertex, FF_GL_STATIC_DRAW);
-    opengl->glprocs.glBindBuffer(FF_GL_ARRAY_BUFFER, 0);
-    OPENGL_ERROR_CHECK(opengl);
-    return 0;
-  fail:
-    return AVERROR_EXTERNAL;
-}
-
-static int opengl_prepare(OpenGLContext *opengl)
-{
-    int i;
-    opengl->glprocs.glUseProgram(opengl->program);
-    opengl->glprocs.glUniformMatrix4fv(opengl->projection_matrix_location, 1, GL_FALSE, opengl->projection_matrix);
-    opengl->glprocs.glUniformMatrix4fv(opengl->model_view_matrix_location, 1, GL_FALSE, opengl->model_view_matrix);
-    for (i = 0; i < 4; i++)
-        if (opengl->texture_location[i] != -1) {
-            opengl->glprocs.glActiveTexture(GL_TEXTURE0 + i);
-            glBindTexture(GL_TEXTURE_2D, opengl->texture_name[i]);
-            opengl->glprocs.glUniform1i(opengl->texture_location[i], i);
-        }
-    if (opengl->color_map_location != -1)
-        opengl->glprocs.glUniformMatrix4fv(opengl->color_map_location, 1, GL_FALSE, opengl->color_map);
-    if (opengl->chroma_div_h_location != -1)
-        opengl->glprocs.glUniform1f(opengl->chroma_div_h_location, opengl->chroma_div_h);
-    if (opengl->chroma_div_w_location != -1)
-        opengl->glprocs.glUniform1f(opengl->chroma_div_w_location, opengl->chroma_div_w);
-
-    OPENGL_ERROR_CHECK(opengl);
-    return 0;
-  fail:
-    return AVERROR_EXTERNAL;
-}
-
-static int opengl_create_window(AVFormatContext *h)
-{
-    OpenGLContext *opengl = h->priv_data;
-    int ret;
-
-    if (!opengl->no_window) {
-#if CONFIG_SDL2
-        if ((ret = opengl_sdl_create_window(h)) < 0) {
-            av_log(opengl, AV_LOG_ERROR, "Cannot create default SDL window.\n");
-            return ret;
-        }
-#else
-        av_log(opengl, AV_LOG_ERROR, "FFmpeg is compiled without SDL. Cannot create default window.\n");
-        return AVERROR(ENOSYS);
-#endif
-    } else {
-        AVDeviceRect message;
-        message.x = message.y = 0;
-        message.width = opengl->window_width;
-        message.height = opengl->window_height;
-        if ((ret = avdevice_dev_to_app_control_message(h, AV_DEV_TO_APP_CREATE_WINDOW_BUFFER,
-                                                       &message , sizeof(message))) < 0) {
-            av_log(opengl, AV_LOG_ERROR, "Application failed to create window buffer.\n");
-            return ret;
-        }
-        if ((ret = avdevice_dev_to_app_control_message(h, AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER, NULL , 0)) < 0) {
-            av_log(opengl, AV_LOG_ERROR, "Application failed to prepare window buffer.\n");
-            return ret;
-        }
-    }
-    return 0;
-}
-
-static int opengl_release_window(AVFormatContext *h)
-{
-    int ret;
-    OpenGLContext *opengl = h->priv_data;
-    if (!opengl->no_window) {
-#if CONFIG_SDL2
-        SDL_GL_DeleteContext(opengl->glcontext);
-        SDL_DestroyWindow(opengl->window);
-        SDL_Quit();
-#endif
-    } else if ((ret = avdevice_dev_to_app_control_message(h, AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER, NULL , 0)) < 0) {
-        av_log(opengl, AV_LOG_ERROR, "Application failed to release window buffer.\n");
-        return ret;
-    }
-    return 0;
-}
-
-static av_cold int opengl_write_trailer(AVFormatContext *h)
-{
-    OpenGLContext *opengl = h->priv_data;
-
-    if (opengl->no_window &&
-        avdevice_dev_to_app_control_message(h, AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER, NULL , 0) < 0)
-        av_log(opengl, AV_LOG_ERROR, "Application failed to prepare window buffer.\n");
-
-    opengl_deinit_context(opengl);
-    opengl_release_window(h);
-
-    return 0;
-}
-
-static av_cold int opengl_init_context(OpenGLContext *opengl)
-{
-    int i, ret;
-    const AVPixFmtDescriptor *desc;
-
-    if ((ret = opengl_compile_shaders(opengl, opengl->pix_fmt)) < 0)
-        goto fail;
-
-    desc = av_pix_fmt_desc_get(opengl->pix_fmt);
-    av_assert0(desc->nb_components > 0 && desc->nb_components <= 4);
-    glGenTextures(desc->nb_components, opengl->texture_name);
-
-    opengl->glprocs.glGenBuffers(2, &opengl->index_buffer);
-    if (!opengl->index_buffer || !opengl->vertex_buffer) {
-        av_log(opengl, AV_LOG_ERROR, "Buffer generation failed.\n");
-        ret = AVERROR_EXTERNAL;
-        goto fail;
-    }
-
-    opengl_configure_texture(opengl, opengl->texture_name[0], opengl->width, opengl->height);
-    if (desc->nb_components > 1) {
-        int has_alpha = desc->flags & AV_PIX_FMT_FLAG_ALPHA;
-        int num_planes = desc->nb_components - (has_alpha ? 1 : 0);
-        if (opengl->non_pow_2_textures) {
-            opengl->chroma_div_w = 1.0f;
-            opengl->chroma_div_h = 1.0f;
-        } else {
-            opengl->chroma_div_w = 1 << desc->log2_chroma_w;
-            opengl->chroma_div_h = 1 << desc->log2_chroma_h;
-        }
-        for (i = 1; i < num_planes; i++)
-            if (opengl->non_pow_2_textures)
-                opengl_configure_texture(opengl, opengl->texture_name[i],
-                        AV_CEIL_RSHIFT(opengl->width, desc->log2_chroma_w),
-                        AV_CEIL_RSHIFT(opengl->height, desc->log2_chroma_h));
-            else
-                opengl_configure_texture(opengl, opengl->texture_name[i], opengl->width, opengl->height);
-        if (has_alpha)
-            opengl_configure_texture(opengl, opengl->texture_name[3], opengl->width, opengl->height);
-    }
-
-    opengl->glprocs.glBindBuffer(FF_GL_ELEMENT_ARRAY_BUFFER, opengl->index_buffer);
-    opengl->glprocs.glBufferData(FF_GL_ELEMENT_ARRAY_BUFFER, sizeof(g_index), g_index, FF_GL_STATIC_DRAW);
-    opengl->glprocs.glBindBuffer(FF_GL_ELEMENT_ARRAY_BUFFER, 0);
-
-    glEnable(GL_BLEND);
-    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-
-    glClearColor((float)opengl->background[0] / 255.0f, (float)opengl->background[1] / 255.0f,
-                 (float)opengl->background[2] / 255.0f, 1.0f);
-
-    ret = AVERROR_EXTERNAL;
-    OPENGL_ERROR_CHECK(opengl);
-
-    return 0;
-  fail:
-    return ret;
-}
-
-static av_cold int opengl_write_header(AVFormatContext *h)
-{
-    OpenGLContext *opengl = h->priv_data;
-    AVCodecParameters *par = h->streams[0]->codecpar;
-    AVStream *st;
-    int ret;
-
-    if (!opengl->warned) {
-        av_log(opengl, AV_LOG_WARNING,
-            "The opengl output device is deprecated due to being fundamentally incompatible with libavformat API. "
-            "For monitoring purposes in ffmpeg you can output to a file or use pipes and a video player.\n"
-            "Example: ffmpeg -i INPUT -f nut -c:v rawvideo - | ffplay -loglevel warning -vf setpts=0 -\n"
-        );
-        opengl->warned = 1;
-    }
-
-    if (h->nb_streams != 1 ||
-        par->codec_type != AVMEDIA_TYPE_VIDEO ||
-        (par->codec_id != AV_CODEC_ID_WRAPPED_AVFRAME && par->codec_id != AV_CODEC_ID_RAWVIDEO)) {
-        av_log(opengl, AV_LOG_ERROR, "Only a single raw or wrapped avframe video stream is supported.\n");
-        return AVERROR(EINVAL);
-    }
-    st = h->streams[0];
-    opengl->width = st->codecpar->width;
-    opengl->height = st->codecpar->height;
-    opengl->pix_fmt = st->codecpar->format;
-    if (!opengl->window_width)
-        opengl->window_width = opengl->width;
-    if (!opengl->window_height)
-        opengl->window_height = opengl->height;
-
-    if (!opengl->window_title && !opengl->no_window)
-        opengl->window_title = av_strdup(h->url);
-
-    if ((ret = opengl_create_window(h)))
-        goto fail;
-
-    if ((ret = opengl_read_limits(h)) < 0)
-        goto fail;
-
-    if (opengl->width > opengl->max_texture_size || opengl->height > opengl->max_texture_size) {
-        av_log(opengl, AV_LOG_ERROR, "Too big picture %dx%d, max supported size is %dx%d\n",
-               opengl->width, opengl->height, opengl->max_texture_size, opengl->max_texture_size);
-        ret = AVERROR(EINVAL);
-        goto fail;
-    }
-
-    if ((ret = opengl_load_procedures(opengl)) < 0)
-        goto fail;
-
-    opengl_fill_color_map(opengl);
-    opengl_get_texture_params(opengl);
-
-    if ((ret = opengl_init_context(opengl)) < 0)
-        goto fail;
-
-    if ((ret = opengl_prepare_vertex(h)) < 0)
-        goto fail;
-
-    glClear(GL_COLOR_BUFFER_BIT);
-
-#if CONFIG_SDL2
-    if (!opengl->no_window)
-        SDL_GL_SwapWindow(opengl->window);
-#endif
-    if (opengl->no_window &&
-        (ret = avdevice_dev_to_app_control_message(h, AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER, NULL , 0)) < 0) {
-        av_log(opengl, AV_LOG_ERROR, "Application failed to display window buffer.\n");
-        goto fail;
-    }
-
-    ret = AVERROR_EXTERNAL;
-    OPENGL_ERROR_CHECK(opengl);
-
-    opengl->inited = 1;
-    return 0;
-
-  fail:
-    opengl_write_trailer(h);
-    return ret;
-}
-
-static uint8_t* opengl_get_plane_pointer(OpenGLContext *opengl, AVPacket *pkt, int comp_index,
-                                         const AVPixFmtDescriptor *desc)
-{
-    uint8_t *data = pkt->data;
-    int wordsize = opengl_type_size(opengl->type);
-    int width_chroma = AV_CEIL_RSHIFT(opengl->width, desc->log2_chroma_w);
-    int height_chroma = AV_CEIL_RSHIFT(opengl->height, desc->log2_chroma_h);
-    int plane = desc->comp[comp_index].plane;
-
-    switch(plane) {
-    case 0:
-        break;
-    case 1:
-        data += opengl->width * opengl->height * wordsize;
-        break;
-    case 2:
-        data += opengl->width * opengl->height * wordsize;
-        data += width_chroma * height_chroma * wordsize;
-        break;
-    case 3:
-        data += opengl->width * opengl->height * wordsize;
-        data += 2 * width_chroma * height_chroma * wordsize;
-        break;
-    default:
-        return NULL;
-    }
-    return data;
-}
-
-#define LOAD_TEXTURE_DATA(comp_index, sub)                                                  \
-{                                                                                           \
-    int width = sub ? AV_CEIL_RSHIFT(opengl->width, desc->log2_chroma_w) : opengl->width;   \
-    int height = sub ? AV_CEIL_RSHIFT(opengl->height, desc->log2_chroma_h): opengl->height; \
-    uint8_t *data;                                                                          \
-    int plane = desc->comp[comp_index].plane;                                               \
-                                                                                            \
-    glBindTexture(GL_TEXTURE_2D, opengl->texture_name[comp_index]);                         \
-    if (!is_pkt) {                                                                          \
-        GLint length = ((AVFrame *)input)->linesize[plane];                                 \
-        int bytes_per_pixel = opengl_type_size(opengl->type);                               \
-        if (!(desc->flags & AV_PIX_FMT_FLAG_PLANAR))                                        \
-            bytes_per_pixel *= desc->nb_components;                                         \
-        data = ((AVFrame *)input)->data[plane];                                             \
-        if (!(length % bytes_per_pixel) &&                                                  \
-            (opengl->unpack_subimage || ((length / bytes_per_pixel) == width))) {           \
-            length /= bytes_per_pixel;                                                      \
-            if (length != width)                                                            \
-                glPixelStorei(FF_GL_UNPACK_ROW_LENGTH, length);                             \
-            glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height,                          \
-                            opengl->format, opengl->type, data);                            \
-            if (length != width)                                                            \
-                glPixelStorei(FF_GL_UNPACK_ROW_LENGTH, 0);                                  \
-        } else {                                                                            \
-            int h;                                                                          \
-            for (h = 0; h < height; h++) {                                                  \
-                glTexSubImage2D(GL_TEXTURE_2D, 0, 0, h, width, 1,                           \
-                                opengl->format, opengl->type, data);                        \
-                data += length;                                                             \
-            }                                                                               \
-        }                                                                                   \
-    } else {                                                                                \
-        data = opengl_get_plane_pointer(opengl, input, comp_index, desc);                   \
-        glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height,                              \
-                        opengl->format, opengl->type, data);                                \
-    }                                                                                       \
-}
-
-static int opengl_draw(AVFormatContext *h, void *input, int repaint, int is_pkt)
-{
-    OpenGLContext *opengl = h->priv_data;
-    enum AVPixelFormat pix_fmt = h->streams[0]->codecpar->format;
-    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
-    int ret;
-
-#if CONFIG_SDL2
-    /* At this point, opengl->glcontext implies opengl->glcontext */
-    if (opengl->glcontext)
-        SDL_GL_MakeCurrent(opengl->window, opengl->glcontext);
-
-    if (!opengl->no_window && (ret = opengl_sdl_process_events(h)) < 0)
-        goto fail;
-#endif
-    if (opengl->no_window &&
-        (ret = avdevice_dev_to_app_control_message(h, AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER, NULL , 0)) < 0) {
-        av_log(opengl, AV_LOG_ERROR, "Application failed to prepare window buffer.\n");
-        goto fail;
-    }
-
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    if (!repaint) {
-        if (is_pkt)
-            glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-        LOAD_TEXTURE_DATA(0, 0)
-        if (desc->flags & AV_PIX_FMT_FLAG_PLANAR) {
-            LOAD_TEXTURE_DATA(1, 1)
-            LOAD_TEXTURE_DATA(2, 1)
-            if (desc->flags & AV_PIX_FMT_FLAG_ALPHA)
-                LOAD_TEXTURE_DATA(3, 0)
-        }
-    }
-    ret = AVERROR_EXTERNAL;
-    OPENGL_ERROR_CHECK(opengl);
-
-    if ((ret = opengl_prepare(opengl)) < 0)
-        goto fail;
-
-    opengl->glprocs.glBindBuffer(FF_GL_ARRAY_BUFFER, opengl->vertex_buffer);
-    opengl->glprocs.glBindBuffer(FF_GL_ELEMENT_ARRAY_BUFFER, opengl->index_buffer);
-    opengl->glprocs.glVertexAttribPointer(opengl->position_attrib, 3, GL_FLOAT, GL_FALSE, sizeof(OpenGLVertexInfo), 0);
-    opengl->glprocs.glEnableVertexAttribArray(opengl->position_attrib);
-    opengl->glprocs.glVertexAttribPointer(opengl->texture_coords_attrib, 2, GL_FLOAT, GL_FALSE, sizeof(OpenGLVertexInfo), 12);
-    opengl->glprocs.glEnableVertexAttribArray(opengl->texture_coords_attrib);
-
-    glDrawElements(GL_TRIANGLES, FF_ARRAY_ELEMS(g_index), GL_UNSIGNED_SHORT, 0);
-
-    ret = AVERROR_EXTERNAL;
-    OPENGL_ERROR_CHECK(opengl);
-
-#if CONFIG_SDL2
-    if (!opengl->no_window)
-        SDL_GL_SwapWindow(opengl->window);
-#endif
-    if (opengl->no_window &&
-        (ret = avdevice_dev_to_app_control_message(h, AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER, NULL , 0)) < 0) {
-        av_log(opengl, AV_LOG_ERROR, "Application failed to display window buffer.\n");
-        goto fail;
-    }
-
-    return 0;
-  fail:
-    return ret;
-}
-
-static int opengl_write_packet(AVFormatContext *h, AVPacket *pkt)
-{
-    AVCodecParameters *par = h->streams[0]->codecpar;
-    if (par->codec_id == AV_CODEC_ID_WRAPPED_AVFRAME) {
-        AVFrame *frame = (AVFrame *)pkt->data;
-        return opengl_draw(h, frame, 0, 0);
-    } else {
-        return opengl_draw(h, pkt, 0, 1);
-    }
-}
-
-static int opengl_write_frame(AVFormatContext *h, int stream_index,
-                              AVFrame **frame, unsigned flags)
-{
-    if ((flags & AV_WRITE_UNCODED_FRAME_QUERY))
-        return 0;
-    return opengl_draw(h, *frame, 0, 0);
-}
-
-#define OFFSET(x) offsetof(OpenGLContext, x)
-#define ENC AV_OPT_FLAG_ENCODING_PARAM
-static const AVOption options[] = {
-    { "background",   "set background color",   OFFSET(background),   AV_OPT_TYPE_COLOR,  {.str = "black"}, 0, 0, ENC },
-    { "no_window",    "disable default window", OFFSET(no_window),    AV_OPT_TYPE_INT,    {.i64 = 0}, INT_MIN, INT_MAX, ENC },
-    { "window_title", "set window title",       OFFSET(window_title), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, ENC },
-    { "window_size",  "set window size",        OFFSET(window_width), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0, ENC },
-    { NULL }
-};
-
-static const AVClass opengl_class = {
-    .class_name = "opengl outdev",
-    .item_name  = av_default_item_name,
-    .option     = options,
-    .version    = LIBAVUTIL_VERSION_INT,
-    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
-};
-
-const FFOutputFormat ff_opengl_muxer = {
-    .p.name              = "opengl",
-    .p.long_name         = NULL_IF_CONFIG_SMALL("OpenGL output"),
-    .p.audio_codec       = AV_CODEC_ID_NONE,
-    .p.video_codec       = AV_CODEC_ID_WRAPPED_AVFRAME,
-    .p.flags             = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS,
-    .p.priv_class        = &opengl_class,
-    .priv_data_size = sizeof(OpenGLContext),
-    .write_header   = opengl_write_header,
-    .write_packet   = opengl_write_packet,
-    .write_uncoded_frame = opengl_write_frame,
-    .write_trailer  = opengl_write_trailer,
-    .control_message = opengl_control_message,
-};
diff --git a/libavdevice/opengl_enc_shaders.h b/libavdevice/opengl_enc_shaders.h
deleted file mode 100644
index 67ee0ae7b4..0000000000
--- a/libavdevice/opengl_enc_shaders.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (c) 2014 Lukasz Marek
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVDEVICE_OPENGL_ENC_SHADERS_H
-#define AVDEVICE_OPENGL_ENC_SHADERS_H
-
-#include "libavutil/pixfmt.h"
-
-static const char * const FF_OPENGL_VERTEX_SHADER =
-    "uniform mat4 u_projectionMatrix;"
-    "uniform mat4 u_modelViewMatrix;"
-
-    "attribute vec4 a_position;"
-    "attribute vec2 a_textureCoords;"
-
-    "varying vec2 texture_coordinate;"
-
-    "void main()"
-    "{"
-        "gl_Position = u_projectionMatrix * (a_position * u_modelViewMatrix);"
-        "texture_coordinate = a_textureCoords;"
-    "}";
-
-/**
- * Fragment shader for packet RGBA formats.
- */
-static const char * const FF_OPENGL_FRAGMENT_SHADER_RGBA_PACKET =
-#if defined(GL_ES_VERSION_2_0)
-    "precision mediump float;"
-#endif
-    "uniform sampler2D u_texture0;"
-    "uniform mat4 u_colorMap;"
-
-    "varying vec2 texture_coordinate;"
-
-    "void main()"
-    "{"
-        "gl_FragColor = texture2D(u_texture0, texture_coordinate) * u_colorMap;"
-    "}";
-
-/**
- * Fragment shader for packet RGB formats.
- */
-static const char * const FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET =
-#if defined(GL_ES_VERSION_2_0)
-    "precision mediump float;"
-#endif
-    "uniform sampler2D u_texture0;"
-    "uniform mat4 u_colorMap;"
-
-    "varying vec2 texture_coordinate;"
-
-    "void main()"
-    "{"
-        "gl_FragColor = vec4((texture2D(u_texture0, texture_coordinate) * u_colorMap).rgb, 1.0);"
-    "}";
-
-/**
- * Fragment shader for planar RGBA formats.
- */
-static const char * const FF_OPENGL_FRAGMENT_SHADER_RGBA_PLANAR =
-#if defined(GL_ES_VERSION_2_0)
-    "precision mediump float;"
-#endif
-    "uniform sampler2D u_texture0;"
-    "uniform sampler2D u_texture1;"
-    "uniform sampler2D u_texture2;"
-    "uniform sampler2D u_texture3;"
-
-    "varying vec2 texture_coordinate;"
-
-    "void main()"
-    "{"
-        "gl_FragColor = vec4(texture2D(u_texture0, texture_coordinate).r,"
-                            "texture2D(u_texture1, texture_coordinate).r,"
-                            "texture2D(u_texture2, texture_coordinate).r,"
-                            "texture2D(u_texture3, texture_coordinate).r);"
-    "}";
-
-/**
- * Fragment shader for planar RGB formats.
- */
-static const char * const FF_OPENGL_FRAGMENT_SHADER_RGB_PLANAR =
-#if defined(GL_ES_VERSION_2_0)
-    "precision mediump float;"
-#endif
-    "uniform sampler2D u_texture0;"
-    "uniform sampler2D u_texture1;"
-    "uniform sampler2D u_texture2;"
-
-    "varying vec2 texture_coordinate;"
-
-    "void main()"
-    "{"
-        "gl_FragColor = vec4(texture2D(u_texture0, texture_coordinate).r,"
-                            "texture2D(u_texture1, texture_coordinate).r,"
-                            "texture2D(u_texture2, texture_coordinate).r,"
-                            "1.0);"
-    "}";
-
-/**
- * Fragment shader for planar YUV formats.
- */
-static const char * const  FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR =
-#if defined(GL_ES_VERSION_2_0)
-    "precision mediump float;"
-#endif
-    "uniform sampler2D u_texture0;"
-    "uniform sampler2D u_texture1;"
-    "uniform sampler2D u_texture2;"
-    "uniform float u_chroma_div_w;"
-    "uniform float u_chroma_div_h;"
-
-    "varying vec2 texture_coordinate;"
-
-    "void main()"
-    "{"
-        "vec3 yuv;"
-
-        "yuv.r = texture2D(u_texture0, texture_coordinate).r - 0.0625;"
-        "yuv.g = texture2D(u_texture1, vec2(texture_coordinate.x / u_chroma_div_w, texture_coordinate.y / u_chroma_div_h)).r - 0.5;"
-        "yuv.b = texture2D(u_texture2, vec2(texture_coordinate.x / u_chroma_div_w, texture_coordinate.y / u_chroma_div_h)).r - 0.5;"
-
-        "gl_FragColor = clamp(vec4(mat3(1.1643,  1.16430, 1.1643,"
-                                       "0.0,    -0.39173, 2.0170,"
-                                       "1.5958, -0.81290, 0.0) * yuv, 1.0), 0.0, 1.0);"
-
-    "}";
-
-/**
- * Fragment shader for planar YUVA formats.
- */
-static const char * const FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR =
-#if defined(GL_ES_VERSION_2_0)
-    "precision mediump float;"
-#endif
-    "uniform sampler2D u_texture0;"
-    "uniform sampler2D u_texture1;"
-    "uniform sampler2D u_texture2;"
-    "uniform sampler2D u_texture3;"
-    "uniform float u_chroma_div_w;"
-    "uniform float u_chroma_div_h;"
-
-    "varying vec2 texture_coordinate;"
-
-    "void main()"
-    "{"
-        "vec3 yuv;"
-
-        "yuv.r = texture2D(u_texture0, texture_coordinate).r - 0.0625;"
-        "yuv.g = texture2D(u_texture1, vec2(texture_coordinate.x / u_chroma_div_w, texture_coordinate.y / u_chroma_div_h)).r - 0.5;"
-        "yuv.b = texture2D(u_texture2, vec2(texture_coordinate.x / u_chroma_div_w, texture_coordinate.y / u_chroma_div_h)).r - 0.5;"
-
-        "gl_FragColor = clamp(vec4(mat3(1.1643,  1.16430, 1.1643,"
-                                       "0.0,    -0.39173, 2.0170,"
-                                       "1.5958, -0.81290, 0.0) * yuv, texture2D(u_texture3, texture_coordinate).r), 0.0, 1.0);"
-    "}";
-
-static const char * const FF_OPENGL_FRAGMENT_SHADER_GRAY =
-#if defined(GL_ES_VERSION_2_0)
-    "precision mediump float;"
-#endif
-    "uniform sampler2D u_texture0;"
-    "varying vec2 texture_coordinate;"
-    "void main()"
-    "{"
-        "float c = texture2D(u_texture0, texture_coordinate).r;"
-        "gl_FragColor = vec4(c, c, c, 1.0);"
-    "}";
-
-#endif /* AVDEVICE_OPENGL_ENC_SHADERS_H */
diff --git a/libavdevice/version_major.h b/libavdevice/version_major.h
index b7dbe28b4d..bbe7d8344c 100644
--- a/libavdevice/version_major.h
+++ b/libavdevice/version_major.h
@@ -33,8 +33,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-// reminder to remove the opengl device on next major bump
-#define FF_API_OPENGL_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
 // reminder to remove the sdl2 device on next major bump
 #define FF_API_SDL2_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
 #define FF_API_ALSA_CHANNELS (LIBAVDEVICE_VERSION_MAJOR < 62)
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 13/30] avdevice: remove deprecated FF_API_SDL2_DEVICE
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (11 preceding siblings ...)
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 12/30] avdevice: remove deprecated FF_API_OPENGL_DEVICE James Almer
@ 2025-02-23 22:06 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 14/30] avdevice/version_major: postpone some deprecations until the next bump James Almer
                   ` (16 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2024-02-28.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 configure                   |   5 -
 libavdevice/Makefile        |   1 -
 libavdevice/alldevices.c    |   1 -
 libavdevice/sdl2.c          | 377 ------------------------------------
 libavdevice/version_major.h |   2 -
 5 files changed, 386 deletions(-)
 delete mode 100644 libavdevice/sdl2.c

diff --git a/configure b/configure
index 9a003aa453..9247face79 100755
--- a/configure
+++ b/configure
@@ -3764,7 +3764,6 @@ oss_indev_deps_any="sys_soundcard_h"
 oss_outdev_deps_any="sys_soundcard_h"
 pulse_indev_deps="libpulse"
 pulse_outdev_deps="libpulse"
-sdl2_outdev_deps="sdl2"
 sndio_indev_deps="sndio"
 sndio_outdev_deps="sndio"
 v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h"
@@ -7859,10 +7858,6 @@ enabled zoompan_filter      && prepend avfilter_deps "swscale"
 
 enabled lavfi_indev         && prepend avdevice_deps "avfilter"
 
-#FIXME
-enabled_any sdl2_outdev && enabled sdl2 &&
-    add_cflags $(filter_out '-Dmain=SDL_main' $sdl2_cflags)
-
 enabled opus_decoder    && prepend avcodec_deps "swresample"
 
 # reorder the items at var $1 to align with the items order at var $2 .
diff --git a/libavdevice/Makefile b/libavdevice/Makefile
index d09bfb95f9..a226368d16 100644
--- a/libavdevice/Makefile
+++ b/libavdevice/Makefile
@@ -40,7 +40,6 @@ OBJS-$(CONFIG_PULSE_INDEV)               += pulse_audio_dec.o \
                                             pulse_audio_common.o timefilter.o
 OBJS-$(CONFIG_PULSE_OUTDEV)              += pulse_audio_enc.o \
                                             pulse_audio_common.o
-OBJS-$(CONFIG_SDL2_OUTDEV)               += sdl2.o
 OBJS-$(CONFIG_SNDIO_INDEV)               += sndio_dec.o sndio.o
 OBJS-$(CONFIG_SNDIO_OUTDEV)              += sndio_enc.o sndio.o
 OBJS-$(CONFIG_V4L2_INDEV)                += v4l2.o v4l2-common.o timefilter.o
diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c
index c2e525b7b9..573595f416 100644
--- a/libavdevice/alldevices.c
+++ b/libavdevice/alldevices.c
@@ -48,7 +48,6 @@ extern const FFInputFormat  ff_oss_demuxer;
 extern const FFOutputFormat ff_oss_muxer;
 extern const FFInputFormat  ff_pulse_demuxer;
 extern const FFOutputFormat ff_pulse_muxer;
-extern const FFOutputFormat ff_sdl2_muxer;
 extern const FFInputFormat  ff_sndio_demuxer;
 extern const FFOutputFormat ff_sndio_muxer;
 extern const FFInputFormat  ff_v4l2_demuxer;
diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c
deleted file mode 100644
index 491c8dafe8..0000000000
--- a/libavdevice/sdl2.c
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * Copyright (c) 2016 Josh de Kock
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * @file
- * libSDL2 output device
- */
-
-#include <SDL.h>
-#include <SDL_thread.h>
-
-#include "libavutil/imgutils.h"
-#include "libavutil/mem.h"
-#include "libavutil/opt.h"
-#include "libavutil/pixdesc.h"
-#include "libavformat/mux.h"
-
-typedef struct {
-    AVClass *class;
-    SDL_Window *window;
-    SDL_Renderer *renderer;
-    char *window_title;
-    int window_width, window_height;  /**< size of the window */
-    int window_x, window_y;           /**< position of the window */
-    int window_fullscreen;
-    int window_borderless;
-    int enable_quit_action;
-
-    SDL_Texture *texture;
-    int texture_fmt;
-    SDL_Rect texture_rect;
-
-    int inited;
-    int warned;
-} SDLContext;
-
-static const struct sdl_texture_format_entry {
-    enum AVPixelFormat format; int texture_fmt;
-} sdl_texture_format_map[] = {
-    /*
-     * Not implemented in FFmpeg, but leaving here for completeness.
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_ARGB4444 },
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_RGBA4444 },
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_ABGR4444 },
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_BGRA4444 },
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_ARGB1555 },
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_RGBA5551 },
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_ABGR1555 },
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_BGRA5551 },
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_ARGB2101010 },
-    */
-    { AV_PIX_FMT_RGB8,    SDL_PIXELFORMAT_RGB332 },
-    { AV_PIX_FMT_RGB444,  SDL_PIXELFORMAT_RGB444 },
-    { AV_PIX_FMT_RGB555,  SDL_PIXELFORMAT_RGB555 },
-    { AV_PIX_FMT_BGR555,  SDL_PIXELFORMAT_BGR555 },
-    { AV_PIX_FMT_RGB565,  SDL_PIXELFORMAT_RGB565 },
-    { AV_PIX_FMT_BGR565,  SDL_PIXELFORMAT_BGR565 },
-    { AV_PIX_FMT_RGB24,   SDL_PIXELFORMAT_RGB24 },
-    { AV_PIX_FMT_BGR24,   SDL_PIXELFORMAT_BGR24 },
-    { AV_PIX_FMT_0RGB32,  SDL_PIXELFORMAT_RGB888 },
-    { AV_PIX_FMT_0BGR32,  SDL_PIXELFORMAT_BGR888 },
-#if HAVE_BIGENDIAN
-    { AV_PIX_FMT_RGB0,    SDL_PIXELFORMAT_RGBX8888 },
-    { AV_PIX_FMT_BGR0,    SDL_PIXELFORMAT_BGRX8888 },
-#else
-    { AV_PIX_FMT_0BGR,    SDL_PIXELFORMAT_RGBX8888 },
-    { AV_PIX_FMT_0RGB,    SDL_PIXELFORMAT_BGRX8888 },
-#endif
-    { AV_PIX_FMT_RGB32,   SDL_PIXELFORMAT_ARGB8888 },
-    { AV_PIX_FMT_RGB32_1, SDL_PIXELFORMAT_RGBA8888 },
-    { AV_PIX_FMT_BGR32,   SDL_PIXELFORMAT_ABGR8888 },
-    { AV_PIX_FMT_BGR32_1, SDL_PIXELFORMAT_BGRA8888 },
-    { AV_PIX_FMT_YUV420P, SDL_PIXELFORMAT_IYUV },
-    { AV_PIX_FMT_YUYV422, SDL_PIXELFORMAT_YUY2 },
-    { AV_PIX_FMT_UYVY422, SDL_PIXELFORMAT_UYVY },
-    { AV_PIX_FMT_NONE,    0                },
-};
-
-static void compute_texture_rect(AVFormatContext *s)
-{
-    AVRational sar, dar; /* sample and display aspect ratios */
-    SDLContext *sdl = s->priv_data;
-    AVStream *st = s->streams[0];
-    AVCodecParameters *codecpar = st->codecpar;
-    SDL_Rect *texture_rect = &sdl->texture_rect;
-
-    /* compute texture width and height from the codec context information */
-    sar = st->sample_aspect_ratio.num ? st->sample_aspect_ratio : (AVRational){ 1, 1 };
-    dar = av_mul_q(sar, (AVRational){ codecpar->width, codecpar->height });
-
-    /* we suppose the screen has a 1/1 sample aspect ratio */
-    if (sdl->window_width && sdl->window_height) {
-        /* fit in the window */
-        if (av_cmp_q(dar, (AVRational){ sdl->window_width, sdl->window_height }) > 0) {
-            /* fit in width */
-            texture_rect->w = sdl->window_width;
-            texture_rect->h = av_rescale(texture_rect->w, dar.den, dar.num);
-        } else {
-            /* fit in height */
-            texture_rect->h = sdl->window_height;
-            texture_rect->w = av_rescale(texture_rect->h, dar.num, dar.den);
-        }
-    } else {
-        if (sar.num > sar.den) {
-            texture_rect->w = codecpar->width;
-            texture_rect->h = av_rescale(texture_rect->w, dar.den, dar.num);
-        } else {
-            texture_rect->h = codecpar->height;
-            texture_rect->w = av_rescale(texture_rect->h, dar.num, dar.den);
-        }
-        sdl->window_width  = texture_rect->w;
-        sdl->window_height = texture_rect->h;
-    }
-
-    texture_rect->x = (sdl->window_width  - texture_rect->w) / 2;
-    texture_rect->y = (sdl->window_height - texture_rect->h) / 2;
-}
-
-static int sdl2_write_trailer(AVFormatContext *s)
-{
-    SDLContext *sdl = s->priv_data;
-
-    if (sdl->texture)
-        SDL_DestroyTexture(sdl->texture);
-    sdl->texture = NULL;
-
-    if (sdl->renderer)
-        SDL_DestroyRenderer(sdl->renderer);
-    sdl->renderer = NULL;
-
-    if (sdl->window)
-        SDL_DestroyWindow(sdl->window);
-    sdl->window = NULL;
-
-    if (!sdl->inited)
-        SDL_Quit();
-
-    return 0;
-}
-
-static int sdl2_write_header(AVFormatContext *s)
-{
-    SDLContext *sdl = s->priv_data;
-    AVStream *st = s->streams[0];
-    AVCodecParameters *codecpar = st->codecpar;
-    int i, ret = 0;
-    int flags  = 0;
-
-    if (!sdl->warned) {
-        av_log(sdl, AV_LOG_WARNING,
-            "The sdl output device is deprecated due to being fundamentally incompatible with libavformat API. "
-            "For monitoring purposes in ffmpeg you can output to a file or use pipes and a video player.\n"
-            "Example: ffmpeg -i INPUT -f nut -c:v rawvideo - | ffplay -loglevel warning -vf setpts=0 -\n"
-        );
-        sdl->warned = 1;
-    }
-
-    if (!sdl->window_title)
-        sdl->window_title = av_strdup(s->url);
-
-    if (SDL_WasInit(SDL_INIT_VIDEO)) {
-        av_log(s, AV_LOG_WARNING,
-               "SDL video subsystem was already inited, you could have multiple SDL outputs. This may cause unknown behaviour.\n");
-        sdl->inited = 1;
-    }
-
-    if (   s->nb_streams > 1
-        || codecpar->codec_type != AVMEDIA_TYPE_VIDEO
-        || codecpar->codec_id   != AV_CODEC_ID_RAWVIDEO) {
-        av_log(s, AV_LOG_ERROR, "Only supports one rawvideo stream\n");
-        goto fail;
-    }
-
-    for (i = 0; sdl_texture_format_map[i].format != AV_PIX_FMT_NONE; i++) {
-        if (sdl_texture_format_map[i].format == codecpar->format) {
-            sdl->texture_fmt = sdl_texture_format_map[i].texture_fmt;
-            break;
-        }
-    }
-
-    if (!sdl->texture_fmt) {
-        av_log(s, AV_LOG_ERROR,
-               "Unsupported pixel format '%s'.\n",
-               av_get_pix_fmt_name(codecpar->format));
-        goto fail;
-    }
-
-    /* resize texture to width and height from the codec context information */
-    flags = SDL_WINDOW_HIDDEN |
-            (sdl->window_fullscreen ? SDL_WINDOW_FULLSCREEN : 0) |
-            (sdl->window_borderless ? SDL_WINDOW_BORDERLESS : SDL_WINDOW_RESIZABLE);
-
-    /* initialization */
-    if (!sdl->inited){
-        if (SDL_Init(SDL_INIT_VIDEO) != 0) {
-            av_log(s, AV_LOG_ERROR, "Unable to initialize SDL: %s\n", SDL_GetError());
-            goto fail;
-        }
-    }
-
-    compute_texture_rect(s);
-
-    if (SDL_CreateWindowAndRenderer(sdl->window_width, sdl->window_height,
-                                    flags, &sdl->window, &sdl->renderer) != 0){
-        av_log(sdl, AV_LOG_ERROR, "Couldn't create window and renderer: %s\n", SDL_GetError());
-        goto fail;
-    }
-
-    SDL_SetWindowTitle(sdl->window, sdl->window_title);
-    SDL_SetWindowPosition(sdl->window, sdl->window_x, sdl->window_y);
-    SDL_ShowWindow(sdl->window);
-
-    sdl->texture = SDL_CreateTexture(sdl->renderer, sdl->texture_fmt, SDL_TEXTUREACCESS_STREAMING,
-                                     codecpar->width, codecpar->height);
-
-    if (!sdl->texture) {
-        av_log(sdl, AV_LOG_ERROR, "Unable to set create mode: %s\n", SDL_GetError());
-        goto fail;
-    }
-
-    av_log(s, AV_LOG_VERBOSE, "w:%d h:%d fmt:%s -> w:%d h:%d\n",
-           codecpar->width, codecpar->height, av_get_pix_fmt_name(codecpar->format),
-           sdl->window_width, sdl->window_height);
-
-    sdl->inited = 1;
-
-    return 0;
-fail:
-    sdl2_write_trailer(s);
-    return ret;
-}
-
-static int sdl2_write_packet(AVFormatContext *s, AVPacket *pkt)
-{
-    int ret, quit = 0;
-    SDLContext *sdl = s->priv_data;
-    AVCodecParameters *codecpar = s->streams[0]->codecpar;
-    uint8_t *data[4];
-    int linesize[4];
-
-    SDL_Event event;
-    if (SDL_PollEvent(&event)){
-        switch (event.type) {
-        case SDL_KEYDOWN:
-            switch (event.key.keysym.sym) {
-            case SDLK_ESCAPE:
-            case SDLK_q:
-                quit = 1;
-                break;
-            default:
-                break;
-            }
-            break;
-        case SDL_QUIT:
-            quit = 1;
-            break;
-        case SDL_WINDOWEVENT:
-            switch(event.window.event){
-            case SDL_WINDOWEVENT_RESIZED:
-            case SDL_WINDOWEVENT_SIZE_CHANGED:
-                sdl->window_width  = event.window.data1;
-                sdl->window_height = event.window.data2;
-                compute_texture_rect(s);
-                break;
-            default:
-                break;
-            }
-            break;
-        default:
-            break;
-        }
-    }
-
-    if (quit && sdl->enable_quit_action) {
-        sdl2_write_trailer(s);
-        return AVERROR(EIO);
-    }
-
-    av_image_fill_arrays(data, linesize, pkt->data, codecpar->format, codecpar->width, codecpar->height, 1);
-    switch (sdl->texture_fmt) {
-    /* case SDL_PIXELFORMAT_ARGB4444:
-     * case SDL_PIXELFORMAT_RGBA4444:
-     * case SDL_PIXELFORMAT_ABGR4444:
-     * case SDL_PIXELFORMAT_BGRA4444:
-     * case SDL_PIXELFORMAT_ARGB1555:
-     * case SDL_PIXELFORMAT_RGBA5551:
-     * case SDL_PIXELFORMAT_ABGR1555:
-     * case SDL_PIXELFORMAT_BGRA5551:
-     * case SDL_PIXELFORMAT_ARGB2101010:
-     */
-    case SDL_PIXELFORMAT_IYUV:
-    case SDL_PIXELFORMAT_YUY2:
-    case SDL_PIXELFORMAT_UYVY:
-        ret = SDL_UpdateYUVTexture(sdl->texture, NULL,
-                                   data[0], linesize[0],
-                                   data[1], linesize[1],
-                                   data[2], linesize[2]);
-        break;
-    case SDL_PIXELFORMAT_RGB332:
-    case SDL_PIXELFORMAT_RGB444:
-    case SDL_PIXELFORMAT_RGB555:
-    case SDL_PIXELFORMAT_BGR555:
-    case SDL_PIXELFORMAT_RGB565:
-    case SDL_PIXELFORMAT_BGR565:
-    case SDL_PIXELFORMAT_RGB24:
-    case SDL_PIXELFORMAT_BGR24:
-    case SDL_PIXELFORMAT_RGB888:
-    case SDL_PIXELFORMAT_RGBX8888:
-    case SDL_PIXELFORMAT_BGR888:
-    case SDL_PIXELFORMAT_BGRX8888:
-    case SDL_PIXELFORMAT_ARGB8888:
-    case SDL_PIXELFORMAT_RGBA8888:
-    case SDL_PIXELFORMAT_ABGR8888:
-    case SDL_PIXELFORMAT_BGRA8888:
-        ret = SDL_UpdateTexture(sdl->texture, NULL, data[0], linesize[0]);
-        break;
-    default:
-        av_log(NULL, AV_LOG_FATAL, "Unsupported pixel format\n");
-        ret = -1;
-        break;
-    }
-    SDL_RenderClear(sdl->renderer);
-    SDL_RenderCopy(sdl->renderer, sdl->texture, NULL, &sdl->texture_rect);
-    SDL_RenderPresent(sdl->renderer);
-    return ret;
-}
-
-#define OFFSET(x) offsetof(SDLContext,x)
-
-static const AVOption options[] = {
-    { "window_title",      "set SDL window title",       OFFSET(window_title), AV_OPT_TYPE_STRING,     { .str = NULL }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM },
-    { "window_size",       "set SDL window forced size", OFFSET(window_width), AV_OPT_TYPE_IMAGE_SIZE, { .str = NULL }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM },
-    { "window_x",          "set SDL window x position",  OFFSET(window_x),     AV_OPT_TYPE_INT,        { .i64 = SDL_WINDOWPOS_CENTERED }, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
-    { "window_y",          "set SDL window y position",  OFFSET(window_y),     AV_OPT_TYPE_INT,        { .i64 = SDL_WINDOWPOS_CENTERED }, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
-    { "window_fullscreen", "set SDL window fullscreen",  OFFSET(window_fullscreen), AV_OPT_TYPE_BOOL,  { .i64 = 0 },    0, 1, AV_OPT_FLAG_ENCODING_PARAM },
-    { "window_borderless", "set SDL window border off",  OFFSET(window_borderless), AV_OPT_TYPE_BOOL,  { .i64 = 0 },    0, 1, AV_OPT_FLAG_ENCODING_PARAM },
-    { "window_enable_quit", "set if quit action is available", OFFSET(enable_quit_action), AV_OPT_TYPE_INT, {.i64=1},   0, 1, AV_OPT_FLAG_ENCODING_PARAM },
-    { NULL },
-};
-
-static const AVClass sdl2_class = {
-    .class_name = "sdl2 outdev",
-    .item_name  = av_default_item_name,
-    .option     = options,
-    .version    = LIBAVUTIL_VERSION_INT,
-    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
-};
-
-const FFOutputFormat ff_sdl2_muxer = {
-    .p.name         = "sdl,sdl2",
-    .p.long_name    = NULL_IF_CONFIG_SMALL("SDL2 output device"),
-    .priv_data_size = sizeof(SDLContext),
-    .p.audio_codec  = AV_CODEC_ID_NONE,
-    .p.video_codec  = AV_CODEC_ID_RAWVIDEO,
-    .write_header   = sdl2_write_header,
-    .write_packet   = sdl2_write_packet,
-    .write_trailer  = sdl2_write_trailer,
-    .p.flags        = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS,
-    .p.priv_class   = &sdl2_class,
-};
diff --git a/libavdevice/version_major.h b/libavdevice/version_major.h
index bbe7d8344c..6e7dd62027 100644
--- a/libavdevice/version_major.h
+++ b/libavdevice/version_major.h
@@ -33,8 +33,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-// reminder to remove the sdl2 device on next major bump
-#define FF_API_SDL2_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
 #define FF_API_ALSA_CHANNELS (LIBAVDEVICE_VERSION_MAJOR < 62)
 
 #endif /* AVDEVICE_VERSION_MAJOR_H */
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 14/30] avdevice/version_major: postpone some deprecations until the next bump
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (12 preceding siblings ...)
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 13/30] avdevice: remove deprecated FF_API_SDL2_DEVICE James Almer
@ 2025-02-23 22:06 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 15/30] avformat: remove deprecated FF_API_LAVF_SHORTEST James Almer
                   ` (15 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

They are too recent.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavdevice/version_major.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavdevice/version_major.h b/libavdevice/version_major.h
index 6e7dd62027..470e5626be 100644
--- a/libavdevice/version_major.h
+++ b/libavdevice/version_major.h
@@ -33,6 +33,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#define FF_API_ALSA_CHANNELS (LIBAVDEVICE_VERSION_MAJOR < 62)
+#define FF_API_ALSA_CHANNELS (LIBAVDEVICE_VERSION_MAJOR < 63)
 
 #endif /* AVDEVICE_VERSION_MAJOR_H */
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 15/30] avformat: remove deprecated FF_API_LAVF_SHORTEST
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (13 preceding siblings ...)
  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 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 16/30] avformat: remove deprecated FF_API_ALLOW_FLUSH James Almer
                   ` (14 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2023-09-18.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/avformat.h          |  3 ---
 libavformat/avformat_internal.h |  7 ------
 libavformat/mux.c               | 38 ---------------------------------
 libavformat/options.c           |  4 ----
 libavformat/options_table.h     |  3 ---
 libavformat/version_major.h     |  1 -
 6 files changed, 56 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 6abdb6d480..a3bb1f1ee3 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1470,9 +1470,6 @@ typedef struct AVFormatContext {
 #define AVFMT_FLAG_BITEXACT         0x0400
 #define AVFMT_FLAG_SORT_DTS    0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down)
 #define AVFMT_FLAG_FAST_SEEK   0x80000 ///< Enable fast, but inaccurate seeks for some formats
-#if FF_API_LAVF_SHORTEST
-#define AVFMT_FLAG_SHORTEST   0x100000 ///< Stop muxing when the shortest stream stops.
-#endif
 #define AVFMT_FLAG_AUTO_BSF   0x200000 ///< Add bitstream filters as requested by the muxer
 
     /**
diff --git a/libavformat/avformat_internal.h b/libavformat/avformat_internal.h
index b114dba659..157252fa90 100644
--- a/libavformat/avformat_internal.h
+++ b/libavformat/avformat_internal.h
@@ -95,13 +95,6 @@ typedef struct FormatContextInternal {
             int chapter_ids_monotonic;
         };
     };
-
-#if FF_API_LAVF_SHORTEST
-    /**
-     * Timestamp of the end of the shortest stream.
-     */
-    int64_t shortest_end;
-#endif
 } FormatContextInternal;
 
 static av_always_inline FormatContextInternal *ff_fc_internal(AVFormatContext *s)
diff --git a/libavformat/mux.c b/libavformat/mux.c
index dde30f89eb..60204f6266 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -1025,44 +1025,6 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *pkt,
         }
     }
 
-#if FF_API_LAVF_SHORTEST
-    if (si->packet_buffer.head &&
-        eof &&
-        (s->flags & AVFMT_FLAG_SHORTEST) &&
-        fci->shortest_end == AV_NOPTS_VALUE) {
-        AVPacket *const top_pkt = &si->packet_buffer.head->pkt;
-
-        fci->shortest_end = av_rescale_q(top_pkt->dts,
-                                         s->streams[top_pkt->stream_index]->time_base,
-                                         AV_TIME_BASE_Q);
-    }
-
-    if (fci->shortest_end != AV_NOPTS_VALUE) {
-        while (si->packet_buffer.head) {
-            PacketListEntry *pktl = si->packet_buffer.head;
-            AVPacket *const top_pkt = &pktl->pkt;
-            AVStream *const st = s->streams[top_pkt->stream_index];
-            FFStream *const sti = ffstream(st);
-            int64_t top_dts = av_rescale_q(top_pkt->dts, st->time_base,
-                                        AV_TIME_BASE_Q);
-
-            if (fci->shortest_end + 1 >= top_dts)
-                break;
-
-            si->packet_buffer.head = pktl->next;
-            if (!si->packet_buffer.head)
-                si->packet_buffer.tail = NULL;
-
-            if (sti->last_in_packet_buffer == pktl)
-                sti->last_in_packet_buffer = NULL;
-
-            av_packet_unref(&pktl->pkt);
-            av_freep(&pktl);
-            flush = 0;
-        }
-    }
-#endif
-
     if (stream_count && flush) {
         PacketListEntry *pktl = si->packet_buffer.head;
         AVStream *const st = s->streams[pktl->pkt.stream_index];
diff --git a/libavformat/options.c b/libavformat/options.c
index c8f3390306..b314cd4a35 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -184,10 +184,6 @@ AVFormatContext *avformat_alloc_context(void)
         return NULL;
     }
 
-#if FF_API_LAVF_SHORTEST
-    fci->shortest_end = AV_NOPTS_VALUE;
-#endif
-
     return s;
 }
 
diff --git a/libavformat/options_table.h b/libavformat/options_table.h
index 311880d24d..e2e690fd2a 100644
--- a/libavformat/options_table.h
+++ b/libavformat/options_table.h
@@ -51,9 +51,6 @@ static const AVOption avformat_options[] = {
 {"fastseek", "fast but inaccurate seeks", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_FAST_SEEK }, INT_MIN, INT_MAX, D, .unit = "fflags"},
 {"nobuffer", "reduce the latency introduced by optional buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_NOBUFFER }, 0, INT_MAX, D, .unit = "fflags"},
 {"bitexact", "do not write random/volatile data", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_BITEXACT }, 0, 0, E, .unit = "fflags" },
-#if FF_API_LAVF_SHORTEST
-{"shortest", "stop muxing with the shortest stream", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_SHORTEST }, 0, 0, E | AV_OPT_FLAG_DEPRECATED, .unit = "fflags" },
-#endif
 {"autobsf", "add needed bsfs automatically", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_AUTO_BSF }, 0, 0, E, .unit = "fflags" },
 {"seek2any", "allow seeking to non-keyframes on demuxer level when supported", OFFSET(seek2any), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, D},
 {"analyzeduration", "specify how many microseconds are analyzed to probe the input", OFFSET(max_analyze_duration), AV_OPT_TYPE_INT64, {.i64 = 0 }, 0, INT64_MAX, D},
diff --git a/libavformat/version_major.h b/libavformat/version_major.h
index 7a9b06703d..e189ed90ac 100644
--- a/libavformat/version_major.h
+++ b/libavformat/version_major.h
@@ -42,7 +42,6 @@
  *
  */
 #define FF_API_COMPUTE_PKT_FIELDS2      (LIBAVFORMAT_VERSION_MAJOR < 62)
-#define FF_API_LAVF_SHORTEST            (LIBAVFORMAT_VERSION_MAJOR < 62)
 #define FF_API_ALLOW_FLUSH              (LIBAVFORMAT_VERSION_MAJOR < 62)
 #define FF_API_AVSTREAM_SIDE_DATA       (LIBAVFORMAT_VERSION_MAJOR < 62)
 
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 16/30] avformat: remove deprecated FF_API_ALLOW_FLUSH
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (14 preceding siblings ...)
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 15/30] avformat: remove deprecated FF_API_LAVF_SHORTEST James Almer
@ 2025-02-23 22:06 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 17/30] avformat: remove deprecated FF_API_AVSTREAM_SIDE_DATA James Almer
                   ` (13 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2023-10-02.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavdevice/pulse_audio_enc.c  |  4 ----
 libavformat/avformat.h         |  3 ---
 libavformat/fifo.c             |  4 ----
 libavformat/hlsenc.c           |  4 ----
 libavformat/matroskaenc.c      | 13 -----------
 libavformat/movenc.c           | 40 ++--------------------------------
 libavformat/mpegtsenc.c        |  4 ----
 libavformat/oggenc.c           | 20 -----------------
 libavformat/tee.c              |  4 ----
 libavformat/tests/fifo_muxer.c |  4 ----
 libavformat/version_major.h    |  1 -
 11 files changed, 2 insertions(+), 99 deletions(-)

diff --git a/libavdevice/pulse_audio_enc.c b/libavdevice/pulse_audio_enc.c
index 80136d1e20..d1652bf8d7 100644
--- a/libavdevice/pulse_audio_enc.c
+++ b/libavdevice/pulse_audio_enc.c
@@ -796,11 +796,7 @@ const FFOutputFormat ff_pulse_muxer = {
     .get_output_timestamp = pulse_get_output_timestamp,
     .get_device_list      = pulse_get_device_list,
     .control_message      = pulse_control_message,
-#if FF_API_ALLOW_FLUSH
-    .p.flags              = AVFMT_NOFILE | AVFMT_ALLOW_FLUSH,
-#else
     .p.flags              = AVFMT_NOFILE,
-#endif
     .p.priv_class         = &pulse_muxer_class,
     .flags_internal       = FF_OFMT_FLAG_ALLOW_FLUSH,
 };
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index a3bb1f1ee3..08e3206290 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -485,9 +485,6 @@ typedef struct AVProbeData {
 #define AVFMT_NOBINSEARCH   0x2000 /**< Format does not allow to fall back on binary search via read_timestamp */
 #define AVFMT_NOGENSEARCH   0x4000 /**< Format does not allow to fall back on generic search */
 #define AVFMT_NO_BYTE_SEEK  0x8000 /**< Format does not allow seeking by bytes */
-#if FF_API_ALLOW_FLUSH
-#define AVFMT_ALLOW_FLUSH  0x10000 /**< @deprecated: Just send a NULL packet if you want to flush a muxer. */
-#endif
 #define AVFMT_TS_NONSTRICT 0x20000 /**< Format does not require strictly
                                         increasing timestamps, but they must
                                         still be monotonic */
diff --git a/libavformat/fifo.c b/libavformat/fifo.c
index 23e4149ad6..936a153a49 100644
--- a/libavformat/fifo.c
+++ b/libavformat/fifo.c
@@ -717,11 +717,7 @@ const FFOutputFormat ff_fifo_muxer = {
     .p.name         = "fifo",
     .p.long_name    = NULL_IF_CONFIG_SMALL("FIFO queue pseudo-muxer"),
     .p.priv_class   = &fifo_muxer_class,
-#if FF_API_ALLOW_FLUSH
-    .p.flags        = AVFMT_NOFILE | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE,
-#else
     .p.flags        = AVFMT_NOFILE | AVFMT_TS_NEGATIVE,
-#endif
     .priv_data_size = sizeof(FifoContext),
     .init           = fifo_init,
     .write_header   = fifo_write_header,
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 6148685f40..f1f03dbd49 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -3256,11 +3256,7 @@ const FFOutputFormat ff_hls_muxer = {
     .p.audio_codec    = AV_CODEC_ID_AAC,
     .p.video_codec    = AV_CODEC_ID_H264,
     .p.subtitle_codec = AV_CODEC_ID_WEBVTT,
-#if FF_API_ALLOW_FLUSH
-    .p.flags          = AVFMT_NOFILE | AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | AVFMT_NODIMENSIONS,
-#else
     .p.flags          = AVFMT_NOFILE | AVFMT_GLOBALHEADER | AVFMT_NODIMENSIONS,
-#endif
     .p.priv_class     = &hls_class,
     .flags_internal   = FF_OFMT_FLAG_ALLOW_FLUSH,
     .priv_data_size = sizeof(HLSContext),
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 2e06f68304..6d0d791f18 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -3601,11 +3601,7 @@ const FFOutputFormat ff_matroska_muxer = {
     .write_packet      = mkv_write_flush_packet,
     .write_trailer     = mkv_write_trailer,
     .p.flags           = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS |
-#if FF_API_ALLOW_FLUSH
-                         AVFMT_TS_NONSTRICT | AVFMT_ALLOW_FLUSH,
-#else
                          AVFMT_TS_NONSTRICT,
-#endif
     .p.codec_tag       = (const AVCodecTag* const []){
          ff_codec_bmp_tags, ff_codec_wav_tags,
          additional_audio_tags, additional_subtitle_tags, 0
@@ -3645,11 +3641,7 @@ const FFOutputFormat ff_webm_muxer = {
     .query_codec       = webm_query_codec,
     .check_bitstream   = mkv_check_bitstream,
     .p.flags           = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS |
-#if FF_API_ALLOW_FLUSH
-                         AVFMT_TS_NONSTRICT | AVFMT_ALLOW_FLUSH,
-#else
                          AVFMT_TS_NONSTRICT,
-#endif
     .p.priv_class      = &matroska_webm_class,
     .flags_internal    = FF_OFMT_FLAG_ALLOW_FLUSH,
 };
@@ -3671,12 +3663,7 @@ const FFOutputFormat ff_matroska_audio_muxer = {
     .write_packet      = mkv_write_flush_packet,
     .write_trailer     = mkv_write_trailer,
     .check_bitstream   = mkv_check_bitstream,
-#if FF_API_ALLOW_FLUSH
-    .p.flags           = AVFMT_GLOBALHEADER | AVFMT_TS_NONSTRICT |
-                         AVFMT_ALLOW_FLUSH,
-#else
     .p.flags           = AVFMT_GLOBALHEADER | AVFMT_TS_NONSTRICT,
-#endif
     .p.codec_tag       = (const AVCodecTag* const []){
         ff_codec_wav_tags, additional_audio_tags, 0
     },
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 76dce9e6e5..daac6e8957 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -8713,11 +8713,7 @@ const FFOutputFormat ff_mov_muxer = {
     .write_packet      = mov_write_packet,
     .write_trailer     = mov_write_trailer,
     .deinit            = mov_free,
-    .p.flags           = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE | AVFMT_VARIABLE_FPS
-#if FF_API_ALLOW_FLUSH
-                       | AVFMT_ALLOW_FLUSH
-#endif
-                         ,
+    .p.flags           = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE | AVFMT_VARIABLE_FPS,
     .p.codec_tag       = (const AVCodecTag* const []){
         ff_codec_movvideo_tags, ff_codec_movaudio_tags, ff_codec_movsubtitle_tags, 0
     },
@@ -8739,11 +8735,7 @@ const FFOutputFormat ff_tgp_muxer = {
     .write_packet      = mov_write_packet,
     .write_trailer     = mov_write_trailer,
     .deinit            = mov_free,
-#if FF_API_ALLOW_FLUSH
-    .p.flags           = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE,
-#else
     .p.flags           = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE,
-#endif
     .p.codec_tag       = codec_3gp_tags_list,
     .check_bitstream   = mov_check_bitstream,
     .p.priv_class      = &mov_isobmff_muxer_class,
@@ -8765,11 +8757,7 @@ const FFOutputFormat ff_mp4_muxer = {
     .write_packet      = mov_write_packet,
     .write_trailer     = mov_write_trailer,
     .deinit            = mov_free,
-    .p.flags           = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE | AVFMT_VARIABLE_FPS
-#if FF_API_ALLOW_FLUSH
-                       | AVFMT_ALLOW_FLUSH
-#endif
-                         ,
+    .p.flags           = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE | AVFMT_VARIABLE_FPS,
     .p.codec_tag       = mp4_codec_tags_list,
     .check_bitstream   = mov_check_bitstream,
     .p.priv_class      = &mov_isobmff_muxer_class,
@@ -8790,11 +8778,7 @@ const FFOutputFormat ff_psp_muxer = {
     .write_packet      = mov_write_packet,
     .write_trailer     = mov_write_trailer,
     .deinit            = mov_free,
-#if FF_API_ALLOW_FLUSH
-    .p.flags           = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE,
-#else
     .p.flags           = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE,
-#endif
     .p.codec_tag       = mp4_codec_tags_list,
     .check_bitstream   = mov_check_bitstream,
     .p.priv_class      = &mov_isobmff_muxer_class,
@@ -8814,11 +8798,7 @@ const FFOutputFormat ff_tg2_muxer = {
     .write_packet      = mov_write_packet,
     .write_trailer     = mov_write_trailer,
     .deinit            = mov_free,
-#if FF_API_ALLOW_FLUSH
-    .p.flags           = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE,
-#else
     .p.flags           = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE,
-#endif
     .p.codec_tag       = codec_3gp_tags_list,
     .check_bitstream   = mov_check_bitstream,
     .p.priv_class      = &mov_isobmff_muxer_class,
@@ -8839,11 +8819,7 @@ const FFOutputFormat ff_ipod_muxer = {
     .write_packet      = mov_write_packet,
     .write_trailer     = mov_write_trailer,
     .deinit            = mov_free,
-#if FF_API_ALLOW_FLUSH
-    .p.flags           = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE,
-#else
     .p.flags           = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE,
-#endif
     .p.codec_tag       = (const AVCodecTag* const []){ codec_ipod_tags, 0 },
     .check_bitstream   = mov_check_bitstream,
     .p.priv_class      = &mov_isobmff_muxer_class,
@@ -8864,11 +8840,7 @@ const FFOutputFormat ff_ismv_muxer = {
     .write_packet      = mov_write_packet,
     .write_trailer     = mov_write_trailer,
     .deinit            = mov_free,
-#if FF_API_ALLOW_FLUSH
-    .p.flags           = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE,
-#else
     .p.flags           = AVFMT_GLOBALHEADER | AVFMT_TS_NEGATIVE,
-#endif
     .p.codec_tag       = (const AVCodecTag* const []){
         codec_mp4_tags, codec_ism_tags, 0 },
     .check_bitstream   = mov_check_bitstream,
@@ -8890,11 +8862,7 @@ const FFOutputFormat ff_f4v_muxer = {
     .write_packet      = mov_write_packet,
     .write_trailer     = mov_write_trailer,
     .deinit            = mov_free,
-#if FF_API_ALLOW_FLUSH
-    .p.flags           = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH,
-#else
     .p.flags           = AVFMT_GLOBALHEADER,
-#endif
     .p.codec_tag       = (const AVCodecTag* const []){ codec_f4v_tags, 0 },
     .check_bitstream   = mov_check_bitstream,
     .p.priv_class      = &mov_isobmff_muxer_class,
@@ -8914,11 +8882,7 @@ const FFOutputFormat ff_avif_muxer = {
     .write_packet      = mov_write_packet,
     .write_trailer     = avif_write_trailer,
     .deinit            = mov_free,
-#if FF_API_ALLOW_FLUSH
-    .p.flags           = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH,
-#else
     .p.flags           = AVFMT_GLOBALHEADER,
-#endif
     .p.codec_tag       = codec_avif_tags_list,
     .p.priv_class      = &mov_avif_muxer_class,
     .flags_internal    = FF_OFMT_FLAG_ALLOW_FLUSH,
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 399ba21d29..6935b71cfe 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -2413,11 +2413,7 @@ const FFOutputFormat ff_mpegts_muxer = {
     .write_trailer  = mpegts_write_end,
     .deinit         = mpegts_deinit,
     .check_bitstream = mpegts_check_bitstream,
-#if FF_API_ALLOW_FLUSH
-    .p.flags        = AVFMT_ALLOW_FLUSH | AVFMT_VARIABLE_FPS | AVFMT_NODIMENSIONS,
-#else
     .p.flags         = AVFMT_VARIABLE_FPS | AVFMT_NODIMENSIONS,
-#endif
     .flags_internal  = FF_OFMT_FLAG_ALLOW_FLUSH,
     .p.priv_class   = &mpegts_muxer_class,
 };
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index 0647111396..e1bb7dd972 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -773,11 +773,7 @@ const FFOutputFormat ff_ogg_muxer = {
     .write_packet      = ogg_write_packet,
     .write_trailer     = ogg_write_trailer,
     .deinit            = ogg_free,
-#if FF_API_ALLOW_FLUSH
-    .p.flags           = AVFMT_TS_NEGATIVE | AVFMT_TS_NONSTRICT | AVFMT_ALLOW_FLUSH,
-#else
     .p.flags           = AVFMT_TS_NEGATIVE | AVFMT_TS_NONSTRICT,
-#endif
     .p.priv_class      = &ogg_muxer_class,
     .flags_internal    = FF_OFMT_FLAG_ALLOW_FLUSH,
 };
@@ -796,11 +792,7 @@ const FFOutputFormat ff_oga_muxer = {
     .write_packet      = ogg_write_packet,
     .write_trailer     = ogg_write_trailer,
     .deinit            = ogg_free,
-#if FF_API_ALLOW_FLUSH
-    .p.flags           = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH,
-#else
     .p.flags           = AVFMT_TS_NEGATIVE,
-#endif
     .p.priv_class      = &ogg_muxer_class,
     .flags_internal    = FF_OFMT_FLAG_ALLOW_FLUSH,
 };
@@ -822,11 +814,7 @@ const FFOutputFormat ff_ogv_muxer = {
     .write_packet      = ogg_write_packet,
     .write_trailer     = ogg_write_trailer,
     .deinit            = ogg_free,
-#if FF_API_ALLOW_FLUSH
-    .p.flags           = AVFMT_TS_NEGATIVE | AVFMT_TS_NONSTRICT | AVFMT_ALLOW_FLUSH,
-#else
     .p.flags           = AVFMT_TS_NEGATIVE | AVFMT_TS_NONSTRICT,
-#endif
     .p.priv_class      = &ogg_muxer_class,
     .flags_internal    = FF_OFMT_FLAG_ALLOW_FLUSH,
 };
@@ -845,11 +833,7 @@ const FFOutputFormat ff_spx_muxer = {
     .write_packet      = ogg_write_packet,
     .write_trailer     = ogg_write_trailer,
     .deinit            = ogg_free,
-#if FF_API_ALLOW_FLUSH
-    .p.flags           = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH,
-#else
     .p.flags           = AVFMT_TS_NEGATIVE,
-#endif
     .p.priv_class      = &ogg_muxer_class,
     .flags_internal    = FF_OFMT_FLAG_ALLOW_FLUSH,
 };
@@ -868,11 +852,7 @@ const FFOutputFormat ff_opus_muxer = {
     .write_packet      = ogg_write_packet,
     .write_trailer     = ogg_write_trailer,
     .deinit            = ogg_free,
-#if FF_API_ALLOW_FLUSH
-    .p.flags           = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH,
-#else
     .p.flags           = AVFMT_TS_NEGATIVE,
-#endif
     .p.priv_class      = &ogg_muxer_class,
     .flags_internal    = FF_OFMT_FLAG_ALLOW_FLUSH,
 };
diff --git a/libavformat/tee.c b/libavformat/tee.c
index 1a2a8ead82..0150ee9f22 100644
--- a/libavformat/tee.c
+++ b/libavformat/tee.c
@@ -610,10 +610,6 @@ const FFOutputFormat ff_tee_muxer = {
     .write_trailer     = tee_write_trailer,
     .write_packet      = tee_write_packet,
     .p.priv_class      = &tee_muxer_class,
-#if FF_API_ALLOW_FLUSH
-    .p.flags           = AVFMT_NOFILE | AVFMT_ALLOW_FLUSH | AVFMT_TS_NEGATIVE,
-#else
     .p.flags           = AVFMT_NOFILE | AVFMT_TS_NEGATIVE,
-#endif
     .flags_internal    = FF_OFMT_FLAG_ALLOW_FLUSH,
 };
diff --git a/libavformat/tests/fifo_muxer.c b/libavformat/tests/fifo_muxer.c
index 222761fed3..1ba440b301 100644
--- a/libavformat/tests/fifo_muxer.c
+++ b/libavformat/tests/fifo_muxer.c
@@ -154,11 +154,7 @@ const FFOutputFormat ff_fifo_test_muxer = {
     .write_trailer  = fifo_test_trailer,
     .deinit         = failing_deinit,
     .p.priv_class   = &failing_muxer_class,
-#if FF_API_ALLOW_FLUSH
-    .p.flags        = AVFMT_NOFILE | AVFMT_ALLOW_FLUSH,
-#else
     .p.flags        = AVFMT_NOFILE,
-#endif
     .flags_internal = FF_OFMT_FLAG_ALLOW_FLUSH,
 };
 
diff --git a/libavformat/version_major.h b/libavformat/version_major.h
index e189ed90ac..f76d811889 100644
--- a/libavformat/version_major.h
+++ b/libavformat/version_major.h
@@ -42,7 +42,6 @@
  *
  */
 #define FF_API_COMPUTE_PKT_FIELDS2      (LIBAVFORMAT_VERSION_MAJOR < 62)
-#define FF_API_ALLOW_FLUSH              (LIBAVFORMAT_VERSION_MAJOR < 62)
 #define FF_API_AVSTREAM_SIDE_DATA       (LIBAVFORMAT_VERSION_MAJOR < 62)
 
 #define FF_API_GET_DUR_ESTIMATE_METHOD  (LIBAVFORMAT_VERSION_MAJOR < 62)
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 17/30] avformat: remove deprecated FF_API_AVSTREAM_SIDE_DATA
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (15 preceding siblings ...)
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 16/30] avformat: remove deprecated FF_API_ALLOW_FLUSH James Almer
@ 2025-02-23 22:06 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 18/30] avformat: remove deprecated FF_API_GET_DUR_ESTIMATE_METHOD James Almer
                   ` (12 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2023-10-06.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/avformat.c      |  80 ----------------------------
 libavformat/avformat.h      | 103 ------------------------------------
 libavformat/demux.c         |  46 ----------------
 libavformat/demux_utils.c   |  12 -----
 libavformat/internal.h      |  11 ----
 libavformat/mux.c           |  22 --------
 libavformat/options.c       |   5 --
 libavformat/seek.c          |   7 ---
 libavformat/version_major.h |   1 -
 9 files changed, 287 deletions(-)

diff --git a/libavformat/avformat.c b/libavformat/avformat.c
index f53299cc40..18ca4643ee 100644
--- a/libavformat/avformat.c
+++ b/libavformat/avformat.c
@@ -50,14 +50,6 @@ void ff_free_stream(AVStream **pst)
     if (!st)
         return;
 
-#if FF_API_AVSTREAM_SIDE_DATA
-FF_DISABLE_DEPRECATION_WARNINGS
-    for (int i = 0; i < st->nb_side_data; i++)
-        av_freep(&st->side_data[i].data);
-    av_freep(&st->side_data);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
     if (st->attached_pic.data)
         av_packet_unref(&st->attached_pic);
 
@@ -199,78 +191,6 @@ void avformat_free_context(AVFormatContext *s)
     av_free(s);
 }
 
-#if FF_API_AVSTREAM_SIDE_DATA
-FF_DISABLE_DEPRECATION_WARNINGS
-uint8_t *av_stream_get_side_data(const AVStream *st,
-                                 enum AVPacketSideDataType type, size_t *size)
-{
-    for (int i = 0; i < st->nb_side_data; i++) {
-        if (st->side_data[i].type == type) {
-            if (size)
-                *size = st->side_data[i].size;
-            return st->side_data[i].data;
-        }
-    }
-    if (size)
-        *size = 0;
-    return NULL;
-}
-
-int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type,
-                            uint8_t *data, size_t size)
-{
-    AVPacketSideData *sd, *tmp;
-
-    for (int i = 0; i < st->nb_side_data; i++) {
-        sd = &st->side_data[i];
-
-        if (sd->type == type) {
-            av_freep(&sd->data);
-            sd->data = data;
-            sd->size = size;
-            return 0;
-        }
-    }
-
-    if (st->nb_side_data + 1U > FFMIN(INT_MAX, SIZE_MAX / sizeof(*tmp)))
-        return AVERROR(ERANGE);
-
-    tmp = av_realloc_array(st->side_data, st->nb_side_data + 1, sizeof(*tmp));
-    if (!tmp) {
-        return AVERROR(ENOMEM);
-    }
-
-    st->side_data = tmp;
-    st->nb_side_data++;
-
-    sd = &st->side_data[st->nb_side_data - 1];
-    sd->type = type;
-    sd->data = data;
-    sd->size = size;
-
-    return 0;
-}
-
-uint8_t *av_stream_new_side_data(AVStream *st, enum AVPacketSideDataType type,
-                                 size_t size)
-{
-    int ret;
-    uint8_t *data = av_malloc(size);
-
-    if (!data)
-        return NULL;
-
-    ret = av_stream_add_side_data(st, type, data, size);
-    if (ret < 0) {
-        av_freep(&data);
-        return NULL;
-    }
-
-    return data;
-}
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
 /**
  * Copy all stream parameters from source to destination stream, with the
  * exception of the index field, which is usually set by avformat_new_stream().
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 08e3206290..fabe1d305c 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -844,38 +844,6 @@ typedef struct AVStream {
      */
     AVPacket attached_pic;
 
-#if FF_API_AVSTREAM_SIDE_DATA
-    /**
-     * An array of side data that applies to the whole stream (i.e. the
-     * container does not allow it to change between packets).
-     *
-     * There may be no overlap between the side data in this array and side data
-     * in the packets. I.e. a given side data is either exported by the muxer
-     * (demuxing) / set by the caller (muxing) in this array, then it never
-     * appears in the packets, or the side data is exported / sent through
-     * the packets (always in the first packet where the value becomes known or
-     * changes), then it does not appear in this array.
-     *
-     * - demuxing: Set by libavformat when the stream is created.
-     * - muxing: May be set by the caller before avformat_write_header().
-     *
-     * Freed by libavformat in avformat_free_context().
-     *
-     * @deprecated use AVStream's @ref AVCodecParameters.coded_side_data
-     *             "codecpar side data".
-     */
-    attribute_deprecated
-    AVPacketSideData *side_data;
-    /**
-     * The number of elements in the AVStream.side_data array.
-     *
-     * @deprecated use AVStream's @ref AVCodecParameters.nb_coded_side_data
-     *             "codecpar side data".
-     */
-    attribute_deprecated
-    int            nb_side_data;
-#endif
-
     /**
      * Flags indicating events happening on the stream, a combination of
      * AVSTREAM_EVENT_FLAG_*.
@@ -1923,26 +1891,6 @@ typedef struct AVFormatContext {
     int64_t duration_probesize;
 } AVFormatContext;
 
-#if FF_API_AVSTREAM_SIDE_DATA
-/**
- * This function will cause global side data to be injected in the next packet
- * of each stream as well as after any subsequent seek.
- *
- * @note global side data is always available in every AVStream's
- *       @ref AVCodecParameters.coded_side_data "codecpar side data" array, and
- *       in a @ref AVCodecContext.coded_side_data "decoder's side data" array if
- *       initialized with said stream's codecpar.
- * @see av_packet_side_data_get()
- *
- * @deprecated this function should never be needed, as global side data is now
- *             exported in AVCodecParameters and should
- *             be propagated from demuxers to decoders via
- *             ::avcodec_parameters_to_context()
- */
-attribute_deprecated
-void av_format_inject_global_side_data(AVFormatContext *s);
-#endif
-
 #if FF_API_GET_DUR_ESTIMATE_METHOD
 /**
  * Returns the method used to set ctx->duration.
@@ -2131,57 +2079,6 @@ AVStream *avformat_new_stream(AVFormatContext *s, const struct AVCodec *c);
  */
 int avformat_stream_group_add_stream(AVStreamGroup *stg, AVStream *st);
 
-#if FF_API_AVSTREAM_SIDE_DATA
-/**
- * Wrap an existing array as stream side data.
- *
- * @param st   stream
- * @param type side information type
- * @param data the side data array. It must be allocated with the av_malloc()
- *             family of functions. The ownership of the data is transferred to
- *             st.
- * @param size side information size
- *
- * @return zero on success, a negative AVERROR code on failure. On failure,
- *         the stream is unchanged and the data remains owned by the caller.
- * @deprecated use av_packet_side_data_add() with the stream's
- *             @ref AVCodecParameters.coded_side_data "codecpar side data"
- */
-attribute_deprecated
-int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type,
-                            uint8_t *data, size_t size);
-
-/**
- * Allocate new information from stream.
- *
- * @param stream stream
- * @param type   desired side information type
- * @param size   side information size
- *
- * @return pointer to fresh allocated data or NULL otherwise
- * @deprecated use av_packet_side_data_new() with the stream's
- *             @ref AVCodecParameters.coded_side_data "codecpar side data"
- */
-attribute_deprecated
-uint8_t *av_stream_new_side_data(AVStream *stream,
-                                 enum AVPacketSideDataType type, size_t size);
-/**
- * Get side information from stream.
- *
- * @param stream stream
- * @param type   desired side information type
- * @param size   If supplied, *size will be set to the size of the side data
- *               or to zero if the desired side data is not present.
- *
- * @return pointer to data if present or NULL otherwise
- * @deprecated use av_packet_side_data_get() with the stream's
- *             @ref AVCodecParameters.coded_side_data "codecpar side data"
- */
-attribute_deprecated
-uint8_t *av_stream_get_side_data(const AVStream *stream,
-                                 enum AVPacketSideDataType type, size_t *size);
-#endif
-
 AVProgram *av_new_program(AVFormatContext *s, int id);
 
 /**
diff --git a/libavformat/demux.c b/libavformat/demux.c
index c0bfb9cb67..71af8acad9 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -1495,27 +1495,6 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
             }
             sti->skip_samples = 0;
         }
-
-#if FF_API_AVSTREAM_SIDE_DATA
-        if (sti->inject_global_side_data) {
-            for (int i = 0; i < st->codecpar->nb_coded_side_data; i++) {
-                const AVPacketSideData *const src_sd = &st->codecpar->coded_side_data[i];
-                uint8_t *dst_data;
-
-                if (av_packet_get_side_data(pkt, src_sd->type, NULL))
-                    continue;
-
-                dst_data = av_packet_new_side_data(pkt, src_sd->type, src_sd->size);
-                if (!dst_data) {
-                    av_log(s, AV_LOG_WARNING, "Could not inject global side data\n");
-                    continue;
-                }
-
-                memcpy(dst_data, src_sd->data, src_sd->size);
-            }
-            sti->inject_global_side_data = 0;
-        }
-#endif
     }
 
     if (!fci->metafree) {
@@ -3074,31 +3053,6 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
         }
 
         sti->avctx_inited = 0;
-#if FF_API_AVSTREAM_SIDE_DATA
-FF_DISABLE_DEPRECATION_WARNINGS
-        if (st->codecpar->nb_coded_side_data > 0) {
-            av_assert0(!st->side_data && !st->nb_side_data);
-            st->side_data = av_calloc(st->codecpar->nb_coded_side_data, sizeof(*st->side_data));
-            if (!st->side_data) {
-                ret = AVERROR(ENOMEM);
-                goto find_stream_info_err;
-            }
-
-            for (int j = 0; j < st->codecpar->nb_coded_side_data; j++) {
-                uint8_t *data = av_memdup(st->codecpar->coded_side_data[j].data,
-                                          st->codecpar->coded_side_data[j].size);
-                if (!data) {
-                    ret = AVERROR(ENOMEM);
-                    goto find_stream_info_err;
-                }
-                st->side_data[j].type = st->codecpar->coded_side_data[j].type;
-                st->side_data[j].size = st->codecpar->coded_side_data[j].size;
-                st->side_data[j].data = data;
-                st->nb_side_data++;
-            }
-        }
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     }
 
 find_stream_info_err:
diff --git a/libavformat/demux_utils.c b/libavformat/demux_utils.c
index 9aae521c6c..b632277460 100644
--- a/libavformat/demux_utils.c
+++ b/libavformat/demux_utils.c
@@ -81,18 +81,6 @@ AVChapter *avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_ba
     return chapter;
 }
 
-#if FF_API_AVSTREAM_SIDE_DATA
-void av_format_inject_global_side_data(AVFormatContext *s)
-{
-    FFFormatContext *const si = ffformatcontext(s);
-    si->inject_global_side_data = 1;
-    for (unsigned i = 0; i < s->nb_streams; i++) {
-        AVStream *st = s->streams[i];
-        ffstream(st)->inject_global_side_data = 1;
-    }
-}
-#endif
-
 int avformat_queue_attached_pictures(AVFormatContext *s)
 {
     FormatContextInternal *const fci = ff_fc_internal(s);
diff --git a/libavformat/internal.h b/libavformat/internal.h
index b909adf209..500c310b88 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -110,10 +110,6 @@ typedef struct FFFormatContext {
      */
     AVPacket *pkt;
 
-#if FF_API_AVSTREAM_SIDE_DATA
-    int inject_global_side_data;
-#endif
-
     int avoid_negative_ts_use_pts;
 
     /**
@@ -292,13 +288,6 @@ typedef struct FFStream {
     uint8_t dts_ordered;
     uint8_t dts_misordered;
 
-#if FF_API_AVSTREAM_SIDE_DATA
-    /**
-     * Internal data to inject global side data
-     */
-    int inject_global_side_data;
-#endif
-
     /**
      * display aspect ratio (0 if unknown)
      * - encoding: unused
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 60204f6266..db3b6c2bfe 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -295,27 +295,6 @@ static int init_muxer(AVFormatContext *s, AVDictionary **options)
             }
         }
 
-#if FF_API_AVSTREAM_SIDE_DATA
-FF_DISABLE_DEPRECATION_WARNINGS
-        /* if the caller is using the deprecated AVStream side_data API,
-         * copy its contents to AVStream.codecpar, giving it priority
-           over existing side data in the latter */
-        for (int i = 0; i < st->nb_side_data; i++) {
-            const AVPacketSideData *sd_src = &st->side_data[i];
-            AVPacketSideData *sd_dst;
-
-            sd_dst = av_packet_side_data_new(&st->codecpar->coded_side_data,
-                                             &st->codecpar->nb_coded_side_data,
-                                             sd_src->type, sd_src->size, 0);
-            if (!sd_dst) {
-                ret = AVERROR(ENOMEM);
-                goto fail;
-            }
-            memcpy(sd_dst->data, sd_src->data, sd_src->size);
-        }
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
         desc = avcodec_descriptor_get(par->codec_id);
         if (desc && desc->props & AV_CODEC_PROP_REORDER)
             sti->reorder = 1;
@@ -965,7 +944,6 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *pkt,
     int stream_count = 0;
     int noninterleaved_count = 0;
     int ret;
-    int eof = flush;
 
     if (has_packet) {
         if ((ret = ff_interleave_add_packet(s, pkt, interleave_compare_dts)) < 0)
diff --git a/libavformat/options.c b/libavformat/options.c
index b314cd4a35..76b91169a5 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -250,7 +250,6 @@ const AVClass *av_stream_get_class(void)
 
 AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c)
 {
-    FFFormatContext *const si = ffformatcontext(s);
     FFStream *sti;
     AVStream *st;
     AVStream **streams;
@@ -322,10 +321,6 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c)
     sti->transferred_mux_tb = (AVRational) { 0, 1 };;
 #endif
 
-#if FF_API_AVSTREAM_SIDE_DATA
-    sti->inject_global_side_data = si->inject_global_side_data;
-#endif
-
     sti->need_context_update = 1;
 
     s->streams[s->nb_streams++] = st;
diff --git a/libavformat/seek.c b/libavformat/seek.c
index a096d5e5b3..c0d94371e6 100644
--- a/libavformat/seek.c
+++ b/libavformat/seek.c
@@ -715,8 +715,6 @@ int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts,
 /** Flush the frame reader. */
 void ff_read_frame_flush(AVFormatContext *s)
 {
-    FFFormatContext *const si = ffformatcontext(s);
-
     ff_flush_packet_queue(s);
 
     /* Reset read state for each stream. */
@@ -741,11 +739,6 @@ void ff_read_frame_flush(AVFormatContext *s)
         for (int j = 0; j < MAX_REORDER_DELAY + 1; j++)
             sti->pts_buffer[j] = AV_NOPTS_VALUE;
 
-#if FF_API_AVSTREAM_SIDE_DATA
-        if (si->inject_global_side_data)
-            sti->inject_global_side_data = 1;
-#endif
-
         sti->skip_samples = 0;
     }
 }
diff --git a/libavformat/version_major.h b/libavformat/version_major.h
index f76d811889..aec4ee6e74 100644
--- a/libavformat/version_major.h
+++ b/libavformat/version_major.h
@@ -42,7 +42,6 @@
  *
  */
 #define FF_API_COMPUTE_PKT_FIELDS2      (LIBAVFORMAT_VERSION_MAJOR < 62)
-#define FF_API_AVSTREAM_SIDE_DATA       (LIBAVFORMAT_VERSION_MAJOR < 62)
 
 #define FF_API_GET_DUR_ESTIMATE_METHOD  (LIBAVFORMAT_VERSION_MAJOR < 62)
 #define FF_API_INTERNAL_TIMING          (LIBAVFORMAT_VERSION_MAJOR < 62)
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 18/30] avformat: remove deprecated FF_API_GET_DUR_ESTIMATE_METHOD
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (16 preceding siblings ...)
  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 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 19/30] avformat/version_major: postpone some deprecations until the next bump James Almer
                   ` (11 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2024-03-06.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/avformat.h      | 11 -----------
 libavformat/options.c       |  7 -------
 libavformat/version_major.h |  1 -
 3 files changed, 19 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index fabe1d305c..1a94819644 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1891,17 +1891,6 @@ typedef struct AVFormatContext {
     int64_t duration_probesize;
 } AVFormatContext;
 
-#if FF_API_GET_DUR_ESTIMATE_METHOD
-/**
- * Returns the method used to set ctx->duration.
- *
- * @return AVFMT_DURATION_FROM_PTS, AVFMT_DURATION_FROM_STREAM, or AVFMT_DURATION_FROM_BITRATE.
- * @deprecated duration_estimation_method is public and can be read directly.
- */
-attribute_deprecated
-enum AVDurationEstimationMethod av_fmt_ctx_get_duration_estimation_method(const AVFormatContext* ctx);
-#endif
-
 /**
  * @defgroup lavf_core Core functions
  * @ingroup libavf
diff --git a/libavformat/options.c b/libavformat/options.c
index 76b91169a5..7e4130b405 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -187,13 +187,6 @@ AVFormatContext *avformat_alloc_context(void)
     return s;
 }
 
-#if FF_API_GET_DUR_ESTIMATE_METHOD
-enum AVDurationEstimationMethod av_fmt_ctx_get_duration_estimation_method(const AVFormatContext* ctx)
-{
-    return ctx->duration_estimation_method;
-}
-#endif
-
 const AVClass *avformat_get_class(void)
 {
     return &av_format_context_class;
diff --git a/libavformat/version_major.h b/libavformat/version_major.h
index aec4ee6e74..f5efa4db33 100644
--- a/libavformat/version_major.h
+++ b/libavformat/version_major.h
@@ -43,7 +43,6 @@
  */
 #define FF_API_COMPUTE_PKT_FIELDS2      (LIBAVFORMAT_VERSION_MAJOR < 62)
 
-#define FF_API_GET_DUR_ESTIMATE_METHOD  (LIBAVFORMAT_VERSION_MAJOR < 62)
 #define FF_API_INTERNAL_TIMING          (LIBAVFORMAT_VERSION_MAJOR < 62)
 
 #define FF_API_R_FRAME_RATE            1
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 19/30] avformat/version_major: postpone some deprecations until the next bump
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (17 preceding siblings ...)
  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 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 20/30] avfilter: remove deprecated FF_API_LINK_PUBLIC James Almer
                   ` (10 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

They are either too recent, or are not trivial to remove.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/version_major.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/version_major.h b/libavformat/version_major.h
index f5efa4db33..be3e13c334 100644
--- a/libavformat/version_major.h
+++ b/libavformat/version_major.h
@@ -41,9 +41,9 @@
  * at once through the bump. This improves the git bisect-ability of the change.
  *
  */
-#define FF_API_COMPUTE_PKT_FIELDS2      (LIBAVFORMAT_VERSION_MAJOR < 62)
+#define FF_API_COMPUTE_PKT_FIELDS2      (LIBAVFORMAT_VERSION_MAJOR < 63)
 
-#define FF_API_INTERNAL_TIMING          (LIBAVFORMAT_VERSION_MAJOR < 62)
+#define FF_API_INTERNAL_TIMING          (LIBAVFORMAT_VERSION_MAJOR < 63)
 
 #define FF_API_R_FRAME_RATE            1
 
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 20/30] avfilter: remove deprecated FF_API_LINK_PUBLIC
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (18 preceding siblings ...)
  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 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 21/30] avfilter/version_major: postpone some deprecations until the next bump James Almer
                   ` (9 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2024-03-08.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavfilter/avfilter.c      | 11 -----------
 libavfilter/avfilter.h      | 14 --------------
 libavfilter/version_major.h |  1 -
 3 files changed, 26 deletions(-)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index e732556ffa..cac5cf8997 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -213,17 +213,6 @@ static void link_free(AVFilterLink **link)
     av_freep(link);
 }
 
-#if FF_API_LINK_PUBLIC
-void avfilter_link_free(AVFilterLink **link)
-{
-    link_free(link);
-}
-int avfilter_config_links(AVFilterContext *filter)
-{
-    return ff_filter_config_links(filter);
-}
-#endif
-
 static void update_link_current_pts(FilterLinkInternal *li, int64_t pts)
 {
     AVFilterLink *const link = &li->l.pub;
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 4520d5f978..a89d3cf658 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -447,20 +447,6 @@ struct AVFilterLink {
 int avfilter_link(AVFilterContext *src, unsigned srcpad,
                   AVFilterContext *dst, unsigned dstpad);
 
-#if FF_API_LINK_PUBLIC
-/**
- * @deprecated this function should never be called by users
- */
-attribute_deprecated
-void avfilter_link_free(AVFilterLink **link);
-
-/**
- * @deprecated this function should never be called by users
- */
-attribute_deprecated
-int avfilter_config_links(AVFilterContext *filter);
-#endif
-
 #define AVFILTER_CMD_FLAG_ONE   1 ///< Stop once a filter understood the command (for target=all for example), fast filters are favored automatically
 #define AVFILTER_CMD_FLAG_FAST  2 ///< Only execute command when its fast (like a video out that supports contrast adjustment in hw)
 
diff --git a/libavfilter/version_major.h b/libavfilter/version_major.h
index 41374fbbe5..c156805a31 100644
--- a/libavfilter/version_major.h
+++ b/libavfilter/version_major.h
@@ -35,7 +35,6 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#define FF_API_LINK_PUBLIC     (LIBAVFILTER_VERSION_MAJOR < 11)
 #define FF_API_BUFFERSINK_OPTS (LIBAVFILTER_VERSION_MAJOR < 11)
 #define FF_API_CONTEXT_PUBLIC  (LIBAVFILTER_VERSION_MAJOR < 11)
 
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 21/30] avfilter/version_major: postpone some deprecations until the next bump
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (19 preceding siblings ...)
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 20/30] avfilter: remove deprecated FF_API_LINK_PUBLIC James Almer
@ 2025-02-23 22:06 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 22/30] avutil: remove deprecated FF_API_HDR_VIVID_THREE_SPLINE James Almer
                   ` (8 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

They are too recent.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavfilter/version_major.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/version_major.h b/libavfilter/version_major.h
index c156805a31..cd5c01d7c3 100644
--- a/libavfilter/version_major.h
+++ b/libavfilter/version_major.h
@@ -35,7 +35,7 @@
  * the public API and may change, break or disappear at any time.
  */
 
-#define FF_API_BUFFERSINK_OPTS (LIBAVFILTER_VERSION_MAJOR < 11)
-#define FF_API_CONTEXT_PUBLIC  (LIBAVFILTER_VERSION_MAJOR < 11)
+#define FF_API_BUFFERSINK_OPTS (LIBAVFILTER_VERSION_MAJOR < 12)
+#define FF_API_CONTEXT_PUBLIC  (LIBAVFILTER_VERSION_MAJOR < 12)
 
 #endif /* AVFILTER_VERSION_MAJOR_H */
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 22/30] avutil: remove deprecated FF_API_HDR_VIVID_THREE_SPLINE
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (20 preceding siblings ...)
  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 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 23/30] avutil: remove deprecated FF_API_FRAME_PKT James Almer
                   ` (7 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2023-03-17.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/dynamic_hdr_vivid.c         | 11 ------
 libavutil/hdr_dynamic_vivid_metadata.h | 54 --------------------------
 libavutil/version.h                    |  1 -
 3 files changed, 66 deletions(-)

diff --git a/libavcodec/dynamic_hdr_vivid.c b/libavcodec/dynamic_hdr_vivid.c
index a9b6910798..319d13b90a 100644
--- a/libavcodec/dynamic_hdr_vivid.c
+++ b/libavcodec/dynamic_hdr_vivid.c
@@ -116,17 +116,6 @@ int ff_parse_itu_t_t35_to_dynamic_hdr_vivid(AVDynamicHDRVivid *s, const uint8_t
                             three_spline->th_delta2 = (AVRational){get_bits(gb, 10),  1023};
                             three_spline->enable_strength = (AVRational){get_bits(gb,  8),  255};
                         }
-#if FF_API_HDR_VIVID_THREE_SPLINE
-                        three_spline = &tm_params->three_spline[0];
-FF_DISABLE_DEPRECATION_WARNINGS
-                        tm_params->three_Spline_TH_mode = three_spline->th_mode;
-                        tm_params->three_Spline_TH_enable_MB = three_spline->th_enable_mb;
-                        tm_params->three_Spline_TH_enable = three_spline->th_enable;
-                        tm_params->three_Spline_TH_Delta1 = three_spline->th_delta1;
-                        tm_params->three_Spline_TH_Delta2 = three_spline->th_delta2;
-                        tm_params->three_Spline_enable_Strength = three_spline->enable_strength;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
                     }
                 }
             }
diff --git a/libavutil/hdr_dynamic_vivid_metadata.h b/libavutil/hdr_dynamic_vivid_metadata.h
index 4524a81557..a9d4797f0b 100644
--- a/libavutil/hdr_dynamic_vivid_metadata.h
+++ b/libavutil/hdr_dynamic_vivid_metadata.h
@@ -168,60 +168,6 @@ typedef struct AVHDRVividColorToneMappingParams {
      */
     int three_Spline_num;
 
-#if FF_API_HDR_VIVID_THREE_SPLINE
-    /**
-     * The mode of three Spline. the value shall be in the range
-     * of 0 to 3, inclusive.
-     * @deprecated Use three_spline instead
-     */
-    attribute_deprecated
-    int three_Spline_TH_mode;
-
-    /**
-     * three_Spline_TH_enable_MB is in the range of 0.0 to 1.0, inclusive
-     * and in multiples of 1.0/255.
-     * @deprecated Use three_spline instead
-     */
-    attribute_deprecated
-    AVRational three_Spline_TH_enable_MB;
-
-    /**
-     * 3Spline_TH_enable of three Spline.
-     * The value shall be in the range of 0.0 to 1.0, inclusive.
-     * and in multiples of 1.0/4095.
-     * @deprecated Use three_spline instead
-     */
-    attribute_deprecated
-    AVRational three_Spline_TH_enable;
-
-    /**
-     * 3Spline_TH_Delta1 of three Spline.
-     * The value shall be in the range of 0.0 to 0.25, inclusive,
-     * and in multiples of 0.25/1023.
-     * @deprecated Use three_spline instead
-     */
-    attribute_deprecated
-    AVRational three_Spline_TH_Delta1;
-
-    /**
-     * 3Spline_TH_Delta2 of three Spline.
-     * The value shall be in the range of 0.0 to 0.25, inclusive,
-     * and in multiples of 0.25/1023.
-     * @deprecated Use three_spline instead
-     */
-    attribute_deprecated
-    AVRational three_Spline_TH_Delta2;
-
-    /**
-     * 3Spline_enable_Strength of three Spline.
-     * The value shall be in the range of 0.0 to 1.0, inclusive,
-     * and in multiples of 1.0/255.
-     * @deprecated Use three_spline instead
-     */
-    attribute_deprecated
-    AVRational three_Spline_enable_Strength;
-#endif
-
     AVHDRVivid3SplineParams three_spline[2];
 } AVHDRVividColorToneMappingParams;
 
diff --git a/libavutil/version.h b/libavutil/version.h
index ee4a36cb17..4c8282a35c 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -105,7 +105,6 @@
  * @{
  */
 
-#define FF_API_HDR_VIVID_THREE_SPLINE   (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_FRAME_PKT                (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_INTERLACED_FRAME         (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_FRAME_KEY                (LIBAVUTIL_VERSION_MAJOR < 60)
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 23/30] avutil: remove deprecated FF_API_FRAME_PKT
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (21 preceding siblings ...)
  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 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 24/30] avutil: remove deprecated FF_API_INTERLACED_FRAME James Almer
                   ` (6 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2023-03-20.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/av1dec.c           |  6 ----
 libavcodec/cuviddec.c         |  6 ----
 libavcodec/decode.c           | 27 ------------------
 libavcodec/libuavs3d.c        | 12 --------
 libavdevice/lavfi.c           | 10 -------
 libavfilter/af_volume.c       | 15 ----------
 libavfilter/af_volume.h       |  3 --
 libavfilter/avfilter.c        | 14 ---------
 libavfilter/f_select.c        | 11 -------
 libavfilter/f_sendcmd.c       | 11 -------
 libavfilter/setpts.c          | 11 -------
 libavfilter/vf_crop.c         | 15 ----------
 libavfilter/vf_drawtext.c     | 18 ------------
 libavfilter/vf_eq.c           |  8 ------
 libavfilter/vf_eq.h           |  6 ----
 libavfilter/vf_overlay.c      | 14 ---------
 libavfilter/vf_overlay.h      |  3 --
 libavfilter/vf_overlay_cuda.c | 18 ------------
 libavfilter/vf_scale.c        | 41 ++------------------------
 libavfilter/vf_scale_npp.c    | 54 +++--------------------------------
 libavfilter/vf_swaprect.c     | 17 ++---------
 libavutil/frame.c             | 12 --------
 libavutil/frame.h             | 26 -----------------
 libavutil/version.h           |  1 -
 24 files changed, 8 insertions(+), 351 deletions(-)

diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 7c54e36220..1909b1f122 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -1196,12 +1196,6 @@ static int set_output_frame(AVCodecContext *avctx, AVFrame *frame)
 
     frame->pts = pkt->pts;
     frame->pkt_dts = pkt->dts;
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-    frame->pkt_size = pkt->size;
-    frame->pkt_pos = pkt->pos;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
     av_packet_unref(pkt);
 
diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c
index 67076a1752..b029882926 100644
--- a/libavcodec/cuviddec.c
+++ b/libavcodec/cuviddec.c
@@ -695,12 +695,6 @@ static int cuvid_output_frame(AVCodecContext *avctx, AVFrame *frame)
          * So set pkt_pts and clear all the other pkt_ fields.
          */
         frame->duration = 0;
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->pkt_pos = -1;
-        frame->pkt_size = -1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
         if (!parsed_frame.is_deinterlacing && !parsed_frame.dispinfo.progressive_frame)
             frame->flags |= AV_FRAME_FLAG_INTERLACED;
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index a28279bd36..271345cff1 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -172,10 +172,6 @@ static int extract_packet_props(AVCodecInternal *avci, const AVPacket *pkt)
     av_packet_unref(avci->last_pkt_props);
     if (pkt) {
         ret = av_packet_copy_props(avci->last_pkt_props, pkt);
-#if FF_API_FRAME_PKT
-        if (!ret)
-            avci->last_pkt_props->stream_index = pkt->size; // Needed for ff_decode_frame_props().
-#endif
     }
     return ret;
 }
@@ -444,14 +440,6 @@ static inline int decode_simple_internal(AVCodecContext *avctx, AVFrame *frame,
 
     if (!(codec->caps_internal & FF_CODEC_CAP_SETS_PKT_DTS))
         frame->pkt_dts = pkt->dts;
-    if (avctx->codec->type == AVMEDIA_TYPE_VIDEO) {
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-        if(!avctx->has_b_frames)
-            frame->pkt_pos = pkt->pos;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-    }
     emms_c();
 
     if (avctx->codec->type == AVMEDIA_TYPE_VIDEO) {
@@ -507,10 +495,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
         pkt->pts                  = AV_NOPTS_VALUE;
         pkt->dts                  = AV_NOPTS_VALUE;
         if (!(codec->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) {
-#if FF_API_FRAME_PKT
-            // See extract_packet_props() comment.
-            avci->last_pkt_props->stream_index = avci->last_pkt_props->stream_index - consumed;
-#endif
             avci->last_pkt_props->pts = AV_NOPTS_VALUE;
             avci->last_pkt_props->dts = AV_NOPTS_VALUE;
         }
@@ -1483,12 +1467,6 @@ int ff_decode_frame_props_from_pkt(const AVCodecContext *avctx,
 
     frame->pts          = pkt->pts;
     frame->duration     = pkt->duration;
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-    frame->pkt_pos      = pkt->pos;
-    frame->pkt_size     = pkt->size;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
     ret = side_data_map(frame, pkt->side_data, pkt->side_data_elems, ff_sd_global_map);
     if (ret < 0)
@@ -1529,11 +1507,6 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame)
         ret = ff_decode_frame_props_from_pkt(avctx, frame, pkt);
         if (ret < 0)
             return ret;
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->pkt_size = pkt->stream_index;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     }
 
     ret = fill_frame_props(avctx, frame);
diff --git a/libavcodec/libuavs3d.c b/libavcodec/libuavs3d.c
index 53b5faafc5..4122f60480 100644
--- a/libavcodec/libuavs3d.c
+++ b/libavcodec/libuavs3d.c
@@ -79,12 +79,6 @@ static void uavs3d_output_callback(uavs3d_io_frm_t *dec_frame) {
 
     frm->pts       = dec_frame->pts;
     frm->pkt_dts   = dec_frame->dts;
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-    frm->pkt_pos   = dec_frame->pkt_pos;
-    frm->pkt_size  = dec_frame->pkt_size;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
     if (dec_frame->type < 0 || dec_frame->type >= FF_ARRAY_ELEMS(ff_avs3_image_type)) {
         av_log(NULL, AV_LOG_WARNING, "Error frame type in uavs3d: %d.\n", dec_frame->type);
@@ -176,12 +170,6 @@ static int libuavs3d_decode_frame(AVCodecContext *avctx, AVFrame *frm,
         uavs3d_io_frm_t *frm_dec = &h->dec_frame;
 
         buf_end = buf + buf_size;
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-        frm_dec->pkt_pos  = avpkt->pos;
-        frm_dec->pkt_size = avpkt->size;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
         while (!finish) {
             int bs_len;
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index 17657a0638..548183d633 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -353,11 +353,6 @@ static int create_subcc_packet(AVFormatContext *avctx, AVFrame *frame,
     memcpy(lavfi->subcc_packet.data, sd->data, sd->size);
     lavfi->subcc_packet.stream_index = stream_idx;
     lavfi->subcc_packet.pts = frame->pts;
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-    lavfi->subcc_packet.pos = frame->pkt_pos;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     return 0;
 }
 
@@ -466,11 +461,6 @@ static int lavfi_read_packet(AVFormatContext *avctx, AVPacket *pkt)
 
     pkt->stream_index = stream_idx;
     pkt->pts = frame->pts;
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-    pkt->pos = frame->pkt_pos;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
     av_frame_free(&frame_to_free);
 
diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c
index 18b1616cab..471bffeceb 100644
--- a/libavfilter/af_volume.c
+++ b/libavfilter/af_volume.c
@@ -48,9 +48,6 @@ static const char *const var_names[] = {
     "nb_channels",         ///< number of channels
     "nb_consumed_samples", ///< number of samples consumed by the filter
     "nb_samples",          ///< number of samples in the current frame
-#if FF_API_FRAME_PKT
-    "pos",                 ///< position in the file of the frame
-#endif
     "pts",                 ///< frame presentation timestamp
     "sample_rate",         ///< sample rate
     "startpts",            ///< PTS at start of stream
@@ -289,9 +286,6 @@ static int config_output(AVFilterLink *outlink)
     vol->var_values[VAR_N] =
     vol->var_values[VAR_NB_CONSUMED_SAMPLES] =
     vol->var_values[VAR_NB_SAMPLES] =
-#if FF_API_FRAME_PKT
-    vol->var_values[VAR_POS] =
-#endif
     vol->var_values[VAR_PTS] =
     vol->var_values[VAR_STARTPTS] =
     vol->var_values[VAR_STARTT] =
@@ -383,15 +377,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
     vol->var_values[VAR_T  ] = TS2T(buf->pts, inlink->time_base);
     vol->var_values[VAR_N  ] = inl->frame_count_out;
 
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-    {
-        int64_t pos;
-        pos = buf->pkt_pos;
-        vol->var_values[VAR_POS] = pos == -1 ? NAN : pos;
-    }
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     if (vol->eval_mode == EVAL_MODE_FRAME)
         set_volume(ctx);
 
diff --git a/libavfilter/af_volume.h b/libavfilter/af_volume.h
index c3756ee969..e9527eea8a 100644
--- a/libavfilter/af_volume.h
+++ b/libavfilter/af_volume.h
@@ -47,9 +47,6 @@ enum VolumeVarName {
     VAR_NB_CHANNELS,
     VAR_NB_CONSUMED_SAMPLES,
     VAR_NB_SAMPLES,
-#if FF_API_FRAME_PKT
-    VAR_POS,
-#endif
     VAR_PTS,
     VAR_SAMPLE_RATE,
     VAR_STARTPTS,
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index cac5cf8997..64c1075c40 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -550,9 +550,6 @@ static int request_frame_to_filter(AVFilterLink *link)
 static const char *const var_names[] = {
     "t",
     "n",
-#if FF_API_FRAME_PKT
-    "pos",
-#endif
     "w",
     "h",
     NULL
@@ -561,9 +558,6 @@ static const char *const var_names[] = {
 enum {
     VAR_T,
     VAR_N,
-#if FF_API_FRAME_PKT
-    VAR_POS,
-#endif
     VAR_W,
     VAR_H,
     VAR_VARS_NB
@@ -1012,11 +1006,6 @@ static int evaluate_timeline_at_frame(AVFilterLink *link, const AVFrame *frame)
     AVFilterContext *dstctx = link->dst;
     FFFilterContext *dsti = fffilterctx(dstctx);
     int64_t pts = frame->pts;
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-    int64_t pos = frame->pkt_pos;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
     if (!dstctx->enable_str)
         return 1;
@@ -1025,9 +1014,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
     dsti->var_values[VAR_T] = pts == AV_NOPTS_VALUE ? NAN : pts * av_q2d(link->time_base);
     dsti->var_values[VAR_W] = link->w;
     dsti->var_values[VAR_H] = link->h;
-#if FF_API_FRAME_PKT
-    dsti->var_values[VAR_POS] = pos == -1 ? NAN : pos;
-#endif
 
     return fabs(av_expr_eval(dsti->enable, dsti->var_values, NULL)) >= 0.5;
 }
diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c
index 1f2a9a59fc..aa374c6ad0 100644
--- a/libavfilter/f_select.c
+++ b/libavfilter/f_select.c
@@ -82,9 +82,6 @@ static const char *const var_names[] = {
     "prev_selected_n",   ///< number of the last selected frame
 
     "key",               ///< tell if the frame is a key frame
-#if FF_API_FRAME_PKT
-    "pos",               ///< original position in the file of the frame
-#endif
 
     "scene",
 
@@ -141,9 +138,6 @@ enum var_name {
     VAR_PREV_SELECTED_N,
 
     VAR_KEY,
-#if FF_API_FRAME_PKT
-    VAR_POS,
-#endif
 
     VAR_SCENE,
 
@@ -358,11 +352,6 @@ static void select_frame(AVFilterContext *ctx, AVFrame *frame)
     select->var_values[VAR_N  ] = inl->frame_count_out;
     select->var_values[VAR_PTS] = TS2D(frame->pts);
     select->var_values[VAR_T  ] = TS2D(frame->pts) * av_q2d(inlink->time_base);
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-    select->var_values[VAR_POS] = frame->pkt_pos == -1 ? NAN : frame->pkt_pos;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     select->var_values[VAR_KEY] = !!(frame->flags & AV_FRAME_FLAG_KEY);
     select->var_values[VAR_CONCATDEC_SELECT] = get_concatdec_select(frame, av_rescale_q(frame->pts, inlink->time_base, AV_TIME_BASE_Q));
 
diff --git a/libavfilter/f_sendcmd.c b/libavfilter/f_sendcmd.c
index d5d72e6410..9201fb5381 100644
--- a/libavfilter/f_sendcmd.c
+++ b/libavfilter/f_sendcmd.c
@@ -44,9 +44,6 @@
 static const char *const var_names[] = {
     "N",     /* frame number */
     "T",     /* frame time in seconds */
-#if FF_API_FRAME_PKT
-    "POS",   /* original position in the file of the frame */
-#endif
     "PTS",   /* frame pts */
     "TS",    /* interval start time in seconds */
     "TE",    /* interval end time in seconds */
@@ -59,9 +56,6 @@ static const char *const var_names[] = {
 enum var_name {
     VAR_N,
     VAR_T,
-#if FF_API_FRAME_PKT
-    VAR_POS,
-#endif
     VAR_PTS,
     VAR_TS,
     VAR_TE,
@@ -537,11 +531,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *ref)
                         double current = TS2T(ref->pts, inlink->time_base);
 
                         var_values[VAR_N]   = inl->frame_count_in;
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-                        var_values[VAR_POS] = ref->pkt_pos == -1 ? NAN : ref->pkt_pos;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
                         var_values[VAR_PTS] = TS2D(ref->pts);
                         var_values[VAR_T]   = current;
                         var_values[VAR_TS]  = start;
diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c
index 397be5c817..0565533ed2 100644
--- a/libavfilter/setpts.c
+++ b/libavfilter/setpts.c
@@ -44,9 +44,6 @@ static const char *const var_names[] = {
     "N",           ///< frame / sample number (starting at zero)
     "NB_CONSUMED_SAMPLES", ///< number of samples consumed by the filter (only audio)
     "NB_SAMPLES",  ///< number of samples in the current frame (only audio)
-#if FF_API_FRAME_PKT
-    "POS",         ///< original position in the file of the frame
-#endif
     "PREV_INPTS",  ///< previous  input PTS
     "PREV_INT",    ///< previous  input time in seconds
     "PREV_OUTPTS", ///< previous output PTS
@@ -72,9 +69,6 @@ enum var_name {
     VAR_N,
     VAR_NB_CONSUMED_SAMPLES,
     VAR_NB_SAMPLES,
-#if FF_API_FRAME_PKT
-    VAR_POS,
-#endif
     VAR_PREV_INPTS,
     VAR_PREV_INT,
     VAR_PREV_OUTPTS,
@@ -182,11 +176,6 @@ static double eval_pts(SetPTSContext *setpts, AVFilterLink *inlink, AVFrame *fra
     }
     V(PTS       ) = TS2D(pts);
     V(T         ) = TS2T(pts, inlink->time_base);
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-    V(POS       ) = !frame || frame->pkt_pos == -1 ? NAN : frame->pkt_pos;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     V(RTCTIME   ) = av_gettime();
 
     if (frame) {
diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
index fd0750c755..fb3f30a758 100644
--- a/libavfilter/vf_crop.c
+++ b/libavfilter/vf_crop.c
@@ -50,9 +50,6 @@ static const char *const var_names[] = {
     "x",
     "y",
     "n",            ///< number of frame
-#if FF_API_FRAME_PKT
-    "pos",          ///< position in the file
-#endif
     "t",            ///< timestamp expressed in seconds
     NULL
 };
@@ -70,9 +67,6 @@ enum var_name {
     VAR_X,
     VAR_Y,
     VAR_N,
-#if FF_API_FRAME_PKT
-    VAR_POS,
-#endif
     VAR_T,
     VAR_VARS_NB
 };
@@ -152,9 +146,6 @@ static int config_input(AVFilterLink *link)
     s->var_values[VAR_OUT_H] = s->var_values[VAR_OH] = NAN;
     s->var_values[VAR_N]     = 0;
     s->var_values[VAR_T]     = NAN;
-#if FF_API_FRAME_PKT
-    s->var_values[VAR_POS]   = NAN;
-#endif
 
     av_image_fill_max_pixsteps(s->max_step, NULL, pix_desc);
 
@@ -267,12 +258,6 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
     s->var_values[VAR_N] = l->frame_count_out;
     s->var_values[VAR_T] = frame->pts == AV_NOPTS_VALUE ?
         NAN : frame->pts * av_q2d(link->time_base);
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-    s->var_values[VAR_POS] = frame->pkt_pos == -1 ?
-        NAN : frame->pkt_pos;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     s->var_values[VAR_X] = av_expr_eval(s->x_pexpr, s->var_values, NULL);
     s->var_values[VAR_Y] = av_expr_eval(s->y_pexpr, s->var_values, NULL);
     /* It is necessary if x is expressed from y  */
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index e4662f3a45..6c57652748 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -102,12 +102,6 @@ static const char *const var_names[] = {
     "x",
     "y",
     "pict_type",
-#if FF_API_FRAME_PKT
-    "pkt_pos",
-#endif
-#if FF_API_FRAME_PKT
-    "pkt_size",
-#endif
     "duration",
     NULL
 };
@@ -150,12 +144,6 @@ enum var_name {
     VAR_X,
     VAR_Y,
     VAR_PICT_TYPE,
-#if FF_API_FRAME_PKT
-    VAR_PKT_POS,
-#endif
-#if FF_API_FRAME_PKT
-    VAR_PKT_SIZE,
-#endif
     VAR_DURATION,
     VAR_VARS_NB
 };
@@ -1878,12 +1866,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
         NAN : frame->pts * av_q2d(inlink->time_base);
 
     s->var_values[VAR_PICT_TYPE] = frame->pict_type;
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-    s->var_values[VAR_PKT_POS] = frame->pkt_pos;
-    s->var_values[VAR_PKT_SIZE] = frame->pkt_size;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     s->var_values[VAR_DURATION] = frame->duration * av_q2d(inlink->time_base);
 
     s->metadata = frame->metadata;
diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c
index 2d6822348f..c9922c41b1 100644
--- a/libavfilter/vf_eq.c
+++ b/libavfilter/vf_eq.c
@@ -238,14 +238,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
     desc = av_pix_fmt_desc_get(inlink->format);
 
     eq->var_values[VAR_N]   = inl->frame_count_out;
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-    {
-        int64_t pos = in->pkt_pos;
-        eq->var_values[VAR_POS] = pos == -1 ? NAN : pos;
-    }
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     eq->var_values[VAR_T]   = TS2T(in->pts, inlink->time_base);
 
     if (eq->eval_mode == EVAL_MODE_FRAME) {
diff --git a/libavfilter/vf_eq.h b/libavfilter/vf_eq.h
index 50850ea42c..cbca3bc27c 100644
--- a/libavfilter/vf_eq.h
+++ b/libavfilter/vf_eq.h
@@ -30,9 +30,6 @@
 
 static const char *const var_names[] = {
     "n",   // frame count
-#if FF_API_FRAME_PKT
-    "pos", // frame position
-#endif
     "r",   // frame rate
     "t",   // timestamp expressed in seconds
     NULL
@@ -40,9 +37,6 @@ static const char *const var_names[] = {
 
 enum var_name {
     VAR_N,
-#if FF_API_FRAME_PKT
-    VAR_POS,
-#endif
     VAR_R,
     VAR_T,
     VAR_NB
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index 528b845c6c..8560ed7c17 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -55,9 +55,6 @@ static const char *const var_names[] = {
     "x",
     "y",
     "n",            ///< number of frame
-#if FF_API_FRAME_PKT
-    "pos",          ///< position in the file
-#endif
     "t",            ///< timestamp expressed in seconds
     NULL
 };
@@ -305,9 +302,6 @@ static int config_input_overlay(AVFilterLink *inlink)
     s->var_values[VAR_Y]     = NAN;
     s->var_values[VAR_N]     = 0;
     s->var_values[VAR_T]     = NAN;
-#if FF_API_FRAME_PKT
-    s->var_values[VAR_POS]   = NAN;
-#endif
 
     if ((ret = set_expr(&s->x_pexpr,      s->x_expr,      "x",      ctx)) < 0 ||
         (ret = set_expr(&s->y_pexpr,      s->y_expr,      "y",      ctx)) < 0)
@@ -897,14 +891,6 @@ static int do_blend(FFFrameSync *fs)
         s->var_values[VAR_N] = inl->frame_count_out;
         s->var_values[VAR_T] = mainpic->pts == AV_NOPTS_VALUE ?
             NAN : mainpic->pts * av_q2d(inlink->time_base);
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-        {
-            int64_t pos = mainpic->pkt_pos;
-            s->var_values[VAR_POS] = pos == -1 ? NAN : pos;
-        }
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
         s->var_values[VAR_OVERLAY_W] = s->var_values[VAR_OW] = second->width;
         s->var_values[VAR_OVERLAY_H] = s->var_values[VAR_OH] = second->height;
diff --git a/libavfilter/vf_overlay.h b/libavfilter/vf_overlay.h
index 59749648c3..3ad378ce42 100644
--- a/libavfilter/vf_overlay.h
+++ b/libavfilter/vf_overlay.h
@@ -34,9 +34,6 @@ enum var_name {
     VAR_X,
     VAR_Y,
     VAR_N,
-#if FF_API_FRAME_PKT
-    VAR_POS,
-#endif
     VAR_T,
     VAR_VARS_NB
 };
diff --git a/libavfilter/vf_overlay_cuda.c b/libavfilter/vf_overlay_cuda.c
index 8680fc0c4a..4708b34d30 100644
--- a/libavfilter/vf_overlay_cuda.c
+++ b/libavfilter/vf_overlay_cuda.c
@@ -67,9 +67,6 @@ enum var_name {
     VAR_X,
     VAR_Y,
     VAR_N,
-#if FF_API_FRAME_PKT
-    VAR_POS,
-#endif
     VAR_T,
     VAR_VARS_NB
 };
@@ -88,9 +85,6 @@ static const char *const var_names[] = {
     "x",
     "y",
     "n",            ///< number of frame
-#if FF_API_FRAME_PKT
-    "pos",          ///< position in the file
-#endif
     "t",            ///< timestamp expressed in seconds
     NULL
 };
@@ -274,15 +268,6 @@ static int overlay_cuda_blend(FFFrameSync *fs)
         ctx->var_values[VAR_T] = input_main->pts == AV_NOPTS_VALUE ?
             NAN : input_main->pts * av_q2d(inlink->time_base);
 
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-        {
-            int64_t pos = input_main->pkt_pos;
-            ctx->var_values[VAR_POS] = pos == -1 ? NAN : pos;
-        }
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
         ctx->var_values[VAR_OVERLAY_W] = ctx->var_values[VAR_OW] = input_overlay->width;
         ctx->var_values[VAR_OVERLAY_H] = ctx->var_values[VAR_OH] = input_overlay->height;
         ctx->var_values[VAR_MAIN_W   ] = ctx->var_values[VAR_MW] = input_main->width;
@@ -365,9 +350,6 @@ static int config_input_overlay(AVFilterLink *inlink)
     s->var_values[VAR_Y]   = NAN;
     s->var_values[VAR_N]   = 0;
     s->var_values[VAR_T]   = NAN;
-#if FF_API_FRAME_PKT
-    s->var_values[VAR_POS] = NAN;
-#endif
 
     if ((ret = set_expr(&s->x_pexpr, s->x_expr, "x", ctx)) < 0 ||
         (ret = set_expr(&s->y_pexpr, s->y_expr, "y", ctx)) < 0)
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index 8c03d7fd8d..606bf9ba10 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -57,9 +57,6 @@ static const char *const var_names[] = {
     "ovsub",
     "n",
     "t",
-#if FF_API_FRAME_PKT
-    "pos",
-#endif
     "ref_w", "rw",
     "ref_h", "rh",
     "ref_a",
@@ -98,9 +95,6 @@ enum var_name {
     VAR_OVSUB,
     VAR_N,
     VAR_T,
-#if FF_API_FRAME_PKT
-    VAR_POS,
-#endif
     VAR_REF_W, VAR_RW,
     VAR_REF_H, VAR_RH,
     VAR_REF_A,
@@ -266,9 +260,6 @@ static int check_exprs(AVFilterContext *ctx)
     if (scale->eval_mode == EVAL_MODE_INIT &&
         (vars_w[VAR_N]            || vars_h[VAR_N]           ||
          vars_w[VAR_T]            || vars_h[VAR_T]           ||
-#if FF_API_FRAME_PKT
-         vars_w[VAR_POS]          || vars_h[VAR_POS]         ||
-#endif
          vars_w[VAR_S2R_MAIN_N]   || vars_h[VAR_S2R_MAIN_N]  ||
          vars_w[VAR_S2R_MAIN_T]   || vars_h[VAR_S2R_MAIN_T]  ||
          vars_w[VAR_S2R_MAIN_POS] || vars_h[VAR_S2R_MAIN_POS]) ) {
@@ -790,16 +781,8 @@ static int scale_frame(AVFilterLink *link, AVFrame **frame_in,
         if (scale->eval_mode == EVAL_MODE_FRAME &&
             !frame_changed &&
             !IS_SCALE2REF(ctx) &&
-            !(vars_w[VAR_N] || vars_w[VAR_T]
-#if FF_API_FRAME_PKT
-              || vars_w[VAR_POS]
-#endif
-              ) &&
-            !(vars_h[VAR_N] || vars_h[VAR_T]
-#if FF_API_FRAME_PKT
-              || vars_h[VAR_POS]
-#endif
-              ) &&
+            !(vars_w[VAR_N] || vars_w[VAR_T]) &&
+            !(vars_h[VAR_N] || vars_h[VAR_T]) &&
             scale->w && scale->h)
             goto scale;
 
@@ -821,19 +804,9 @@ static int scale_frame(AVFilterLink *link, AVFrame **frame_in,
         if (IS_SCALE2REF(ctx)) {
             scale->var_values[VAR_S2R_MAIN_N] = inl->frame_count_out;
             scale->var_values[VAR_S2R_MAIN_T] = TS2T(in->pts, link->time_base);
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-            scale->var_values[VAR_S2R_MAIN_POS] = in->pkt_pos == -1 ? NAN : in->pkt_pos;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         } else {
             scale->var_values[VAR_N] = inl->frame_count_out;
             scale->var_values[VAR_T] = TS2T(in->pts, link->time_base);
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-            scale->var_values[VAR_POS] = in->pkt_pos == -1 ? NAN : in->pkt_pos;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         }
 
         link->dst->inputs[0]->format        = in->format;
@@ -975,11 +948,6 @@ static int do_scale(FFFrameSync *fs)
         if (scale->eval_mode == EVAL_MODE_FRAME) {
             scale->var_values[VAR_REF_N] = rl->frame_count_out;
             scale->var_values[VAR_REF_T] = TS2T(ref->pts, reflink->time_base);
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-            scale->var_values[VAR_REF_POS] = ref->pkt_pos == -1 ? NAN : ref->pkt_pos;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         }
     }
 
@@ -1040,11 +1008,6 @@ static int filter_frame_ref(AVFilterLink *link, AVFrame *in)
     if (scale->eval_mode == EVAL_MODE_FRAME) {
         scale->var_values[VAR_N] = l->frame_count_out;
         scale->var_values[VAR_T] = TS2T(in->pts, link->time_base);
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-        scale->var_values[VAR_POS] = in->pkt_pos == -1 ? NAN : in->pkt_pos;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     }
 
     return ff_filter_frame(outlink, in);
diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c
index 618788bc36..1b1b7b9fc9 100644
--- a/libavfilter/vf_scale_npp.c
+++ b/libavfilter/vf_scale_npp.c
@@ -85,9 +85,6 @@ static const char *const var_names[] = {
     "dar",
     "n",
     "t",
-#if FF_API_FRAME_PKT
-    "pos",
-#endif
     "main_w",
     "main_h",
     "main_a",
@@ -95,9 +92,6 @@ static const char *const var_names[] = {
     "main_dar", "mdar",
     "main_n",
     "main_t",
-#if FF_API_FRAME_PKT
-    "main_pos",
-#endif
     NULL
 };
 
@@ -111,9 +105,6 @@ enum var_name {
     VAR_DAR,
     VAR_N,
     VAR_T,
-#if FF_API_FRAME_PKT
-    VAR_POS,
-#endif
     VAR_S2R_MAIN_W,
     VAR_S2R_MAIN_H,
     VAR_S2R_MAIN_A,
@@ -121,9 +112,6 @@ enum var_name {
     VAR_S2R_MAIN_DAR, VAR_S2R_MDAR,
     VAR_S2R_MAIN_N,
     VAR_S2R_MAIN_T,
-#if FF_API_FRAME_PKT
-    VAR_S2R_MAIN_POS,
-#endif
     VARS_NB
 };
 
@@ -215,11 +203,7 @@ static int check_exprs(AVFilterContext* ctx)
          vars_w[VAR_S2R_MAIN_DAR] || vars_h[VAR_S2R_MAIN_DAR] ||
          vars_w[VAR_S2R_MDAR]     || vars_h[VAR_S2R_MDAR]     ||
          vars_w[VAR_S2R_MAIN_N]   || vars_h[VAR_S2R_MAIN_N]   ||
-         vars_w[VAR_S2R_MAIN_T]   || vars_h[VAR_S2R_MAIN_T]
-#if FF_API_FRAME_PKT
-         || vars_w[VAR_S2R_MAIN_POS] || vars_h[VAR_S2R_MAIN_POS]
-#endif
-         )) {
+         vars_w[VAR_S2R_MAIN_T]   || vars_h[VAR_S2R_MAIN_T])) {
         av_log(ctx, AV_LOG_ERROR, "Expressions with scale2ref_npp variables are not valid in scale_npp filter.\n");
         return AVERROR(EINVAL);
     }
@@ -227,15 +211,8 @@ static int check_exprs(AVFilterContext* ctx)
     if (scale->eval_mode == EVAL_MODE_INIT &&
         (vars_w[VAR_N]            || vars_h[VAR_N]           ||
          vars_w[VAR_T]            || vars_h[VAR_T]           ||
-#if FF_API_FRAME_PKT
-         vars_w[VAR_POS]          || vars_h[VAR_POS]         ||
-#endif
          vars_w[VAR_S2R_MAIN_N]   || vars_h[VAR_S2R_MAIN_N]  ||
-         vars_w[VAR_S2R_MAIN_T]   || vars_h[VAR_S2R_MAIN_T]
-#if FF_API_FRAME_PKT
-         || vars_w[VAR_S2R_MAIN_POS] || vars_h[VAR_S2R_MAIN_POS]
-#endif
-         ) ) {
+         vars_w[VAR_S2R_MAIN_T]   || vars_h[VAR_S2R_MAIN_T])) {
         av_log(ctx, AV_LOG_ERROR, "Expressions with frame variables 'n', 't', are not valid in init eval_mode.\n");
         return AVERROR(EINVAL);
     }
@@ -821,16 +798,8 @@ static int nppscale_scale(AVFilterLink *link, AVFrame *out, AVFrame *in)
         av_expr_count_vars(s->h_pexpr, vars_h, VARS_NB);
 
         if (s->eval_mode == EVAL_MODE_FRAME && !frame_changed && !IS_SCALE2REF(ctx) &&
-            !(vars_w[VAR_N] || vars_w[VAR_T]
-#if FF_API_FRAME_PKT
-              || vars_w[VAR_POS]
-#endif
-              ) &&
-            !(vars_h[VAR_N] || vars_h[VAR_T]
-#if FF_API_FRAME_PKT
-              || vars_h[VAR_POS]
-#endif
-              ) && s->w && s->h)
+            !(vars_w[VAR_N] || vars_w[VAR_T]) &&
+            !(vars_h[VAR_N] || vars_h[VAR_T]) && s->w && s->h)
             goto scale;
 
         if (s->eval_mode == EVAL_MODE_INIT) {
@@ -851,19 +820,9 @@ static int nppscale_scale(AVFilterLink *link, AVFrame *out, AVFrame *in)
         if (IS_SCALE2REF(ctx)) {
             s->var_values[VAR_S2R_MAIN_N] = inl->frame_count_out;
             s->var_values[VAR_S2R_MAIN_T] = TS2T(in->pts, link->time_base);
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-            s->var_values[VAR_S2R_MAIN_POS] = in->pkt_pos == -1 ? NAN : in->pkt_pos;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         } else {
             s->var_values[VAR_N] = inl->frame_count_out;
             s->var_values[VAR_T] = TS2T(in->pts, link->time_base);
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-            s->var_values[VAR_POS] = in->pkt_pos == -1 ? NAN : in->pkt_pos;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         }
 
         link->format = in->format;
@@ -985,11 +944,6 @@ static int nppscale_filter_frame_ref(AVFilterLink *link, AVFrame *in)
     if (scale->eval_mode == EVAL_MODE_FRAME) {
         scale->var_values[VAR_N] = inl->frame_count_out;
         scale->var_values[VAR_T] = TS2T(in->pts, link->time_base);
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-        scale->var_values[VAR_POS] = in->pkt_pos == -1 ? NAN : in->pkt_pos;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     }
 
     return ff_filter_frame(outlink, in);
diff --git a/libavfilter/vf_swaprect.c b/libavfilter/vf_swaprect.c
index 83afe49ec1..5d93f51c30 100644
--- a/libavfilter/vf_swaprect.c
+++ b/libavfilter/vf_swaprect.c
@@ -68,16 +68,8 @@ static int query_formats(const AVFilterContext *ctx,
                                   ff_formats_pixdesc_filter(0, reject_flags));
 }
 
-static const char *const var_names[] = {   "w",   "h",   "a",   "n",   "t",
-#if FF_API_FRAME_PKT
-                                                                           "pos",
-#endif
-                                                                                      "sar",   "dar",        NULL };
-enum                                   { VAR_W, VAR_H, VAR_A, VAR_N, VAR_T,
-#if FF_API_FRAME_PKT
-                                                                           VAR_POS,
-#endif
-                                                                                    VAR_SAR, VAR_DAR, VAR_VARS_NB };
+static const char *const var_names[] = {   "w",   "h",   "a",   "n",   "t",   "sar",   "dar",        NULL };
+enum                                   { VAR_W, VAR_H, VAR_A, VAR_N, VAR_T, VAR_SAR, VAR_DAR, VAR_VARS_NB };
 
 static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 {
@@ -103,11 +95,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
     var_values[VAR_DAR] = var_values[VAR_A] * var_values[VAR_SAR];
     var_values[VAR_N]   = inl->frame_count_out;
     var_values[VAR_T]   = in->pts == AV_NOPTS_VALUE ? NAN : in->pts * av_q2d(inlink->time_base);
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-    var_values[VAR_POS] = in->pkt_pos == -1 ? NAN : in->pkt_pos;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
     ret = av_expr_parse_and_eval(&dw, s->w,
                                  var_names, &var_values[0],
diff --git a/libavutil/frame.c b/libavutil/frame.c
index 492b467ebd..5434021f44 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -69,12 +69,6 @@ static void get_frame_defaults(AVFrame *frame)
     frame->pkt_dts               = AV_NOPTS_VALUE;
     frame->best_effort_timestamp = AV_NOPTS_VALUE;
     frame->duration            = 0;
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-    frame->pkt_pos             = -1;
-    frame->pkt_size            = -1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     frame->time_base           = (AVRational){ 0, 1 };
     frame->sample_aspect_ratio = (AVRational){ 0, 1 };
     frame->format              = -1; /* unknown */
@@ -348,12 +342,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
     dst->sample_rate            = src->sample_rate;
     dst->opaque                 = src->opaque;
     dst->pkt_dts                = src->pkt_dts;
-#if FF_API_FRAME_PKT
-FF_DISABLE_DEPRECATION_WARNINGS
-    dst->pkt_pos                = src->pkt_pos;
-    dst->pkt_size               = src->pkt_size;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     dst->time_base              = src->time_base;
     dst->quality                = src->quality;
     dst->best_effort_timestamp  = src->best_effort_timestamp;
diff --git a/libavutil/frame.h b/libavutil/frame.h
index 49260ae2dd..5f89acbe2f 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -716,18 +716,6 @@ typedef struct AVFrame {
      */
     int64_t best_effort_timestamp;
 
-#if FF_API_FRAME_PKT
-    /**
-     * reordered pos from the last AVPacket that has been input into the decoder
-     * - encoding: unused
-     * - decoding: Read by user.
-     * @deprecated use AV_CODEC_FLAG_COPY_OPAQUE to pass through arbitrary user
-     *             data from packets to frames
-     */
-    attribute_deprecated
-    int64_t pkt_pos;
-#endif
-
     /**
      * metadata.
      * - encoding: Set by user.
@@ -748,20 +736,6 @@ typedef struct AVFrame {
 #define FF_DECODE_ERROR_CONCEALMENT_ACTIVE  4
 #define FF_DECODE_ERROR_DECODE_SLICES       8
 
-#if FF_API_FRAME_PKT
-    /**
-     * size of the corresponding packet containing the compressed
-     * frame.
-     * It is set to a negative value if unknown.
-     * - encoding: unused
-     * - decoding: set by libavcodec, read by user.
-     * @deprecated use AV_CODEC_FLAG_COPY_OPAQUE to pass through arbitrary user
-     *             data from packets to frames
-     */
-    attribute_deprecated
-    int pkt_size;
-#endif
-
     /**
      * For hwaccel-format frames, this should be a reference to the
      * AVHWFramesContext describing the frame.
diff --git a/libavutil/version.h b/libavutil/version.h
index 4c8282a35c..879444718a 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -105,7 +105,6 @@
  * @{
  */
 
-#define FF_API_FRAME_PKT                (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_INTERLACED_FRAME         (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_FRAME_KEY                (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_PALETTE_HAS_CHANGED      (LIBAVUTIL_VERSION_MAJOR < 60)
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 24/30] avutil: remove deprecated FF_API_INTERLACED_FRAME
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (22 preceding siblings ...)
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 23/30] avutil: remove deprecated FF_API_FRAME_PKT James Almer
@ 2025-02-23 22:06 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 25/30] avutil: remove deprecated FF_API_FRAME_KEY James Almer
                   ` (5 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2023-05-04.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/decode.c                |  6 ------
 libavcodec/encode.c                |  8 --------
 libavfilter/buffersrc.c            |  9 ---------
 libavfilter/qsvvpp.c               |  5 -----
 libavfilter/vf_coreimage.m         |  3 ---
 libavfilter/vf_deinterlace_vaapi.c |  5 -----
 libavfilter/vf_estdif.c            |  5 -----
 libavfilter/vf_field.c             |  5 -----
 libavfilter/vf_fieldhint.c         | 10 ----------
 libavfilter/vf_fieldmatch.c        | 10 ----------
 libavfilter/vf_fieldorder.c        |  5 -----
 libavfilter/vf_idet.c              | 32 ------------------------------
 libavfilter/vf_kerndeint.c         |  5 -----
 libavfilter/vf_nnedi.c             |  5 -----
 libavfilter/vf_separatefields.c    |  5 -----
 libavfilter/vf_setparams.c         | 11 ----------
 libavfilter/vf_telecine.c          | 18 -----------------
 libavfilter/vf_tinterlace.c        | 23 ---------------------
 libavfilter/vf_w3fdif.c            |  5 -----
 libavfilter/vf_weave.c             |  6 ------
 libavfilter/vsrc_gradients.c       |  5 -----
 libavfilter/vsrc_testsrc.c         |  5 -----
 libavfilter/yadif_common.c         | 10 ----------
 libavutil/frame.c                  |  6 ------
 libavutil/frame.h                  | 18 -----------------
 libavutil/version.h                |  1 -
 26 files changed, 226 deletions(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 271345cff1..455adff25c 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -674,12 +674,6 @@ static int decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame)
 FF_DISABLE_DEPRECATION_WARNINGS
         frame->key_frame = !!(frame->flags & AV_FRAME_FLAG_KEY);
 FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->interlaced_frame = !!(frame->flags & AV_FRAME_FLAG_INTERLACED);
-        frame->top_field_first =  !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST);
-FF_ENABLE_DEPRECATION_WARNINGS
 #endif
         frame->best_effort_timestamp = guess_correct_pts(dc,
                                                          frame->pts,
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index 7935bb971b..d831cac13b 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -219,14 +219,6 @@ FF_DISABLE_DEPRECATION_WARNINGS
     if (frame->key_frame)
         frame->flags |= AV_FRAME_FLAG_KEY;
 FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    if (frame->interlaced_frame)
-        frame->flags |= AV_FRAME_FLAG_INTERLACED;
-    if (frame->top_field_first)
-        frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST;
-FF_ENABLE_DEPRECATION_WARNINGS
 #endif
 
     return 0;
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index 7edec7ee77..d41d1112d4 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -252,15 +252,6 @@ int attribute_align_arg av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFra
             return AVERROR(ENOMEM);
     }
 
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    if (copy->interlaced_frame)
-        copy->flags |= AV_FRAME_FLAG_INTERLACED;
-    if (copy->top_field_first)
-        copy->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
 #if FF_API_FRAME_KEY
 FF_DISABLE_DEPRECATION_WARNINGS
     if (copy->key_frame)
diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c
index 67ae23b165..c3685f126c 100644
--- a/libavfilter/qsvvpp.c
+++ b/libavfilter/qsvvpp.c
@@ -536,11 +536,6 @@ static QSVFrame *query_frame(QSVVPPContext *s, AVFilterLink *outlink, const AVFr
         mfxExtBuffer *extbuf = s->vpp_param.ExtParam[i];
 
         if (extbuf->BufferId == MFX_EXTBUFF_VPP_DEINTERLACING) {
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-            out_frame->frame->interlaced_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
             out_frame->frame->flags &= ~AV_FRAME_FLAG_INTERLACED;
             break;
         }
diff --git a/libavfilter/vf_coreimage.m b/libavfilter/vf_coreimage.m
index ec7eaa4b80..9e03c46ce5 100644
--- a/libavfilter/vf_coreimage.m
+++ b/libavfilter/vf_coreimage.m
@@ -304,9 +304,6 @@ FF_DISABLE_DEPRECATION_WARNINGS
 #if FF_API_FRAME_KEY
     frame->key_frame           = 1;
 #endif
-#if FF_API_INTERLACED_FRAME
-    frame->interlaced_frame    = 0;
-#endif
 FF_ENABLE_DEPRECATION_WARNINGS
 
     frame->pict_type           = AV_PICTURE_TYPE_I;
diff --git a/libavfilter/vf_deinterlace_vaapi.c b/libavfilter/vf_deinterlace_vaapi.c
index e37c2835bb..4bb109336a 100644
--- a/libavfilter/vf_deinterlace_vaapi.c
+++ b/libavfilter/vf_deinterlace_vaapi.c
@@ -304,11 +304,6 @@ static int deint_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
                 output_frame->pts = input_frame->pts +
                     ctx->frame_queue[current_frame_index + 1]->pts;
         }
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        output_frame->interlaced_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         output_frame->flags &= ~AV_FRAME_FLAG_INTERLACED;
 
         av_log(avctx, AV_LOG_DEBUG, "Filter output: %s, %ux%u (%"PRId64").\n",
diff --git a/libavfilter/vf_estdif.c b/libavfilter/vf_estdif.c
index 08360533d1..b8289a6e96 100644
--- a/libavfilter/vf_estdif.c
+++ b/libavfilter/vf_estdif.c
@@ -440,11 +440,6 @@ static int filter(AVFilterContext *ctx, AVFrame *in, int64_t pts, int64_t durati
     if (!out)
         return AVERROR(ENOMEM);
     av_frame_copy_props(out, in);
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    out->interlaced_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     out->flags &= ~AV_FRAME_FLAG_INTERLACED;
     out->pts = pts;
     out->duration = duration;
diff --git a/libavfilter/vf_field.c b/libavfilter/vf_field.c
index 801fc42ce5..40fcf73bc4 100644
--- a/libavfilter/vf_field.c
+++ b/libavfilter/vf_field.c
@@ -73,11 +73,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
     int i;
 
     inpicref->height = outlink->h;
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    inpicref->interlaced_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     inpicref->flags &= ~AV_FRAME_FLAG_INTERLACED;
 
     for (i = 0; i < field->nb_planes; i++) {
diff --git a/libavfilter/vf_fieldhint.c b/libavfilter/vf_fieldhint.c
index 20f13e34d3..6f4403a48d 100644
--- a/libavfilter/vf_fieldhint.c
+++ b/libavfilter/vf_fieldhint.c
@@ -223,19 +223,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 
     switch (hint) {
     case '+':
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        out->interlaced_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         out->flags |= AV_FRAME_FLAG_INTERLACED;
         break;
     case '-':
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        out->interlaced_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         out->flags &= ~AV_FRAME_FLAG_INTERLACED;
         break;
     case '=':
diff --git a/libavfilter/vf_fieldmatch.c b/libavfilter/vf_fieldmatch.c
index 5e68ad0e49..60b4a602cb 100644
--- a/libavfilter/vf_fieldmatch.c
+++ b/libavfilter/vf_fieldmatch.c
@@ -823,20 +823,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 
     /* mark the frame we are unable to match properly as interlaced so a proper
      * de-interlacer can take the relay */
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    dst->interlaced_frame = interlaced_frame;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     if (interlaced_frame) {
         dst->flags |= AV_FRAME_FLAG_INTERLACED;
         av_log(ctx, AV_LOG_WARNING, "Frame #%"PRId64" at %s is still interlaced\n",
                outl->frame_count_in, av_ts2timestr(in->pts, &inlink->time_base));
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        dst->top_field_first = field;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         if (field)
             dst->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST;
         else
diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c
index dc5cb87517..fe999f27ea 100644
--- a/libavfilter/vf_fieldorder.c
+++ b/libavfilter/vf_fieldorder.c
@@ -142,11 +142,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
             }
         }
     }
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    out->top_field_first = s->dst_tff;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     if (s->dst_tff)
         out->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST;
     else
diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c
index 15ed489eb6..445ecc203a 100644
--- a/libavfilter/vf_idet.c
+++ b/libavfilter/vf_idet.c
@@ -183,28 +183,11 @@ static void filter(AVFilterContext *ctx)
     }
 
     if      (idet->last_type == TFF){
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        idet->cur->top_field_first = 1;
-        idet->cur->interlaced_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         idet->cur->flags |= (AV_FRAME_FLAG_INTERLACED | AV_FRAME_FLAG_TOP_FIELD_FIRST);
     }else if(idet->last_type == BFF){
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        idet->cur->top_field_first = 0;
-        idet->cur->interlaced_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         idet->cur->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST;
         idet->cur->flags |= AV_FRAME_FLAG_INTERLACED;
     }else if(idet->last_type == PROGRESSIVE){
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        idet->cur->interlaced_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         idet->cur->flags &= ~AV_FRAME_FLAG_INTERLACED;
     }
 
@@ -260,11 +243,6 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref)
     }
     if (idet->analyze_interlaced_flag_done) {
         if ((picref->flags & AV_FRAME_FLAG_INTERLACED) && idet->interlaced_flag_accuracy < 0) {
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-            picref->interlaced_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
             picref->flags &= ~AV_FRAME_FLAG_INTERLACED;
         }
         return ff_filter_frame(ctx->outputs[0], picref);
@@ -305,11 +283,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
 
     if (idet->analyze_interlaced_flag) {
         if (idet->cur->flags & AV_FRAME_FLAG_INTERLACED) {
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-            idet->cur->interlaced_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
             idet->cur->flags &= ~AV_FRAME_FLAG_INTERLACED;
             filter(ctx);
             if (idet->last_type == PROGRESSIVE) {
@@ -323,11 +296,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
                 ff_filter_frame(ctx->outputs[0], av_frame_clone(idet->cur));
 
                 if ((idet->next->flags & AV_FRAME_FLAG_INTERLACED) && idet->interlaced_flag_accuracy < 0) {
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-                    idet->next->interlaced_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
                     idet->next->flags &= ~AV_FRAME_FLAG_INTERLACED;
                 }
                 idet->analyze_interlaced_flag_done = 1;
diff --git a/libavfilter/vf_kerndeint.c b/libavfilter/vf_kerndeint.c
index d6f65a2dc4..f37e6b05d3 100644
--- a/libavfilter/vf_kerndeint.c
+++ b/libavfilter/vf_kerndeint.c
@@ -142,11 +142,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
         return AVERROR(ENOMEM);
     }
     av_frame_copy_props(outpic, inpic);
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    outpic->interlaced_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     outpic->flags &= ~AV_FRAME_FLAG_INTERLACED;
 
     for (plane = 0; plane < 4 && inpic->data[plane] && inpic->linesize[plane]; plane++) {
diff --git a/libavfilter/vf_nnedi.c b/libavfilter/vf_nnedi.c
index 113252ebd0..d3f52b3f94 100644
--- a/libavfilter/vf_nnedi.c
+++ b/libavfilter/vf_nnedi.c
@@ -668,11 +668,6 @@ static int get_frame(AVFilterContext *ctx, int is_second)
     if (!dst)
         return AVERROR(ENOMEM);
     av_frame_copy_props(dst, s->prev);
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    dst->interlaced_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     dst->flags &= ~AV_FRAME_FLAG_INTERLACED;
     dst->pts = s->pts;
 
diff --git a/libavfilter/vf_separatefields.c b/libavfilter/vf_separatefields.c
index 2933570358..c0c0640dcc 100644
--- a/libavfilter/vf_separatefields.c
+++ b/libavfilter/vf_separatefields.c
@@ -72,11 +72,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
     int ret;
 
     inpicref->height = outlink->h;
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    inpicref->interlaced_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     inpicref->flags &= ~AV_FRAME_FLAG_INTERLACED;
 
     if (!s->second) {
diff --git a/libavfilter/vf_setparams.c b/libavfilter/vf_setparams.c
index 34583b1d10..751750e6c0 100644
--- a/libavfilter/vf_setparams.c
+++ b/libavfilter/vf_setparams.c
@@ -167,19 +167,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
 
     /* set field */
     if (s->field_mode == MODE_PROG) {
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->interlaced_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         frame->flags &= ~AV_FRAME_FLAG_INTERLACED;
     } else if (s->field_mode != MODE_AUTO) {
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->interlaced_frame = 1;
-        frame->top_field_first = s->field_mode;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         frame->flags |= AV_FRAME_FLAG_INTERLACED;
         if (s->field_mode)
             frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST;
diff --git a/libavfilter/vf_telecine.c b/libavfilter/vf_telecine.c
index e64e400d9f..292b2ee625 100644
--- a/libavfilter/vf_telecine.c
+++ b/libavfilter/vf_telecine.c
@@ -209,12 +209,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
                                 s->stride[i],
                                 (s->planeheight[i] - !s->first_field + 1) / 2);
         }
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        s->frame[nout]->interlaced_frame = 1;
-        s->frame[nout]->top_field_first  = !s->first_field;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         s->frame[nout]->flags |= AV_FRAME_FLAG_INTERLACED;
         if (s->first_field)
             s->frame[nout]->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST;
@@ -237,12 +231,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
                                 inpicref->data[i], inpicref->linesize[i],
                                 s->stride[i],
                                 s->planeheight[i]);
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        s->frame[nout]->interlaced_frame = inpicref->interlaced_frame;
-        s->frame[nout]->top_field_first  = inpicref->top_field_first;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         s->frame[nout]->flags |= (inpicref->flags & (AV_FRAME_FLAG_INTERLACED | AV_FRAME_FLAG_TOP_FIELD_FIRST));
         nout++;
         len -= 2;
@@ -269,12 +257,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
         }
 
         av_frame_copy_props(frame, inpicref);
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->interlaced_frame = interlaced;
-        frame->top_field_first  = tff;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         if (interlaced)
             frame->flags |= AV_FRAME_FLAG_INTERLACED;
         else
diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c
index de7cd88103..8b04926faa 100644
--- a/libavfilter/vf_tinterlace.c
+++ b/libavfilter/vf_tinterlace.c
@@ -405,12 +405,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
             return AVERROR(ENOMEM);
         av_frame_copy_props(out, cur);
         out->height = outlink->h;
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        out->interlaced_frame = 1;
-        out->top_field_first = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         out->flags |= AV_FRAME_FLAG_INTERLACED | AV_FRAME_FLAG_TOP_FIELD_FIRST;
         out->sample_aspect_ratio = av_mul_q(cur->sample_aspect_ratio, av_make_q(2, 1));
 
@@ -479,12 +473,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
         if (!out)
             return AVERROR(ENOMEM);
         av_frame_copy_props(out, cur);
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        out->interlaced_frame = 1;
-        out->top_field_first = tff;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         out->flags |= AV_FRAME_FLAG_INTERLACED;
         if (tff)
             out->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST;
@@ -510,11 +498,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
         out = av_frame_clone(cur);
         if (!out)
             return AVERROR(ENOMEM);
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        out->interlaced_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         out->flags |= AV_FRAME_FLAG_INTERLACED;
         if (cur->pts != AV_NOPTS_VALUE)
             out->pts = cur->pts*2;
@@ -530,12 +513,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
         if (!out)
             return AVERROR(ENOMEM);
         av_frame_copy_props(out, next);
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        out->interlaced_frame = 1;
-        out->top_field_first = !tff;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         out->flags |= AV_FRAME_FLAG_INTERLACED;
         if (tff)
             out->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST;
diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c
index 0635edc7f0..5b4c83bbd9 100644
--- a/libavfilter/vf_w3fdif.c
+++ b/libavfilter/vf_w3fdif.c
@@ -488,11 +488,6 @@ static int filter(AVFilterContext *ctx, int is_second)
     if (!out)
         return AVERROR(ENOMEM);
     av_frame_copy_props(out, s->cur);
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    out->interlaced_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     out->flags &= ~AV_FRAME_FLAG_INTERLACED;
 
     if (!is_second) {
diff --git a/libavfilter/vf_weave.c b/libavfilter/vf_weave.c
index c978c47ad4..91c98e0e66 100644
--- a/libavfilter/vf_weave.c
+++ b/libavfilter/vf_weave.c
@@ -161,12 +161,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
                       FFMIN(s->planeheight[1], ff_filter_get_nb_threads(ctx)));
 
     out->pts = s->double_weave ? s->prev->pts : in->pts / 2;
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    out->interlaced_frame = 1;
-    out->top_field_first = !s->first_field;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     out->flags |= AV_FRAME_FLAG_INTERLACED;
     if (s->first_field)
         out->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST;
diff --git a/libavfilter/vsrc_gradients.c b/libavfilter/vsrc_gradients.c
index 0c5a9dbf53..d4dc2b1bc5 100644
--- a/libavfilter/vsrc_gradients.c
+++ b/libavfilter/vsrc_gradients.c
@@ -415,11 +415,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
 #endif
 
         frame->flags              |= AV_FRAME_FLAG_KEY;
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->interlaced_frame    = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         frame->flags              &= ~AV_FRAME_FLAG_INTERLACED;
         frame->pict_type           = AV_PICTURE_TYPE_I;
         frame->sample_aspect_ratio = (AVRational) {1, 1};
diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c
index c842cacceb..ef51161adb 100644
--- a/libavfilter/vsrc_testsrc.c
+++ b/libavfilter/vsrc_testsrc.c
@@ -205,11 +205,6 @@ static int activate(AVFilterContext *ctx)
     frame->pts                 = test->pts;
     frame->duration            = 1;
     frame->flags              |= AV_FRAME_FLAG_KEY;
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    frame->interlaced_frame    = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     frame->flags              &= ~AV_FRAME_FLAG_INTERLACED;
     frame->pict_type           = AV_PICTURE_TYPE_I;
     frame->sample_aspect_ratio = test->sar;
diff --git a/libavfilter/yadif_common.c b/libavfilter/yadif_common.c
index 059b44ba22..a6cd981684 100644
--- a/libavfilter/yadif_common.c
+++ b/libavfilter/yadif_common.c
@@ -44,11 +44,6 @@ static int return_frame(AVFilterContext *ctx, int is_second)
             return AVERROR(ENOMEM);
 
         av_frame_copy_props(yadif->out, yadif->cur);
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-        yadif->out->interlaced_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         yadif->out->flags &= ~AV_FRAME_FLAG_INTERLACED;
         if (yadif->current_field == YADIF_FIELD_BACK_END)
             yadif->current_field = YADIF_FIELD_END;
@@ -164,11 +159,6 @@ int ff_yadif_filter_frame(AVFilterLink *link, AVFrame *frame)
         return AVERROR(ENOMEM);
 
     av_frame_copy_props(yadif->out, yadif->cur);
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    yadif->out->interlaced_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     yadif->out->flags &= ~AV_FRAME_FLAG_INTERLACED;
 
     if (yadif->out->pts != AV_NOPTS_VALUE)
diff --git a/libavutil/frame.c b/libavutil/frame.c
index 5434021f44..b745a7df01 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -328,12 +328,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
     dst->pts                    = src->pts;
     dst->duration               = src->duration;
     dst->repeat_pict            = src->repeat_pict;
-#if FF_API_INTERLACED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    dst->interlaced_frame       = src->interlaced_frame;
-    dst->top_field_first        = src->top_field_first;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 #if FF_API_PALETTE_HAS_CHANGED
 FF_DISABLE_DEPRECATION_WARNINGS
     dst->palette_has_changed    = src->palette_has_changed;
diff --git a/libavutil/frame.h b/libavutil/frame.h
index 5f89acbe2f..a6667aadce 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -577,24 +577,6 @@ typedef struct AVFrame {
      */
     int repeat_pict;
 
-#if FF_API_INTERLACED_FRAME
-    /**
-     * The content of the picture is interlaced.
-     *
-     * @deprecated Use AV_FRAME_FLAG_INTERLACED instead
-     */
-    attribute_deprecated
-    int interlaced_frame;
-
-    /**
-     * If the content is interlaced, is top field displayed first.
-     *
-     * @deprecated Use AV_FRAME_FLAG_TOP_FIELD_FIRST instead
-     */
-    attribute_deprecated
-    int top_field_first;
-#endif
-
 #if FF_API_PALETTE_HAS_CHANGED
     /**
      * Tell user application that palette has changed from previous frame.
diff --git a/libavutil/version.h b/libavutil/version.h
index 879444718a..f4fc2e4855 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -105,7 +105,6 @@
  * @{
  */
 
-#define FF_API_INTERLACED_FRAME         (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_FRAME_KEY                (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_PALETTE_HAS_CHANGED      (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_VULKAN_CONTIGUOUS_MEMORY (LIBAVUTIL_VERSION_MAJOR < 60)
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 25/30] avutil: remove deprecated FF_API_FRAME_KEY
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (23 preceding siblings ...)
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 24/30] avutil: remove deprecated FF_API_INTERLACED_FRAME James Almer
@ 2025-02-23 22:06 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 26/30] avutil: remove deprecated FF_API_PALETTE_HAS_CHANGED James Almer
                   ` (4 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2023-05-04.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/decode.c          |  5 -----
 libavcodec/encode.c          |  7 -------
 libavfilter/buffersrc.c      |  7 -------
 libavfilter/vf_coreimage.m   |  7 -------
 libavfilter/vsrc_gradients.c |  6 ------
 libavutil/frame.c            |  5 -----
 libavutil/frame.h            | 10 ----------
 libavutil/version.h          |  1 -
 8 files changed, 48 deletions(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 455adff25c..794f14f18d 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -670,11 +670,6 @@ static int decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame)
             return ret;
         }
 
-#if FF_API_FRAME_KEY
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->key_frame = !!(frame->flags & AV_FRAME_FLAG_KEY);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         frame->best_effort_timestamp = guess_correct_pts(dc,
                                                          frame->pts,
                                                          frame->pkt_dts);
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index d831cac13b..72dfa8867a 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -214,13 +214,6 @@ int ff_encode_get_frame(AVCodecContext *avctx, AVFrame *frame)
 
     av_frame_move_ref(frame, avci->buffer_frame);
 
-#if FF_API_FRAME_KEY
-FF_DISABLE_DEPRECATION_WARNINGS
-    if (frame->key_frame)
-        frame->flags |= AV_FRAME_FLAG_KEY;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
     return 0;
 }
 
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index d41d1112d4..af27306b3b 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -252,13 +252,6 @@ int attribute_align_arg av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFra
             return AVERROR(ENOMEM);
     }
 
-#if FF_API_FRAME_KEY
-FF_DISABLE_DEPRECATION_WARNINGS
-    if (copy->key_frame)
-        copy->flags |= AV_FRAME_FLAG_KEY;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
     if (copy->colorspace == AVCOL_SPC_UNSPECIFIED)
         copy->colorspace = ctx->outputs[0]->colorspace;
     if (copy->color_range == AVCOL_RANGE_UNSPECIFIED)
diff --git a/libavfilter/vf_coreimage.m b/libavfilter/vf_coreimage.m
index 9e03c46ce5..dfa8758ce9 100644
--- a/libavfilter/vf_coreimage.m
+++ b/libavfilter/vf_coreimage.m
@@ -299,13 +299,6 @@ static int request_frame(AVFilterLink *link)
     frame->duration            = 1;
     frame->flags              |= AV_FRAME_FLAG_KEY;
     frame->flags              &= ~AV_FRAME_FLAG_INTERLACED;
-
-FF_DISABLE_DEPRECATION_WARNINGS
-#if FF_API_FRAME_KEY
-    frame->key_frame           = 1;
-#endif
-FF_ENABLE_DEPRECATION_WARNINGS
-
     frame->pict_type           = AV_PICTURE_TYPE_I;
     frame->sample_aspect_ratio = ctx->sar;
 
diff --git a/libavfilter/vsrc_gradients.c b/libavfilter/vsrc_gradients.c
index d4dc2b1bc5..cb1b73773f 100644
--- a/libavfilter/vsrc_gradients.c
+++ b/libavfilter/vsrc_gradients.c
@@ -408,12 +408,6 @@ static int activate(AVFilterContext *ctx)
         if (!frame)
             return AVERROR(ENOMEM);
 
-#if FF_API_FRAME_KEY
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->key_frame           = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
         frame->flags              |= AV_FRAME_FLAG_KEY;
         frame->flags              &= ~AV_FRAME_FLAG_INTERLACED;
         frame->pict_type           = AV_PICTURE_TYPE_I;
diff --git a/libavutil/frame.c b/libavutil/frame.c
index b745a7df01..45e0df65fa 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -314,11 +314,6 @@ static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy)
 {
     int ret;
 
-#if FF_API_FRAME_KEY
-FF_DISABLE_DEPRECATION_WARNINGS
-    dst->key_frame              = src->key_frame;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     dst->pict_type              = src->pict_type;
     dst->sample_aspect_ratio    = src->sample_aspect_ratio;
     dst->crop_top               = src->crop_top;
diff --git a/libavutil/frame.h b/libavutil/frame.h
index a6667aadce..60edcc4787 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -496,16 +496,6 @@ typedef struct AVFrame {
      */
     int format;
 
-#if FF_API_FRAME_KEY
-    /**
-     * 1 -> keyframe, 0-> not
-     *
-     * @deprecated Use AV_FRAME_FLAG_KEY instead
-     */
-    attribute_deprecated
-    int key_frame;
-#endif
-
     /**
      * Picture type of the frame.
      */
diff --git a/libavutil/version.h b/libavutil/version.h
index f4fc2e4855..58a25c28cd 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -105,7 +105,6 @@
  * @{
  */
 
-#define FF_API_FRAME_KEY                (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_PALETTE_HAS_CHANGED      (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_VULKAN_CONTIGUOUS_MEMORY (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_H274_FILM_GRAIN_VCS      (LIBAVUTIL_VERSION_MAJOR < 60)
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 26/30] avutil: remove deprecated FF_API_PALETTE_HAS_CHANGED
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (24 preceding siblings ...)
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 25/30] avutil: remove deprecated FF_API_FRAME_KEY James Almer
@ 2025-02-23 22:06 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 27/30] avutil: remove deprecated FF_API_VULKAN_CONTIGUOUS_MEMORY James Almer
                   ` (3 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2023-05-18.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/8bps.c           |  7 -------
 libavcodec/ansi.c           | 10 ----------
 libavcodec/bethsoftvideo.c  |  5 -----
 libavcodec/bfi.c            | 10 ----------
 libavcodec/bintext.c        |  5 -----
 libavcodec/bmvvideo.c       |  5 -----
 libavcodec/brenderpix.c     | 12 ------------
 libavcodec/c93.c            |  5 -----
 libavcodec/cdgraphics.c     |  5 -----
 libavcodec/cdtoons.c        |  5 -----
 libavcodec/cinepak.c        |  7 -------
 libavcodec/dds.c            | 11 -----------
 libavcodec/dfa.c            |  5 -----
 libavcodec/dsicinvideo.c    |  5 -----
 libavcodec/dxa.c            |  5 -----
 libavcodec/flicvideo.c      |  5 -----
 libavcodec/gemdec.c         |  5 -----
 libavcodec/idcinvideo.c     |  7 -------
 libavcodec/imx.c            | 10 ----------
 libavcodec/interplayvideo.c |  7 -------
 libavcodec/jvdec.c          | 12 ------------
 libavcodec/kmvc.c           | 17 -----------------
 libavcodec/mscc.c           |  5 -----
 libavcodec/msrle.c          |  8 --------
 libavcodec/mss1.c           |  5 -----
 libavcodec/msvideo1.c       |  7 -------
 libavcodec/pafvideo.c       |  5 -----
 libavcodec/pictordec.c      |  5 -----
 libavcodec/psd.c            |  5 -----
 libavcodec/qdrw.c           |  5 -----
 libavcodec/qpeg.c           |  7 -------
 libavcodec/qtrle.c          |  8 --------
 libavcodec/rawdec.c         | 13 +------------
 libavcodec/rscc.c           |  7 -------
 libavcodec/sga.c            |  5 -----
 libavcodec/smacker.c        |  5 -----
 libavcodec/smc.c            |  7 -------
 libavcodec/targa.c          |  5 -----
 libavcodec/tiertexseqv.c    |  5 -----
 libavcodec/tmv.c            |  5 -----
 libavcodec/tscc.c           |  5 -----
 libavcodec/vb.c             |  5 -----
 libavcodec/vqavideo.c       |  5 -----
 libavcodec/yop.c            |  6 ------
 libavutil/frame.c           |  5 -----
 libavutil/frame.h           |  8 --------
 libavutil/version.h         |  1 -
 47 files changed, 1 insertion(+), 311 deletions(-)

diff --git a/libavcodec/8bps.c b/libavcodec/8bps.c
index 0060c46d09..7a01633c9a 100644
--- a/libavcodec/8bps.c
+++ b/libavcodec/8bps.c
@@ -114,14 +114,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
     }
 
     if (avctx->bits_per_coded_sample <= 8) {
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->palette_has_changed =
-#endif
         ff_copy_palette(c->pal, avpkt, avctx);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
         memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);
     }
diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c
index d8d32bafbd..b58b72ef49 100644
--- a/libavcodec/ansi.c
+++ b/libavcodec/ansi.c
@@ -262,11 +262,6 @@ static int execute_code(AVCodecContext * avctx, int c)
                                      AV_GET_BUFFER_FLAG_REF)) < 0)
                 return ret;
             s->frame->pict_type           = AV_PICTURE_TYPE_I;
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-            s->frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
             set_palette((uint32_t *)s->frame->data[1]);
             erase_screen(avctx);
         } else if (c == 'l') {
@@ -375,11 +370,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe,
     }
 
     s->frame->pict_type           = AV_PICTURE_TYPE_I;
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    s->frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     set_palette((uint32_t *)s->frame->data[1]);
     if (!s->first_frame) {
         erase_screen(avctx);
diff --git a/libavcodec/bethsoftvideo.c b/libavcodec/bethsoftvideo.c
index 6de502822b..c06eaba32a 100644
--- a/libavcodec/bethsoftvideo.c
+++ b/libavcodec/bethsoftvideo.c
@@ -63,11 +63,6 @@ static int set_palette(BethsoftvidContext *ctx, GetByteContext *g)
         palette[a] = 0xFFU << 24 | bytestream2_get_be24u(g) * 4;
         palette[a] |= palette[a] >> 6 & 0x30303;
     }
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    ctx->frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     return 0;
 }
 
diff --git a/libavcodec/bfi.c b/libavcodec/bfi.c
index 58158f6eee..1d2d3a7204 100644
--- a/libavcodec/bfi.c
+++ b/libavcodec/bfi.c
@@ -83,19 +83,9 @@ static int bfi_decode_frame(AVCodecContext *avctx, AVFrame *frame,
             pal++;
         }
         memcpy(bfi->pal, frame->data[1], sizeof(bfi->pal));
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     } else {
         frame->pict_type = AV_PICTURE_TYPE_P;
         frame->flags &= ~AV_FRAME_FLAG_KEY;
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->palette_has_changed = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         memcpy(frame->data[1], bfi->pal, sizeof(bfi->pal));
     }
 
diff --git a/libavcodec/bintext.c b/libavcodec/bintext.c
index b20d6ce176..b91a741875 100644
--- a/libavcodec/bintext.c
+++ b/libavcodec/bintext.c
@@ -157,11 +157,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
     if ((ret = ff_get_buffer(avctx, s->frame, 0)) < 0)
         return ret;
     s->frame->pict_type           = AV_PICTURE_TYPE_I;
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    s->frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     memcpy(s->frame->data[1], s->palette, 16 * 4);
 
     if (avctx->codec_id == AV_CODEC_ID_XBIN) {
diff --git a/libavcodec/bmvvideo.c b/libavcodec/bmvvideo.c
index 20f07ca556..e83b7e64d6 100644
--- a/libavcodec/bmvvideo.c
+++ b/libavcodec/bmvvideo.c
@@ -251,11 +251,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
     }
 
     memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    frame->palette_has_changed = type & BMV_PALETTE;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
     outptr = frame->data[0];
     srcptr = c->frame;
diff --git a/libavcodec/brenderpix.c b/libavcodec/brenderpix.c
index 07bb47fff9..dd48b40b37 100644
--- a/libavcodec/brenderpix.c
+++ b/libavcodec/brenderpix.c
@@ -245,12 +245,6 @@ static int pix_decode_frame(AVCodecContext *avctx, AVFrame *frame,
             *pal_out++ = (0xFFU << 24) | bytestream2_get_be32u(&gb);
         bytestream2_skip(&gb, 8);
 
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
         chunk_type = bytestream2_get_be32(&gb);
     } else if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
         /* no palette supplied, use the default one */
@@ -260,12 +254,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
         av_log(avctx, AV_LOG_WARNING,
                "Using default palette, colors might be off.\n");
         memcpy(pal_out, std_pal_table, sizeof(uint32_t) * 256);
-
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     }
 
     data_len = bytestream2_get_be32(&gb);
diff --git a/libavcodec/c93.c b/libavcodec/c93.c
index 2a4fe45958..288b1f0ea7 100644
--- a/libavcodec/c93.c
+++ b/libavcodec/c93.c
@@ -246,11 +246,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe,
         for (i = 0; i < 256; i++) {
             palette[i] = 0xFFU << 24 | bytestream2_get_be24(&gb);
         }
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        newpic->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     } else {
         if (oldpic->data[1])
             memcpy(newpic->data[1], oldpic->data[1], 256 * 4);
diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c
index f33f7fbf00..518c75081b 100644
--- a/libavcodec/cdgraphics.c
+++ b/libavcodec/cdgraphics.c
@@ -125,11 +125,6 @@ static void cdg_load_palette(CDGraphicsContext *cc, uint8_t *data, int low)
         b = ((color     ) & 0x000F) * 17;
         palette[i + array_offset] = (uint32_t)cc->alpha[i + array_offset] << 24 | r << 16 | g << 8 | b;
     }
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    cc->frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 }
 
 static int cdg_tile_block(CDGraphicsContext *cc, uint8_t *data, int b)
diff --git a/libavcodec/cdtoons.c b/libavcodec/cdtoons.c
index 89b6d76d84..adc6cf3f44 100644
--- a/libavcodec/cdtoons.c
+++ b/libavcodec/cdtoons.c
@@ -385,11 +385,6 @@ static int cdtoons_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
             }
             /* first palette entry indicates transparency */
             c->pal[0]                     = 0;
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-            c->frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         }
     }
 
diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
index 2ec0ce8882..9ec7ac5a8f 100644
--- a/libavcodec/cinepak.c
+++ b/libavcodec/cinepak.c
@@ -476,14 +476,7 @@ static int cinepak_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
         return ret;
 
     if (s->palette_video) {
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        s->frame->palette_has_changed =
-#endif
         ff_copy_palette(s->pal, avpkt, avctx);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     }
 
     if ((ret = cinepak_decode(s)) < 0) {
diff --git a/libavcodec/dds.c b/libavcodec/dds.c
index 2af7f5c98f..bd16b41e49 100644
--- a/libavcodec/dds.c
+++ b/libavcodec/dds.c
@@ -653,11 +653,6 @@ static int dds_decode(AVCodecContext *avctx, AVFrame *frame,
                     ((unsigned)frame->data[1][3+i*4]<<24)
             );
         }
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
         if (bytestream2_get_bytes_left(gbc) < frame->height * frame->width / 2) {
             av_log(avctx, AV_LOG_ERROR, "Buffer is too small (%d < %d).\n",
@@ -687,12 +682,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
                         (frame->data[1][0+i*4]<<16)+
                         ((unsigned)frame->data[1][3+i*4]<<24)
                 );
-
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-            frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         }
 
         if (bytestream2_get_bytes_left(gbc) < frame->height * linesize) {
diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
index 9114feb0b3..1efaefcb69 100644
--- a/libavcodec/dfa.c
+++ b/libavcodec/dfa.c
@@ -367,11 +367,6 @@ static int dfa_decode_frame(AVCodecContext *avctx, AVFrame *frame,
                 s->pal[i] = bytestream2_get_be24(&gb) << 2;
                 s->pal[i] |= 0xFFU << 24 | (s->pal[i] >> 6) & 0x30303;
             }
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-            frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         } else if (chunk_type <= 9) {
             if (decoder[chunk_type - 2](&gb, s->frame_buf, avctx->width, avctx->height)) {
                 av_log(avctx, AV_LOG_ERROR, "Error decoding %s chunk\n",
diff --git a/libavcodec/dsicinvideo.c b/libavcodec/dsicinvideo.c
index 10b536d405..7001a195e2 100644
--- a/libavcodec/dsicinvideo.c
+++ b/libavcodec/dsicinvideo.c
@@ -294,11 +294,6 @@ static int cinvideo_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
         return res;
 
     memcpy(cin->frame->data[1], cin->palette, sizeof(cin->palette));
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    cin->frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     for (y = 0; y < cin->avctx->height; ++y)
         memcpy(cin->frame->data[0] + (cin->avctx->height - 1 - y) * cin->frame->linesize[0],
                cin->bitmap_table[CIN_CUR_BMP] + y * cin->avctx->width,
diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c
index 59e2411d8e..3a53d3496e 100644
--- a/libavcodec/dxa.c
+++ b/libavcodec/dxa.c
@@ -230,11 +230,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
     if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)
         return ret;
     memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    frame->palette_has_changed = pc;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
     outptr = frame->data[0];
     srcptr = c->decomp_buf;
diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c
index 43f3f83bf6..f17e61a9f2 100644
--- a/libavcodec/flicvideo.c
+++ b/libavcodec/flicvideo.c
@@ -682,11 +682,6 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
     /* make the palette available on the way out */
     memcpy(s->frame->data[1], s->palette, AVPALETTE_SIZE);
     if (s->new_palette) {
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        s->frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         s->new_palette = 0;
     }
 
diff --git a/libavcodec/gemdec.c b/libavcodec/gemdec.c
index 5ece2e2ee3..07f01a24a1 100644
--- a/libavcodec/gemdec.c
+++ b/libavcodec/gemdec.c
@@ -182,11 +182,6 @@ static int gem_decode_frame(AVCodecContext *avctx, AVFrame *p,
 
     p->pict_type = AV_PICTURE_TYPE_I;
     p->flags |= AV_FRAME_FLAG_KEY;
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    p->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     palette = (uint32_t  *)p->data[1];
 
     if (tag == AV_RB32("STTT")) {
diff --git a/libavcodec/idcinvideo.c b/libavcodec/idcinvideo.c
index d9e4633548..da17ea35b1 100644
--- a/libavcodec/idcinvideo.c
+++ b/libavcodec/idcinvideo.c
@@ -224,14 +224,7 @@ static int idcin_decode_frame(AVCodecContext *avctx, AVFrame *frame,
     if (idcin_decode_vlcs(s, frame))
         return AVERROR_INVALIDDATA;
 
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    frame->palette_has_changed =
-#endif
     ff_copy_palette(s->pal, avpkt, avctx);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     /* make the palette available on the way out */
     memcpy(frame->data[1], s->pal, AVPALETTE_SIZE);
 
diff --git a/libavcodec/imx.c b/libavcodec/imx.c
index 0d9d9b5bb9..9f7f2aa829 100644
--- a/libavcodec/imx.c
+++ b/libavcodec/imx.c
@@ -58,19 +58,9 @@ static int imx_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
         return ret;
 
     if (ff_copy_palette(imx->pal, avpkt, avctx)) {
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         frame->flags |= AV_FRAME_FLAG_KEY;
     } else {
         frame->flags &= ~AV_FRAME_FLAG_KEY;
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->palette_has_changed = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     }
 
     bytestream2_init(&gb, avpkt->data, avpkt->size);
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index 9c13707f87..a3bd931264 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -1315,14 +1315,7 @@ static int ipvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame,
         return ret;
 
     if (!s->is_16bpp) {
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->palette_has_changed =
-#endif
         ff_copy_palette(s->pal, avpkt, avctx);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     }
 
     switch (frame_format) {
diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c
index 2b7c9f0d29..d8c78cd18f 100644
--- a/libavcodec/jvdec.c
+++ b/libavcodec/jvdec.c
@@ -37,9 +37,6 @@ typedef struct JvContext {
     BlockDSPContext bdsp;
     AVFrame   *frame;
     uint32_t   palette[AVPALETTE_COUNT];
-#if FF_API_PALETTE_HAS_CHANGED
-    int        palette_has_changed;
-#endif
 } JvContext;
 
 static av_cold int decode_init(AVCodecContext *avctx)
@@ -209,18 +206,9 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe,
             s->palette[i] = 0xFFU << 24 | pal << 2 | ((pal >> 4) & 0x30303);
             buf += 3;
         }
-#if FF_API_PALETTE_HAS_CHANGED
-        s->palette_has_changed = 1;
-#endif
     }
 
     if (video_size) {
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        s->frame->palette_has_changed = s->palette_has_changed;
-        s->palette_has_changed        = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         memcpy(s->frame->data[1], s->palette, AVPALETTE_SIZE);
 
         if ((ret = av_frame_ref(rframe, s->frame)) < 0)
diff --git a/libavcodec/kmvc.c b/libavcodec/kmvc.c
index 83aba4b252..15a0bc59ef 100644
--- a/libavcodec/kmvc.c
+++ b/libavcodec/kmvc.c
@@ -273,14 +273,7 @@ static int decode_frame(AVCodecContext * avctx, AVFrame *frame,
     if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
         return ret;
 
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    frame->palette_has_changed =
-#endif
     ff_copy_palette(ctx->pal, avpkt, avctx);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
     header = bytestream2_get_byte(&ctx->g);
 
@@ -303,11 +296,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
     }
 
     if (header & KMVC_PALETTE) {
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         // palette starts from index 1 and has 127 entries
         for (i = 1; i <= ctx->palsize; i++) {
             ctx->pal[i] = 0xFFU << 24 | bytestream2_get_be24(&ctx->g);
@@ -316,11 +304,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
 
     if (ctx->setpal) {
         ctx->setpal = 0;
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     }
 
     /* make the palette available on the way out */
diff --git a/libavcodec/mscc.c b/libavcodec/mscc.c
index 6d57f1b622..708e84a8e1 100644
--- a/libavcodec/mscc.c
+++ b/libavcodec/mscc.c
@@ -184,11 +184,6 @@ inflate_error:
         const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &size);
 
         if (pal && size == AVPALETTE_SIZE) {
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-            frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
             for (j = 0; j < 256; j++)
                 s->pal[j] = 0xFF000000 | AV_RL32(pal + j * 4);
         } else if (pal) {
diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c
index 51e843e4a6..288f0d768a 100644
--- a/libavcodec/msrle.c
+++ b/libavcodec/msrle.c
@@ -95,15 +95,7 @@ static int msrle_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
         return ret;
 
     if (avctx->bits_per_coded_sample > 1 && avctx->bits_per_coded_sample <= 8) {
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        s->frame->palette_has_changed =
-#endif
         ff_copy_palette(s->pal, avpkt, avctx);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
         /* make the palette available */
         memcpy(s->frame->data[1], s->pal, AVPALETTE_SIZE);
     }
diff --git a/libavcodec/mss1.c b/libavcodec/mss1.c
index 5460673133..ffee7469d4 100644
--- a/libavcodec/mss1.c
+++ b/libavcodec/mss1.c
@@ -178,11 +178,6 @@ static int mss1_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
     if (c->corrupted)
         return AVERROR_INVALIDDATA;
     memcpy(ctx->pic->data[1], c->pal, AVPALETTE_SIZE);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    ctx->pic->palette_has_changed = pal_changed;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
     if ((ret = av_frame_ref(rframe, ctx->pic)) < 0)
         return ret;
diff --git a/libavcodec/msvideo1.c b/libavcodec/msvideo1.c
index ca4583d841..27ec26f3a2 100644
--- a/libavcodec/msvideo1.c
+++ b/libavcodec/msvideo1.c
@@ -312,14 +312,7 @@ static int msvideo1_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
         return ret;
 
     if (s->mode_8bit) {
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        s->frame->palette_has_changed =
-#endif
         ff_copy_palette(s->pal, avpkt, avctx);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     }
 
     if (s->mode_8bit)
diff --git a/libavcodec/pafvideo.c b/libavcodec/pafvideo.c
index c17ae9ae4d..d8d6db5219 100644
--- a/libavcodec/pafvideo.c
+++ b/libavcodec/pafvideo.c
@@ -328,11 +328,6 @@ static int paf_video_decode(AVCodecContext *avctx, AVFrame *rframe,
             b = b << 2 | b >> 4;
             *out++ = (0xFFU << 24) | (r << 16) | (g << 8) | b;
         }
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        c->pic->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     }
 
     c->dirty[c->current_frame] = 1;
diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c
index 845a882454..a6f2a1a342 100644
--- a/libavcodec/pictordec.c
+++ b/libavcodec/pictordec.c
@@ -192,11 +192,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
         return ret;
     memset(frame->data[0], 0, s->height * frame->linesize[0]);
     frame->pict_type           = AV_PICTURE_TYPE_I;
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
     pos_after_pal = bytestream2_tell(&s->g) + esize;
     palette = (uint32_t*)frame->data[1];
diff --git a/libavcodec/psd.c b/libavcodec/psd.c
index 3e5bfcd360..9c3e4f6905 100644
--- a/libavcodec/psd.c
+++ b/libavcodec/psd.c
@@ -533,11 +533,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture,
     }
 
     if (s->color_mode == PSD_INDEXED) {
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        picture->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         memcpy(picture->data[1], s->palette, AVPALETTE_SIZE);
     }
 
diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c
index ca38f48bd9..fd2d894477 100644
--- a/libavcodec/qdrw.c
+++ b/libavcodec/qdrw.c
@@ -384,11 +384,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
             ret = parse_palette(avctx, &gbc, (uint32_t *)p->data[1], colors, flags & 0x8000);
             if (ret < 0)
                 return ret;
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-            p->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
             /* jump to image data */
             bytestream2_skip(&gbc, 18);
diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c
index 9b4ad8e25d..08bff5c81b 100644
--- a/libavcodec/qpeg.c
+++ b/libavcodec/qpeg.c
@@ -297,14 +297,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
     }
 
     /* make the palette available on the way out */
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    p->palette_has_changed =
-#endif
     ff_copy_palette(a->pal, avpkt, avctx);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     memcpy(p->data[1], a->pal, AVPALETTE_SIZE);
 
     if ((ret = av_frame_replace(ref, p)) < 0)
diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c
index 9b016d7e83..be105bdfb6 100644
--- a/libavcodec/qtrle.c
+++ b/libavcodec/qtrle.c
@@ -537,15 +537,7 @@ static int qtrle_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
     }
 
     if(has_palette) {
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        s->frame->palette_has_changed =
-#endif
         ff_copy_palette(s->pal, avpkt, avctx);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
         /* make the palette available on the way out */
         memcpy(s->frame->data[1], s->pal, AVPALETTE_SIZE);
     }
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index b02edac371..53d1fba583 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -368,24 +368,13 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame,
             return ret;
         }
 
-        if (ff_copy_palette(context->palette->data, avpkt, avctx)) {
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-            frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-        } else if (context->is_nut_pal8) {
+        if (!ff_copy_palette(context->palette->data, avpkt, avctx) && context->is_nut_pal8) {
             int vid_size = avctx->width * avctx->height;
             int pal_size = avpkt->size - vid_size;
 
             if (avpkt->size > vid_size && pal_size <= AVPALETTE_SIZE) {
                 const uint8_t *pal = avpkt->data + vid_size;
                 memcpy(context->palette->data, pal, pal_size);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-                frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
             }
         }
     }
diff --git a/libavcodec/rscc.c b/libavcodec/rscc.c
index e601ff39ed..3715e1c6d4 100644
--- a/libavcodec/rscc.c
+++ b/libavcodec/rscc.c
@@ -347,14 +347,7 @@ static int rscc_decode_frame(AVCodecContext *avctx, AVFrame *frame,
 
     /* Palette handling */
     if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->palette_has_changed =
-#endif
         ff_copy_palette(ctx->palette, avpkt, avctx);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         memcpy(frame->data[1], ctx->palette, AVPALETTE_SIZE);
     }
     // We only return a picture when enough of it is undamaged, this avoids copying nearly broken frames around
diff --git a/libavcodec/sga.c b/libavcodec/sga.c
index 5d913a28b4..b6902452d3 100644
--- a/libavcodec/sga.c
+++ b/libavcodec/sga.c
@@ -501,11 +501,6 @@ static int sga_decode_frame(AVCodecContext *avctx, AVFrame *frame,
     }
 
     memcpy(frame->data[1], s->pal, AVPALETTE_SIZE);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     frame->pict_type = AV_PICTURE_TYPE_I;
     frame->flags |= AV_FRAME_FLAG_KEY;
 
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 8f198d6957..db464dfcf7 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -393,11 +393,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe,
     pal = (uint32_t*)smk->pic->data[1];
     bytestream2_init(&gb2, avpkt->data, avpkt->size);
     flags = bytestream2_get_byteu(&gb2);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    smk->pic->palette_has_changed = flags & 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     if (flags & 2) {
         smk->pic->flags |= AV_FRAME_FLAG_KEY;
         smk->pic->pict_type = AV_PICTURE_TYPE_I;
diff --git a/libavcodec/smc.c b/libavcodec/smc.c
index 3e8a89ced1..673d7a5e18 100644
--- a/libavcodec/smc.c
+++ b/libavcodec/smc.c
@@ -437,14 +437,7 @@ static int smc_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
     if ((ret = ff_reget_buffer(avctx, s->frame, 0)) < 0)
         return ret;
 
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    s->frame->palette_has_changed =
-#endif
     ff_copy_palette(s->pal, avpkt, avctx);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
     bytestream2_init(&gb, buf, buf_size);
     ret = smc_decode_stream(s, &gb);
diff --git a/libavcodec/targa.c b/libavcodec/targa.c
index 59fdc428d9..7e016ea4af 100644
--- a/libavcodec/targa.c
+++ b/libavcodec/targa.c
@@ -249,11 +249,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
                 }
                 break;
             }
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-            p->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         }
     }
 
diff --git a/libavcodec/tiertexseqv.c b/libavcodec/tiertexseqv.c
index cdc885558b..31acc9b438 100644
--- a/libavcodec/tiertexseqv.c
+++ b/libavcodec/tiertexseqv.c
@@ -182,11 +182,6 @@ static int seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int
                 c[j] = (*data << 2) | (*data >> 4);
             palette[i] = 0xFFU << 24 | AV_RB24(c);
         }
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        seq->frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     }
 
     if (flags & 2) {
diff --git a/libavcodec/tmv.c b/libavcodec/tmv.c
index 2ff1424bd8..ebd0e0b0bc 100644
--- a/libavcodec/tmv.c
+++ b/libavcodec/tmv.c
@@ -58,11 +58,6 @@ static int tmv_decode_frame(AVCodecContext *avctx, AVFrame *frame,
 
     dst              = frame->data[0];
 
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     memcpy(frame->data[1], ff_cga_palette, 16 * 4);
     memset(frame->data[1] + 16 * 4, 0, AVPALETTE_SIZE - 16 * 4);
 
diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c
index 575173698c..99bb0307b0 100644
--- a/libavcodec/tscc.c
+++ b/libavcodec/tscc.c
@@ -107,11 +107,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe,
 
     /* make the palette available on the way out */
     if (c->avctx->pix_fmt == AV_PIX_FMT_PAL8) {
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        frame->palette_has_changed = palette_has_changed;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
         memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);
     }
 
diff --git a/libavcodec/vb.c b/libavcodec/vb.c
index 0a9528a8d2..42d6f26f6c 100644
--- a/libavcodec/vb.c
+++ b/libavcodec/vb.c
@@ -231,11 +231,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
     }
 
     memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    frame->palette_has_changed = flags & VB_HAS_PALETTE;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
     outptr = frame->data[0];
     srcptr = c->frame;
diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
index 4fd1861d25..b81d13ea67 100644
--- a/libavcodec/vqavideo.c
+++ b/libavcodec/vqavideo.c
@@ -810,11 +810,6 @@ static int vqa_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
 
         /* make the palette available on the way out */
         memcpy(s->frame->data[1], s->palette, PALETTE_COUNT * 4);
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-        s->frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     } else if (avctx->pix_fmt == AV_PIX_FMT_RGB555LE) {
         if ((res = vqa_decode_frame_hicolor(s, s->frame)) < 0)
             return res;
diff --git a/libavcodec/yop.c b/libavcodec/yop.c
index 77b8d6e055..225bc71f5d 100644
--- a/libavcodec/yop.c
+++ b/libavcodec/yop.c
@@ -232,12 +232,6 @@ static int yop_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
                                    (palette[i + firstcolor] >> 6) & 0x30303;
     }
 
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    frame->palette_has_changed = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
     for (y = 0; y < avctx->height; y += 2) {
         for (x = 0; x < avctx->width; x += 2) {
             if (s->srcptr - avpkt->data >= avpkt->size) {
diff --git a/libavutil/frame.c b/libavutil/frame.c
index 45e0df65fa..1eceab2251 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -323,11 +323,6 @@ static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy)
     dst->pts                    = src->pts;
     dst->duration               = src->duration;
     dst->repeat_pict            = src->repeat_pict;
-#if FF_API_PALETTE_HAS_CHANGED
-FF_DISABLE_DEPRECATION_WARNINGS
-    dst->palette_has_changed    = src->palette_has_changed;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
     dst->sample_rate            = src->sample_rate;
     dst->opaque                 = src->opaque;
     dst->pkt_dts                = src->pkt_dts;
diff --git a/libavutil/frame.h b/libavutil/frame.h
index 60edcc4787..4305fd9f4c 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -567,14 +567,6 @@ typedef struct AVFrame {
      */
     int repeat_pict;
 
-#if FF_API_PALETTE_HAS_CHANGED
-    /**
-     * Tell user application that palette has changed from previous frame.
-     */
-    attribute_deprecated
-    int palette_has_changed;
-#endif
-
     /**
      * Sample rate of the audio data.
      */
diff --git a/libavutil/version.h b/libavutil/version.h
index 58a25c28cd..70c2ab925b 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -105,7 +105,6 @@
  * @{
  */
 
-#define FF_API_PALETTE_HAS_CHANGED      (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_VULKAN_CONTIGUOUS_MEMORY (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_H274_FILM_GRAIN_VCS      (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_MOD_UINTP2               (LIBAVUTIL_VERSION_MAJOR < 60)
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 27/30] avutil: remove deprecated FF_API_VULKAN_CONTIGUOUS_MEMORY
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (25 preceding siblings ...)
  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 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 28/30] avutil: remove deprecated FF_API_H274_FILM_GRAIN_VCS James Almer
                   ` (2 subsequent siblings)
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2023-05-28.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavutil/hwcontext_vulkan.h | 5 -----
 libavutil/version.h          | 1 -
 2 files changed, 6 deletions(-)

diff --git a/libavutil/hwcontext_vulkan.h b/libavutil/hwcontext_vulkan.h
index 2688a4757b..6ab74579ac 100644
--- a/libavutil/hwcontext_vulkan.h
+++ b/libavutil/hwcontext_vulkan.h
@@ -197,11 +197,6 @@ typedef enum AVVkFrameFlags {
      * device and tiling during av_hwframe_ctx_init(). */
     AV_VK_FRAME_FLAG_NONE              = (1ULL << 0),
 
-#if FF_API_VULKAN_CONTIGUOUS_MEMORY
-    /* DEPRECATED: does nothing. Replaced by multiplane images. */
-    AV_VK_FRAME_FLAG_CONTIGUOUS_MEMORY = (1ULL << 1),
-#endif
-
     /* Disables multiplane images.
      * This is required to export/import images from CUDA. */
     AV_VK_FRAME_FLAG_DISABLE_MULTIPLANE = (1ULL << 2),
diff --git a/libavutil/version.h b/libavutil/version.h
index 70c2ab925b..50466c34d9 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -105,7 +105,6 @@
  * @{
  */
 
-#define FF_API_VULKAN_CONTIGUOUS_MEMORY (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_H274_FILM_GRAIN_VCS      (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_MOD_UINTP2               (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_RISCV_FD_ZBA             (LIBAVUTIL_VERSION_MAJOR < 60)
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 28/30] avutil: remove deprecated FF_API_H274_FILM_GRAIN_VCS
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (26 preceding siblings ...)
  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 ` 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
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Deprecated since 2024-03-23.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/h2645_sei.c        | 11 -------
 libavutil/film_grain_params.h | 58 ++++++-----------------------------
 libavutil/version.h           |  1 -
 3 files changed, 9 insertions(+), 61 deletions(-)

diff --git a/libavcodec/h2645_sei.c b/libavcodec/h2645_sei.c
index 2494daaf3c..c7950a4a45 100644
--- a/libavcodec/h2645_sei.c
+++ b/libavcodec/h2645_sei.c
@@ -875,17 +875,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
         h274->blending_mode_id  = fgc->blending_mode_id;
         h274->log2_scale_factor = fgc->log2_scale_factor;
 
-#if FF_API_H274_FILM_GRAIN_VCS
-FF_DISABLE_DEPRECATION_WARNINGS
-        h274->bit_depth_luma   = fgp->bit_depth_luma;
-        h274->bit_depth_chroma = fgp->bit_depth_chroma;
-        h274->color_range      = fgp->color_range;
-        h274->color_primaries  = fgp->color_primaries;
-        h274->color_trc        = fgp->color_trc;
-        h274->color_space      = fgp->color_space;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
         memcpy(&h274->component_model_present, &fgc->comp_model_present_flag,
                sizeof(h274->component_model_present));
         memcpy(&h274->num_intensity_intervals, &fgc->num_intensity_intervals,
diff --git a/libavutil/film_grain_params.h b/libavutil/film_grain_params.h
index ccacab88fe..7e8d333777 100644
--- a/libavutil/film_grain_params.h
+++ b/libavutil/film_grain_params.h
@@ -136,43 +136,6 @@ typedef struct AVFilmGrainH274Params {
      */
     int model_id;
 
-#if FF_API_H274_FILM_GRAIN_VCS
-  /**
-   * TODO: On this ABI bump, please also re-order the fields in
-   * AVFilmGrainParams (see below)
-   */
-
-  /**
-   * Specifies the bit depth used for the luma component.
-   *
-   * @deprecated use AVFilmGrainParams.bit_depth_luma.
-   */
-    attribute_deprecated
-    int bit_depth_luma;
-
-    /**
-     * Specifies the bit depth used for the chroma components.
-     *
-     * @deprecated use AVFilmGrainParams.bit_depth_chroma.
-     */
-    attribute_deprecated
-    int bit_depth_chroma;
-
-    /**
-     * Specifies the video signal characteristics.
-     *
-     * @deprecated use AVFilmGrainParams.color_{range,primaries,trc,space}.
-     */
-    attribute_deprecated
-    enum AVColorRange                  color_range;
-    attribute_deprecated
-    enum AVColorPrimaries              color_primaries;
-    attribute_deprecated
-    enum AVColorTransferCharacteristic color_trc;
-    attribute_deprecated
-    enum AVColorSpace                  color_space;
-#endif
-
     /**
      * Specifies the blending mode used to blend the simulated film grain
      * with the decoded images.
@@ -249,18 +212,6 @@ typedef struct AVFilmGrainParams {
      */
     uint64_t seed;
 
-    /**
-     * Additional fields may be added both here and in any structure included.
-     * If a codec's film grain structure differs slightly over another
-     * codec's, fields within may change meaning depending on the type.
-     *
-     * TODO: Move this to the end of the structure, at the next ABI bump.
-     */
-    union {
-        AVFilmGrainAOMParams aom;
-        AVFilmGrainH274Params h274;
-    } codec;
-
     /**
      * Intended display resolution. May be 0 if the codec does not specify
      * any restrictions.
@@ -287,6 +238,15 @@ typedef struct AVFilmGrainParams {
     int bit_depth_luma;
     int bit_depth_chroma;
 
+    /**
+     * Additional fields may be added both here and in any structure included.
+     * If a codec's film grain structure differs slightly over another
+     * codec's, fields within may change meaning depending on the type.
+     */
+    union {
+        AVFilmGrainAOMParams aom;
+        AVFilmGrainH274Params h274;
+    } codec;
 } AVFilmGrainParams;
 
 /**
diff --git a/libavutil/version.h b/libavutil/version.h
index 50466c34d9..443b4771f6 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -105,7 +105,6 @@
  * @{
  */
 
-#define FF_API_H274_FILM_GRAIN_VCS      (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_MOD_UINTP2               (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_RISCV_FD_ZBA             (LIBAVUTIL_VERSION_MAJOR < 60)
 #define FF_API_VULKAN_FIXED_QUEUES      (LIBAVUTIL_VERSION_MAJOR < 60)
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 29/30] avutil/version_major: postpone some deprecations until the next bump
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (27 preceding siblings ...)
  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 ` James Almer
  2025-02-23 22:06 ` [FFmpeg-devel] [PATCH 30/30] libs: bump major version for all libraries James Almer
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

They are too recent.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavutil/version.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavutil/version.h b/libavutil/version.h
index 443b4771f6..a29aadcead 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -105,11 +105,11 @@
  * @{
  */
 
-#define FF_API_MOD_UINTP2               (LIBAVUTIL_VERSION_MAJOR < 60)
-#define FF_API_RISCV_FD_ZBA             (LIBAVUTIL_VERSION_MAJOR < 60)
-#define FF_API_VULKAN_FIXED_QUEUES      (LIBAVUTIL_VERSION_MAJOR < 60)
-#define FF_API_OPT_INT_LIST             (LIBAVUTIL_VERSION_MAJOR < 60)
-#define FF_API_OPT_PTR                  (LIBAVUTIL_VERSION_MAJOR < 60)
+#define FF_API_MOD_UINTP2               (LIBAVUTIL_VERSION_MAJOR < 61)
+#define FF_API_RISCV_FD_ZBA             (LIBAVUTIL_VERSION_MAJOR < 61)
+#define FF_API_VULKAN_FIXED_QUEUES      (LIBAVUTIL_VERSION_MAJOR < 61)
+#define FF_API_OPT_INT_LIST             (LIBAVUTIL_VERSION_MAJOR < 61)
+#define FF_API_OPT_PTR                  (LIBAVUTIL_VERSION_MAJOR < 61)
 
 /**
  * @}
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [FFmpeg-devel] [PATCH 30/30] libs: bump major version for all libraries
  2025-02-23 22:06 [FFmpeg-devel] [PATCH 00/31] Major library soname bump James Almer
                   ` (28 preceding siblings ...)
  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 ` James Almer
  29 siblings, 0 replies; 32+ messages in thread
From: James Almer @ 2025-02-23 22:06 UTC (permalink / raw)
  To: ffmpeg-devel

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/version.h          | 4 ++--
 libavcodec/version_major.h    | 2 +-
 libavdevice/version.h         | 2 +-
 libavdevice/version_major.h   | 2 +-
 libavfilter/version.h         | 2 +-
 libavfilter/version_major.h   | 2 +-
 libavformat/version.h         | 4 ++--
 libavformat/version_major.h   | 2 +-
 libavutil/version.h           | 4 ++--
 libpostproc/version.h         | 2 +-
 libpostproc/version_major.h   | 2 +-
 libswresample/version.h       | 2 +-
 libswresample/version_major.h | 2 +-
 libswscale/version.h          | 2 +-
 libswscale/version_major.h    | 2 +-
 15 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/libavcodec/version.h b/libavcodec/version.h
index 62e7eba3db..8c3d476003 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,8 +29,8 @@
 
 #include "version_major.h"
 
-#define LIBAVCODEC_VERSION_MINOR  33
-#define LIBAVCODEC_VERSION_MICRO 102
+#define LIBAVCODEC_VERSION_MINOR   0
+#define LIBAVCODEC_VERSION_MICRO 100
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \
diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h
index b4f4936786..75f9fce9d3 100644
--- a/libavcodec/version_major.h
+++ b/libavcodec/version_major.h
@@ -25,7 +25,7 @@
  * Libavcodec version macros.
  */
 
-#define LIBAVCODEC_VERSION_MAJOR  61
+#define LIBAVCODEC_VERSION_MAJOR  62
 
 /**
  * FF_API_* defines may be placed below to indicate public API that will be
diff --git a/libavdevice/version.h b/libavdevice/version.h
index 0e4ce64598..25befdead1 100644
--- a/libavdevice/version.h
+++ b/libavdevice/version.h
@@ -29,7 +29,7 @@
 
 #include "version_major.h"
 
-#define LIBAVDEVICE_VERSION_MINOR   4
+#define LIBAVDEVICE_VERSION_MINOR   0
 #define LIBAVDEVICE_VERSION_MICRO 100
 
 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
diff --git a/libavdevice/version_major.h b/libavdevice/version_major.h
index 470e5626be..191511cdcc 100644
--- a/libavdevice/version_major.h
+++ b/libavdevice/version_major.h
@@ -25,7 +25,7 @@
  * Libavdevice version macros
  */
 
-#define LIBAVDEVICE_VERSION_MAJOR  61
+#define LIBAVDEVICE_VERSION_MAJOR  62
 
 /**
  * FF_API_* defines may be placed below to indicate public API that will be
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 77f38cb9b4..d5a6bc143a 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -31,7 +31,7 @@
 
 #include "version_major.h"
 
-#define LIBAVFILTER_VERSION_MINOR   9
+#define LIBAVFILTER_VERSION_MINOR   0
 #define LIBAVFILTER_VERSION_MICRO 100
 
 
diff --git a/libavfilter/version_major.h b/libavfilter/version_major.h
index cd5c01d7c3..af6f59832f 100644
--- a/libavfilter/version_major.h
+++ b/libavfilter/version_major.h
@@ -27,7 +27,7 @@
  * Libavfilter version macros
  */
 
-#define LIBAVFILTER_VERSION_MAJOR  10
+#define LIBAVFILTER_VERSION_MAJOR  11
 
 /**
  * FF_API_* defines may be placed below to indicate public API that will be
diff --git a/libavformat/version.h b/libavformat/version.h
index 6ffdf61b43..752aac16f7 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,8 +31,8 @@
 
 #include "version_major.h"
 
-#define LIBAVFORMAT_VERSION_MINOR   9
-#define LIBAVFORMAT_VERSION_MICRO 107
+#define LIBAVFORMAT_VERSION_MINOR   0
+#define LIBAVFORMAT_VERSION_MICRO 100
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
                                                LIBAVFORMAT_VERSION_MINOR, \
diff --git a/libavformat/version_major.h b/libavformat/version_major.h
index be3e13c334..b5583c9e11 100644
--- a/libavformat/version_major.h
+++ b/libavformat/version_major.h
@@ -29,7 +29,7 @@
 
 // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
 // Also please add any ticket numbers that you believe might be affected here
-#define LIBAVFORMAT_VERSION_MAJOR  61
+#define LIBAVFORMAT_VERSION_MAJOR  60
 
 /**
  * FF_API_* defines may be placed below to indicate public API that will be
diff --git a/libavutil/version.h b/libavutil/version.h
index a29aadcead..6d79b303c6 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -78,8 +78,8 @@
  * @{
  */
 
-#define LIBAVUTIL_VERSION_MAJOR  59
-#define LIBAVUTIL_VERSION_MINOR  57
+#define LIBAVUTIL_VERSION_MAJOR  60
+#define LIBAVUTIL_VERSION_MINOR   0
 #define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
diff --git a/libpostproc/version.h b/libpostproc/version.h
index 4459d251d4..bcbdd210c4 100644
--- a/libpostproc/version.h
+++ b/libpostproc/version.h
@@ -30,7 +30,7 @@
 
 #include "version_major.h"
 
-#define LIBPOSTPROC_VERSION_MINOR   4
+#define LIBPOSTPROC_VERSION_MINOR   0
 #define LIBPOSTPROC_VERSION_MICRO 100
 
 #define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \
diff --git a/libpostproc/version_major.h b/libpostproc/version_major.h
index 8136ee918c..b40b251a73 100644
--- a/libpostproc/version_major.h
+++ b/libpostproc/version_major.h
@@ -26,6 +26,6 @@
  * Libpostproc version macros
  */
 
-#define LIBPOSTPROC_VERSION_MAJOR  58
+#define LIBPOSTPROC_VERSION_MAJOR  59
 
 #endif /* POSTPROC_VERSION_MAJOR_H */
diff --git a/libswresample/version.h b/libswresample/version.h
index 9a514e6d6f..703023094e 100644
--- a/libswresample/version.h
+++ b/libswresample/version.h
@@ -30,7 +30,7 @@
 
 #include "version_major.h"
 
-#define LIBSWRESAMPLE_VERSION_MINOR   4
+#define LIBSWRESAMPLE_VERSION_MINOR   0
 #define LIBSWRESAMPLE_VERSION_MICRO 100
 
 #define LIBSWRESAMPLE_VERSION_INT  AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
diff --git a/libswresample/version_major.h b/libswresample/version_major.h
index dd13f2bbe3..4e0bc0ab19 100644
--- a/libswresample/version_major.h
+++ b/libswresample/version_major.h
@@ -26,6 +26,6 @@
  * Libswresample version macros
  */
 
-#define LIBSWRESAMPLE_VERSION_MAJOR   5
+#define LIBSWRESAMPLE_VERSION_MAJOR   6
 
 #endif /* SWRESAMPLE_VERSION_MAJOR_H */
diff --git a/libswscale/version.h b/libswscale/version.h
index f84fcc160d..148efd83eb 100644
--- a/libswscale/version.h
+++ b/libswscale/version.h
@@ -28,7 +28,7 @@
 
 #include "version_major.h"
 
-#define LIBSWSCALE_VERSION_MINOR  13
+#define LIBSWSCALE_VERSION_MINOR   0
 #define LIBSWSCALE_VERSION_MICRO 100
 
 #define LIBSWSCALE_VERSION_INT  AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
diff --git a/libswscale/version_major.h b/libswscale/version_major.h
index fd259f959d..0dc507921e 100644
--- a/libswscale/version_major.h
+++ b/libswscale/version_major.h
@@ -24,7 +24,7 @@
  * swscale version macros
  */
 
-#define LIBSWSCALE_VERSION_MAJOR   8
+#define LIBSWSCALE_VERSION_MAJOR   9
 
 /**
  * FF_API_* defines may be placed below to indicate public API that will be
-- 
2.48.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [FFmpeg-devel] [PATCH 03/30] avcodec: remove deprecated FF_API_DROPCHANGED
  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
  0 siblings, 0 replies; 32+ messages in thread
From: Gyan Doshi @ 2025-02-24  9:44 UTC (permalink / raw)
  To: ffmpeg-devel



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 <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".

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2025-02-24  9:44 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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-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-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

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