[FFmpeg-devel] [PATCH]planarRgb16ToRgb16Wrapper does not support 8bit conversion

Carl Eugen Hoyos cehoyos at ag.or.at
Mon Jun 10 10:06:19 CEST 2013


Hi!

Attached patch should make the unscaled gbr to rgb16 conversion more robust.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index 774c655..3b07800 100644
--- a/libswscale/swscale_unscaled.c
+++ b/libswscale/swscale_unscaled.c
@@ -495,7 +495,8 @@ static int planarRgb16ToRgb16Wrapper(SwsContext *c, const uint8_t *src[],
         swap += 2;
 
     if ((src_format->flags & (AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB)) !=
-        (AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB)) {
+        (AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB) ||
+        bits_per_sample <= 8) {
         av_log(c, AV_LOG_ERROR, "unsupported planar RGB conversion %s -> %s\n",
                src_format->name, dst_format->name);
         return srcSliceH;


More information about the ffmpeg-devel mailing list