You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Use a simpler and more general check for the gray case in the planarCopy function
Originally committed as revision 29009 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
This commit is contained in:
@@ -1989,11 +1989,8 @@ static int planarCopy(SwsContext *c, uint8_t* src[], int srcStride[], int srcSli
|
|||||||
int y= plane==0 ? srcSliceY: -((-srcSliceY)>>c->chrDstVSubSample);
|
int y= plane==0 ? srcSliceY: -((-srcSliceY)>>c->chrDstVSubSample);
|
||||||
int height= plane==0 ? srcSliceH: -((-srcSliceH)>>c->chrDstVSubSample);
|
int height= plane==0 ? srcSliceH: -((-srcSliceH)>>c->chrDstVSubSample);
|
||||||
|
|
||||||
if ((isGray(c->srcFormat) || isGray(c->dstFormat)) && plane>0)
|
if (dst[plane] && !src[plane])
|
||||||
{
|
|
||||||
if (!isGray(c->dstFormat))
|
|
||||||
fillPlane(dst[plane], dstStride[plane], length, height, y, 128);
|
fillPlane(dst[plane], dstStride[plane], length, height, y, 128);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (dstStride[plane]==srcStride[plane] && srcStride[plane] > 0)
|
if (dstStride[plane]==srcStride[plane] && srcStride[plane] > 0)
|
||||||
|
Reference in New Issue
Block a user