changeset 26754:63630c09e237

cosmetics: Remove pointless parentheses from return calls.
author diego
date Fri, 16 May 2008 00:23:02 +0000
parents 502f04b67653
children 46f0b4d34fa1
files libmpcodecs/ad_twin.c libmpcodecs/ae_lame.c libmpcodecs/dec_video.c libmpcodecs/img_format.c libmpcodecs/vd_ffmpeg.c libmpcodecs/vd_qtvideo.c libmpcodecs/vd_realvid.c libmpcodecs/vd_xanim.c libmpcodecs/vd_xvid4.c libmpcodecs/ve_lavc.c libmpcodecs/ve_qtvideo.c libmpcodecs/ve_x264.c libmpcodecs/ve_xvid4.c libmpcodecs/vf_expand.c libmpcodecs/vf_framestep.c libmpcodecs/vf_lavc.c libmpcodecs/vf_palette.c libmpcodecs/vf_tile.c libmpcodecs/vf_vo.c
diffstat 19 files changed, 151 insertions(+), 151 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ad_twin.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/ad_twin.c	Fri May 16 00:23:02 2008 +0000
@@ -216,7 +216,7 @@
         }
         iptr = priv->ptr;           /* current file data buffer pointer */
         if ( iptr >= priv->nbuf )   /* If data file is empty then return */
-            return(retval);
+            return retval;
         ibufadr = iptr/BYTE_BIT;      /* current file data buffer address */
         ibufbit = iptr%BYTE_BIT;      /* current file data buffer bit */
         /*  tmpdat = stream->buf[ibufadr] >> (BYTE_BIT-ibufbit-1); */
@@ -235,7 +235,7 @@
         }
         ++retval;
     }
-    return(retval);
+    return retval;
 }
 
 #define BITS_INT    (sizeof(int)*8)
@@ -266,7 +266,7 @@
         mask >>= 1;
     }
     *data = work;
-    return(retval);
+    return retval;
 }
 
 static int GetVqInfo( tvqConfInfoSubBlock *cfg,
--- a/libmpcodecs/ae_lame.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/ae_lame.c	Fri May 16 00:23:02 2008 +0000
@@ -122,7 +122,7 @@
     else
         n = lame_encode_buffer_interleaved(lame,(short *)src, len/4, dest, max_size);
 
-    return (n < 0 ? 0 : n);
+    return n < 0 ? 0 : n;
 }
 
 
--- a/libmpcodecs/dec_video.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/dec_video.c	Fri May 16 00:23:02 2008 +0000
@@ -88,7 +88,7 @@
     {
 	int ret = vf->control(vf, VFCTRL_SET_EQUALIZER, &data);
 	if (ret == CONTROL_TRUE)
-	    return(1);
+	    return 1;
     }
     /* try software control */
     if(mpvdec)
@@ -111,7 +111,7 @@
         int ret = vf->control(vf, VFCTRL_GET_EQUALIZER, &data);
 	if (ret == CONTROL_TRUE){
 	    *value = data.value;
-	    return(1);
+	    return 1;
 	}
     }
     /* try software control */
@@ -129,7 +129,7 @@
     {
         int ret = vf->control(vf, VFCTRL_CHANGE_RECTANGLE, data);
 	if (ret)
-	    return(1);
+	    return 1;
     }
     return 0;
 }
