aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-16 17:50:43 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-16 17:50:43 +0200
commit13bbfb8fda2123a076fede7bf9063490ed492ed9 (patch)
tree67b805531a646d9bba561ce1143a05430c17e3fa
parent6b657ac7889738b9ab38924cca4e7c418f6fbc38 (diff)
downloadffmpeg-13bbfb8fda2123a076fede7bf9063490ed492ed9.tar.gz
sws: Skip ff_yuv2rgb_c_init_tables() when the output is YUV
Fixes "20bpp not supported by yuv2rgb" warning Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libswscale/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index d73aa6a7a2..ca7c2c4a28 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -919,6 +919,7 @@ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
c->dstFormatBpp = av_get_bits_per_pixel(desc_dst);
c->srcFormatBpp = av_get_bits_per_pixel(desc_src);
+ if (!isYUV(c->dstFormat) && !isGray(c->dstFormat)) {
ff_yuv2rgb_c_init_tables(c, inv_table, srcRange, brightness,
contrast, saturation);
// FIXME factorize
@@ -926,6 +927,7 @@ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
if (HAVE_ALTIVEC && av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)
ff_yuv2rgb_init_tables_altivec(c, inv_table, brightness,
contrast, saturation);
+ }
fill_rgb2yuv_table(c, table, dstRange);