[FFmpeg-cvslog] swresample: reuse COMMON_CORE asm where possible

James Almer git at videolan.org
Tue Mar 18 16:22:51 CET 2014


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Mar 18 00:00:30 2014 -0300| [3d48cbc56ce778c0be7b080d35b859dc0ac0c853] | committer: Michael Niedermayer

swresample: reuse COMMON_CORE asm where possible

Signed-off-by: James Almer <jamrial at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libswresample/resample_template.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libswresample/resample_template.c b/libswresample/resample_template.c
index bdb038a..f11053d 100644
--- a/libswresample/resample_template.c
+++ b/libswresample/resample_template.c
@@ -152,6 +152,7 @@ int RENAME(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int
             }else if(sample_index < 0){
                 for(i=0; i<c->filter_length; i++)
                     val += src[FFABS(sample_index + i)] * (FELEM2)filter[i];
+                OUT(dst[dst_index], val);
             }else if(c->linear){
                 FELEM2 v2=0;
                 for(i=0; i<c->filter_length; i++){
@@ -159,14 +160,18 @@ int RENAME(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int
                     v2  += src[sample_index + i] * (FELEM2)filter[i + c->filter_alloc];
                 }
                 val+=(v2-val)*(FELEML)frac / c->src_incr;
+                OUT(dst[dst_index], val);
             }else{
+#ifdef COMMON_CORE
+                COMMON_CORE
+#else
                 for(i=0; i<c->filter_length; i++){
                     val += src[sample_index + i] * (FELEM2)filter[i];
                 }
+                OUT(dst[dst_index], val);
+#endif
             }
 
-            OUT(dst[dst_index], val);
-
             frac += dst_incr_frac;
             index += dst_incr;
             if(frac >= c->src_incr){



More information about the ffmpeg-cvslog mailing list