diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-01-19 08:36:17 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-22 00:46:19 +0100 |
commit | 657878f76ebd4d3aa151c3b3070c1a2f89b064ec (patch) | |
tree | c018b73c5485c1c514dcf108b5fe30cf74751980 /libswscale/swscale_unscaled.c | |
parent | 2478612fc077a9f38f3d1e413d764ac3c355d7ad (diff) | |
download | ffmpeg-657878f76ebd4d3aa151c3b3070c1a2f89b064ec.tar.gz |
sws: fix copy case detection with gray8a.
Fixes gray_alpha.png
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/swscale_unscaled.c')
-rw-r--r-- | libswscale/swscale_unscaled.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index eca377873b..b5b05744e5 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -829,13 +829,14 @@ void ff_get_unscaled_swscale(SwsContext *c) if (srcFormat == PIX_FMT_UYVY422 && dstFormat == PIX_FMT_YUV422P) c->swScale = uyvyToYuv422Wrapper; +#define isPlanarGray(x) (isGray(x) && (x) != PIX_FMT_GRAY8A) /* simple copy */ if ( srcFormat == dstFormat || (srcFormat == PIX_FMT_YUVA420P && dstFormat == PIX_FMT_YUV420P) || (srcFormat == PIX_FMT_YUV420P && dstFormat == PIX_FMT_YUVA420P) || - (isPlanarYUV(srcFormat) && isGray(dstFormat)) || - (isPlanarYUV(dstFormat) && isGray(srcFormat)) || - (isGray(dstFormat) && isGray(srcFormat)) || + (isPlanarYUV(srcFormat) && isPlanarGray(dstFormat)) || + (isPlanarYUV(dstFormat) && isPlanarGray(srcFormat)) || + (isPlanarGray(dstFormat) && isPlanarGray(srcFormat)) || (isPlanarYUV(srcFormat) && isPlanarYUV(dstFormat) && c->chrDstHSubSample == c->chrSrcHSubSample && c->chrDstVSubSample == c->chrSrcVSubSample && |