MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / renorm_cabac_decoder_once

Function renorm_cabac_decoder_once

libavcodec/cabac.h:302–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302static inline void renorm_cabac_decoder_once(CABACContext *c){
303#ifdef ARCH_X86_DISABLED
304 int temp;
305#if 0
306 //P3:683 athlon:475
307 __asm__(
308 "lea -0x100(%0), %2 \n\t"
309 "shr $31, %2 \n\t" //FIXME 31->63 for x86-64
310 "shl %%cl, %0 \n\t"
311 "shl %%cl, %1 \n\t"
312 : "+r"(c->range), "+r"(c->low), "+c"(temp)
313 );
314#elif 0
315 //P3:680 athlon:474
316 __asm__(
317 "cmp $0x100, %0 \n\t"
318 "setb %%cl \n\t" //FIXME 31->63 for x86-64
319 "shl %%cl, %0 \n\t"
320 "shl %%cl, %1 \n\t"
321 : "+r"(c->range), "+r"(c->low), "+c"(temp)
322 );
323#elif 1
324 int temp2;
325 //P3:665 athlon:517
326 __asm__(
327 "lea -0x100(%0), %%eax \n\t"
328 "cltd \n\t"
329 "mov %0, %%eax \n\t"
330 "and %%edx, %0 \n\t"
331 "and %1, %%edx \n\t"
332 "add %%eax, %0 \n\t"
333 "add %%edx, %1 \n\t"
334 : "+r"(c->range), "+r"(c->low), "+a"(temp), "+d"(temp2)
335 );
336#elif 0
337 int temp2;
338 //P3:673 athlon:509
339 __asm__(
340 "cmp $0x100, %0 \n\t"
341 "sbb %%edx, %%edx \n\t"
342 "mov %0, %%eax \n\t"
343 "and %%edx, %0 \n\t"
344 "and %1, %%edx \n\t"
345 "add %%eax, %0 \n\t"
346 "add %%edx, %1 \n\t"
347 : "+r"(c->range), "+r"(c->low), "+a"(temp), "+d"(temp2)
348 );
349#else
350 int temp2;
351 //P3:677 athlon:511
352 __asm__(
353 "cmp $0x100, %0 \n\t"
354 "lea (%0, %0), %%eax \n\t"
355 "lea (%1, %1), %%edx \n\t"
356 "cmovb %%eax, %0 \n\t"
357 "cmovb %%edx, %1 \n\t"
358 : "+r"(c->range), "+r"(c->low), "+a"(temp), "+d"(temp2)
359 );

Callers 2

get_cabac_inlineFunction · 0.85
get_cabac_terminateFunction · 0.85

Calls 1

refillFunction · 0.70

Tested by

no test coverage detected