mirror of
https://github.com/mpv-player/mpv
synced 2025-01-17 04:22:41 +00:00
Use a simpler and more general check for the gray case in the planarCopy function
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29009 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e7c09a0f2b
commit
218c79a44d
@ -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 height= plane==0 ? srcSliceH: -((-srcSliceH)>>c->chrDstVSubSample);
|
||||
|
||||
if ((isGray(c->srcFormat) || isGray(c->dstFormat)) && plane>0)
|
||||
{
|
||||
if (!isGray(c->dstFormat))
|
||||
if (dst[plane] && !src[plane])
|
||||
fillPlane(dst[plane], dstStride[plane], length, height, y, 128);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dstStride[plane]==srcStride[plane] && srcStride[plane] > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user