[FFmpeg-devel] [PATCH] modification of the MMX H264 MC chroma functions to support RV40
Michael Niedermayer
michaelni
Mon Dec 22 23:14:07 CET 2008
On Mon, Dec 22, 2008 at 08:51:22PM +0100, Mathieu Velten wrote:
> sorry :P
>
> patch attached
>
> Mathieu Velten
>
> 2008/12/22 Diego Biurrun <diego at biurrun.de>:
> > On Mon, Dec 22, 2008 at 08:45:48PM +0100, Mathieu Velten wrote:
> >> it is bit exact for the unique rv40 sample I have, about 5% speedup.
> >
> > Very nice, can we see the patch now? :)
how much does it slow h.264 down?
please put START/STOP_TIMER surrounding the call to the MC code
and tell us the results.
[...]
> @@ -45,17 +46,16 @@
> /* 1 dimensional filter only */
> const int dxy = x ? 1 : stride;
>
> - rnd_reg = rnd ? &ff_pw_4 : &ff_pw_3;
> -
> __asm__ volatile(
> "movd %0, %%mm5\n\t"
> "movq %1, %%mm4\n\t"
> - "movq %2, %%mm6\n\t" /* mm6 = rnd */
> + "movq %2, %%mm6\n\t"
> + "psrlw $3, %%mm6\n\t" /* mm6 = bias >> 3 */
is this a useless instruction that can be merged into the table?
[...]
> @@ -2635,6 +2672,9 @@
> c->put_h264_chroma_pixels_tab[0]= put_h264_chroma_mc8_mmx_rnd;
> c->put_h264_chroma_pixels_tab[1]= put_h264_chroma_mc4_mmx;
> c->put_no_rnd_h264_chroma_pixels_tab[0]= put_h264_chroma_mc8_mmx_nornd;
> +
tabs
[...]
> c->avg_h264_chroma_pixels_tab[1]= avg_h264_chroma_mc4_mmx2;
> @@ -2805,6 +2848,9 @@
>
> c->avg_h264_chroma_pixels_tab[0]= avg_h264_chroma_mc8_3dnow_rnd;
> c->avg_h264_chroma_pixels_tab[1]= avg_h264_chroma_mc4_3dnow;
> +
trailing whitespace
[...]
> Index: libavcodec/x86/h264dsp_mmx.c
> ===================================================================
> --- libavcodec/x86/h264dsp_mmx.c (revision 16270)
> +++ libavcodec/x86/h264dsp_mmx.c (working copy)
> @@ -19,6 +19,7 @@
> */
>
> #include "dsputil_mmx.h"
> +#include "libavcodec/rv40data.h"
duplicating lots of tables ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- 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/20081222/52ad6d00/attachment.pgp>
More information about the ffmpeg-devel
mailing list