[FFmpeg-devel] [PATCH] avformat/movenc: correct ImageDescription depth for v210 v410
Dave Rice
dave at dericed.com
Thu Nov 16 18:54:59 EET 2017
This corrects a few values in the Image Description for v210 and v410 in mov. Apple defines what the depth value for these uncompressed formats should be in https://developer.apple.com/library/content/technotes/tn2162/_index.html <https://developer.apple.com/library/content/technotes/tn2162/_index.html>.
From 47def189b270ac93245e002580463b254daf8484 Mon Sep 17 00:00:00 2001
From: Dave Rice <dave at dericed.com>
Date: Thu, 16 Nov 2017 11:53:32 -0500
Subject: [PATCH] avformat/movenc: correct ImageDescription depth for v210 v410
Per
https://developer.apple.com/library/content/technotes/tn2162/_index.html
.
---
libavformat/movenc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 18232e8ba3..f7b08e2885 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1885,7 +1885,11 @@ static int mov_write_video_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *tr
avio_w8(pb, strlen(compressor_name));
avio_write(pb, compressor_name, 31);
- if (track->mode == MODE_MOV && track->par->bits_per_coded_sample)
+ if (track->mode == MODE_MOV && track->par->codec_id == AV_CODEC_ID_V410)
+ avio_wb16(pb, 0x18);
+ else if (track->mode == MODE_MOV && track->par->codec_id == AV_CODEC_ID_V210)
+ avio_wb16(pb, 0x18);
+ else if (track->mode == MODE_MOV && track->par->bits_per_coded_sample)
avio_wb16(pb, track->par->bits_per_coded_sample |
(track->par->format == AV_PIX_FMT_GRAY8 ? 0x20 : 0));
else
--
2.15.0
More information about the ffmpeg-devel
mailing list