[FFmpeg-devel] [PATCH] SSE-optimized vector_clipf()

Vitor Sessak vitor1001
Sat Aug 8 09:10:52 CEST 2009


Vitor Sessak wrote:
> Michael Niedermayer wrote:
>> On Thu, Aug 06, 2009 at 02:55:30AM +0200, Vitor Sessak wrote:
>>> Vitor Sessak wrote:
>>>> $subj, 10% speedup for twinvq decoding (but should be useful also 
>>>> for AMR and wmapro).
>>> err, I mean, attached.
>>>
>>> -Vitor
>>
>>>  dsputil.c         |   15 +++++++++++++++
>>>  dsputil.h         |    3 ++-
>>>  x86/dsputil_mmx.c |   34 ++++++++++++++++++++++++++++++++++

[...]

>>> +        "movaps  %%xmm3, 48(%1,%0) \n\t"
>>> +        "sub  $64, %0 \n\t"
>>
>> did you benchmark the backward direction vs forward?
> 
> I've tried (both synthetic and twinvq dec) and found no measurable 
> difference.
> 
> I've attached a new version that now accepts in != out. Also a patch for 
> using it in qcelpdec.c.
> 
> -Vitor
> 
> Index: libavcodec/dsputil.c
> ===================================================================
> --- libavcodec/dsputil.c	(revision 19598)
> +++ libavcodec/dsputil.c	(working copy)
> @@ -4093,6 +4093,20 @@
>          dst[i] = src[i] * mul;
>  }
>  
> +void vector_clipf_c(float *dst, float *src, float min, float max, int len) {

Oops, I mean _static void_ here. New version attached.

-Vitor

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dsp_vector_clipf3.diff
Type: text/x-diff
Size: 4142 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090808/0398d55b/attachment.diff>



More information about the ffmpeg-devel mailing list