[FFmpeg-cvslog] swscale: add 14bit support to the "MMX/SSE2/SSSE3/ SSE4 versions for horizontal scaling"

Michael Niedermayer git at videolan.org
Wed Sep 14 00:40:32 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Sep 14 00:18:16 2011 +0200| [1eb8014b492705533a8e18b08e74ee6ac63ba44f] | committer: Michael Niedermayer

swscale: add 14bit support to the "MMX/SSE2/SSSE3/SSE4 versions for horizontal scaling"

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1eb8014b492705533a8e18b08e74ee6ac63ba44f
---

 libswscale/x86/scale.asm     |    2 ++
 libswscale/x86/swscale_mmx.c |    7 ++++++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/libswscale/x86/scale.asm b/libswscale/x86/scale.asm
index ebaab34..f9778c8 100644
--- a/libswscale/x86/scale.asm
+++ b/libswscale/x86/scale.asm
@@ -411,11 +411,13 @@ SCALE_FUNC %1, %2, X, X8, %3, 7, %4
 SCALE_FUNCS  8, 15, %1, %2
 SCALE_FUNCS  9, 15, %1, %3
 SCALE_FUNCS 10, 15, %1, %3
+SCALE_FUNCS 14, 15, %1, %3
 SCALE_FUNCS 16, 15, %1, %4
 %endif ; !sse4
 SCALE_FUNCS  8, 19, %1, %2
 SCALE_FUNCS  9, 19, %1, %3
 SCALE_FUNCS 10, 19, %1, %3
+SCALE_FUNCS 14, 19, %1, %3
 SCALE_FUNCS 16, 19, %1, %4
 %endmacro
 
diff --git a/libswscale/x86/swscale_mmx.c b/libswscale/x86/swscale_mmx.c
index 427979b..815055e 100644
--- a/libswscale/x86/swscale_mmx.c
+++ b/libswscale/x86/swscale_mmx.c
@@ -187,10 +187,12 @@ extern 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, 14, 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, 14, 19, opt); \
     SCALE_FUNC(filter_n, 16, 19, opt)
 
 #define SCALE_FUNCS_MMX(opt) \
@@ -233,7 +235,10 @@ void ff_sws_init_swScale_mmx(SwsContext *c)
     } else if (c->srcBpc == 10) { \
         hscalefn = c->dstBpc <= 10 ? ff_hscale10to15_ ## filtersize ## _ ## opt2 : \
                                      ff_hscale10to19_ ## filtersize ## _ ## opt1; \
-    } else if(c->srcBpc == 16 && !((c->srcFormat==PIX_FMT_PAL8||isAnyRGB(c->srcFormat)) && av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1<15)) { \
+    } else if (c->srcBpc == 14 || ((c->srcFormat==PIX_FMT_PAL8||isAnyRGB(c->srcFormat)) && av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1<15)) { \
+        hscalefn = c->dstBpc <= 10 ? ff_hscale14to15_ ## filtersize ## _ ## opt2 : \
+                                     ff_hscale14to19_ ## filtersize ## _ ## opt1; \
+    } else { /* c->srcBpc == 16 */ \
         hscalefn = c->dstBpc <= 10 ? ff_hscale16to15_ ## filtersize ## _ ## opt2 : \
                                      ff_hscale16to19_ ## filtersize ## _ ## opt1; \
     } \



More information about the ffmpeg-cvslog mailing list