comparison dsputil.c @ 4749:7011f597e473 libavcodec

mmx 16-bit ssd. 2.3x faster svq1 encoding.
author lorenm
date Fri, 30 Mar 2007 19:15:31 +0000
parents 5111fceeb971
children 689490842cf5
comparison
equal deleted inserted replaced
4748:c6a2b573f259 4749:7011f597e473
3692 } 3692 }
3693 3693
3694 return score; 3694 return score;
3695 } 3695 }
3696 3696
3697 static int ssd_int8_vs_int16_c(int8_t *pix1, int16_t *pix2, int size){
3698 int score=0;
3699 int i;
3700 for(i=0; i<size; i++)
3701 score += (pix1[i]-pix2[i])*(pix1[i]-pix2[i]);
3702 return score;
3703 }
3704
3697 WARPER8_16_SQ(hadamard8_diff8x8_c, hadamard8_diff16_c) 3705 WARPER8_16_SQ(hadamard8_diff8x8_c, hadamard8_diff16_c)
3698 WARPER8_16_SQ(hadamard8_intra8x8_c, hadamard8_intra16_c) 3706 WARPER8_16_SQ(hadamard8_intra8x8_c, hadamard8_intra16_c)
3699 WARPER8_16_SQ(dct_sad8x8_c, dct_sad16_c) 3707 WARPER8_16_SQ(dct_sad8x8_c, dct_sad16_c)
3700 #ifdef CONFIG_GPL 3708 #ifdef CONFIG_GPL
3701 WARPER8_16_SQ(dct264_sad8x8_c, dct264_sad16_c) 3709 WARPER8_16_SQ(dct264_sad8x8_c, dct264_sad16_c)
4074 c->w53[1]= w53_8_c; 4082 c->w53[1]= w53_8_c;
4075 c->w97[0]= w97_16_c; 4083 c->w97[0]= w97_16_c;
4076 c->w97[1]= w97_8_c; 4084 c->w97[1]= w97_8_c;
4077 #endif 4085 #endif
4078 4086
4087 c->ssd_int8_vs_int16 = ssd_int8_vs_int16_c;
4088
4079 c->add_bytes= add_bytes_c; 4089 c->add_bytes= add_bytes_c;
4080 c->diff_bytes= diff_bytes_c; 4090 c->diff_bytes= diff_bytes_c;
4081 c->sub_hfyu_median_prediction= sub_hfyu_median_prediction_c; 4091 c->sub_hfyu_median_prediction= sub_hfyu_median_prediction_c;
4082 c->bswap_buf= bswap_buf; 4092 c->bswap_buf= bswap_buf;
4083 4093