diff options
author | Cosmin Stejerean <cosmin@cosmin.at> | 2024-02-04 15:14:11 +0000 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2024-02-04 13:36:25 -0300 |
commit | dda4b25e2d92e3e72f500daef2de143587752126 (patch) | |
tree | f9e907397e85e66c068450b2474d34f13a60a634 /libavformat/movenc.c | |
parent | 45697e6a51244e3393c8bf5e931ad86387fd8ec8 (diff) | |
download | ffmpeg-dda4b25e2d92e3e72f500daef2de143587752126.tar.gz |
avformat/mov: rename rescale_mdcv
It's not specific to the mdcv box.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index b724bd5ebc..9e37781000 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2208,7 +2208,7 @@ static int mov_write_clli_tag(AVIOContext *pb, MOVTrack *track) return 12; } -static inline int64_t rescale_mdcv(AVRational q, int b) +static inline int64_t rescale_rational(AVRational q, int b) { return av_rescale(q.num, b, q.den); } @@ -2231,16 +2231,16 @@ static int mov_write_mdcv_tag(AVIOContext *pb, MOVTrack *track) avio_wb32(pb, 32); // size ffio_wfourcc(pb, "mdcv"); - avio_wb16(pb, rescale_mdcv(metadata->display_primaries[1][0], chroma_den)); - avio_wb16(pb, rescale_mdcv(metadata->display_primaries[1][1], chroma_den)); - avio_wb16(pb, rescale_mdcv(metadata->display_primaries[2][0], chroma_den)); - avio_wb16(pb, rescale_mdcv(metadata->display_primaries[2][1], chroma_den)); - avio_wb16(pb, rescale_mdcv(metadata->display_primaries[0][0], chroma_den)); - avio_wb16(pb, rescale_mdcv(metadata->display_primaries[0][1], chroma_den)); - avio_wb16(pb, rescale_mdcv(metadata->white_point[0], chroma_den)); - avio_wb16(pb, rescale_mdcv(metadata->white_point[1], chroma_den)); - avio_wb32(pb, rescale_mdcv(metadata->max_luminance, luma_den)); - avio_wb32(pb, rescale_mdcv(metadata->min_luminance, luma_den)); + avio_wb16(pb, rescale_rational(metadata->display_primaries[1][0], chroma_den)); + avio_wb16(pb, rescale_rational(metadata->display_primaries[1][1], chroma_den)); + avio_wb16(pb, rescale_rational(metadata->display_primaries[2][0], chroma_den)); + avio_wb16(pb, rescale_rational(metadata->display_primaries[2][1], chroma_den)); + avio_wb16(pb, rescale_rational(metadata->display_primaries[0][0], chroma_den)); + avio_wb16(pb, rescale_rational(metadata->display_primaries[0][1], chroma_den)); + avio_wb16(pb, rescale_rational(metadata->white_point[0], chroma_den)); + avio_wb16(pb, rescale_rational(metadata->white_point[1], chroma_den)); + avio_wb32(pb, rescale_rational(metadata->max_luminance, luma_den)); + avio_wb32(pb, rescale_rational(metadata->min_luminance, luma_den)); return 32; } |