[Ffmpeg-devel] [RFC] svq1 very slow encoding

Loren Merritt lorenm
Sat Mar 31 22:40:06 CEST 2007


On Sat, 31 Mar 2007, Luca Barbato wrote:
> Loren Merritt wrote:
>> On Sat, 31 Mar 2007, Luca Barbato wrote:
>>> Loren Merritt wrote:
>>>> +    int (*ssd_int8_vs_int16)(int8_t *pix1, int16_t *pix2, int size);
>>>
>>> Which are the constraints? I'm afraid I could mess up since I'm not that
>>> proficient in x86 asm.
>>>
>>> lu - that is obviously writing the same opt for altivec.
>>
>> size is a multiple of 8.
>
> ok, so I'll have to add a epilogue for the remaining 8 (using it in
> blocks of 16)
>
>> The pointers could be aligned to 8 elements, but aren't currently.
>
> Having everything 16 aligned would be nicer for me (8 shorts aligned is
> fine, 8 char aligned isn't)
>
> I'll try to cook up something with those constraints then ^^;

OK, to be more precise:
(assuming you add the appropriate alignment to the tables)
size is a power of 2, between 8 and 256.
pix1 and pix2 are aligned to a multiple of size elements.
So you have one case with size==8, pix1 aligned to 8 bytes, pix2 aligned 
to 16 bytes.
And another case with size a multiple of 16, pix1 and pix2 aligned to 16 
bytes.

--Loren Merritt




More information about the ffmpeg-devel mailing list