summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-21 02:42:48 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-26 03:02:49 +0200
commita02a0e8db492ae91672449ac3be8ff084a903402 (patch)
treec5b5421ec7902f3e0430fc8b2bdd134ec16b2461 /libavcodec/avcodec.h
parent832e6563df9bb6ca79b8a9b39c6a7e8dc28808e2 (diff)
avcodec/avcodec: Deprecate lavc chroma pos API functions
avcodec_enum_to_chroma_pos() and avcodec_chroma_pos_to_enum() deal with enum AVChromaLocation which is defined in lavu. These functions are therefore replaced by av_chroma_location_enum_to_pos() and av_chroma_location_pos_to_enum(). This commit provides the necessary deprecations. Also already make these functions wrappers around the corresponding lavu functions as not doing so would force one to disable deprecation warnings. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 0769577338..7365eb5cc0 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2496,6 +2496,7 @@ 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.
*
@@ -2504,7 +2505,9 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
*
* @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);
/**
@@ -2515,8 +2518,11 @@ int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos);
*
* @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.