[FFmpeg-devel] [PATCH] modification of the MMX H264 MC chroma functions to support RV40

Michael Niedermayer michaelni
Fri Dec 26 04:21:40 CET 2008


On Fri, Dec 26, 2008 at 03:15:51AM +0100, Mathieu Velten wrote:
> patch attached
[...]

> +static const uint64_t *rv40_bias_reg[8][4] = {
> +    {    &ff_pw_0, &ff_pw_16.a, &ff_pw_32.a, &ff_pw_16.a },
> +    { &ff_pw_32.a, &ff_pw_28.a, &ff_pw_32.a, &ff_pw_28.a },
> +    {    &ff_pw_0, &ff_pw_32.a, &ff_pw_16.a, &ff_pw_32.a },
> +    { &ff_pw_32.a, &ff_pw_28.a, &ff_pw_32.a, &ff_pw_28.a },
> +    /* bias div by 8 */
> +    {    &ff_pw_0,    &ff_pw_2,    &ff_pw_4,    &ff_pw_2 },
> +    {    &ff_pw_4,    &ff_pw_3,    &ff_pw_4,    &ff_pw_3 },
> +    {    &ff_pw_0,    &ff_pw_4,    &ff_pw_2,    &ff_pw_4 },
> +    {    &ff_pw_4,    &ff_pw_3,    &ff_pw_4,    &ff_pw_3 }
> +};

this is a table of pointers, thus requireing an unneeded pointer dereference


> +
> +static void put_rv40_chroma_mc8_mmx(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y)
> +{
> +    int y_div_2 = y >> 1;
> +    int x_div_2 = x >> 1;
> +    put_h264_chroma_generic_mc8_mmx(dst, src, stride, h, x, y, rv40_bias_reg[y_div_2][x_div_2], rv40_bias_reg[y_div_2+4][x_div_2]);

there is no need to pass 2 pointers, one is enough

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081226/fc2d592a/attachment.pgp>



More information about the ffmpeg-devel mailing list