if(&s->c.bytestream_end - &s->c.bytestream < w*MB_SIZE*MB_SIZE*3){ av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n"); return; }
static void encode_blocks(SnowContext *s){    int x, y;    int w= s->b_width;    int h= s->b_height;    for(y=0; y<h; y++){        for(x=0; x<w; x++){            encode_q_branch(s, 0, x, y);        }    }}