for(y=block_w*mb_y; y<block_w*(mb_y+1); y++){
for(y=block_w*mb_y; y<FFMIN(h,block_w*(mb_y+1)); y++){
static always_inline void predict_slice(SnowContext *s, DWTELEM *buf, int plane_index, int add, int mb_y){    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;    int x, y, mb_x;    int block_size = MB_SIZE >> s->block_max_depth;    int block_w    = plane_index ? block_size/2 : block_size;    const 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->current_picture.linesize[plane_index];    uint8_t *ref  = s->last_picture.data[plane_index];    uint8_t *dst8= s->current_picture.data[plane_index];    int w= p->width;    int h= p->height;    START_TIMER        if(s->keyframe || (s->avctx->debug&512)){        if(mb_y==mb_h)            return;        if(add){            for(y=block_w*mb_y; y<block_w*(mb_y+1); y++){                for(x=0; x<w; x++){                    int v= buf[x + y*w] + (128<<FRAC_BITS) + (1<<(FRAC_BITS-1));                    v >>= FRAC_BITS;                    if(v&(~255)) v= ~(v>>31);                    dst8[x + y*ref_stride]= v;                }            }        }else{            for(y=block_w*mb_y; y<block_w*(mb_y+1); y++){                for(x=0; x<w; x++){                    buf[x + y*w]-= 128<<FRAC_BITS;                }            }        }        return;    }