Mercurial > libavcodec.hg
comparison mpegvideo.c @ 2065:9e4bebc39ade libavcodec
noise preserving sum of squares comparission function
author | michael |
---|---|
date | Mon, 07 Jun 2004 03:23:31 +0000 |
parents | 99556d33f102 |
children | 4bfb146e701b |
comparison
equal
deleted
inserted
replaced
2064:b77fe059dd09 | 2065:9e4bebc39ade |
---|---|
3914 | 3914 |
3915 if(s->mb_x*16 + 16 > s->width ) w= s->width - s->mb_x*16; | 3915 if(s->mb_x*16 + 16 > s->width ) w= s->width - s->mb_x*16; |
3916 if(s->mb_y*16 + 16 > s->height) h= s->height- s->mb_y*16; | 3916 if(s->mb_y*16 + 16 > s->height) h= s->height- s->mb_y*16; |
3917 | 3917 |
3918 if(w==16 && h==16) | 3918 if(w==16 && h==16) |
3919 if(s->avctx->mb_cmp == FF_CMP_NSSE){ | |
3920 return s->dsp.nsse[0](NULL, s->new_picture.data[0] + s->mb_x*16 + s->mb_y*s->linesize*16, s->dest[0], s->linesize, 16) | |
3921 +s->dsp.nsse[1](NULL, s->new_picture.data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[1], s->uvlinesize, 8) | |
3922 +s->dsp.nsse[1](NULL, s->new_picture.data[2] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[2], s->uvlinesize, 8); | |
3923 }else{ | |
3919 return s->dsp.sse[0](NULL, s->new_picture.data[0] + s->mb_x*16 + s->mb_y*s->linesize*16, s->dest[0], s->linesize, 16) | 3924 return s->dsp.sse[0](NULL, s->new_picture.data[0] + s->mb_x*16 + s->mb_y*s->linesize*16, s->dest[0], s->linesize, 16) |
3920 +s->dsp.sse[1](NULL, s->new_picture.data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[1], s->uvlinesize, 8) | 3925 +s->dsp.sse[1](NULL, s->new_picture.data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[1], s->uvlinesize, 8) |
3921 +s->dsp.sse[1](NULL, s->new_picture.data[2] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[2], s->uvlinesize, 8); | 3926 +s->dsp.sse[1](NULL, s->new_picture.data[2] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[2], s->uvlinesize, 8); |
3927 } | |
3922 else | 3928 else |
3923 return sse(s, s->new_picture.data[0] + s->mb_x*16 + s->mb_y*s->linesize*16, s->dest[0], w, h, s->linesize) | 3929 return sse(s, s->new_picture.data[0] + s->mb_x*16 + s->mb_y*s->linesize*16, s->dest[0], w, h, s->linesize) |
3924 +sse(s, s->new_picture.data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[1], w>>1, h>>1, s->uvlinesize) | 3930 +sse(s, s->new_picture.data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[1], w>>1, h>>1, s->uvlinesize) |
3925 +sse(s, s->new_picture.data[2] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[2], w>>1, h>>1, s->uvlinesize); | 3931 +sse(s, s->new_picture.data[2] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[2], w>>1, h>>1, s->uvlinesize); |
3926 } | 3932 } |