[FFmpeg-devel] [PATCH] Altivec version of h264_idct_add
Loren Merritt
lorenm
Sat Jun 2 11:17:18 CEST 2007
On Sat, 2 Jun 2007, Luca Barbato wrote:
> David Conrad wrote:
>
>> + if ((unsigned long)dst & 0xF){
>> + vec_u8_t vdst_mask;
>> + switch ((unsigned long)dst & 0xF){
>> + case 4:
>> + dstperm = (vec_u8_t)AVV(0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
>> + 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F);
>> + break;
>> + case 8:
>> + dstperm = (vec_u8_t)AVV(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
>> + 0x10, 0x11, 0x12, 0x13, 0x0C, 0x0D, 0x0E, 0x0F);
>> + break;
>> + default: // case 12
>> + dstperm = (vec_u8_t)AVV(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
>> + 0x08, 0x09, 0x0A, 0x0B, 0x10, 0x11, 0x12, 0x13);
>> + break;
>> + }
>
> Overall (decode time)
>
> g4: 1/100 1/70 faster.
>
> cell: pretty much the same, the if+switch killed it probably.
The switch could be changed to a table if it matters.
--Loren Merritt
More information about the ffmpeg-devel
mailing list