[FFmpeg-cvslog] r20583 - trunk/libavcodec/libtheoraenc.c
conrad
subversion
Sun Nov 22 22:08:47 CET 2009
Author: conrad
Date: Sun Nov 22 22:08:46 2009
New Revision: 20583
Log:
Set colorspace for libtheora encoding
Modified:
trunk/libavcodec/libtheoraenc.c
Modified: trunk/libavcodec/libtheoraenc.c
==============================================================================
--- trunk/libavcodec/libtheoraenc.c Sun Nov 22 22:08:43 2009 (r20582)
+++ trunk/libavcodec/libtheoraenc.c Sun Nov 22 22:08:46 2009 (r20583)
@@ -168,7 +168,13 @@ static av_cold int encode_init(AVCodecCo
t_info.aspect_numerator = 1;
t_info.aspect_denominator = 1;
}
- t_info.colorspace = TH_CS_UNSPECIFIED;
+
+ if (avc_context->color_primaries == AVCOL_PRI_BT470M)
+ t_info.colorspace = TH_CS_ITU_REC_470M;
+ else if (avc_context->color_primaries == AVCOL_PRI_BT470BG)
+ t_info.colorspace = TH_CS_ITU_REC_470BG;
+ else
+ t_info.colorspace = TH_CS_UNSPECIFIED;
if (avc_context->pix_fmt == PIX_FMT_YUV420P)
t_info.pixel_fmt = TH_PF_420;
More information about the ffmpeg-cvslog
mailing list