[FFmpeg-devel] [PATCH] A rather simple H.264 speed optimization

Måns Rullgård mans
Mon Jul 28 17:50:24 CEST 2008


Jason Garrett-Glaser wrote:
> On Mon, Jul 28, 2008 at 9:19 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> On Sun, Jul 27, 2008 at 10:50:29PM -0600, Jason Garrett-Glaser wrote:
>>> $subject, gains 6 clock cycles or so per decode_cabac_residual call on
>>> an ordinary source.
>>
>> ok
>
> applied
>
> round 2:
>
> I used the extra casts in the p[0] p[8] etc cases for clarity, to
> avoid changing the array indices.

> -                *(uint32_t*)h->mv_cache [list][scan8[0] + 0 - 1*8]=
> -                *(uint32_t*)h->mv_cache [list][scan8[0] + 1 - 1*8]=
> -                *(uint32_t*)h->mv_cache [list][scan8[0] + 2 - 1*8]=
> -                *(uint32_t*)h->mv_cache [list][scan8[0] + 3 - 1*8]= 0;
> +                *(uint64_t*)h->mv_cache [list][scan8[0] + 0 - 1*8]=
> +                *(uint64_t*)h->mv_cache [list][scan8[0] + 2 - 1*8]= 0;

What does gcc do with this on 32-bit platforms.  I've often seen it do
some rather horrid things with 64-bit types there.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list