Mercurial > mplayer.hg
changeset 11295:8b9ae87aff0f
10l
author | michael |
---|---|
date | Mon, 27 Oct 2003 19:14:38 +0000 |
parents | e5f08b2e05e6 |
children | 86916e46d445 |
files | libmpcodecs/vf_spp.c |
diffstat | 1 files changed, 24 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vf_spp.c Mon Oct 27 17:40:51 2003 +0000 +++ b/libmpcodecs/vf_spp.c Mon Oct 27 19:14:38 2003 +0000 @@ -99,7 +99,6 @@ for(i=1; i<64; i++){ int level= qinv*src[i]; - if(((unsigned)(level+threshold1))>threshold2){ const int j= permutation[i]; if(level>0){ @@ -163,7 +162,6 @@ const int x1= x + offset[i][0]; const int y1= y + offset[i][1]; const int index= x1 + y1*stride; - p->dsp.get_pixels(block, p->src + index, stride); p->dsp.fdct(block); requantize(block2, block, qp, p->dsp.idct_permutation); @@ -173,20 +171,36 @@ } } +#define STORE(pos) \ + temp= ((p->temp[index + pos]<<log2_scale) + d[pos])>>6;\ + if(temp & 0x100) temp= ~(temp>>31);\ + dst[x + y*dst_stride + pos]= temp; + for(y=0; y<height; y++){ uint8_t *d= dither[y&7]; for(x=0; x<width; x+=8){ const int index= 8 + 8*stride + x + y*stride; - dst[x + y*src_stride + 0]= ((p->temp[index + 0]<<log2_scale) + d[0])>>6; - dst[x + y*src_stride + 1]= ((p->temp[index + 1]<<log2_scale) + d[1])>>6; - dst[x + y*src_stride + 2]= ((p->temp[index + 2]<<log2_scale) + d[2])>>6; - dst[x + y*src_stride + 3]= ((p->temp[index + 3]<<log2_scale) + d[3])>>6; - dst[x + y*src_stride + 4]= ((p->temp[index + 4]<<log2_scale) + d[4])>>6; - dst[x + y*src_stride + 5]= ((p->temp[index + 5]<<log2_scale) + d[5])>>6; - dst[x + y*src_stride + 6]= ((p->temp[index + 6]<<log2_scale) + d[6])>>6; - dst[x + y*src_stride + 7]= ((p->temp[index + 7]<<log2_scale) + d[7])>>6; + int temp; + STORE(0); + STORE(1); + STORE(2); + STORE(3); + STORE(4); + STORE(5); + STORE(6); + STORE(7); } } +#if 0 + for(y=0; y<height; y++){ + for(x=0; x<width; x++){ + if((((x>>6) ^ (y>>6)) & 1) == 0) + dst[x + y*dst_stride]= p->src[8 + 8*stride + x + y*stride]; + if((x&63) == 0 || (y&63)==0) + dst[x + y*dst_stride] += 128; + } + } +#endif //FIXME reorder for better caching }