Mercurial > libavcodec.hg
diff h263dec.c @ 2270:21f450be6cb5 libavcodec
lowres width/height cleanup 3rd try
author | michael |
---|---|
date | Mon, 27 Sep 2004 11:50:56 +0000 |
parents | 514949de5d15 |
children | 870597ca3e7a |
line wrap: on
line diff
--- a/h263dec.c Mon Sep 27 10:06:10 2004 +0000 +++ b/h263dec.c Mon Sep 27 11:50:56 2004 +0000 @@ -37,10 +37,8 @@ s->avctx = avctx; s->out_format = FMT_H263; - s->width = avctx->width; - s->height = avctx->height; - avctx->width = -((-s->width )>>avctx->lowres); - avctx->height= -((-s->height)>>avctx->lowres); + s->width = avctx->coded_width; + s->height = avctx->coded_height; s->workaround_bugs= avctx->workaround_bugs; // set defaults @@ -639,8 +637,8 @@ /* FIXME: By the way H263 decoder is evolving it should have */ /* an H263EncContext */ - if ( -((-s->width )>>avctx->lowres) != avctx->width - || -((-s->height)>>avctx->lowres) != avctx->height) { + if ( s->width != avctx->coded_width + || s->height != avctx->coded_height) { /* H.263 could change picture size any time */ ParseContext pc= s->parse_context; //FIXME move these demuxng hack to avformat s->parse_context.buffer=0; @@ -648,8 +646,7 @@ s->parse_context= pc; } if (!s->context_initialized) { - avctx->width = -((-s->width)>>avctx->lowres); - avctx->height = -((-s->height)>>avctx->lowres); + avcodec_set_dimensions(avctx, s->width, s->height); goto retry; }