]> git.sesse.net Git - ffmpeg/commitdiff
aarch64/yuv2rgb_neon: fix return value
authorLynne <dev@lynne.ee>
Tue, 7 Jul 2020 15:01:58 +0000 (16:01 +0100)
committerLynne <dev@lynne.ee>
Thu, 9 Jul 2020 09:33:14 +0000 (10:33 +0100)
We return 0 for this particular architecture but should instead be
returning the number of lines.
Fixes users who check the return value matches what they expect.

libswscale/aarch64/swscale_unscaled.c
libswscale/aarch64/yuv2rgb_neon.S

index 551daad9e353046e217b2cfc8ef19f89c3b3f80a..c7a2a1037df83b1e5eb6f4162a4f5e89054e6585 100644 (file)
@@ -42,15 +42,14 @@ static int ifmt##_to_##ofmt##_neon_wrapper(SwsContext *c, const uint8_t *src[],
                                            uint8_t *dst[], int dstStride[]) {               \
     const int16_t yuv2rgb_table[] = { YUV_TO_RGB_TABLE };                                   \
                                                                                             \
-    ff_##ifmt##_to_##ofmt##_neon(c->srcW, srcSliceH,                                        \
-                                 dst[0] + srcSliceY * dstStride[0], dstStride[0],           \
-                                 src[0], srcStride[0],                                      \
-                                 src[1], srcStride[1],                                      \
-                                 src[2], srcStride[2],                                      \
-                                 yuv2rgb_table,                                             \
-                                 c->yuv2rgb_y_offset >> 6,                                  \
-                                 c->yuv2rgb_y_coeff);                                       \
-    return 0;                                                                               \
+    return ff_##ifmt##_to_##ofmt##_neon(c->srcW, srcSliceH,                                 \
+                                        dst[0] + srcSliceY * dstStride[0], dstStride[0],    \
+                                        src[0], srcStride[0],                               \
+                                        src[1], srcStride[1],                               \
+                                        src[2], srcStride[2],                               \
+                                        yuv2rgb_table,                                      \
+                                        c->yuv2rgb_y_offset >> 6,                           \
+                                        c->yuv2rgb_y_coeff);                                \
 }                                                                                           \
 
 #define DECLARE_FF_YUVX_TO_ALL_RGBX_FUNCS(yuvx)                                             \
@@ -76,14 +75,12 @@ static int ifmt##_to_##ofmt##_neon_wrapper(SwsContext *c, const uint8_t *src[],
                                            uint8_t *dst[], int dstStride[]) {               \
     const int16_t yuv2rgb_table[] = { YUV_TO_RGB_TABLE };                                   \
                                                                                             \
-    ff_##ifmt##_to_##ofmt##_neon(c->srcW, srcSliceH,                                        \
-                                 dst[0] + srcSliceY * dstStride[0], dstStride[0],           \
-                                 src[0], srcStride[0], src[1], srcStride[1],                \
-                                 yuv2rgb_table,                                             \
-                                 c->yuv2rgb_y_offset >> 6,                                  \
-                                 c->yuv2rgb_y_coeff);                                       \
-                                                                                            \
-    return 0;                                                                               \
+    return ff_##ifmt##_to_##ofmt##_neon(c->srcW, srcSliceH,                                 \
+                                        dst[0] + srcSliceY * dstStride[0], dstStride[0],    \
+                                        src[0], srcStride[0], src[1], srcStride[1],         \
+                                        yuv2rgb_table,                                      \
+                                        c->yuv2rgb_y_offset >> 6,                           \
+                                        c->yuv2rgb_y_coeff);                                \
 }                                                                                           \
 
 #define DECLARE_FF_NVX_TO_ALL_RGBX_FUNCS(nvx)                                               \
index b7446aa10511388641a2cb4253014e421d77ee58..f4b220fb608eaf6a7af2b31e5c26c1676c8715cb 100644 (file)
 .macro declare_func ifmt ofmt
 function ff_\ifmt\()_to_\ofmt\()_neon, export=1
     load_args_\ifmt
+    mov                 w9, w1
 1:
     mov                 w8, w0                                          // w8 = width
 2:
@@ -193,6 +194,7 @@ function ff_\ifmt\()_to_\ofmt\()_neon, export=1
     increment_\ifmt
     subs                w1, w1, #1                                      // height -= 1
     b.gt                1b
+    mov                 w0, w9
     ret
 endfunc
 .endm