--- a/libmpcodecs/img_format.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/img_format.c	Fri May 16 00:23:02 2008 +0000
@@ -7,66 +7,66 @@
     static char unknown_format[20];
     switch(format)
     {
-	case IMGFMT_RGB1: return("RGB 1-bit");
-	case IMGFMT_RGB4: return("RGB 4-bit");
-	case IMGFMT_RG4B: return("RGB 4-bit per byte");
-	case IMGFMT_RGB8: return("RGB 8-bit");
-	case IMGFMT_RGB15: return("RGB 15-bit");
-	case IMGFMT_RGB16: return("RGB 16-bit");
-	case IMGFMT_RGB24: return("RGB 24-bit");
-//	case IMGFMT_RGB32: return("RGB 32-bit");
-	case IMGFMT_BGR1: return("BGR 1-bit");
-	case IMGFMT_BGR4: return("BGR 4-bit");
-	case IMGFMT_BG4B: return("BGR 4-bit per byte");
-	case IMGFMT_BGR8: return("BGR 8-bit");
-	case IMGFMT_BGR15: return("BGR 15-bit");
-	case IMGFMT_BGR16: return("BGR 16-bit");
-	case IMGFMT_BGR24: return("BGR 24-bit");
-//	case IMGFMT_BGR32: return("BGR 32-bit");
-	case IMGFMT_ABGR: return("ABGR");
-	case IMGFMT_BGRA: return("BGRA");
-	case IMGFMT_ARGB: return("ARGB");
-	case IMGFMT_RGBA: return("RGBA");
-	case IMGFMT_YVU9: return("Planar YVU9");
-	case IMGFMT_IF09: return("Planar IF09");
-	case IMGFMT_YV12: return("Planar YV12");
-	case IMGFMT_I420: return("Planar I420");
-	case IMGFMT_IYUV: return("Planar IYUV");
-	case IMGFMT_CLPL: return("Planar CLPL");
-	case IMGFMT_Y800: return("Planar Y800");
-	case IMGFMT_Y8: return("Planar Y8");
-	case IMGFMT_444P: return("Planar 444P");
-	case IMGFMT_422P: return("Planar 422P");
-	case IMGFMT_411P: return("Planar 411P");
-	case IMGFMT_NV12: return("Planar NV12");
-	case IMGFMT_NV21: return("Planar NV21");
-        case IMGFMT_HM12: return("Planar NV12 Macroblock");
-	case IMGFMT_IUYV: return("Packed IUYV");
-	case IMGFMT_IY41: return("Packed IY41");
-	case IMGFMT_IYU1: return("Packed IYU1");
-	case IMGFMT_IYU2: return("Packed IYU2");
-	case IMGFMT_UYVY: return("Packed UYVY");
-	case IMGFMT_UYNV: return("Packed UYNV");
-	case IMGFMT_cyuv: return("Packed CYUV");
-	case IMGFMT_Y422: return("Packed Y422");
-	case IMGFMT_YUY2: return("Packed YUY2");
-	case IMGFMT_YUNV: return("Packed YUNV");
-	case IMGFMT_YVYU: return("Packed YVYU");
-	case IMGFMT_Y41P: return("Packed Y41P");
-	case IMGFMT_Y211: return("Packed Y211");
-	case IMGFMT_Y41T: return("Packed Y41T");
-	case IMGFMT_Y42T: return("Packed Y42T");
-	case IMGFMT_V422: return("Packed V422");
-	case IMGFMT_V655: return("Packed V655");
-	case IMGFMT_CLJR: return("Packed CLJR");
-	case IMGFMT_YUVP: return("Packed YUVP");
-	case IMGFMT_UYVP: return("Packed UYVP");
-	case IMGFMT_MPEGPES: return("Mpeg PES");
-	case IMGFMT_ZRMJPEGNI: return("Zoran MJPEG non-interlaced");
-	case IMGFMT_ZRMJPEGIT: return("Zoran MJPEG top field first");
-	case IMGFMT_ZRMJPEGIB: return("Zoran MJPEG bottom field first");
-	case IMGFMT_XVMC_MOCO_MPEG2: return("MPEG1/2 Motion Compensation");
-	case IMGFMT_XVMC_IDCT_MPEG2: return("MPEG1/2 Motion Compensation and IDCT");
+	case IMGFMT_RGB1: return "RGB 1-bit";
+	case IMGFMT_RGB4: return "RGB 4-bit";
+	case IMGFMT_RG4B: return "RGB 4-bit per byte";
+	case IMGFMT_RGB8: return "RGB 8-bit";
+	case IMGFMT_RGB15: return "RGB 15-bit";
+	case IMGFMT_RGB16: return "RGB 16-bit";
+	case IMGFMT_RGB24: return "RGB 24-bit";
+//	case IMGFMT_RGB32: return "RGB 32-bit";
+	case IMGFMT_BGR1: return "BGR 1-bit";
+	case IMGFMT_BGR4: return "BGR 4-bit";
+	case IMGFMT_BG4B: return "BGR 4-bit per byte";
+	case IMGFMT_BGR8: return "BGR 8-bit";
+	case IMGFMT_BGR15: return "BGR 15-bit";
+	case IMGFMT_BGR16: return "BGR 16-bit";
+	case IMGFMT_BGR24: return "BGR 24-bit";
+//	case IMGFMT_BGR32: return "BGR 32-bit";
+	case IMGFMT_ABGR: return "ABGR";
+	case IMGFMT_BGRA: return "BGRA";
+	case IMGFMT_ARGB: return "ARGB";
+	case IMGFMT_RGBA: return "RGBA";
+	case IMGFMT_YVU9: return "Planar YVU9";
+	case IMGFMT_IF09: return "Planar IF09";
+	case IMGFMT_YV12: return "Planar YV12";
+	case IMGFMT_I420: return "Planar I420";
+	case IMGFMT_IYUV: return "Planar IYUV";
+	case IMGFMT_CLPL: return "Planar CLPL";
+	case IMGFMT_Y800: return "Planar Y800";
+	case IMGFMT_Y8: return "Planar Y8";
+	case IMGFMT_444P: return "Planar 444P";
+	case IMGFMT_422P: return "Planar 422P";
+	case IMGFMT_411P: return "Planar 411P";
+	case IMGFMT_NV12: return "Planar NV12";
+	case IMGFMT_NV21: return "Planar NV21";
+        case IMGFMT_HM12: return "Planar NV12 Macroblock";
+	case IMGFMT_IUYV: return "Packed IUYV";
+	case IMGFMT_IY41: return "Packed IY41";
+	case IMGFMT_IYU1: return "Packed IYU1";
+	case IMGFMT_IYU2: return "Packed IYU2";
+	case IMGFMT_UYVY: return "Packed UYVY";
+	case IMGFMT_UYNV: return "Packed UYNV";
+	case IMGFMT_cyuv: return "Packed CYUV";
+	case IMGFMT_Y422: return "Packed Y422";
+	case IMGFMT_YUY2: return "Packed YUY2";
+	case IMGFMT_YUNV: return "Packed YUNV";
+	case IMGFMT_YVYU: return "Packed YVYU";
+	case IMGFMT_Y41P: return "Packed Y41P";
+	case IMGFMT_Y211: return "Packed Y211";
+	case IMGFMT_Y41T: return "Packed Y41T";
+	case IMGFMT_Y42T: return "Packed Y42T";
+	case IMGFMT_V422: return "Packed V422";
+	case IMGFMT_V655: return "Packed V655";
+	case IMGFMT_CLJR: return "Packed CLJR";
+	case IMGFMT_YUVP: return "Packed YUVP";
+	case IMGFMT_UYVP: return "Packed UYVP";
+	case IMGFMT_MPEGPES: return "Mpeg PES";
+	case IMGFMT_ZRMJPEGNI: return "Zoran MJPEG non-interlaced";
+	case IMGFMT_ZRMJPEGIT: return "Zoran MJPEG top field first";
+	case IMGFMT_ZRMJPEGIB: return "Zoran MJPEG bottom field first";
+	case IMGFMT_XVMC_MOCO_MPEG2: return "MPEG1/2 Motion Compensation";
+	case IMGFMT_XVMC_IDCT_MPEG2: return "MPEG1/2 Motion Compensation and IDCT";
     }
     snprintf(unknown_format,20,"Unknown 0x%04x",format);
     return unknown_format;
