diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-10-27 19:14:38 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-10-27 19:14:38 +0000 |
commit | 0259d347c81461edeb5d028ba4628404d36a47b9 (patch) | |
tree | d77d1d116c15981fa8e3327345f981381b91f86e /libmpcodecs/vf_spp.c | |
parent | e70248769ca066e90f272fcd2480748ca31adecc (diff) | |
download | mpv-0259d347c81461edeb5d028ba4628404d36a47b9.tar.bz2 mpv-0259d347c81461edeb5d028ba4628404d36a47b9.tar.xz |
10l
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11296 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vf_spp.c')
-rw-r--r-- | libmpcodecs/vf_spp.c | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/libmpcodecs/vf_spp.c b/libmpcodecs/vf_spp.c index 5ccabd3d25..c62cb2bb20 100644 --- a/libmpcodecs/vf_spp.c +++ b/libmpcodecs/vf_spp.c @@ -99,7 +99,6 @@ static inline void requantize(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t 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 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stri 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 @@ static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stri } } +#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 } |