Mercurial > libavcodec.hg
diff h263dec.c @ 2266:514949de5d15 libavcodec
set AVCodecContext.width/height to the picture width/height instead of the one stored in the bitstream (that only matters if lowres!=0)
author | michael |
---|---|
date | Mon, 27 Sep 2004 02:39:55 +0000 |
parents | bd09f4d1976f |
children | 21f450be6cb5 |
line wrap: on
line diff
--- a/h263dec.c Sun Sep 26 23:01:42 2004 +0000 +++ b/h263dec.c Mon Sep 27 02:39:55 2004 +0000 @@ -37,8 +37,10 @@ s->avctx = avctx; s->out_format = FMT_H263; - s->width = avctx->width; + s->width = avctx->width; s->height = avctx->height; + avctx->width = -((-s->width )>>avctx->lowres); + avctx->height= -((-s->height)>>avctx->lowres); s->workaround_bugs= avctx->workaround_bugs; // set defaults @@ -637,7 +639,8 @@ /* FIXME: By the way H263 decoder is evolving it should have */ /* an H263EncContext */ - if ( s->width != avctx->width || s->height != avctx->height) { + if ( -((-s->width )>>avctx->lowres) != avctx->width + || -((-s->height)>>avctx->lowres) != avctx->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; @@ -645,8 +648,8 @@ s->parse_context= pc; } if (!s->context_initialized) { - avctx->width = s->width; - avctx->height = s->height; + avctx->width = -((-s->width)>>avctx->lowres); + avctx->height = -((-s->height)>>avctx->lowres); goto retry; }