Mercurial > libavcodec.hg
comparison libtheoraenc.c @ 10556:54e322044750 libavcodec
Set colorspace for libtheora encoding
author | conrad |
---|---|
date | Sun, 22 Nov 2009 21:08:46 +0000 |
parents | 3d8ab953a869 |
children | aacf5f712ba7 |
comparison
equal
deleted
inserted
replaced
10555:3d8ab953a869 | 10556:54e322044750 |
---|---|
166 t_info.aspect_denominator = avc_context->sample_aspect_ratio.den; | 166 t_info.aspect_denominator = avc_context->sample_aspect_ratio.den; |
167 } else { | 167 } else { |
168 t_info.aspect_numerator = 1; | 168 t_info.aspect_numerator = 1; |
169 t_info.aspect_denominator = 1; | 169 t_info.aspect_denominator = 1; |
170 } | 170 } |
171 t_info.colorspace = TH_CS_UNSPECIFIED; | 171 |
172 if (avc_context->color_primaries == AVCOL_PRI_BT470M) | |
173 t_info.colorspace = TH_CS_ITU_REC_470M; | |
174 else if (avc_context->color_primaries == AVCOL_PRI_BT470BG) | |
175 t_info.colorspace = TH_CS_ITU_REC_470BG; | |
176 else | |
177 t_info.colorspace = TH_CS_UNSPECIFIED; | |
172 | 178 |
173 if (avc_context->pix_fmt == PIX_FMT_YUV420P) | 179 if (avc_context->pix_fmt == PIX_FMT_YUV420P) |
174 t_info.pixel_fmt = TH_PF_420; | 180 t_info.pixel_fmt = TH_PF_420; |
175 else if (avc_context->pix_fmt == PIX_FMT_YUV422P) | 181 else if (avc_context->pix_fmt == PIX_FMT_YUV422P) |
176 t_info.pixel_fmt = TH_PF_422; | 182 t_info.pixel_fmt = TH_PF_422; |