Mercurial > libavcodec.hg
changeset 10556:54e322044750 libavcodec
Set colorspace for libtheora encoding
author | conrad |
---|---|
date | Sun, 22 Nov 2009 21:08:46 +0000 |
parents | 3d8ab953a869 |
children | f2f4d6fe3f6d |
files | libtheoraenc.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libtheoraenc.c Sun Nov 22 21:08:43 2009 +0000 +++ b/libtheoraenc.c Sun Nov 22 21:08:46 2009 +0000 @@ -168,7 +168,13 @@ 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;