[Mplayer-cvslog] CVS: main/libmpcodecs vd_ffmpeg.c,1.29,1.30

Michael Niedermayer michael at mplayerhq.hu
Mon Jul 15 16:30:25 CEST 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv24547

Modified Files:
	vd_ffmpeg.c 
Log Message:
imgtype IP support
enabling dr1 by default, lets see if its bugfree ...


Index: vd_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_ffmpeg.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- vd_ffmpeg.c	15 Jul 2002 00:30:50 -0000	1.29
+++ vd_ffmpeg.c	15 Jul 2002 14:30:12 -0000	1.30
@@ -250,6 +250,7 @@
     mp_image_t* mpi=NULL;
 //    int flags= MP_IMGFLAG_ALIGNED_STRIDE;
     int flags= MP_IMGFLAG_ACCEPT_STRIDE;
+    int type= MP_IMGTYPE_IPB;
     
     if(init_vo(sh)<0){
         printf("init_vo failed\n");
@@ -262,7 +263,16 @@
     else
         flags|= MP_IMGFLAG_PRESERVE|MP_IMGFLAG_READABLE;
 
-    mpi= mpcodecs_get_image(sh,MP_IMGTYPE_IPB, flags,
+#if LIBAVCODEC_BUILD > 4616
+    if(avctx->has_b_frames){
+        type= MP_IMGTYPE_IPB;
+    }else{
+        type= MP_IMGTYPE_IP;
+    }
+#endif
+    mp_msg(MSGT_DECVIDEO,MSGL_DBG2, type== MP_IMGTYPE_IPB ? "using IPB\n" : "using IP\n");
+
+    mpi= mpcodecs_get_image(sh,type, flags,
 // MN: arpi, is the next line ok? (i doubt it), its needed for height%16!=0 files
 			(width+15)&(~15), (height+15)&(~15));
 
@@ -282,13 +292,10 @@
     }
 
     avctx->dr_stride   = mpi->stride[0];
+    avctx->dr_uvstride = mpi->stride[1];
 
-    if(mpi->stride[0]>>1 != mpi->stride[1] 
-     ||mpi->stride[0]>>1 != mpi->stride[2]){
-        mp_msg(MSGT_DECVIDEO,MSGL_ERR, "Error: chroma stride != luma stride >>1\n");
-    }
-    
     avctx->dr_opaque_frame = mpi;
+    avctx->dr_ip_buffer_count=2; //FIXME
 }
 #endif
 
@@ -300,7 +307,7 @@
     vd_ffmpeg_ctx *ctx = sh->context;
     AVCodecContext *avctx = ctx->avctx;
     mp_image_t* mpi=NULL;
-    int dr1= ctx->do_dr1=0;
+    int dr1= ctx->do_dr1;
 
     if(len<=0) return NULL; // skipped frame
 




More information about the MPlayer-cvslog mailing list