sws: dont use the optimized 410->420 unscaled conversion when height%4
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 30 Apr 2014 04:21:58 +0000 (06:21 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 10 May 2014 19:55:41 +0000 (21:55 +0200)
Fixes Ticket3594
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 421b21ca8a02a346ba03cea3bb2ecc33f791fc30)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswscale/swscale_unscaled.c

index 44a6902..deabce2 100644 (file)
@@ -943,7 +943,7 @@ void ff_get_unscaled_swscale(SwsContext *c)
         c->swScale = ff_yuv2rgb_get_func_ptr(c);
     }
 
-    if (srcFormat == AV_PIX_FMT_YUV410P &&
+    if (srcFormat == AV_PIX_FMT_YUV410P && !(dstH & 3) &&
         (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P) &&
         !(flags & SWS_BITEXACT)) {
         c->swScale = yvu9ToYv12Wrapper;