diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-26 19:43:06 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2013-02-09 14:31:53 -0500 |
commit | e58013dd8f00e17dd98ba64e41c72f1d152f6608 (patch) | |
tree | b7ae1c2f6f15e89006a9516474005aa308373b76 /libswscale | |
parent | d6d5ef5534d582f9dbaf18ac2605cf5bb72cd821 (diff) | |
download | ffmpeg-streaming-e58013dd8f00e17dd98ba64e41c72f1d152f6608.zip ffmpeg-streaming-e58013dd8f00e17dd98ba64e41c72f1d152f6608.tar.gz |
sws: use planarRgbToRgbWrapper only for 8bit per component
The function doesnt support >8bit currently
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale_unscaled.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index 9b919f8..78090f1 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -932,7 +932,15 @@ void ff_get_unscaled_swscale(SwsContext *c) && (!needsDither || (c->flags&(SWS_FAST_BILINEAR|SWS_POINT)))) c->swScale= rgbToRgbWrapper; - if (isPlanarRGB(srcFormat) && isPackedRGB(dstFormat)) +#define isByteRGB(f) ( \ + f == AV_PIX_FMT_RGB32 || \ + f == AV_PIX_FMT_RGB32_1 || \ + f == AV_PIX_FMT_RGB24 || \ + f == AV_PIX_FMT_BGR32 || \ + f == AV_PIX_FMT_BGR32_1 || \ + f == AV_PIX_FMT_BGR24) + + if (srcFormat == AV_PIX_FMT_GBRP && isPlanar(srcFormat) && isByteRGB(dstFormat)) c->swScale = planarRgbToRgbWrapper; /* bswap 16 bits per pixel/component packed formats */ |