From c65ac515d87f9e3a06693f0681e5ba17a940619f Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 27 Sep 2004 10:08:57 +0000 Subject: compensate for width/height being picture width/height instead of bitstream width/height git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13490 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd_ffmpeg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 1b4fb497d3..6526823285 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -414,7 +414,7 @@ static void draw_slice(struct AVCodecContext *s, sh_video_t * sh = s->opaque; int start=0, i; int width= s->width; - int skip_stride= (width+15)>>4; + int skip_stride= ((width<>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 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ // 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++ ) -- cgit v1.2.3