mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Set colorspace for libtheora encoding
Originally committed as revision 20583 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
af89b1781f
commit
6c2289b52e
@ -168,7 +168,13 @@ static av_cold int encode_init(AVCodecContext* avc_context)
|
|||||||
t_info.aspect_numerator = 1;
|
t_info.aspect_numerator = 1;
|
||||||
t_info.aspect_denominator = 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)
|
if (avc_context->pix_fmt == PIX_FMT_YUV420P)
|
||||||
t_info.pixel_fmt = TH_PF_420;
|
t_info.pixel_fmt = TH_PF_420;
|
||||||
|
Loading…
Reference in New Issue
Block a user