int i, level, orientation, x, y;
int level, orientation, x, y;
static void calculate_vissual_weight(SnowContext *s, Plane *p){    int width = p->width;    int height= p->height;    int i, level, orientation, x, y;    for(level=0; level<s->spatial_decomposition_count; level++){        for(orientation=level ? 1 : 0; orientation<4; orientation++){            SubBand *b= &p->band[level][orientation];            DWTELEM *buf= b->buf;            int64_t error=0;                        memset(s->spatial_dwt_buffer, 0, sizeof(int)*width*height);            buf[b->width/2 + b->height/2*b->stride]= 256*256;            ff_spatial_idwt(s->spatial_dwt_buffer, width, height, width, s->spatial_decomposition_type, s->spatial_decomposition_count);            for(y=0; y<height; y++){                for(x=0; x<width; x++){                    int64_t d= s->spatial_dwt_buffer[x + y*width];                    error += d*d;                }            }            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)*/);        }    }}