changeset 2267:143c17950b55 libavcodec

10l
author michael
date Mon, 27 Sep 2004 03:17:26 +0000
parents 514949de5d15
children 5b3dfc4103b9
files mjpeg.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mjpeg.c	Mon Sep 27 02:39:55 2004 +0000
+++ b/mjpeg.c	Mon Sep 27 03:17:26 2004 +0000
@@ -859,8 +859,8 @@
     MpegEncContext s2;
 
     s->avctx = avctx;
-    avctx->width = -((-avctx->width )) >> avctx->lowres;
-    avctx->height= -((-avctx->height)) >> avctx->lowres;
+    avctx->width = -((-avctx->width ) >> avctx->lowres);
+    avctx->height= -((-avctx->height) >> avctx->lowres);
 
     /* ugly way to get the idct & scantable FIXME */
     memset(&s2, 0, sizeof(MpegEncContext));
@@ -2070,8 +2070,10 @@
 #else
     /* SOF */
     s->bits = 8;
-    s->width  = avctx->width << avctx->lowres;
-    s->height = avctx->height<< avctx->lowres;
+    s->width  = avctx->width;
+    s->height = avctx->height;
+    avctx->width  = -((-avctx->width )>>avctx->lowres);
+    avctx->height = -((-avctx->height)>>avctx->lowres);
     s->nb_components = 3;
     s->component_id[0] = 0;
     s->h_count[0] = 2;