| 3358 | } |
| 3359 | |
| 3360 | static void encode_blocks(SnowContext *s, int search){ |
| 3361 | int x, y; |
| 3362 | int w= s->b_width; |
| 3363 | int h= s->b_height; |
| 3364 | |
| 3365 | if(s->avctx->me_method == ME_ITER && !s->keyframe && search) |
| 3366 | iterative_me(s); |
| 3367 | |
| 3368 | for(y=0; y<h; y++){ |
| 3369 | if(s->c.bytestream_end - s->c.bytestream < w*MB_SIZE*MB_SIZE*3){ //FIXME nicer limit |
| 3370 | av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n"); |
| 3371 | return; |
| 3372 | } |
| 3373 | for(x=0; x<w; x++){ |
| 3374 | if(s->avctx->me_method == ME_ITER || !search) |
| 3375 | encode_q_branch2(s, 0, x, y); |
| 3376 | else |
| 3377 | encode_q_branch (s, 0, x, y); |
| 3378 | } |
| 3379 | } |
| 3380 | } |
| 3381 | |
| 3382 | static void quantize(SnowContext *s, SubBand *b, IDWTELEM *dst, DWTELEM *src, int stride, int bias){ |
| 3383 | const int w= b->width; |
no test coverage detected