Commit f4df7a6d authored by stefano's avatar stefano

Fill the r, g, b values used for computing the c->pal_yuv table in the

case where the source format is PIX_FMT_GRAY8.

This is required as PIX_FMT_GRAY8 has been declared as a paletted
format in FFmpeg r22191, fix GRAY8 -> RGB conversion.

git-svn-id: file:///var/local/repositories/mplayer/trunk/libswscale@30826 b3059339-0415-0410-9bf9-f77b7e298cf2
parent 051edba7
...@@ -1849,6 +1849,8 @@ int sws_scale(SwsContext *c, const uint8_t* const src[], const int srcStride[], ...@@ -1849,6 +1849,8 @@ int sws_scale(SwsContext *c, const uint8_t* const src[], const int srcStride[],
r= (i>>3 )*255; r= (i>>3 )*255;
g= ((i>>1)&3)*85; g= ((i>>1)&3)*85;
b= (i&1 )*255; b= (i&1 )*255;
} else if(c->srcFormat == PIX_FMT_GRAY8) {
r = g = b = i;
} else { } else {
assert(c->srcFormat == PIX_FMT_BGR4_BYTE); assert(c->srcFormat == PIX_FMT_BGR4_BYTE);
b= (i>>3 )*255; b= (i>>3 )*255;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment