if(s->avctx->debug&512){ for(y=0; y<h; y++){ for(x=0; x<w; x++){ if(add) buf[x + y*w]+= 128*256; else    buf[x + y*w]-= 128*256;
if(s->keyframe || (s->avctx->debug&512)){ for(y=0; y<h; y++){ for(x=0; x<w; x++){ if(add) buf[x + y*w]+= 128*256; else    buf[x + y*w]-= 128*256; }
static void predict_plane(SnowContext *s, DWTELEM *buf, int plane_index, int add){    Plane *p= &s->plane[plane_index];    const int mb_w= s->b_width  << s->block_max_depth;    const int mb_h= s->b_height << s->block_max_depth;    const int mb_stride= mb_w;    int x, y, mb_x, mb_y;    int scale      = plane_index ?  s->mv_scale : 2*s->mv_scale;    int block_size = MB_SIZE >> s->block_max_depth;    int block_w    = plane_index ? block_size/2 : block_size;    uint8_t *obmc  = plane_index ? obmc_tab[s->block_max_depth+1] : obmc_tab[s->block_max_depth];    int obmc_stride= plane_index ? block_size : 2*block_size;    int ref_stride= s->last_picture.linesize[plane_index];    uint8_t *ref  = s->last_picture.data[plane_index];    int w= p->width;    int h= p->height;    START_TIMER    if(s->avctx->debug&512){    for(y=0; y<h; y++){        for(x=0; x<w; x++){            if(add) buf[x + y*w]+= 128*256;            else    buf[x + y*w]-= 128*256;        }    }        return;}    for(mb_y=-1; mb_y<=mb_h; mb_y++){        for(mb_x=-1; mb_x<=mb_w; mb_x++){            int index= clip(mb_x, 0, mb_w-1) + clip(mb_y, 0, mb_h-1)*mb_stride;            START_TIMER            add_xblock(s, buf, ref, obmc,                        block_w*mb_x - block_w/2,                        block_w*mb_y - block_w/2,                       2*block_w, 2*block_w,                       s->block[index].mx*scale, s->block[index].my*scale,                       w, h,                       w, ref_stride, obmc_stride,                        s->block[index].type, add, s->block[index].color[plane_index]);            STOP_TIMER("add_xblock")        }    }        STOP_TIMER("predict_plane")}