[Ffmpeg-devel] [PATCH RFC] h264 - explicit load/stores in C cabac

Alexander Strange astrange
Thu Mar 15 23:16:57 CET 2007


I had the opportunity to try out ffh264 on a PPC Mac and noticed that  
gcc generates quite bad code for get_cabac even when it has plenty of  
registers.

So, I made this patch, which makes the struct accesses explicit and  
moves a few operations around.
Unfortunately, it doesn't speed up on x86 vs the current code with  
asm disabled, because gcc regresses in one important spot and I can't  
seem to work around it.
(specifically, it spills more inside the equivalent to  
decode_significance_8x8, which makes up for how it spills less  
everywhere else)

I think it's still promising; would anyone mind testing it on PPC?

Some notes:
* I tried duplicating the cmov/sbb trick in C, but gcc and icc don't  
recognize it.
* AV_RB16 does two one-byte loads; unless this is going to be changed  
(didn't I see a thread about that?) maybe it should just be a pointer  
cast and load. I think it's always aligned.

?



More information about the ffmpeg-devel mailing list