[FFmpeg-devel] [PATCH] H.264: SSE2 weight/biweight functions

Jason Garrett-Glaser darkshikari
Mon Jan 5 23:39:21 CET 2009


On Mon, Jan 5, 2009 at 5:31 PM, Jason Garrett-Glaser
<darkshikari at gmail.com> wrote:
> On Mon, Jan 5, 2009 at 5:25 PM, Diego Biurrun <diego at biurrun.de> wrote:
>> 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
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at mplayerhq.hu
>> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>>
>
> Done.
>
> Dark Shikari
>

Seems I forgot about weight sse2.  Fixed as well.

Dark Shikari
-------------- next part --------------
A non-text attachment was scrubbed...
Name: weightpred_asm.diff
Type: text/x-diff
Size: 8008 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090105/0576c8c2/attachment.diff>



More information about the ffmpeg-devel mailing list