summaryrefslogtreecommitdiff
path: root/libavcodec/h263dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-09-27 11:50:56 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-09-27 11:50:56 +0000
commit21adafec2a42d5575ff0a36a028849a9b886c055 (patch)
tree08fa557bfc0d7b64f2974636330ddeb9da65b416 /libavcodec/h263dec.c
parent0b2346d38c96cbc218cb75e8f83eec788cd1bc29 (diff)
lowres width/height cleanup 3rd try
Originally committed as revision 3522 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263dec.c')
-rw-r--r--libavcodec/h263dec.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 6ba0564552..f9680052c2 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -37,10 +37,8 @@ int ff_h263_decode_init(AVCodecContext *avctx)
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 @@ retry:
/* 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 @@ retry:
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;
}