comparison msmpeg4.c @ 10071:6ac0d4957d35 libavcodec

Replace #ifdef PIC checks with the more appropriate HAVE_EBX_AVAILABLE/HAVE_7REGS.
author reimar
date Fri, 21 Aug 2009 09:54:28 +0000
parents 6b229807a182
children 95f3daa991a2
comparison
equal deleted inserted replaced
10070:68f03567b826 10071:6ac0d4957d35
29 29
30 #include "avcodec.h" 30 #include "avcodec.h"
31 #include "dsputil.h" 31 #include "dsputil.h"
32 #include "mpegvideo.h" 32 #include "mpegvideo.h"
33 #include "msmpeg4.h" 33 #include "msmpeg4.h"
34 #include "libavutil/x86_cpu.h"
34 35
35 /* 36 /*
36 * You can also call this codec : MPEG4 with a twist ! 37 * You can also call this codec : MPEG4 with a twist !
37 * 38 *
38 * TODO: 39 * TODO:
645 646
646 /* XXX: the following solution consumes divisions, but it does not 647 /* XXX: the following solution consumes divisions, but it does not
647 necessitate to modify mpegvideo.c. The problem comes from the 648 necessitate to modify mpegvideo.c. The problem comes from the
648 fact they decided to store the quantized DC (which would lead 649 fact they decided to store the quantized DC (which would lead
649 to problems if Q could vary !) */ 650 to problems if Q could vary !) */
650 #if ARCH_X86 && !defined PIC 651 #if ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE
651 __asm__ volatile( 652 __asm__ volatile(
652 "movl %3, %%eax \n\t" 653 "movl %3, %%eax \n\t"
653 "shrl $1, %%eax \n\t" 654 "shrl $1, %%eax \n\t"
654 "addl %%eax, %2 \n\t" 655 "addl %%eax, %2 \n\t"
655 "addl %%eax, %1 \n\t" 656 "addl %%eax, %1 \n\t"