[FFmpeg-devel] [PATCH 1/2] swscale/arm/yuv2rgb: disable neon if accurate_rnd is enabled

Matthieu Bouron matthieu.bouron at gmail.com
Fri Dec 18 15:59:45 CET 2015


From: Matthieu Bouron <matthieu.bouron at stupeflix.com>

This disables the 32bit precision neon code path in favor of the
default C one and avoids breaking fate if accurate_rnd is enabled.
---
 libswscale/arm/swscale_unscaled.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/libswscale/arm/swscale_unscaled.c b/libswscale/arm/swscale_unscaled.c
index dbb0fb0..8aa6432 100644
--- a/libswscale/arm/swscale_unscaled.c
+++ b/libswscale/arm/swscale_unscaled.c
@@ -101,7 +101,6 @@ DECLARE_FF_NVX_TO_RGBX_FUNCS(nvx, bgra, precision)
 
 #define DECLARE_FF_NVX_TO_ALL_RGBX_ALL_PRECISION_FUNCS(nvx)                                 \
 DECLARE_FF_NVX_TO_ALL_RGBX_FUNCS(nvx, 16)                                                   \
-DECLARE_FF_NVX_TO_ALL_RGBX_FUNCS(nvx, 32)                                                   \
 
 DECLARE_FF_NVX_TO_ALL_RGBX_ALL_PRECISION_FUNCS(nv12)
 DECLARE_FF_NVX_TO_ALL_RGBX_ALL_PRECISION_FUNCS(nv21)
@@ -114,9 +113,9 @@ DECLARE_FF_NVX_TO_ALL_RGBX_ALL_PRECISION_FUNCS(nv21)
     if (c->srcFormat == AV_PIX_FMT_##IFMT                                                   \
         && c->dstFormat == AV_PIX_FMT_##OFMT                                                \
         && !(c->srcH & 1)                                                                   \
-        && !(c->srcW & 15)) {                                                               \
-        c->swscale = (accurate_rnd) ? ifmt##_to_##ofmt##_neon_wrapper_32 :                  \
-                                      ifmt##_to_##ofmt##_neon_wrapper_16 ;                  \
+        && !(c->srcW & 15)                                                                  \
+        && !accurate_rnd) {                                                                 \
+        c->swscale = ifmt##_to_##ofmt##_neon_wrapper_16;                                    \
     }                                                                                       \
 } while (0)
 
-- 
2.6.4



More information about the ffmpeg-devel mailing list