[Mplayer-cvslog] CVS: main/libmpcodecs vf_pp.c,1.22,1.23

Michael Niedermayer CVS michael at mplayerhq.hu
Sun Jan 5 20:10:44 CET 2003


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

Modified Files:
	vf_pp.c 
Log Message:
YUV 411/422/444 support for pp


Index: vf_pp.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_pp.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- vf_pp.c	3 Jan 2003 12:40:10 -0000	1.22
+++ vf_pp.c	5 Jan 2003 19:10:26 -0000	1.23
@@ -37,12 +37,20 @@
 static int config(struct vf_instance_s* vf,
         int width, int height, int d_width, int d_height,
 	unsigned int voflags, unsigned int outfmt){
-    if(vf->priv->context) pp_free_context(vf->priv->context);
-    vf->priv->context= pp_get_context(width, height,
+    int flags=
           (gCpuCaps.hasMMX   ? PP_CPU_CAPS_MMX   : 0)
 	| (gCpuCaps.hasMMX2  ? PP_CPU_CAPS_MMX2  : 0)
-	| (gCpuCaps.has3DNow ? PP_CPU_CAPS_3DNOW : 0)
-    );
+	| (gCpuCaps.has3DNow ? PP_CPU_CAPS_3DNOW : 0);
+
+    switch(outfmt){
+    case IMGFMT_444P: flags|= PP_FORMAT_444; break;
+    case IMGFMT_422P: flags|= PP_FORMAT_422; break;
+    case IMGFMT_411P: flags|= PP_FORMAT_411; break;
+    default:          flags|= PP_FORMAT_420; break;
+    }
+        
+    if(vf->priv->context) pp_free_context(vf->priv->context);
+    vf->priv->context= pp_get_context(width, height, flags);
 
     return vf_next_config(vf,width,height,d_width,d_height,voflags,vf->priv->outfmt);
 }
@@ -61,7 +69,10 @@
     case IMGFMT_YV12:
     case IMGFMT_I420:
     case IMGFMT_IYUV:
-	return vf_next_query_format(vf,vf->priv->outfmt);
+    case IMGFMT_444P:
+    case IMGFMT_422P:
+    case IMGFMT_411P:
+	return vf_next_query_format(vf,fmt);
     }
     return 0;
 }
@@ -129,6 +140,9 @@
     IMGFMT_YV12,
     IMGFMT_I420,
     IMGFMT_IYUV,
+    IMGFMT_444P,
+    IMGFMT_422P,
+    IMGFMT_411P,
     0
 };
 



More information about the MPlayer-cvslog mailing list