--- a/libmpcodecs/vd_ffmpeg.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Fri May 16 00:23:02 2008 +0000
@@ -228,7 +228,7 @@
 
     ctx = sh->context = malloc(sizeof(vd_ffmpeg_ctx));
     if (!ctx)
-	return(0);
+	return 0;
     memset(ctx, 0, sizeof(vd_ffmpeg_ctx));
     
     lavc_codec = (AVCodec *)avcodec_find_decoder_by_name(sh->codec->dll);
--- a/libmpcodecs/vd_qtvideo.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/vd_qtvideo.c	Fri May 16 00:23:02 2008 +0000
@@ -196,7 +196,7 @@
     prev=FindNextComponent(NULL,&desc);
     if(!prev){
 	mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Cannot find requested component\n");
-	return(0);
+	return 0;
     }
     mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"Found it! ID = %p\n",prev);
 
@@ -278,7 +278,7 @@
 	    break;
 	default:
 	    mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Unknown requested csp\n");
-	    return(0);    
+	    return 0;
     }
     mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"imgfmt: %s qt_imgfmt: %.4s\n", vo_format_name(imgfmt), (char *)&qt_imgfmt);
     sh->context = (void *)qt_imgfmt;
--- a/libmpcodecs/vd_realvid.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/vd_realvid.c	Fri May 16 00:23:02 2008 +0000
@@ -427,5 +427,5 @@
 	   (sh->disp_w != transform_out[3] || sh->disp_h != transform_out[4]))
 	    initialized = 0;
 	
-	return (result?NULL:mpi);
+	return result ? NULL : mpi;
 }
--- a/libmpcodecs/vd_xanim.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/vd_xanim.c	Fri May 16 00:23:02 2008 +0000
@@ -211,7 +211,7 @@
 	    mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: failed to dlopen %s while %s\n", filename, error);
 	else
 	    mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: failed to dlopen %s\n", filename);
-	return(0);
+	return 0;
     }
 
     what_the = dlsym(priv->file_handler, "What_The");
@@ -219,7 +219,7 @@
     {
 	mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: failed to init %s while %s\n", filename, error);
 	dlclose(priv->file_handler);
-	return(0);
+	return 0;
     }
 	
     mod_hdr = what_the();
