[FFmpeg-devel] [PATCH 05/24] avcodec: remove deprecated FF_API_AVCODEC_CHROMA_POS
James Almer
jamrial at gmail.com
Thu Jan 25 15:43:28 EET 2024
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavcodec/avcodec.h | 28 ----------------------------
libavcodec/utils.c | 11 -----------
libavcodec/version_major.h | 1 -
3 files changed, 40 deletions(-)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 4b2ef4fdf7..2dd9c5c82b 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2471,34 +2471,6 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
int linesize_align[AV_NUM_DATA_POINTERS]);
-#ifdef FF_API_AVCODEC_CHROMA_POS
-/**
- * Converts AVChromaLocation to swscale x/y chroma position.
- *
- * The positions represent the chroma (0,0) position in a coordinates system
- * with luma (0,0) representing the origin and luma(1,1) representing 256,256
- *
- * @param xpos horizontal chroma sample position
- * @param ypos vertical chroma sample position
- * @deprecated Use av_chroma_location_enum_to_pos() instead.
- */
- attribute_deprecated
-int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos);
-
-/**
- * Converts swscale x/y chroma position to AVChromaLocation.
- *
- * The positions represent the chroma (0,0) position in a coordinates system
- * with luma (0,0) representing the origin and luma(1,1) representing 256,256
- *
- * @param xpos horizontal chroma sample position
- * @param ypos vertical chroma sample position
- * @deprecated Use av_chroma_location_pos_to_enum() instead.
- */
- attribute_deprecated
-enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos);
-#endif
-
/**
* Decode a subtitle message.
* Return a negative value on error, otherwise return the number of bytes used.
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 39b83c7791..1ad91c3237 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -362,17 +362,6 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height)
align = FFMAX3(align, linesize_align[1], linesize_align[2]);
*width = FFALIGN(*width, align);
}
-#if FF_API_AVCODEC_CHROMA_POS
-int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos)
-{
- return av_chroma_location_enum_to_pos(xpos, ypos, pos);
-}
-
-enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos)
-{
- return av_chroma_location_pos_to_enum(xpos, ypos);
-}
-#endif
int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
enum AVSampleFormat sample_fmt, const uint8_t *buf,
diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h
index b364ba68f1..88cc975713 100644
--- a/libavcodec/version_major.h
+++ b/libavcodec/version_major.h
@@ -38,7 +38,6 @@
*/
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 61)
-#define FF_API_AVCODEC_CHROMA_POS (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_VT_HWACCEL_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_AVCTX_FRAME_NUMBER (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_SLICE_OFFSET (LIBAVCODEC_VERSION_MAJOR < 61)
--
2.43.0
More information about the ffmpeg-devel
mailing list