# HG changeset patch # User michael # Date 1091500490 0 # Node ID cbac56a6244f204374e129e7b60c820b5f4de615 # Parent b25df257eab05fb6f8071a794cd12770af9e57ed cleanup diff -r b25df257eab0 -r cbac56a6244f snow.c --- a/snow.c Tue Aug 03 01:50:52 2004 +0000 +++ b/snow.c Tue Aug 03 02:34:50 2004 +0000 @@ -1053,11 +1053,11 @@ } } -static void spatial_dwt(SnowContext *s, int *buffer, int width, int height, int stride){ +void ff_spatial_dwt(int *buffer, int width, int height, int stride, int type, int decomposition_count){ int level; - for(level=0; levelspatial_decomposition_count; level++){ - switch(s->spatial_decomposition_type){ + for(level=0; level>level, height>>level, stride<>level, height>>level, stride<>level, height>>level, stride<spatial_decomposition_count-1; level>=0; level--){ - switch(s->spatial_decomposition_type){ + for(level=decomposition_count-1; level>=0; level--){ + switch(type){ case 0: spatial_compose97i(buffer, width>>level, height>>level, stride<>level, height>>level, stride<>level, height>>level, stride<spatial_dwt_buffer, 0, sizeof(int)*width*height); buf[b->width/2 + b->height/2*b->stride]= 256*256; - spatial_idwt(s, s->spatial_dwt_buffer, width, height, width); + ff_spatial_idwt(s->spatial_dwt_buffer, width, height, width, s->spatial_decomposition_type, s->spatial_decomposition_count); for(y=0; yspatial_dwt_buffer[x + y*width]; @@ -2583,7 +2583,7 @@ } b->qlog= (int)(log(352256.0/sqrt(error)) / log(pow(2.0, 1.0/QROOT))+0.5); - av_log(NULL, AV_LOG_DEBUG, "%d %d %d\n", level, orientation, b->qlog/*, sqrt(error)*/); +// av_log(NULL, AV_LOG_DEBUG, "%d %d %d\n", level, orientation, b->qlog/*, sqrt(error)*/); } } } @@ -2894,7 +2894,7 @@ } } - spatial_dwt(s, s->spatial_dwt_buffer, w, h, w); + ff_spatial_dwt(s->spatial_dwt_buffer, w, h, w, s->spatial_decomposition_type, s->spatial_decomposition_count); for(level=0; levelspatial_decomposition_count; level++){ for(orientation=level ? 1 : 0; orientation<4; orientation++){ @@ -2919,7 +2919,7 @@ } } - spatial_idwt(s, s->spatial_dwt_buffer, w, h, w); + ff_spatial_idwt(s->spatial_dwt_buffer, w, h, w, s->spatial_decomposition_type, s->spatial_decomposition_count); if(s->qlog == LOSSLESS_QLOG){ for(y=0; yspatial_dwt_buffer, w, h, w); + ff_spatial_idwt(s->spatial_dwt_buffer, w, h, w, s->spatial_decomposition_type, s->spatial_decomposition_count); if(s->qlog == LOSSLESS_QLOG){ for(y=0; yspatial_decomposition_type, s->spatial_decomposition_count); + ff_spatial_idwt(buffer[0], width, height, width, s->spatial_decomposition_type, s->spatial_decomposition_count); for(i=0; ispatial_decomposition_type, s->spatial_decomposition_count); + ff_spatial_idwt(buffer[0], width, height, width, s->spatial_decomposition_type, s->spatial_decomposition_count); for(i=0; ispatial_decomposition_type, s->spatial_decomposition_count); for(y=0; yspatial_decomposition_type, s->spatial_decomposition_count); #else for(y=0; yspatial_decomposition_type, s->spatial_decomposition_count); #endif for(y=0; y