@@ -227,7 +227,7 @@
     {
 	mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: initializer function failed in %s\n", filename);
 	dlclose(priv->file_handler);
-	return(0);
+	return 0;
     }
     
     mp_msg(MSGT_DECVIDEO, MSGL_V, "=== XAnim Codec ===\n");
@@ -245,7 +245,7 @@
 	mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: not supported api revision (%d) in %s\n",
 	    mod_hdr->api_rev, filename);
 	dlclose(priv->file_handler);
-	return(0);
+	return 0;
     }
 
     func = mod_hdr->funcs;
@@ -253,7 +253,7 @@
     {
 	mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: function table error in %s\n", filename);
 	dlclose(priv->file_handler);
-	return(0);
+	return 0;
     }
     
     mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Exported functions by codec: [functable: %p entries: %d]\n",
@@ -281,7 +281,7 @@
 	    priv->dec_func = (void *)func[i].dec_func;
 	}
     }
-    return(1);
+    return 1;
 }
 
 static int xacodec_query(sh_video_t *sh, XA_CODEC_HDR *codec_hdr)
@@ -295,7 +295,7 @@
     {
 	codec_hdr->decoder = priv->dec_func;
 	mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "We got decoder's address at init! %p\n", codec_hdr->decoder);
-	return(1);
+	return 1;
     }
 #endif
 
@@ -306,16 +306,16 @@
 	    priv->dec_func = (void *)codec_hdr->decoder;
 	    mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Codec is supported: found decoder for %s at %p\n",
 		codec_hdr->description, codec_hdr->decoder);
-	    return(1);
+	    return 1;
 	case CODEC_UNSUPPORTED:
 	    mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "Codec (%s) is unsupported by dll\n",
 		codec_hdr->description);
-	    return(0);
+	    return 0;
 	case CODEC_UNKNOWN:
 	default:
 	    mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "Codec (%s) is unknown by dll\n",
 		codec_hdr->description);
-	    return(0);
+	    return 0;
     }
 }
 
@@ -475,7 +475,7 @@
 {
     mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "YUV2x2_Map_Func('image_type: %d', 'dith_type: %d')",
 	    image_type, dith_type);
-    return((void*)XA_YUV_2x2_clr);
+    return (void*)XA_YUV_2x2_clr;
 }
 
 /* -------------------- whole YUV frame converters ------------------------- */
@@ -581,7 +581,7 @@
 void *XA_YUV1611_Func(unsigned int image_type)
 {
     mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "XA_YUV1611_Func('image_type: %d')", image_type);
-    return((void *)XA_YUV1611_Convert);
+    return (void *)XA_YUV1611_Convert;
 }
 
 /* --------------- YUV 2x2 1x1 1x1 (4:2:0 aka YV12) [3ivX,H263] ------------ */
@@ -619,7 +619,7 @@
 void *XA_YUV221111_Func(unsigned int image_type)
 {
     mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "XA_YUV221111_Func('image_type: %d')\n",image_type);
-    return((void *)XA_YUV221111_Convert);
+    return (void *)XA_YUV221111_Convert;
 }
 
 /* *** EOF XANIM *** */
@@ -657,7 +657,7 @@
 
     snprintf(dll, 1024, "%s/%s", def_path, sh->codec->dll);
     if (xacodec_load(sh, dll) == 0)
-	return(0);
+	return 0;
 
     codec_hdr.xapi_rev = XAVID_API_REV;
     codec_hdr.anim_hdr = malloc(4096);
@@ -690,13 +690,13 @@
 	default:
 	    mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: not supported image out format (%s)\n",
 		vo_format_name(sh->codec->outfmt[sh->outfmtidx]));
-	    return(0);
+	    return 0;
     }
     mp_msg(MSGT_DECVIDEO, MSGL_INFO, "xacodec: querying for input %dx%d %dbit [fourcc: %4x] (%s)...\n",
 	codec_hdr.x, codec_hdr.y, codec_hdr.depth, codec_hdr.compression, codec_hdr.description);
 
     if (xacodec_query(sh, &codec_hdr) == 0)
-	return(0);
+	return 0;
 
 //    free(codec_hdr.anim_hdr);
 
@@ -705,7 +705,7 @@
     {
 	mp_msg(MSGT_DECVIDEO, MSGL_FATAL, "xacodec: memory allocation error: %s\n",
 	    strerror(errno));
-	return(0);
+	return 0;
     }
     priv->decinfo->cmd = 0;
     priv->decinfo->skip_flag = 0;
@@ -721,7 +721,7 @@
     mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "decinfo->extra, filled by codec: %p [%s]\n",
 	&priv->decinfo->extra, (char *)priv->decinfo->extra);
 
