[FFmpeg-devel] [PATCH 1/2] Remove unneeded add bias from 3 functions.

Ronald S. Bultje rsbultje
Mon Jan 31 17:13:20 CET 2011


Hi,

2011/1/30 M?ns Rullg?rd <mans at mansr.com>:
[..]
> @ -2191,9 +2191,8 @@ static void vector_fmul_add_sse(float *dst, const float *src0, const float *src1
>  }
>
>  static void vector_fmul_window_3dnow2(float *dst, const float *src0, const float *src1,
> -                                      const float *win, float add_bias, int len){
> +                                      const float *win, int len){
>  #if HAVE_6REGS
> -    if(add_bias == 0){
>          x86_reg i = -len*4;
>          x86_reg j = len*4-8;
>          __asm__ volatile(
> @@ -2220,15 +2219,14 @@ static void vector_fmul_window_3dnow2(float *dst, const float *src0, const float
>              :"+r"(i), "+r"(j)
>              :"r"(dst+len), "r"(src0+len), "r"(src1), "r"(win+len)
>          );
> -    }else
> +#else
> +    ff_vector_fmul_window_c(dst, src0, src1, win, len);
>  #endif
> -        ff_vector_fmul_window_c(dst, src0, src1, win, add_bias, len);
>  }
>
>  static void vector_fmul_window_sse(float *dst, const float *src0, const float *src1,
> -                                   const float *win, float add_bias, int len){
> +                                   const float *win, int len){
>  #if HAVE_6REGS
> -    if(add_bias == 0){
>          x86_reg i = -len*4;
>          x86_reg j = len*4-16;
>          __asm__ volatile(
> @@ -2256,9 +2254,9 @@ static void vector_fmul_window_sse(float *dst, const float *src0, const float *s
>              :"+r"(i), "+r"(j)
>              :"r"(dst+len), "r"(src0+len), "r"(src1), "r"(win+len)
>          );
> -    }else
> +#else
> +    ff_vector_fmul_window_c(dst, src0, src1, win, len);
>  #endif
> -        ff_vector_fmul_window_c(dst, src0, src1, win, add_bias, len);
>  }
>
>  static void vector_clipf_sse(float *dst, const float *src, float min, float max,

The #if / .. is no longer necessary, just put the whole function under
#if HAVE_6REGS (including setting the functionname in init), so that
the whole function no longer exists if HAVE_6REGS is not set.

Ronald



More information about the ffmpeg-devel mailing list