comparison snow.c @ 2435:c89ac0e70c66 libavcodec

10l patch by (matthieu castet <castet.matthieu free fr>)
author michael
date Sun, 16 Jan 2005 22:11:47 +0000
parents 18b8b2dcc037
children f67b63ed036d
comparison
equal deleted inserted replaced
2434:24aa9209e8b0 2435:c89ac0e70c66
1345 run= runs[run_index++]; 1345 run= runs[run_index++];
1346 1346
1347 put_symbol2(&s->c, b->state[1], run, 3); 1347 put_symbol2(&s->c, b->state[1], run, 3);
1348 1348
1349 for(y=0; y<h; y++){ 1349 for(y=0; y<h; y++){
1350 if(&s->c.bytestream_end - &s->c.bytestream < w*40){ 1350 if(s->c.bytestream_end - s->c.bytestream < w*40){
1351 av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n"); 1351 av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n");
1352 return -1; 1352 return -1;
1353 } 1353 }
1354 for(x=0; x<w; x++){ 1354 for(x=0; x<w; x++){
1355 int v, p=0; 1355 int v, p=0;
1921 int x, y; 1921 int x, y;
1922 int w= s->b_width; 1922 int w= s->b_width;
1923 int h= s->b_height; 1923 int h= s->b_height;
1924 1924
1925 for(y=0; y<h; y++){ 1925 for(y=0; y<h; y++){
1926 if(&s->c.bytestream_end - &s->c.bytestream < w*MB_SIZE*MB_SIZE*3){ //FIXME nicer limit 1926 if(s->c.bytestream_end - s->c.bytestream < w*MB_SIZE*MB_SIZE*3){ //FIXME nicer limit
1927 av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n"); 1927 av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n");
1928 return; 1928 return;
1929 } 1929 }
1930 for(x=0; x<w; x++){ 1930 for(x=0; x<w; x++){
1931 encode_q_branch(s, 0, x, y); 1931 encode_q_branch(s, 0, x, y);