comparison cabac.h @ 3999:6cbad3675632 libavcodec

slightly faster on P3 slightly slower on athlon and probably faster on P4
author michael
date Wed, 11 Oct 2006 17:59:40 +0000
parents c4ff7d570f19
children 34fdffe98bd0
comparison
equal deleted inserted replaced
3998:f76c914fea4e 3999:6cbad3675632
380 "movl "LOW "(%2), %%ebx \n\t" 380 "movl "LOW "(%2), %%ebx \n\t"
381 //eax:state ebx:low, edx:range, esi:RangeLPS 381 //eax:state ebx:low, edx:range, esi:RangeLPS
382 "subl %%esi, %%edx \n\t" 382 "subl %%esi, %%edx \n\t"
383 "cmpl %%edx, %%ebx \n\t" 383 "cmpl %%edx, %%ebx \n\t"
384 " ja 1f \n\t" 384 " ja 1f \n\t"
385
386 #if 1
387 //athlon:4067 P3:4110
388 "lea -0x2000000(%%edx), %%ecx \n\t"
389 "shr $31, %%ecx \n\t"
390 "shl %%cl, %%edx \n\t"
391 "shl %%cl, %%ebx \n\t"
392 #else
393 //athlon:4057 P3:4130
385 "cmp $0x2000000, %%edx \n\t" //FIXME avoidable 394 "cmp $0x2000000, %%edx \n\t" //FIXME avoidable
386 "setb %%cl \n\t" 395 "setb %%cl \n\t"
387 "shl %%cl, %%edx \n\t" 396 "shl %%cl, %%edx \n\t"
388 "shl %%cl, %%ebx \n\t" 397 "shl %%cl, %%ebx \n\t"
398 #endif
389 "movzbl "MANGLE(ff_h264_mps_state)"(%%eax), %%ecx \n\t" 399 "movzbl "MANGLE(ff_h264_mps_state)"(%%eax), %%ecx \n\t"
390 "movb %%cl, (%1) \n\t" 400 "movb %%cl, (%1) \n\t"
391 //eax:state ebx:low, edx:range, esi:RangeLPS 401 //eax:state ebx:low, edx:range, esi:RangeLPS
392 "test %%bx, %%bx \n\t" 402 "test %%bx, %%bx \n\t"
393 " jnz 2f \n\t" 403 " jnz 2f \n\t"