Commit 6f348086 authored by Reimar Döffinger's avatar Reimar Döffinger

Fix planarCopy to ignore the GRAY8 "pseudo"-palette, fixes libavtest regression test.

Originally committed as revision 29021 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
parent 31e2d5d3
...@@ -2118,7 +2118,9 @@ static int planarCopy(SwsContext *c, uint8_t* src[], int srcStride[], int srcSli ...@@ -2118,7 +2118,9 @@ static int planarCopy(SwsContext *c, uint8_t* src[], int srcStride[], int srcSli
int height= (plane==0 || plane==3) ? srcSliceH: -((-srcSliceH)>>c->chrDstVSubSample); int height= (plane==0 || plane==3) ? srcSliceH: -((-srcSliceH)>>c->chrDstVSubSample);
if (!dst[plane]) continue; if (!dst[plane]) continue;
if (!src[plane]) // ignore palette for GRAY8
if (plane == 1 && !dst[2]) continue;
if (!src[plane] || (plane == 1 && !src[2]))
fillPlane(dst[plane], dstStride[plane], length, height, y, (plane==3) ? 255 : 128); fillPlane(dst[plane], dstStride[plane], length, height, y, (plane==3) ? 255 : 128);
else else
{ {
......
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