-    return(1);
+    return 1;
 }
 
 // uninit driver
--- a/libmpcodecs/vd_xvid4.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/vd_xvid4.c	Fri May 16 00:23:02 2008 +0000
@@ -86,7 +86,7 @@
 
 static int control(sh_video_t *sh,int cmd,void* arg,...)
 {
-	return(CONTROL_UNKNOWN);
+	return CONTROL_UNKNOWN;
 }
 
 /*============================================================================
@@ -144,7 +144,7 @@
 	default:
 		mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Unsupported out_fmt: 0x%X\n",
 		       sh->codec->outfmt[sh->outfmtidx]);
-		return(0);
+		return 0;
 	}
 
 	/* Gather some information about the host library */
@@ -160,7 +160,7 @@
 	
 	/* Initialize the xvidcore library */
 	if(xvid_global(NULL, XVID_GBL_INIT, &xvid_ini, NULL))
-		return(0);
+		return 0;
 
 	/* We use 0 width and height so xvidcore will resize its buffers
 	 * if required. That allows this vd plugin to do resize on first
@@ -171,7 +171,7 @@
 	/* Get a decoder instance */
 	if(xvid_decore(0, XVID_DEC_CREATE, &dec_p, NULL)<0) {
 		mp_msg(MSGT_DECVIDEO, MSGL_ERR, "XviD init failed\n");
-		return(0);
+		return 0;
 	}
 
 	p = malloc(sizeof(priv_t));
@@ -192,7 +192,7 @@
 		break;
 	}
 
-	return(1);
+	return 1;
 }
 
 /*============================================================================
@@ -221,7 +221,7 @@
 
 
 	if(!data || len <= 0)
-		return(NULL);
+		return NULL;
 
 	memset(&dec,0,sizeof(xvid_dec_frame_t));
 	memset(&stats, 0, sizeof(xvid_dec_stats_t));
@@ -272,7 +272,7 @@
 		consumed = xvid_decore(p->hdl, XVID_DEC_DECODE, &dec, &stats);
 		if (consumed < 0) {
 			mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Decoding error\n");
-			return(NULL);
+			return NULL;
 		}
 
 		/* Found a VOL information stats, if VO plugin is not initialized
@@ -280,7 +280,7 @@
 		if (stats.type == XVID_TYPE_VOL && !p->vo_initialized) {
 			sh->aspect = stats2aspect(&stats);
 			if(!mpcodecs_config_vo(sh, stats.data.vol.width, stats.data.vol.height, IMGFMT_YV12))
-				return(NULL);
+				return NULL;
 			
 			/* Don't take this path twice */
 			p->vo_initialized = !p->vo_initialized;
@@ -309,7 +309,7 @@
 
 	/* If we got out the decoding loop because the buffer was empty and there was nothing
 	 * to output yet, then just return NULL */
-	return((stats.type == XVID_TYPE_NOTHING)? NULL: mpi);
+	return (stats.type == XVID_TYPE_NOTHING) ? NULL : mpi;
 }
 
 /*****************************************************************************
@@ -368,10 +368,10 @@
 		dar  = ((float)stats->data.vol.width*wpar);
 		dar /= ((float)stats->data.vol.height*hpar);
 
-		return(dar);
+		return dar;
 	}
 
-	return(0.0f);
+	return 0.0f;
 }
 
 /*****************************************************************************
--- a/libmpcodecs/ve_lavc.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/ve_lavc.c	Fri May 16 00:23:02 2008 +0000
@@ -782,7 +782,7 @@
             pic->top_field_first= lavc_param_top;
     }
 
-    return (encode_frame(vf, pic, pts) >= 0);
+    return encode_frame(vf, pic, pts) >= 0;
 }
 
 static int encode_frame(struct vf_instance_s* vf, AVFrame *pic, double pts){
--- a/libmpcodecs/ve_qtvideo.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/ve_qtvideo.c	Fri May 16 00:23:02 2008 +0000
@@ -149,7 +149,7 @@
     compressor=FindNextComponent(NULL,&cdesc);
     if(!compressor){
 	mp_msg(MSGT_MENCODER,MSGL_ERR,"Cannot find requested component\n");
-	return(0);
+	return 0;
     }
     mp_msg(MSGT_MENCODER,MSGL_DBG2,"Found it! ID = %p\n",compressor);
 
--- a/libmpcodecs/ve_x264.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/ve_x264.c	Fri May 16 00:23:02 2008 +0000
@@ -232,7 +232,7 @@
 {
     switch(fmt) {
     case IMGFMT_I420:
-        return (VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW);
+        return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW;
     case IMGFMT_YV12:
     case IMGFMT_422P:
     case IMGFMT_444P:
--- a/libmpcodecs/ve_xvid4.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/ve_xvid4.c	Fri May 16 00:23:02 2008 +0000
@@ -405,14 +405,14 @@
 	mod->d_height = d_height;
 
 	if(dispatch_settings(mod) == BAD)
-		return(BAD);
+		return BAD;
 
 	/*--------------------------------------------------------------------
 	 * Set remaining information in the xvid_enc_create_t structure
 	 *------------------------------------------------------------------*/
 
 	if(set_create_struct(mod) == BAD)
