[Mplayer-cvslog] CVS: main configure,1.189,1.190 dec_video.c,1.46,1.47

Arpi of Ize arpi at mplayer.dev.hu
Wed Oct 17 01:30:41 CEST 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv12750

Modified Files:
	configure dec_video.c 
Log Message:
ffmpeg postprocess

Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -r1.189 -r1.190
--- configure	16 Oct 2001 17:51:26 -0000	1.189
+++ configure	16 Oct 2001 23:30:38 -0000	1.190
@@ -2382,6 +2382,9 @@
 /* Define this to enable MPEG 1/2 image postprocessing (requires FAST cpu!) */
 #define MPEG12_POSTPROC
 
+/* Define this to enable image postprocessing in libavcodec (requires FAST cpu!) */
+#define FF_POSTPROCESS
+
 #define HAVE_ODIVX_POSTPROCESS
 
 /* Win32 DLL support */

Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_video.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- dec_video.c	13 Oct 2001 15:33:12 -0000	1.46
+++ dec_video.c	16 Oct 2001 23:30:38 -0000	1.47
@@ -59,6 +59,9 @@
     static AVPicture lavc_picture;
     int avcodec_inited=0;
 #endif
+#ifdef FF_POSTPROCESS
+    unsigned int lavc_pp=0;
+#endif
 
 #ifndef NEW_DECORE
 #include "opendivx/decore.h"
@@ -110,6 +113,10 @@
   case VFM_MPEG:
       return GET_PP_QUALITY_MAX;
 #endif
+#ifdef FF_POSTPROCESS
+  case VFM_FFMPEG:
+      return GET_PP_QUALITY_MAX;
+#endif
   case VFM_DIVX4:
   case VFM_ODIVX:
 #ifdef NEW_DECORE
@@ -143,6 +150,12 @@
   }
   break;
 #endif
+#ifdef FF_POSTPROCESS
+  case VFM_FFMPEG:
+    if(quality<0 || quality>GET_PP_QUALITY_MAX) quality=GET_PP_QUALITY_MAX;
+    lavc_pp=getPpModeForQuality(quality);
+    break;
+#endif
   case VFM_DIVX4:
   case VFM_ODIVX: {
    DEC_SET dec_set;
@@ -345,7 +358,9 @@
         mp_msg(MSGT_DECVIDEO,MSGL_ERR, MSGTR_CantOpenCodec);
         return 0;
     }
-   
+#ifdef FF_POSTPROCESS
+   lavc_pp=divx_quality;
+#endif
    mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: libavcodec init OK!\n");
    break;
 #endif
@@ -501,11 +516,29 @@
 	if(!drop_frame && got_picture){
 //	if(!drop_frame){
 	  if(planar){
-	    planes=lavc_picture.data;
-	    stride=lavc_picture.linesize;
-	    //stride[1]=stride[2]=0;
-	    //stride[0]/=2;
-            blit_frame=2;
+#ifdef FF_POSTPROCESS
+	    if(lavc_pp){
+		// postprocess
+		if(!sh_video->our_out_buffer)
+		    sh_video->our_out_buffer = (char*)memalign(64,sh_video->disp_w*sh_video->disp_h*3/2);
+    		stride[0]=sh_video->disp_w;
+    		stride[1]=stride[2]=sh_video->disp_w/2;
+    		planes[0]=sh_video->our_out_buffer;
+    		planes[2]=planes[0]+sh_video->disp_w*sh_video->disp_h;
+    		planes[1]=planes[2]+sh_video->disp_w*sh_video->disp_h/4;
+		postprocess(lavc_picture.data,lavc_picture.linesize[0],
+			    planes,sh_video->disp_w,
+			    sh_video->disp_w,sh_video->disp_h,
+			    &quant_store[0][0],MBC+1,lavc_pp);
+	    } else
+#endif
+	    {
+		planes=lavc_picture.data;
+		stride=lavc_picture.linesize;
+		//stride[1]=stride[2]=0;
+		//stride[0]/=2;
+	    }
+    	    blit_frame=2;
 	  } else {
 	    int y;
 	    // temporary hack - FIXME




More information about the MPlayer-cvslog mailing list