Browse code

avfilter/vf_scale: use sws_getCoefficients()

Found-by: wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2013/07/27 06:03:58
Showing 1 changed files
... ...
@@ -194,16 +194,6 @@ static int query_formats(AVFilterContext *ctx)
194 194
 
195 195
 static const int *parse_yuv_type(const char *s, enum AVColorSpace colorspace)
196 196
 {
197
-    const static int32_t yuv2rgb_coeffs[8][4] = {
198
-        { 117504, 138453, 13954, 34903 },
199
-        { 117504, 138453, 13954, 34903 }, /* ITU-R Rec. 709 (1990) */
200
-        { 104597, 132201, 25675, 53279 }, /* unspecified */
201
-        { 104597, 132201, 25675, 53279 }, /* reserved */
202
-        { 104448, 132798, 24759, 53109 }, /* FCC */
203
-        { 104597, 132201, 25675, 53279 }, /* ITU-R Rec. 624-4 System B, G */
204
-        { 104597, 132201, 25675, 53279 }, /* SMPTE 170M */
205
-        { 117579, 136230, 16907, 35559 }  /* SMPTE 240M (1987) */
206
-    };
207 197
     if (!s)
208 198
         s = "bt601";
209 199
 
... ...
@@ -221,7 +211,7 @@ static const int *parse_yuv_type(const char *s, enum AVColorSpace colorspace)
221 221
         colorspace = AVCOL_SPC_BT470BG;
222 222
     }
223 223
 
224
-    return yuv2rgb_coeffs[colorspace];
224
+    return sws_getCoefficients(colorspace);
225 225
 }
226 226
 
227 227
 static int config_props(AVFilterLink *outlink)