-		return(BAD);
+		return BAD;
 
 	/*--------------------------------------------------------------------
 	 * Encoder instance creation
@@ -423,7 +423,7 @@
 	if(err<0) {
 		mp_msg(MSGT_MENCODER, MSGL_ERR,
 		       "xvid: xvidcore returned a '%s' error\n", errorstring(err));
-		return(BAD);
+		return BAD;
 	}
 	
 	/* Store the encoder instance into the private data */
@@ -431,7 +431,7 @@
 
 	mod->mux->decoder_delay = mod->create.max_bframes ? 1 : 0;
 
-	return(FINE);
+	return FINE;
 }
 
 /*============================================================================
@@ -487,7 +487,7 @@
                 flush_internal_buffers(mod);
 	    break;
 	}
-	return(CONTROL_UNKNOWN);
+	return CONTROL_UNKNOWN;
 }
 
 /*============================================================================
@@ -501,12 +501,12 @@
 	case IMGFMT_YV12:
 	case IMGFMT_IYUV:
 	case IMGFMT_I420:
-		return(VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW);
+		return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW;
 	case IMGFMT_YUY2:
 	case IMGFMT_UYVY:
-		return(VFCAP_CSP_SUPPORTED);
+		return VFCAP_CSP_SUPPORTED;
 	}
-	return(BAD);
+	return BAD;
 }
 
 /*============================================================================
@@ -531,7 +531,7 @@
 	 * -----------------------------------------------------------------*/
 
 	if(set_frame_struct(mod, mpi) == BAD)
-		return(BAD);
+		return BAD;
 
 	/* -------------------------------------------------------------------
 	 * Encode the frame
@@ -543,13 +543,13 @@
 	if(size<0) {
 		mp_msg(MSGT_MENCODER, MSGL_ERR,
 		       "xvid: xvidcore returned a '%s' error\n", errorstring(size));
-		return(BAD);
+		return BAD;
 	}
 
 	/* If size is == 0, we're done with that frame */
 	if(size == 0) {
 		++mod->mux->encoder_delay;
-		return(FINE);
+		return FINE;
 	}
 
 	/* xvidcore returns stats about encoded frame in an asynchronous way
@@ -561,7 +561,7 @@
 			  size,
 			  (mod->frame.out_flags & XVID_KEYFRAME)?0x10:0, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
 
-	return(FINE);
+	return FINE;
 }
 
 /*============================================================================
@@ -590,7 +590,7 @@
 	if(mod == NULL) {
 		mp_msg(MSGT_MENCODER,MSGL_ERR,
 		       "xvid: memory allocation failure (private data)\n");
-		return(BAD);
+		return BAD;
 	}
 
 	/* Initialize the module to zeros */
@@ -607,7 +607,7 @@
 	if(mod->mux->bih  == NULL) {
 		mp_msg(MSGT_MENCODER,MSGL_ERR,
 		       "xvid: memory allocation failure (BITMAP header)\n");
-		return(BAD);
+		return BAD;
 	}
 
 	mod->mux->bih->biSize = sizeof(BITMAPINFOHEADER);
@@ -639,10 +639,10 @@
 	/* Initialize the xvidcore library */
 	if (xvid_global(NULL, XVID_GBL_INIT, &xvid_gbl_init, NULL) < 0) {
 		mp_msg(MSGT_MENCODER,MSGL_ERR, "xvid: initialisation failure\n");
-		return(BAD);
+		return BAD;
 	}
 
-	return(FINE);
+	return FINE;
 }
 
 /*****************************************************************************
@@ -679,7 +679,7 @@
 	{
 		mp_msg(MSGT_MENCODER,MSGL_ERR,
 			"xvid:[ERROR] \"%s\" is an invalid profile name\n", xvidenc_profile);
-		return(BAD);
+		return BAD;
 	}
 	
 	/* -------------------------------------------------------------------
@@ -954,7 +954,7 @@
 	else
 		mp_msg(MSGT_MENCODER, MSGL_INFO,
 			"xvid: par=0/0 (vga11) forced by choosing a DXN profile\n");
-	return(FINE);
+	return FINE;
 }
 
 static int set_create_struct(xvid_mplayer_module_t *mod)
@@ -968,7 +968,7 @@
 	if(xvidenc_profile)
 		selected_profile = profileFromName(xvidenc_profile);
 	if(!selected_profile)
-		return(BAD);
+		return BAD;
 
 	/* Most of the structure is initialized by dispatch settings, only a
 	 * few things are missing  */
