[theora-dev] theora 1.0a3 opt hint
Makc
makc at ukrprombank.kiev.ua
Tue Jun 1 08:04:02 PDT 2004
in lib/blockmap.c,v 1.5 2003/12/03
func CreateMapping, inner loop code:
if ( i<2 ){
MB = ( j<2 ? 0 : 1 );
}else{
MB = ( j<2 ? 2 : 3 );
}
if ( i%2 ){
B = ( j%2 ? 3 : 2 );
}else{
B = ( j%2 ? 1 : 0 );
}
wouldn't this do better:
MB = (i >> 1) * 2 + (j >> 1);
B = (i % 2) * 2 + j % 2;
?
P.S.: I believe it could be optimized even further, but...
<p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'theora-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Theora-dev
mailing list