[FFmpeg-devel] [PATCH] H.264: SSE2 weight/biweight functions
Diego Biurrun
diego
Mon Jan 5 23:25:28 CET 2009
On Mon, Jan 05, 2009 at 05:17:45PM -0500, Jason Garrett-Glaser wrote:
> On Mon, Jan 5, 2009 at 4:55 PM, Jason Garrett-Glaser
> <darkshikari at gmail.com> wrote:
> > $subject
>
> The bad news: 10L in the above patch.
>
> The good news: now includes SSSE3 support.
some nits..
> --- libavcodec/x86/dsputil_mmx.c (revision 16439)
> +++ libavcodec/x86/dsputil_mmx.c (working copy)
> @@ -2852,6 +2852,18 @@
> +
> + c->weight_h264_pixels_tab[0]= ff_h264_weight_16x16_sse2;
> + c->weight_h264_pixels_tab[1]= ff_h264_weight_16x8_sse2;
> + c->weight_h264_pixels_tab[2]= ff_h264_weight_8x16_sse2;
> + c->weight_h264_pixels_tab[3]= ff_h264_weight_8x8_sse2;
> + c->weight_h264_pixels_tab[4]= ff_h264_weight_8x4_sse2;
> +
> + c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16x16_sse2;
> + c->biweight_h264_pixels_tab[1]= ff_h264_biweight_16x8_sse2;
> + c->biweight_h264_pixels_tab[2]= ff_h264_biweight_8x16_sse2;
> + c->biweight_h264_pixels_tab[3]= ff_h264_biweight_8x8_sse2;
> + c->biweight_h264_pixels_tab[4]= ff_h264_biweight_8x4_sse2;
This could be more readable with a space before the =.
> @@ -2873,6 +2885,11 @@
> c->put_h264_chroma_pixels_tab[1]= put_h264_chroma_mc4_ssse3;
> c->avg_h264_chroma_pixels_tab[1]= avg_h264_chroma_mc4_ssse3;
> c->add_png_paeth_prediction= add_png_paeth_prediction_ssse3;
> + c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16x16_ssse3;
> + c->biweight_h264_pixels_tab[1]= ff_h264_biweight_16x8_ssse3;
> + c->biweight_h264_pixels_tab[2]= ff_h264_biweight_8x16_ssse3;
> + c->biweight_h264_pixels_tab[3]= ff_h264_biweight_8x8_ssse3;
> + c->biweight_h264_pixels_tab[4]= ff_h264_biweight_8x4_ssse3;
ditto
> --- libavcodec/x86/h264dsp_mmx.c (revision 16439)
> +++ libavcodec/x86/h264dsp_mmx.c (working copy)
> @@ -2239,6 +2239,47 @@
>
> + "movd %0, %%xmm4 \n\t"
> + "movd %1, %%xmm5 \n\t"
> + "movd %2, %%xmm6 \n\t"
> + "pshuflw $0, %%xmm4, %%xmm4 \n\t"
> + "pshuflw $0, %%xmm5, %%xmm5 \n\t"
> + "punpcklqdq %%xmm4, %%xmm4 \n\t"
> + "punpcklqdq %%xmm5, %%xmm5 \n\t"
> + "pxor %%xmm7, %%xmm7 \n\t"
This could be aligned for better readability, same below...
Diego
More information about the ffmpeg-devel
mailing list