[3/4] swscale: x86: Add some forgotten 12-bit planar YUV cases

Message ID 20161010203516.27667-4-lu_zero@gentoo.org
State New
Headers show

Commit Message

Luca Barbato Oct. 10, 2016, 8:35 p.m.
From: Michael Niedermayer <michaelni@gmx.at>

Signed-off-by: Diego Biurrun <diego@biurrun.de>
---
 libswscale/x86/scale.asm | 2 ++
 libswscale/x86/swscale.c | 8 +++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

Comments

Luca Barbato Oct. 10, 2016, 8:38 p.m. | #1
On 10/10/2016 22:35, Luca Barbato wrote:
> +    } else if (c->srcBpc == 12 && 0) { \

Meh, disregard that =P

Patch

diff --git a/libswscale/x86/scale.asm b/libswscale/x86/scale.asm
index a4c7e1c..982b432 100644
--- a/libswscale/x86/scale.asm
+++ b/libswscale/x86/scale.asm
@@ -407,11 +407,13 @@  SCALE_FUNC %1, %2, X, X8, 7, %3
 SCALE_FUNCS  8, 15, %1
 SCALE_FUNCS  9, 15, %2
 SCALE_FUNCS 10, 15, %2
+SCALE_FUNCS 12, 15, %2
 SCALE_FUNCS 16, 15, %3
 %endif ; !sse4
 SCALE_FUNCS  8, 19, %1
 SCALE_FUNCS  9, 19, %2
 SCALE_FUNCS 10, 19, %2
+SCALE_FUNCS 12, 19, %2
 SCALE_FUNCS 16, 19, %3
 %endmacro
 
diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c
index 326f824..2ddd341 100644
--- a/libswscale/x86/swscale.c
+++ b/libswscale/x86/swscale.c
@@ -215,10 +215,12 @@  void ff_hscale ## from_bpc ## to ## to_bpc ## _ ## filter_n ## _ ## opt( \
     SCALE_FUNC(filter_n,  8, 15, opt); \
     SCALE_FUNC(filter_n,  9, 15, opt); \
     SCALE_FUNC(filter_n, 10, 15, opt); \
+    SCALE_FUNC(filter_n, 12, 15, opt); \
     SCALE_FUNC(filter_n, 16, 15, opt); \
     SCALE_FUNC(filter_n,  8, 19, opt); \
     SCALE_FUNC(filter_n,  9, 19, opt); \
     SCALE_FUNC(filter_n, 10, 19, opt); \
+    SCALE_FUNC(filter_n, 12, 19, opt); \
     SCALE_FUNC(filter_n, 16, 19, opt)
 
 #define SCALE_FUNCS_MMX(opt) \
@@ -324,9 +326,9 @@  av_cold void ff_sws_init_swscale_x86(SwsContext *c)
     } else if (c->srcBpc == 10) { \
         hscalefn = c->dstBpc <= 15 ? ff_hscale10to15_ ## filtersize ## _ ## opt2 : \
                                      ff_hscale10to19_ ## filtersize ## _ ## opt1; \
-    } else if (c->srcBpc == 12) { \
-        hscalefn = c->dstBpc <= 15 ? ff_hscale16to15_ ## filtersize ## _ ## opt2 : \
-                                     ff_hscale16to19_ ## filtersize ## _ ## opt1; \
+    } else if (c->srcBpc == 12 && 0) { \
+        hscalefn = c->dstBpc <= 15 ? ff_hscale12to15_ ## filtersize ## _ ## opt2 : \
+                                     ff_hscale12to19_ ## filtersize ## _ ## opt1; \
     } else if (c->srcBpc == 16) { \
         hscalefn = c->dstBpc <= 15 ? ff_hscale16to15_ ## filtersize ## _ ## opt2 : \
                                      ff_hscale16to19_ ## filtersize ## _ ## opt1; \