diff libmpcodecs/vf_denoise3d.c @ 32702:7af3e6f901fd

Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
author cehoyos
date Fri, 14 Jan 2011 22:10:21 +0000
parents 8fa2f43cb760
children
line wrap: on
line diff
--- a/libmpcodecs/vf_denoise3d.c	Fri Jan 14 13:36:48 2011 +0000
+++ b/libmpcodecs/vf_denoise3d.c	Fri Jan 14 22:10:21 2011 +0000
@@ -38,7 +38,7 @@
 struct vf_priv_s {
         int Coefs[4][512];
         unsigned char *Line;
-	mp_image_t *pmpi;
+        mp_image_t *pmpi;
 };
 
 
@@ -47,14 +47,14 @@
 
 static int config(struct vf_instance *vf,
         int width, int height, int d_width, int d_height,
-	unsigned int flags, unsigned int outfmt){
+        unsigned int flags, unsigned int outfmt){
 
-	free(vf->priv->Line);
+        free(vf->priv->Line);
         vf->priv->Line = malloc(width);
-	vf->priv->pmpi=NULL;
+        vf->priv->pmpi=NULL;
 //        vf->default_caps &= !VFCAP_ACCEPT_STRIDE;
 
-	return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
+        return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
 }
 
 
@@ -91,7 +91,7 @@
 
     for (Y = 1; Y < H; Y++)
     {
-	sLineOffs += sStride, pLineOffs += pStride, dLineOffs += dStride;
+        sLineOffs += sStride, pLineOffs += pStride, dLineOffs += dStride;
         /* First pixel on each line doesn't have previous pixel */
         PixelAnt = Frame[sLineOffs];
         LineAnt[0] = LowPass(LineAnt[0], PixelAnt, Vertical);
@@ -110,56 +110,56 @@
 
 
 static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
-	int cw= mpi->w >> mpi->chroma_x_shift;
-	int ch= mpi->h >> mpi->chroma_y_shift;
+        int cw= mpi->w >> mpi->chroma_x_shift;
+        int ch= mpi->h >> mpi->chroma_y_shift;
         int W = mpi->w, H = mpi->h;
 
-	mp_image_t *dmpi=vf_get_image(vf->next,mpi->imgfmt,
-		MP_IMGTYPE_IP, MP_IMGFLAG_ACCEPT_STRIDE |
-		MP_IMGFLAG_PRESERVE | MP_IMGFLAG_READABLE,
+        mp_image_t *dmpi=vf_get_image(vf->next,mpi->imgfmt,
+                MP_IMGTYPE_IP, MP_IMGFLAG_ACCEPT_STRIDE |
+                MP_IMGFLAG_PRESERVE | MP_IMGFLAG_READABLE,
                 mpi->w,mpi->h);
 
-	if(!dmpi) return 0;
+        if(!dmpi) return 0;
         if (!vf->priv->pmpi) vf->priv->pmpi=mpi;
 
         deNoise(mpi->planes[0], vf->priv->pmpi->planes[0], dmpi->planes[0],
-		vf->priv->Line, W, H,
+                vf->priv->Line, W, H,
                 mpi->stride[0], vf->priv->pmpi->stride[0], dmpi->stride[0],
                 vf->priv->Coefs[0] + 256,
                 vf->priv->Coefs[0] + 256,
                 vf->priv->Coefs[1] + 256);
         deNoise(mpi->planes[1], vf->priv->pmpi->planes[1], dmpi->planes[1],
-		vf->priv->Line, cw, ch,
+                vf->priv->Line, cw, ch,
                 mpi->stride[1], vf->priv->pmpi->stride[1], dmpi->stride[1],
                 vf->priv->Coefs[2] + 256,
                 vf->priv->Coefs[2] + 256,
                 vf->priv->Coefs[3] + 256);
         deNoise(mpi->planes[2], vf->priv->pmpi->planes[2], dmpi->planes[2],
-		vf->priv->Line, cw, ch,
+                vf->priv->Line, cw, ch,
                 mpi->stride[2], vf->priv->pmpi->stride[2], dmpi->stride[2],
                 vf->priv->Coefs[2] + 256,
                 vf->priv->Coefs[2] + 256,
                 vf->priv->Coefs[3] + 256);
 
-	vf->priv->pmpi=dmpi; // save reference image
-	return vf_next_put_image(vf,dmpi, pts);
+        vf->priv->pmpi=dmpi; // save reference image
+        return vf_next_put_image(vf,dmpi, pts);
 }
 
 //===========================================================================//
 
 static int query_format(struct vf_instance *vf, unsigned int fmt){
         switch(fmt)
-	{
-	case IMGFMT_YV12:
-	case IMGFMT_I420:
-	case IMGFMT_IYUV:
-	case IMGFMT_YVU9:
-	case IMGFMT_444P:
-	case IMGFMT_422P:
-	case IMGFMT_411P:
-		return vf_next_query_format(vf, fmt);
-	}
-	return 0;
+        {
+        case IMGFMT_YV12:
+        case IMGFMT_I420:
+        case IMGFMT_IYUV:
+        case IMGFMT_YVU9:
+        case IMGFMT_444P:
+        case IMGFMT_422P:
+        case IMGFMT_411P:
+                return vf_next_query_format(vf, fmt);
+        }
+        return 0;
 }
 
 
@@ -186,11 +186,11 @@
         double LumSpac, LumTmp, ChromSpac, ChromTmp;
         double Param1, Param2, Param3;
 
-	vf->config=config;
-	vf->put_image=put_image;
+        vf->config=config;
+        vf->put_image=put_image;
         vf->query_format=query_format;
         vf->uninit=uninit;
-	vf->priv=malloc(sizeof(struct vf_priv_s));
+        vf->priv=malloc(sizeof(struct vf_priv_s));
         memset(vf->priv, 0, sizeof(struct vf_priv_s));
 
         if (args)
@@ -253,7 +253,7 @@
         PrecalcCoefs(vf->priv->Coefs[2], ChromSpac);
         PrecalcCoefs(vf->priv->Coefs[3], ChromTmp);
 
-	return 1;
+        return 1;
 }
 
 const vf_info_t vf_info_denoise3d = {