@@ -988,7 +988,7 @@
 		mp_msg(MSGT_MENCODER,MSGL_ERR,
 			"xvid:[ERROR] resolution must be <= %dx%d for the chosen profile\n",
 			selected_profile->width, selected_profile->height);
-		return(BAD);
+		return BAD;
 	}
 
 	/* FPS */
@@ -1002,7 +1002,7 @@
 		mp_msg(MSGT_MENCODER,MSGL_ERR,
 			"xvid:[ERROR] frame rate must be <= %d for the chosen profile\n",
 			selected_profile->fps);
-		return(BAD);
+		return BAD;
 	}
 
 	/* Encodings zones */
@@ -1024,7 +1024,7 @@
 		mp_msg(MSGT_MENCODER, MSGL_ERR,
 		       "xvid: you can't mix Fixed Quantizer Rate Control"
 		       " with other Rate Control mechanisms\n");
-		return(BAD);
+		return BAD;
 	}
 
 	if(xvidenc_bitrate != 0 && xvidenc_pass == 1) {
@@ -1062,7 +1062,7 @@
 		mp_msg(MSGT_MENCODER, MSGL_ERR,
 		       "xvid: you must specify one or a valid combination of "
 		       "'bitrate', 'pass', 'fixed_quant' settings\n");
-		return(BAD);
+		return BAD;
 	}
 
 	/* Sanity checking */
@@ -1071,7 +1071,7 @@
 		mp_msg(MSGT_MENCODER, MSGL_ERR,
 		       "xvid: this code should not be reached - fill a bug "
 		       "report\n");
-		return(BAD);
+		return BAD;
 	}
 
 	/* This is a single pass encoding: either a CBR pass or a constant
@@ -1183,7 +1183,7 @@
         		if(e != 3)
 			{
 	    			mp_msg(MSGT_MENCODER,MSGL_ERR, "error parsing zones\n");
-            		return(BAD);
+            		return BAD;
         		}
 			q = (int)(value * 100);
 			if (mode == 'q')
@@ -1191,7 +1191,7 @@
 				if (q < 200 || q > 3100) // make sure that quantizer is in allowable range
 				{
 					mp_msg(MSGT_MENCODER, MSGL_ERR, "zone quantizer must be between 2 and 31\n");
-					return(BAD);
+					return BAD;
 				}
 				else
 				{
@@ -1203,7 +1203,7 @@
 				if (q < 1 || q > 200)
 				{
 					mp_msg(MSGT_MENCODER, MSGL_ERR, "zone weight must be between 1 and 200\n");
-					return(BAD);
+					return BAD;
 				}
 				else
 				{
@@ -1222,7 +1222,7 @@
         		if(p) p++;
     		}
 	}
-	return(FINE);
+	return FINE;
 }
 
 static int set_frame_struct(xvid_mplayer_module_t *mod, mp_image_t *mpi)
@@ -1253,7 +1253,7 @@
 		mp_msg(MSGT_MENCODER, MSGL_ERR,
 		       "xvid: unsupported picture format (%s)!\n",
 		       vo_format_name(mpi->imgfmt));
-		return(BAD);
+		return BAD;
 	}
 
 	/* Bind source frame */
@@ -1268,7 +1268,7 @@
 	 * plugins */
 	frame->quant = 0;
 
-	return(FINE);
+	return FINE;
 }
 
 static void
@@ -1411,7 +1411,7 @@
 	
 	/* Allocate matrix space */
 	if((matrix = malloc(64*sizeof(unsigned char))) == NULL)
-	   return(NULL);
+	   return NULL;
 
 	/* Open the matrix file */
 	if((input = fopen(filename, "rb")) == NULL) {
@@ -1419,7 +1419,7 @@
 			"xvid: Error opening the matrix file %s\n",
 			filename);
 		free(matrix);
-		return(NULL);
+		return NULL;
 	}
 
 	/* Read the matrix */
@@ -1434,7 +1434,7 @@
 				filename);
 			free(matrix);
 			fclose(input);
-			return(NULL);
+			return NULL;
 		}
 
 		/* Clamp the value to safe range */
@@ -1449,7 +1449,7 @@
 	/* We're done */
 	fclose(input);
 
-	return(matrix);
+	return matrix;
 	
 }
 
