comparison libpostproc/postprocess_template.c @ 2642:240e17c3cb2d libavcodec

GCC4 fix by (Keenan Pepper (keenanpepper gmail com)
author michael
date Thu, 05 May 2005 12:37:38 +0000
parents ace6e273f318
children 7b7613020f2c
comparison
equal deleted inserted replaced
2641:c337f851d0f9 2642:240e17c3cb2d
2644 #ifdef HAVE_MMX 2644 #ifdef HAVE_MMX
2645 /** 2645 /**
2646 * accurate deblock filter 2646 * accurate deblock filter
2647 */ 2647 */
2648 static always_inline void RENAME(do_a_deblock)(uint8_t *src, int step, int stride, PPContext *c){ 2648 static always_inline void RENAME(do_a_deblock)(uint8_t *src, int step, int stride, PPContext *c){
2649 int64_t dc_mask, eq_mask; 2649 int64_t dc_mask, eq_mask, both_masks;
2650 int64_t sums[10*8*2]; 2650 int64_t sums[10*8*2];
2651 src+= step*3; // src points to begin of the 8x8 Block 2651 src+= step*3; // src points to begin of the 8x8 Block
2652 //START_TIMER 2652 //START_TIMER
2653 asm volatile( 2653 asm volatile(
2654 "movq %0, %%mm7 \n\t" 2654 "movq %0, %%mm7 \n\t"
2753 : "=m" (eq_mask), "=m" (dc_mask) 2753 : "=m" (eq_mask), "=m" (dc_mask)
2754 : "r" (src), "r" ((long)step), "m" (c->pQPb), "m"(c->ppMode.flatnessThreshold) 2754 : "r" (src), "r" ((long)step), "m" (c->pQPb), "m"(c->ppMode.flatnessThreshold)
2755 : "%"REG_a 2755 : "%"REG_a
2756 ); 2756 );
2757 2757
2758 if(dc_mask & eq_mask){ 2758 both_masks = dc_mask & eq_mask;
2759
2760 if(both_masks){
2759 long offset= -8*step; 2761 long offset= -8*step;
2760 int64_t *temp_sums= sums; 2762 int64_t *temp_sums= sums;
2761 2763
2762 asm volatile( 2764 asm volatile(
2763 "movq %2, %%mm0 \n\t" // QP,..., QP 2765 "movq %2, %%mm0 \n\t" // QP,..., QP
2928 "add $16, %1 \n\t" 2930 "add $16, %1 \n\t"
2929 "add %2, %0 \n\t" 2931 "add %2, %0 \n\t"
2930 " js 1b \n\t" 2932 " js 1b \n\t"
2931 2933
2932 : "+r"(offset), "+r"(temp_sums) 2934 : "+r"(offset), "+r"(temp_sums)
2933 : "r" ((long)step), "r"(src - offset), "m"(dc_mask & eq_mask) 2935 : "r" ((long)step), "r"(src - offset), "m"(both_masks)
2934 ); 2936 );
2935 }else 2937 }else
2936 src+= step; // src points to begin of the 8x8 Block 2938 src+= step; // src points to begin of the 8x8 Block
2937 2939
2938 if(eq_mask != -1LL){ 2940 if(eq_mask != -1LL){