Re: [FFmpeg-devel] [PATCH 2/4] avformat/movenc: write clap atom for uncompressed yuv in mov

2017-11-19 Thread Michael Niedermayer
On Sat, Nov 18, 2017 at 09:19:23PM -0500, Dave Rice wrote:
> From e9079167c199791e652fe9cd3550333b819a8a9a Mon Sep 17 00:00:00 2001
> From: Dave Rice 
> Date: Thu, 16 Nov 2017 11:29:06 -0500
> Subject: [PATCH 2/4] avformat/movenc: write clap atom for uncompressed yuv in
>  mov
> 
> fixes 6145
> ---
>  libavformat/movenc.c | 19 +++
>  1 file changed, 19 insertions(+)

will apply

thanks


[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

"Nothing to hide" only works if the folks in power share the values of
you and everyone you know entirely and always will -- Tom Scott



signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 2/4] avformat/movenc: write clap atom for uncompressed yuv in mov

2017-11-18 Thread Dave Rice
From e9079167c199791e652fe9cd3550333b819a8a9a Mon Sep 17 00:00:00 2001
From: Dave Rice 
Date: Thu, 16 Nov 2017 11:29:06 -0500
Subject: [PATCH 2/4] avformat/movenc: write clap atom for uncompressed yuv in
 mov

fixes 6145
---
 libavformat/movenc.c | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index ce51c4b3d2..aaa1dedfd7 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1686,6 +1686,21 @@ static int mov_write_sv3d_tag(AVFormatContext *s, 
AVIOContext *pb, AVSphericalMa
 return update_size(pb, sv3d_pos);
 }
 
+static int mov_write_clap_tag(AVIOContext *pb, MOVTrack *track)
+{
+avio_wb32(pb, 40);
+ffio_wfourcc(pb, "clap");
+avio_wb32(pb, track->par->width); /* apertureWidth_N */
+avio_wb32(pb, 1); /* apertureWidth_D (= 1) */
+avio_wb32(pb, track->height); /* apertureHeight_N */
+avio_wb32(pb, 1); /* apertureHeight_D (= 1) */
+avio_wb32(pb, 0); /* horizOff_N (= 0) */
+avio_wb32(pb, 1); /* horizOff_D (= 1) */
+avio_wb32(pb, 0); /* vertOff_N (= 0) */
+avio_wb32(pb, 1); /* vertOff_D (= 1) */
+return 40;
+}
+
 static int mov_write_pasp_tag(AVIOContext *pb, MOVTrack *track)
 {
 AVRational sar;
@@ -1984,6 +1999,10 @@ static int mov_write_video_tag(AVIOContext *pb, 
MOVMuxContext *mov, MOVTrack *tr
 mov_write_pasp_tag(pb, track);
 }
 
+if (uncompressed_ycbcr){
+mov_write_clap_tag(pb, track);
+}
+
 if (mov->encryption_scheme != MOV_ENC_NONE) {
 ff_mov_cenc_write_sinf_tag(track, pb, mov->encryption_kid);
 }
-- 
2.15.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel