mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-22 07:20:45 +00:00
avformat/matroska*: Use av_chroma_location_(pos_to_enum|enum_to_pos)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
8be6552aa4
commit
832e6563df
@ -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;
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user