[FFmpeg-cvslog] avformat/matroska*: Use av_chroma_location_(pos_to_enum|enum_to_pos)
Andreas Rheinhardt
git at videolan.org
Mon Sep 26 04:20:34 EEST 2022
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed Sep 21 02:36:04 2022 +0200| [832e6563df9bb6ca79b8a9b39c6a7e8dc28808e2] | committer: Andreas Rheinhardt
avformat/matroska*: Use av_chroma_location_(pos_to_enum|enum_to_pos)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=832e6563df9bb6ca79b8a9b39c6a7e8dc28808e2
---
libavformat/matroskadec.c | 5 +++--
libavformat/matroskaenc.c | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 8b079e1110..d582f566a2 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -46,6 +46,7 @@
#include "libavutil/mastering_display_metadata.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
+#include "libavutil/pixdesc.h"
#include "libavutil/time_internal.h"
#include "libavutil/spherical.h"
@@ -2184,8 +2185,8 @@ static int mkv_parse_video_color(AVStream *st, const MatroskaTrack *track) {
color->chroma_siting_horz < MATROSKA_COLOUR_CHROMASITINGHORZ_NB &&
color->chroma_siting_vert < MATROSKA_COLOUR_CHROMASITINGVERT_NB) {
st->codecpar->chroma_location =
- avcodec_chroma_pos_to_enum((color->chroma_siting_horz - 1) << 7,
- (color->chroma_siting_vert - 1) << 7);
+ av_chroma_location_pos_to_enum((color->chroma_siting_horz - 1) << 7,
+ (color->chroma_siting_vert - 1) << 7);
}
if (color->max_cll && color->max_fall) {
size_t size = 0;
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index ed1ad5039d..147f29988e 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -51,6 +51,7 @@
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
+#include "libavutil/pixdesc.h"
#include "libavutil/random_seed.h"
#include "libavutil/rational.h"
#include "libavutil/samplefmt.h"
@@ -1322,7 +1323,7 @@ static void mkv_write_video_color(EbmlWriter *writer, const AVStream *st,
par->chroma_location <= AVCHROMA_LOC_TOP) {
int xpos, ypos;
- avcodec_enum_to_chroma_pos(&xpos, &ypos, par->chroma_location);
+ av_chroma_location_enum_to_pos(&xpos, &ypos, par->chroma_location);
ebml_writer_add_uint(writer, MATROSKA_ID_VIDEOCOLORCHROMASITINGHORZ,
(xpos >> 7) + 1);
ebml_writer_add_uint(writer, MATROSKA_ID_VIDEOCOLORCHROMASITINGVERT,
More information about the ffmpeg-cvslog
mailing list