X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libswresample%2Fresample_template.c;h=396b4e30558f69676c5f0f214bb4a6781675d6fc;hb=c08e523586b6be36bee3f73d609733cd80a57674;hp=8d5ff4d50e7443287951dcd1a7bb9272c3feb8d8;hpb=d6d3cfb0aa23c1f6111f71889256874d86c2cf77;p=ffmpeg diff --git a/libswresample/resample_template.c b/libswresample/resample_template.c index 8d5ff4d50e7..396b4e30558 100644 --- a/libswresample/resample_template.c +++ b/libswresample/resample_template.c @@ -48,6 +48,7 @@ # define RENAME(N) N ## _float # elif defined(TEMPLATE_RESAMPLE_FLT_SSE) # define COMMON_CORE COMMON_CORE_FLT_SSE +# define LINEAR_CORE LINEAR_CORE_FLT_SSE # define RENAME(N) N ## _float_sse # endif @@ -81,9 +82,11 @@ # define RENAME(N) N ## _int16 # elif defined(TEMPLATE_RESAMPLE_S16_MMX2) # define COMMON_CORE COMMON_CORE_INT16_MMX2 +# define LINEAR_CORE LINEAR_CORE_INT16_MMX2 # define RENAME(N) N ## _int16_mmx2 # elif defined(TEMPLATE_RESAMPLE_S16_SSE2) # define COMMON_CORE COMMON_CORE_INT16_SSE2 +# define LINEAR_CORE LINEAR_CORE_INT16_SSE2 # define RENAME(N) N ## _int16_sse2 # endif @@ -163,10 +166,14 @@ int RENAME(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int OUT(dst[dst_index], val); }else if(c->linear){ FELEM2 v2=0; +#ifdef LINEAR_CORE + LINEAR_CORE +#else for(i=0; ifilter_length; i++){ val += src[sample_index + i] * (FELEM2)filter[i]; v2 += src[sample_index + i] * (FELEM2)filter[i + c->filter_alloc]; } +#endif val+=(v2-val)*(FELEML)frac / c->src_incr; OUT(dst[dst_index], val); }else{ @@ -213,6 +220,7 @@ int RENAME(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int } #undef COMMON_CORE +#undef LINEAR_CORE #undef RENAME #undef FILTER_SHIFT #undef DELEM