diff libmpcodecs/ve_xvid4.c @ 26754:63630c09e237

cosmetics: Remove pointless parentheses from return calls.
author diego
date Fri, 16 May 2008 00:23:02 +0000
parents 82601a38e2a7
children aa81249bfedb
line wrap: on
line diff
--- 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;
 }
 
 /*****************************************************************************