diff options
author | Loren Merritt <lorenm@u.washington.edu> | 2007-03-30 19:15:31 +0000 |
---|---|---|
committer | Loren Merritt <lorenm@u.washington.edu> | 2007-03-30 19:15:31 +0000 |
commit | 5900637219ccccdd39ddafa4e7181da20b8e1f1b (patch) | |
tree | 7281321fc627bdc6f48aedc5dfb98e7719f85aa1 /libavcodec/svq1.c | |
parent | 0c0d17f3ce9dc5bbf3a7c3b85f3fe95e3dbbb482 (diff) | |
download | ffmpeg-5900637219ccccdd39ddafa4e7181da20b8e1f1b.tar.gz |
mmx 16-bit ssd. 2.3x faster svq1 encoding.
Originally committed as revision 8559 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/svq1.c')
-rw-r--r-- | libavcodec/svq1.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libavcodec/svq1.c b/libavcodec/svq1.c index 55595b7baa..9337dc1897 100644 --- a/libavcodec/svq1.c +++ b/libavcodec/svq1.c @@ -992,15 +992,10 @@ static int encode_block(SVQ1Context *s, uint8_t *src, uint8_t *ref, uint8_t *dec for(i=0; i<16; i++){ int sum= codebook_sum[stage*16 + i]; - int sqr=0; - int diff, mean, score; + int sqr, diff, mean, score; vector = codebook + stage*size*16 + i*size; - - for(j=0; j<size; j++){ - int v= vector[j]; - sqr += (v - block[stage][j])*(v - block[stage][j]); - } + sqr = s->dsp.ssd_int8_vs_int16(vector, block[stage], size); diff= block_sum[stage] - sum; mean= (diff + (size>>1)) >> (level+3); assert(mean >-300 && mean<300); |