[Mplayer-cvslog] CVS: main/libmpcodecs vf_scale.c,1.16,1.17

Michael Niedermayer michael at mplayerhq.hu
Thu Jul 4 15:08:40 CEST 2002


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

Modified Files:
	vf_scale.c 
Log Message:
more scaling algos


Index: vf_scale.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_scale.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- vf_scale.c	24 Jun 2002 01:05:41 -0000	1.16
+++ vf_scale.c	4 Jul 2002 13:08:37 -0000	1.17
@@ -16,6 +16,7 @@
 struct vf_priv_s {
     int w,h;
     int v_chr_drop;
+    int param;
     unsigned int fmt;
     SwsContext *ctx;
 };
@@ -30,6 +31,16 @@
     IMGFMT_BGR24,
     IMGFMT_BGR16,
     IMGFMT_BGR15,
+    IMGFMT_BGR8,
+    IMGFMT_BGR4,
+    IMGFMT_BGR1,
+    IMGFMT_RGB32,
+    IMGFMT_RGB24,
+    IMGFMT_RGB16,
+    IMGFMT_RGB15,
+    IMGFMT_RGB8,
+    IMGFMT_RGB4,
+    IMGFMT_RGB1,
     IMGFMT_YV12,
     IMGFMT_I420,
     IMGFMT_IYUV,
@@ -112,6 +123,7 @@
     // new swscaler:
     swsGetFlagsAndFilterFromCmdLine(&int_sws_flags, &srcFilter, &dstFilter);
     int_sws_flags|= vf->priv->v_chr_drop << SWS_SRC_V_CHR_DROP_SHIFT;
+    int_sws_flags|= vf->priv->param      << SWS_PARAM_SHIFT;
     vf->priv->ctx=getSwsContext(width,height,
 	    (outfmt==IMGFMT_I420 || outfmt==IMGFMT_IYUV)?IMGFMT_YV12:outfmt,
 		  vf->priv->w,vf->priv->h,
@@ -195,10 +207,12 @@
     vf->priv->w=
     vf->priv->h=-1;
     vf->priv->v_chr_drop=0;
-    if(args) sscanf(args, "%d:%d:%d",
+    vf->priv->param=0;
+    if(args) sscanf(args, "%d:%d:%d:%d",
     &vf->priv->w,
     &vf->priv->h,
-    &vf->priv->v_chr_drop);
+    &vf->priv->v_chr_drop,
+    &vf->priv->param);
     mp_msg(MSGT_VFILTER,MSGL_V,"SwScale params: %d x %d (-1=no scaling)\n",
     vf->priv->w,
     vf->priv->h);




More information about the MPlayer-cvslog mailing list