Originally committed as revision 23030 to svn://svn.ffmpeg.org/ffmpeg/trunk
David Conrad authored on 2010/05/06 06:38:02... | ... |
@@ -128,6 +128,24 @@ static int libschroedinger_encode_init(AVCodecContext *avccontext) |
128 | 128 |
if (SetSchroChromaFormat(avccontext) == -1) |
129 | 129 |
return -1; |
130 | 130 |
|
131 |
+ if (avccontext->color_primaries == AVCOL_PRI_BT709) { |
|
132 |
+ p_schro_params->format->colour_primaries = SCHRO_COLOUR_PRIMARY_HDTV; |
|
133 |
+ } else if (avccontext->color_primaries == AVCOL_PRI_BT470BG) { |
|
134 |
+ p_schro_params->format->colour_primaries = SCHRO_COLOUR_PRIMARY_SDTV_625; |
|
135 |
+ } else if (avccontext->color_primaries == AVCOL_PRI_SMPTE170M) { |
|
136 |
+ p_schro_params->format->colour_primaries = SCHRO_COLOUR_PRIMARY_SDTV_525; |
|
137 |
+ } |
|
138 |
+ |
|
139 |
+ if (avccontext->colorspace == AVCOL_SPC_BT709) { |
|
140 |
+ p_schro_params->format->colour_matrix = SCHRO_COLOUR_MATRIX_HDTV; |
|
141 |
+ } else if (avccontext->colorspace == AVCOL_SPC_BT470BG) { |
|
142 |
+ p_schro_params->format->colour_matrix = SCHRO_COLOUR_MATRIX_SDTV; |
|
143 |
+ } |
|
144 |
+ |
|
145 |
+ if (avccontext->color_trc == AVCOL_TRC_BT709) { |
|
146 |
+ p_schro_params->format->transfer_function = SCHRO_TRANSFER_CHAR_TV_GAMMA; |
|
147 |
+ } |
|
148 |
+ |
|
131 | 149 |
if (ff_get_schro_frame_format(p_schro_params->format->chroma_format, |
132 | 150 |
&p_schro_params->frame_format) == -1) { |
133 | 151 |
av_log(avccontext, AV_LOG_ERROR, |