@@ -1481,7 +1481,7 @@
 		par_string = "unknown";
 		break;
 	}
-	return (par_string);
+	return par_string;
 }
 
 static const char *errorstring(int err)
@@ -1507,7 +1507,7 @@
 		error = "Unknown";
 	}
 
-	return(error);
+	return error;
 }
 
 /*****************************************************************************
--- a/libmpcodecs/vf_expand.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/vf_expand.c	Fri May 16 00:23:02 2008 +0000
@@ -421,7 +421,7 @@
 }
 
 static int query_format(struct vf_instance_s* vf, unsigned int fmt){
-  return (vf_next_query_format(vf,fmt));
+  return vf_next_query_format(vf,fmt);
 }
 
 static int open(vf_instance_t *vf, char* args){
--- a/libmpcodecs/vf_framestep.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/vf_framestep.c	Fri May 16 00:23:02 2008 +0000
@@ -147,7 +147,7 @@
 	vf->default_reqs = VFCAP_ACCEPT_STRIDE;
 	vf->priv = p = calloc(1, sizeof(struct vf_priv_s));
         if (p == NULL) {
-            return(0);
+            return 0;
         }
 
         if (args != NULL) {
@@ -172,7 +172,7 @@
                     p->frame_step = atoi(args);
                     if (p->frame_step <= 0) {
                         mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_ErrorParsingArgument);
-                        return(0);
+                        return 0;
                     }
                 }
             }
--- a/libmpcodecs/vf_lavc.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/vf_lavc.c	Fri May 16 00:23:02 2008 +0000
@@ -107,7 +107,7 @@
     case IMGFMT_YV12:
     case IMGFMT_I420:
     case IMGFMT_IYUV:
-	return (vf_next_query_format(vf,IMGFMT_MPEGPES) & (~(VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_ACCEPT_STRIDE)));
+	return vf_next_query_format(vf, IMGFMT_MPEGPES) & (~(VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_ACCEPT_STRIDE));
     }
     return 0;
 }
--- a/libmpcodecs/vf_palette.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/vf_palette.c	Fri May 16 00:23:02 2008 +0000
@@ -189,7 +189,7 @@
 	if (!strcasecmp(args,"bgr32")) vf->priv->fmt=IMGFMT_BGR32; else
 	{
 	    mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_UnknownFormatName, args);
-	    return(0);
+	    return 0;
 	}
     }
     return 1;
--- a/libmpcodecs/vf_tile.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/vf_tile.c	Fri May 16 00:23:02 2008 +0000
@@ -172,7 +172,7 @@
     }
     else {
         /* Skip the frame */
-        return(0);
+        return 0;
     }
 }
 
@@ -237,7 +237,7 @@
         }
         else if (**s != '\0') {
             /* Error, we got some wrong char */
-            return(1);
+            return 1;
         }
     }
     else {
@@ -245,7 +245,7 @@
     }
 
     *rt = t;
-    return(0);
+    return 0;
 
 }
 
@@ -263,7 +263,7 @@
     /* Private data */
     vf->priv = p = calloc(1, sizeof(struct vf_priv_s));
     if (p == NULL) {
-        return(0);
+        return 0;
     }
 
     if (args == NULL) {
@@ -280,7 +280,7 @@
 
     if (er) {
         mp_msg(MSGT_VFILTER, MSGL_ERR, MSGTR_MPCODECS_ErrorParsingArgument);
-        return(0);
+        return 0;
     }
     /* Load some default */
     if ((p->xytile <= 0) || (p->xytile > p->xtile * p->ytile)) {
--- a/libmpcodecs/vf_vo.c	Fri May 16 00:13:03 2008 +0000
+++ b/libmpcodecs/vf_vo.c	Fri May 16 00:23:02 2008 +0000
@@ -103,13 +103,13 @@
     {
 	vf_equalizer_t *eq=data;
 	if(!vo_config_count) return CONTROL_FALSE; // vo not configured?
-	return((video_out->control(VOCTRL_SET_EQUALIZER, eq->item, eq->value) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE);
+	return (video_out->control(VOCTRL_SET_EQUALIZER, eq->item, eq->value) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE;
     }
     case VFCTRL_GET_EQUALIZER:
     {
 	vf_equalizer_t *eq=data;
 	if(!vo_config_count) return CONTROL_FALSE; // vo not configured?
-	return((video_out->control(VOCTRL_GET_EQUALIZER, eq->item, &eq->value) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE);
+	return (video_out->control(VOCTRL_GET_EQUALIZER, eq->item, &eq->value) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE;
     }
 #ifdef USE_ASS
     case VFCTRL_INIT_EOSD: