comparison postprocess.c @ 36:b4fc1bd8525f libpostproc

Use common define for x86_32 and x86_64.
author diego
date Wed, 01 Nov 2006 18:34:40 +0000
parents 48b25c548895
children 63d07317cd7a
comparison
equal deleted inserted replaced
35:cd4aa05e3b5d 36:b4fc1bd8525f
103 #define OPTIONS_ARRAY_SIZE 10 103 #define OPTIONS_ARRAY_SIZE 10
104 #define BLOCK_SIZE 8 104 #define BLOCK_SIZE 8
105 #define TEMP_STRIDE 8 105 #define TEMP_STRIDE 8
106 //#define NUM_BLOCKS_AT_ONCE 16 //not used yet 106 //#define NUM_BLOCKS_AT_ONCE 16 //not used yet
107 107
108 #if defined(ARCH_X86) || defined(ARCH_X86_64) 108 #if defined(ARCH_X86)
109 static uint64_t __attribute__((aligned(8))) attribute_used w05= 0x0005000500050005LL; 109 static uint64_t __attribute__((aligned(8))) attribute_used w05= 0x0005000500050005LL;
110 static uint64_t __attribute__((aligned(8))) attribute_used w04= 0x0004000400040004LL; 110 static uint64_t __attribute__((aligned(8))) attribute_used w04= 0x0004000400040004LL;
111 static uint64_t __attribute__((aligned(8))) attribute_used w20= 0x0020002000200020LL; 111 static uint64_t __attribute__((aligned(8))) attribute_used w20= 0x0020002000200020LL;
112 static uint64_t __attribute__((aligned(8))) attribute_used b00= 0x0000000000000000LL; 112 static uint64_t __attribute__((aligned(8))) attribute_used b00= 0x0000000000000000LL;
113 static uint64_t __attribute__((aligned(8))) attribute_used b01= 0x0101010101010101LL; 113 static uint64_t __attribute__((aligned(8))) attribute_used b01= 0x0101010101010101LL;
154 "ac", "ha:a:128:7,va:a,dering:a", 154 "ac", "ha:a:128:7,va:a,dering:a",
155 NULL //End Marker 155 NULL //End Marker
156 }; 156 };
157 157
158 158
159 #if defined(ARCH_X86) || defined(ARCH_X86_64) 159 #if defined(ARCH_X86)
160 static inline void prefetchnta(void *p) 160 static inline void prefetchnta(void *p)
161 { 161 {
162 asm volatile( "prefetchnta (%0)\n\t" 162 asm volatile( "prefetchnta (%0)\n\t"
163 : : "r" (p) 163 : : "r" (p)
164 ); 164 );
579 #ifdef HAVE_ALTIVEC 579 #ifdef HAVE_ALTIVEC
580 #define COMPILE_ALTIVEC 580 #define COMPILE_ALTIVEC
581 #endif //HAVE_ALTIVEC 581 #endif //HAVE_ALTIVEC
582 #endif //ARCH_POWERPC 582 #endif //ARCH_POWERPC
583 583
584 #if defined(ARCH_X86) || defined(ARCH_X86_64) 584 #if defined(ARCH_X86)
585 585
586 #if (defined (HAVE_MMX) && !defined (HAVE_3DNOW) && !defined (HAVE_MMX2)) || defined (RUNTIME_CPUDETECT) 586 #if (defined (HAVE_MMX) && !defined (HAVE_3DNOW) && !defined (HAVE_MMX2)) || defined (RUNTIME_CPUDETECT)
587 #define COMPILE_MMX 587 #define COMPILE_MMX
588 #endif 588 #endif
589 589
592 #endif 592 #endif
593 593
594 #if (defined (HAVE_3DNOW) && !defined (HAVE_MMX2)) || defined (RUNTIME_CPUDETECT) 594 #if (defined (HAVE_3DNOW) && !defined (HAVE_MMX2)) || defined (RUNTIME_CPUDETECT)
595 #define COMPILE_3DNOW 595 #define COMPILE_3DNOW
596 #endif 596 #endif
597 #endif /* defined(ARCH_X86) || defined(ARCH_X86_64) */ 597 #endif /* defined(ARCH_X86) */
598 598
599 #undef HAVE_MMX 599 #undef HAVE_MMX
600 #undef HAVE_MMX2 600 #undef HAVE_MMX2
601 #undef HAVE_3DNOW 601 #undef HAVE_3DNOW
602 #undef HAVE_ALTIVEC 602 #undef HAVE_ALTIVEC
660 660
661 // useing ifs here as they are faster than function pointers allthough the 661 // useing ifs here as they are faster than function pointers allthough the
662 // difference wouldnt be messureable here but its much better because 662 // difference wouldnt be messureable here but its much better because
663 // someone might exchange the cpu whithout restarting mplayer ;) 663 // someone might exchange the cpu whithout restarting mplayer ;)
664 #ifdef RUNTIME_CPUDETECT 664 #ifdef RUNTIME_CPUDETECT
665 #if defined(ARCH_X86) || defined(ARCH_X86_64) 665 #if defined(ARCH_X86)
666 // ordered per speed fasterst first 666 // ordered per speed fasterst first
667 if(c->cpuCaps & PP_CPU_CAPS_MMX2) 667 if(c->cpuCaps & PP_CPU_CAPS_MMX2)
668 postProcess_MMX2(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); 668 postProcess_MMX2(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);
669 else if(c->cpuCaps & PP_CPU_CAPS_3DNOW) 669 else if(c->cpuCaps & PP_CPU_CAPS_3DNOW)
670 postProcess_3DNow(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c); 670 postProcess_3DNow(src, srcStride, dst, dstStride, width, height, QPs, QPStride, isColor, c);