diff options
Diffstat (limited to 'libswscale/yuv2rgb.c')
-rw-r--r-- | libswscale/yuv2rgb.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index 3c7bb3fd9f..a019bf76fd 100644 --- a/libswscale/yuv2rgb.c +++ b/libswscale/yuv2rgb.c @@ -49,6 +49,13 @@ const int32_t ff_yuv2rgb_coeffs[8][4] = { {117579, 136230, 16907, 35559} /* SMPTE 240M (1987) */ }; +const int * sws_getCoefficients(int colorspace) +{ + if (colorspace > 7 || colorspace < 0) + colorspace = SWS_CS_DEFAULT; + return ff_yuv2rgb_coeffs[colorspace]; +} + #define LOADCHROMA(i) \ U = pu[i]; \ V = pv[i]; \ |