[Ffmpeg-devel] [PATCH] h264 optimization: common case hl_decode_mb

Michael Niedermayer michaelni
Sat Feb 24 02:04:30 CET 2007


Hi

On Fri, Feb 23, 2007 at 04:41:19PM -0500, Alexander Strange wrote:
> 
> On Feb 23, 2007, at 6:25 AM, Michael Niedermayer wrote:
> 
> >ok, first, tabs are forbidden in svn
> >second, could you try something like:
> >
> >static always_inline hl_decode_mb_internal(H264Context *h, int  
> >complex){
> >    ...
> >    if(complex){
> >        interlacing and other complex code
> >    }
> >    ...
> >    if( ...
> >    ...
> >}
> >
> >static hl_decode_mb_simple(H264Context *h){
> >    hl_decode_mb_internal(h, 0);
> >}
> >
> >static hl_decode_mb_complex(H264Context *h){
> >    hl_decode_mb_internal(h, 1);
> >}
> >
> >that prevents code duplication (which is definitly bad for the  
> >already pretty
> >large h264.c)
> 
> I went with this method; the code generated is just about the same as  
> the first patch.
> 
> It lets us skip some other branches (h264 vs. svq3 idct, chroma)  
> which are under the function call overhead, so I think it's better  
> even if it does increase the total binary size a little.

patch applied

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070224/68289011/attachment.pgp>



More information about the ffmpeg-devel mailing list