mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
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>
This commit is contained in:
parent
d6d5ef5534
commit
e58013dd8f
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user