changeset 13489:912c906db2ed

compensate for width/height being picture width/height instead of bitstream width/height
author michael
date Mon, 27 Sep 2004 10:08:57 +0000
parents 1efd9eb7da2f
children e8e83796928c
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Mon Sep 27 10:07:49 2004 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Mon Sep 27 10:08:57 2004 +0000
@@ -414,7 +414,7 @@
     sh_video_t * sh = s->opaque;
     int start=0, i;
     int width= s->width;
-    int skip_stride= (width+15)>>4;
+    int skip_stride= ((width<<lavc_param_lowres)+15)>>4;
     uint8_t *skip= &s->coded_frame->mbskip_table[(y>>4)*skip_stride];
     int threshold= s->coded_frame->age;
 #if LIBAVCODEC_BUILD >= 4670
@@ -787,8 +787,8 @@
 	// average MB quantizer
 	{
 	    int x, y;
-	    int w = (avctx->width+15) >> 4;
-	    int h = (avctx->height+15) >> 4;
+	    int w = ((avctx->width  << lavc_param_lowres)+15) >> 4;
+	    int h = ((avctx->height << lavc_param_lowres)+15) >> 4;
 	    int8_t *q = pic->qscale_table;
 	    for( y = 0; y < h; y++ ) {
 		for( x = 0; x < w; x++ )