From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH 3/5] avformat/matroska*: Use av_chroma_location_(pos_to_enum|enum_to_pos)
Date: Wed, 21 Sep 2022 03:35:39 +0200
Message-ID: <GV1P250MB0737961C4EFB8B250F08E47B8F4F9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <GV1P250MB0737CC466D153BBD200DF91D8F4F9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
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 16a3e93611..aa59f73d00 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,
--
2.34.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".
next prev parent reply other threads:[~2022-09-21 1:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 1:30 [FFmpeg-devel] [PATCH 1/5] avcodec/avcodec: Move AV_ER_* and FF_COMPLIANCE_* to defs.h Andreas Rheinhardt
2022-09-21 1:34 ` [FFmpeg-devel] [PATCH 2/5] avutil/pixdesc: Add av_chroma_location_(enum_to_pos|pos_to_enum) Andreas Rheinhardt
2022-09-25 0:09 ` Andreas Rheinhardt
2022-09-21 1:35 ` Andreas Rheinhardt [this message]
2022-09-21 1:35 ` [FFmpeg-devel] [PATCH 4/5] avcodec/avcodec: Deprecate lavc chroma pos API functions Andreas Rheinhardt
2022-09-21 1:35 ` [FFmpeg-devel] [PATCH 5/5] avformat/internal: Don't include avcodec.h Andreas Rheinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=GV1P250MB0737961C4EFB8B250F08E47B8F4F9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \
--to=andreas.rheinhardt@outlook.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git