[x264-devel] [PATCH] faster mc_chroma_altivec

Guillaume POIRIER gpoirier at mplayerhq.hu
Fri Feb 6 09:17:57 CET 2009


Hey,

On Thu, Feb 5, 2009 at 11:10 PM, Guillaume POIRIER
<gpoirier at mplayerhq.hu> wrote:

> you may want to try:
>
> uint16_t thirtytwo = 0x2020;
> uint16_t *src16_0 = (uint16_t*)src;
> uint16_t *src16_1 = (uint16_t*)(src+1);
> uint16_t * srcp16_0 = (uint16_t*) srcp;
> uint16_t * srcp16_1 = (uint16_t*)(srcp+1);
>
> uint16_t *dst16 = (uint16_t*)dst;
>
>    for( y = 0; y < i_height; y++ )
>    {
>        dst16[0] = ( cA*src16_0[0] +  cB*src16_1[0] +
>                  cC*srcp_0[0] + cD*srcp_1[0] + thirtytwo) >> 6;
>
>        src  += i_src_stride;
>        srcp += i_src_stride;
>        dst  += i_dst_stride;
>    }
>
> Note that I haven't checked if it compiles or if it's correct, it's
> just to show you what I'm talking about.

... and now I know it can't work, due to the right shift!

Sorry for the noise!

Cheers,

Guillaume
-- 
Only a very small fraction of our DNA does anything; the rest is all
comments and ifdefs.

Charles M. Schulz  - "I love mankind; it's people I can't stand."


More information about the x264-devel mailing list