On Wednesday 20 May 2015 08:02:57 pm Ronald S. Bultje wrote:
> Hi,
>
> On Wed, May 20, 2015 at 12:32 PM, Carl Eugen Hoyos <ceho...@ag.or.at> wrote:
> > Our mov demuxer claims that "6" is bt470bg, so write "6" if
> > the user specified bt470bg.
>
> [..]
>
> >      }
> >      switch (track->enc->colorspace) {
> >      case AVCOL_TRC_BT709:     avio_wb16(pb, 1); break;
> > +    case AVCOL_PRI_BT470BG:
> >      case AVCOL_PRI_SMPTE170M: avio_wb16(pb, 6); break;
> >      case AVCOL_PRI_SMPTE240M: avio_wb16(pb, 7); break;
> >      default:                  avio_wb16(pb, 2);
> 
> Am I the only one that thinks it's weird that we read the SPC field as a
> combination/mixture of TRC/PRI instead of SPC fields?

New patch attached, I will change the others if ok.

Thank you, Carl Eugen
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index b6821d4..4aa64b0 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1608,6 +1608,7 @@ static int mov_write_colr_tag(AVIOContext *pb, MOVTrack 
*track)
     }
     switch (track->enc->colorspace) {
     case AVCOL_TRC_BT709:     avio_wb16(pb, 1); break;
+    case AVCOL_SPC_BT470BG:
     case AVCOL_PRI_SMPTE170M: avio_wb16(pb, 6); break;
     case AVCOL_PRI_SMPTE240M: avio_wb16(pb, 7); break;
     default:                  avio_wb16(pb, 2);
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to