[Mplayer-cvslog] CVS: main/libmpcodecs vd_ffmpeg.c,1.134,1.135

Michael Niedermayer CVS syncmail at mplayerhq.hu
Mon Sep 27 00:16:58 CEST 2004


CVS change done by Michael Niedermayer CVS

Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv3096

Modified Files:
	vd_ffmpeg.c 
Log Message:
lowres window size fix by arpi
slice fix by me


Index: vd_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_ffmpeg.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -r1.134 -r1.135
--- vd_ffmpeg.c	26 Sep 2004 12:54:00 -0000	1.134
+++ vd_ffmpeg.c	26 Sep 2004 22:16:56 -0000	1.135
@@ -413,8 +413,8 @@
                 	int y, int type, int height){
     sh_video_t * sh = s->opaque;
     int start=0, i;
-    int width= s->width;
-    int skip_stride= (width+15)>>4;
+    int width= s->width >> s->lowres;
+    int skip_stride= (s->width+15)>>4;
     uint8_t *skip= &s->coded_frame->mbskip_table[(y>>4)*skip_stride];
     int threshold= s->coded_frame->age;
 #if LIBAVCODEC_BUILD >= 4670
@@ -462,12 +462,18 @@
 #else
     float aspect= avctx->aspect_ratio;
 #endif
+//    int new_w=(avctx->width+(1<<lavc_param_lowres)-1)>>lavc_param_lowres;
+//    int new_h=(avctx->height+(1<<lavc_param_lowres)-1)>>lavc_param_lowres;
+//    int new_w=((avctx->width>>lavc_param_lowres)+15)&-15;
+//    int new_h=((avctx->height>>lavc_param_lowres)+15)&-15;
+    int new_w=(avctx->width>>lavc_param_lowres);
+    int new_h=(avctx->height>>lavc_param_lowres);
 
      // it is possible another vo buffers to be used after vo config()
      // lavc reset its buffers on width/heigh change but not on aspect change!!!
     if (// aspect != ctx->last_aspect ||
-	avctx->width != sh->disp_w ||
-	avctx->height != sh->disp_h ||
+       new_w != sh->disp_w ||
+       new_h != sh->disp_h ||
 	!ctx->vo_inited)
     {
 	mp_msg(MSGT_DECVIDEO, MSGL_V, "[ffmpeg] aspect_ratio: %f\n", aspect);
@@ -475,8 +481,8 @@
 //	if(ctx->last_aspect>=0.01 && ctx->last_aspect<100)
 	if(sh->aspect==0.0)
 	    sh->aspect = ctx->last_aspect;
-	sh->disp_w = avctx->width;
-	sh->disp_h = avctx->height;
+       sh->disp_w = new_w;
+       sh->disp_h = new_h;
 	ctx->vo_inited=1;
 	switch(pix_fmt){
 	case PIX_FMT_YUV410P: ctx->best_csp=IMGFMT_YVU9;break; //svq1




More information about the MPlayer-cvslog mailing list