# HG changeset patch # User michael # Date 1187866154 0 # Node ID a6f5ed0503351386272e7803ea489e37ceb24374 # Parent 33718fb21437cc47e84bbf554c7e85cd64bffe8b use more bits on the encoder side negligible increase in quality diff -r 33718fb21437 -r a6f5ed050335 snow.c --- a/snow.c Thu Aug 23 07:02:27 2007 +0000 +++ b/snow.c Thu Aug 23 10:49:14 2007 +0000 @@ -393,6 +393,7 @@ #define LOG2_MB_SIZE 4 #define MB_SIZE (1<width; const int h= b->height; const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16); - const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT); + const int qmul= qexp[qlog&(QROOT-1)]<<((qlog>>QSHIFT) + ENCODER_EXTRA_BITS); int x,y, thres1, thres2; // START_TIMER @@ -4194,6 +4195,12 @@ s->spatial_dwt_buffer[y*w + x]= (s->spatial_dwt_buffer[y*w + x] + (1<<(FRAC_BITS-1))-1)>>FRAC_BITS; } } + }else{ + for(y=0; yspatial_dwt_buffer[y*w + x]<<=ENCODER_EXTRA_BITS; + } + } } ff_spatial_dwt(s->spatial_dwt_buffer, w, h, w, s->spatial_decomposition_type, s->spatial_decomposition_count);