[MPlayer-cvslog] r26786 - in trunk/libmpcodecs: ad_twin.c ae_lame.c dec_video.c img_format.c vd_ffmpeg.c vd_qtvideo.c vd_realvid.c vd_xanim.c vd_xvid4.c ve_lavc.c ve_qtvideo.c ve_x264.c ve_xvid4.c vf_expand.c vf_framestep.c vf_lavc.c vf_palette.c vf_tile.c vf_vo.c

diego subversion at mplayerhq.hu
Fri May 16 02:23:03 CEST 2008


Author: diego
Date: Fri May 16 02:23:02 2008
New Revision: 26786

Log:
cosmetics: Remove pointless parentheses from return calls.


Modified:
   trunk/libmpcodecs/ad_twin.c
   trunk/libmpcodecs/ae_lame.c
   trunk/libmpcodecs/dec_video.c
   trunk/libmpcodecs/img_format.c
   trunk/libmpcodecs/vd_ffmpeg.c
   trunk/libmpcodecs/vd_qtvideo.c
   trunk/libmpcodecs/vd_realvid.c
   trunk/libmpcodecs/vd_xanim.c
   trunk/libmpcodecs/vd_xvid4.c
   trunk/libmpcodecs/ve_lavc.c
   trunk/libmpcodecs/ve_qtvideo.c
   trunk/libmpcodecs/ve_x264.c
   trunk/libmpcodecs/ve_xvid4.c
   trunk/libmpcodecs/vf_expand.c
   trunk/libmpcodecs/vf_framestep.c
   trunk/libmpcodecs/vf_lavc.c
   trunk/libmpcodecs/vf_palette.c
   trunk/libmpcodecs/vf_tile.c
   trunk/libmpcodecs/vf_vo.c

Modified: trunk/libmpcodecs/ad_twin.c
==============================================================================
--- trunk/libmpcodecs/ad_twin.c	(original)
+++ trunk/libmpcodecs/ad_twin.c	Fri May 16 02:23:02 2008
@@ -216,7 +216,7 @@ static int bread(char   *data,    /* Out
         }
         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 @@ static int bread(char   *data,    /* Out
         }
         ++retval;
     }
-    return(retval);
+    return retval;
 }
 
 #define BITS_INT    (sizeof(int)*8)
@@ -266,7 +266,7 @@ static int get_bstm(int *data,          
         mask >>= 1;
     }
     *data = work;
-    return(retval);
+    return retval;
 }
 
 static int GetVqInfo( tvqConfInfoSubBlock *cfg,

Modified: trunk/libmpcodecs/ae_lame.c
==============================================================================
--- trunk/libmpcodecs/ae_lame.c	(original)
+++ trunk/libmpcodecs/ae_lame.c	Fri May 16 02:23:02 2008
@@ -122,7 +122,7 @@ static int encode_lame(audio_encoder_t *
     else
         n = lame_encode_buffer_interleaved(lame,(short *)src, len/4, dest, max_size);
 
-    return (n < 0 ? 0 : n);
+    return n < 0 ? 0 : n;
 }
 
 

Modified: trunk/libmpcodecs/dec_video.c
==============================================================================
--- trunk/libmpcodecs/dec_video.c	(original)
+++ trunk/libmpcodecs/dec_video.c	Fri May 16 02:23:02 2008
@@ -88,7 +88,7 @@ int set_video_colors(sh_video_t *sh_vide
     {
 	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 get_video_colors(sh_video_t *sh_vide
         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 set_rectangle(sh_video_t *sh_video,i
     {
         int ret = vf->control(vf, VFCTRL_CHANGE_RECTANGLE, data);
 	if (ret)
-	    return(1);
+	    return 1;
     }
     return 0;
 }

Modified: trunk/libmpcodecs/img_format.c
==============================================================================
--- trunk/libmpcodecs/img_format.c	(original)
+++ trunk/libmpcodecs/img_format.c	Fri May 16 02:23:02 2008
@@ -7,66 +7,66 @@ const char *vo_format_name(int format)
     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;

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	(original)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Fri May 16 02:23:02 2008
@@ -228,7 +228,7 @@ static int init(sh_video_t *sh){
 
     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);

Modified: trunk/libmpcodecs/vd_qtvideo.c
==============================================================================
--- trunk/libmpcodecs/vd_qtvideo.c	(original)
+++ trunk/libmpcodecs/vd_qtvideo.c	Fri May 16 02:23:02 2008
@@ -196,7 +196,7 @@ static int init(sh_video_t *sh){
     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 @@ static int init(sh_video_t *sh){
 	    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;

Modified: trunk/libmpcodecs/vd_realvid.c
==============================================================================
--- trunk/libmpcodecs/vd_realvid.c	(original)
+++ trunk/libmpcodecs/vd_realvid.c	Fri May 16 02:23:02 2008
@@ -427,5 +427,5 @@ static mp_image_t* decode(sh_video_t *sh
 	   (sh->disp_w != transform_out[3] || sh->disp_h != transform_out[4]))
 	    initialized = 0;
 	
-	return (result?NULL:mpi);
+	return result ? NULL : mpi;
 }

Modified: trunk/libmpcodecs/vd_xanim.c
==============================================================================
--- trunk/libmpcodecs/vd_xanim.c	(original)
+++ trunk/libmpcodecs/vd_xanim.c	Fri May 16 02:23:02 2008
@@ -211,7 +211,7 @@ static int xacodec_load(sh_video_t *sh, 
 	    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 @@ static int xacodec_load(sh_video_t *sh, 
     {
 	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 @@ static int xacodec_load(sh_video_t *sh, 
     {
 	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 @@ static int xacodec_load(sh_video_t *sh, 
 	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 @@ static int xacodec_load(sh_video_t *sh, 
     {
 	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 @@ static int xacodec_load(sh_video_t *sh, 
 	    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 @@ static int xacodec_query(sh_video_t *sh,
     {
 	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 @@ static int xacodec_query(sh_video_t *sh,
 	    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 @@ void *YUV2x2_Map_Func(unsigned int image
 {
     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_Convert(unsigned char *i
 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_Convert(unsigned char 
 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 @@ static int init(sh_video_t *sh)
 
     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 @@ static int init(sh_video_t *sh)
 	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 @@ static int init(sh_video_t *sh)
     {
 	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 @@ static int init(sh_video_t *sh)
     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

Modified: trunk/libmpcodecs/vd_xvid4.c
==============================================================================
--- trunk/libmpcodecs/vd_xvid4.c	(original)
+++ trunk/libmpcodecs/vd_xvid4.c	Fri May 16 02:23:02 2008
@@ -86,7 +86,7 @@ static float stats2aspect(xvid_dec_stats
 
 static int control(sh_video_t *sh,int cmd,void* arg,...)
 {
-	return(CONTROL_UNKNOWN);
+	return CONTROL_UNKNOWN;
 }
 
 /*============================================================================
@@ -144,7 +144,7 @@ static int init(sh_video_t *sh)
 	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 @@ static int init(sh_video_t *sh)
 	
 	/* 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 @@ static int init(sh_video_t *sh)
 	/* 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 @@ static int init(sh_video_t *sh)
 		break;
 	}
 
-	return(1);
+	return 1;
 }
 
 /*============================================================================
@@ -221,7 +221,7 @@ static mp_image_t* decode(sh_video_t *sh
 
 
 	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 @@ static mp_image_t* decode(sh_video_t *sh
 		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 @@ static mp_image_t* decode(sh_video_t *sh
 		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 @@ static mp_image_t* decode(sh_video_t *sh
 
 	/* 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 @@ static float stats2aspect(xvid_dec_stats
 		dar  = ((float)stats->data.vol.width*wpar);
 		dar /= ((float)stats->data.vol.height*hpar);
 
-		return(dar);
+		return dar;
 	}
 
-	return(0.0f);
+	return 0.0f;
 }
 
 /*****************************************************************************

Modified: trunk/libmpcodecs/ve_lavc.c
==============================================================================
--- trunk/libmpcodecs/ve_lavc.c	(original)
+++ trunk/libmpcodecs/ve_lavc.c	Fri May 16 02:23:02 2008
@@ -782,7 +782,7 @@ static int put_image(struct vf_instance_
             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){

Modified: trunk/libmpcodecs/ve_qtvideo.c
==============================================================================
--- trunk/libmpcodecs/ve_qtvideo.c	(original)
+++ trunk/libmpcodecs/ve_qtvideo.c	Fri May 16 02:23:02 2008
@@ -149,7 +149,7 @@ static int config(struct vf_instance_s* 
     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);
 

Modified: trunk/libmpcodecs/ve_x264.c
==============================================================================
--- trunk/libmpcodecs/ve_x264.c	(original)
+++ trunk/libmpcodecs/ve_x264.c	Fri May 16 02:23:02 2008
@@ -232,7 +232,7 @@ static int query_format(struct vf_instan
 {
     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:

Modified: trunk/libmpcodecs/ve_xvid4.c
==============================================================================
--- trunk/libmpcodecs/ve_xvid4.c	(original)
+++ trunk/libmpcodecs/ve_xvid4.c	Fri May 16 02:23:02 2008
@@ -405,14 +405,14 @@ config(struct vf_instance_s* vf,
 	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 @@ config(struct vf_instance_s* vf,
 	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 @@ config(struct vf_instance_s* vf,
 
 	mod->mux->decoder_delay = mod->create.max_bframes ? 1 : 0;
 
-	return(FINE);
+	return FINE;
 }
 
 /*============================================================================
@@ -487,7 +487,7 @@ xvid_mplayer_module_t *mod = (xvid_mplay
                 flush_internal_buffers(mod);
 	    break;
 	}
-	return(CONTROL_UNKNOWN);
+	return CONTROL_UNKNOWN;
 }
 
 /*============================================================================
@@ -501,12 +501,12 @@ query_format(struct vf_instance_s* vf, u
 	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 @@ put_image(struct vf_instance_s* vf, mp_i
 	 * -----------------------------------------------------------------*/
 
 	if(set_frame_struct(mod, mpi) == BAD)
-		return(BAD);
+		return BAD;
 
 	/* -------------------------------------------------------------------
 	 * Encode the frame
@@ -543,13 +543,13 @@ put_image(struct vf_instance_s* vf, mp_i
 	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 @@ put_image(struct vf_instance_s* vf, mp_i
 			  size,
 			  (mod->frame.out_flags & XVID_KEYFRAME)?0x10:0, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
 
-	return(FINE);
+	return FINE;
 }
 
 /*============================================================================
@@ -590,7 +590,7 @@ vf_open(vf_instance_t *vf, char* args)
 	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 @@ vf_open(vf_instance_t *vf, char* args)
 	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 @@ vf_open(vf_instance_t *vf, char* args)
 	/* 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 @@ static int dispatch_settings(xvid_mplaye
 	{
 		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 @@ static int dispatch_settings(xvid_mplaye
 	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 @@ static int set_create_struct(xvid_mplaye
 	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 @@ static int set_create_struct(xvid_mplaye
 		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 @@ static int set_create_struct(xvid_mplaye
 		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 @@ static int set_create_struct(xvid_mplaye
 		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 @@ static int set_create_struct(xvid_mplaye
 		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 @@ static int set_create_struct(xvid_mplaye
 		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 @@ static int set_create_struct(xvid_mplaye
         		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 @@ static int set_create_struct(xvid_mplaye
 				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 @@ static int set_create_struct(xvid_mplaye
 				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 @@ static int set_create_struct(xvid_mplaye
         		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 @@ static int set_frame_struct(xvid_mplayer
 		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 @@ static int set_frame_struct(xvid_mplayer
 	 * plugins */
 	frame->quant = 0;
 
-	return(FINE);
+	return FINE;
 }
 
 static void
@@ -1411,7 +1411,7 @@ static void *read_matrix(unsigned char *
 	
 	/* 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 @@ static void *read_matrix(unsigned char *
 			"xvid: Error opening the matrix file %s\n",
 			filename);
 		free(matrix);
-		return(NULL);
+		return NULL;
 	}
 
 	/* Read the matrix */
@@ -1434,7 +1434,7 @@ static void *read_matrix(unsigned char *
 				filename);
 			free(matrix);
 			fclose(input);
-			return(NULL);
+			return NULL;
 		}
 
 		/* Clamp the value to safe range */
@@ -1449,7 +1449,7 @@ static void *read_matrix(unsigned char *
 	/* We're done */
 	fclose(input);
 
-	return(matrix);
+	return matrix;
 	
 }
 
@@ -1481,7 +1481,7 @@ par_string(int parcode)
 		par_string = "unknown";
 		break;
 	}
-	return (par_string);
+	return par_string;
 }
 
 static const char *errorstring(int err)
@@ -1507,7 +1507,7 @@ static const char *errorstring(int err)
 		error = "Unknown";
 	}
 
-	return(error);
+	return error;
 }
 
 /*****************************************************************************

Modified: trunk/libmpcodecs/vf_expand.c
==============================================================================
--- trunk/libmpcodecs/vf_expand.c	(original)
+++ trunk/libmpcodecs/vf_expand.c	Fri May 16 02:23:02 2008
@@ -421,7 +421,7 @@ static int control(struct vf_instance_s*
 }
 
 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){

Modified: trunk/libmpcodecs/vf_framestep.c
==============================================================================
--- trunk/libmpcodecs/vf_framestep.c	(original)
+++ trunk/libmpcodecs/vf_framestep.c	Fri May 16 02:23:02 2008
@@ -147,7 +147,7 @@ static int open(vf_instance_t *vf, char*
 	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 @@ static int open(vf_instance_t *vf, char*
                     p->frame_step = atoi(args);
                     if (p->frame_step <= 0) {
                         mp_msg(MSGT_VFILTER, MSGL_WARN, MSGTR_MPCODECS_ErrorParsingArgument);
-                        return(0);
+                        return 0;
                     }
                 }
             }

Modified: trunk/libmpcodecs/vf_lavc.c
==============================================================================
--- trunk/libmpcodecs/vf_lavc.c	(original)
+++ trunk/libmpcodecs/vf_lavc.c	Fri May 16 02:23:02 2008
@@ -107,7 +107,7 @@ static int query_format(struct vf_instan
     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;
 }

Modified: trunk/libmpcodecs/vf_palette.c
==============================================================================
--- trunk/libmpcodecs/vf_palette.c	(original)
+++ trunk/libmpcodecs/vf_palette.c	Fri May 16 02:23:02 2008
@@ -189,7 +189,7 @@ static int open(vf_instance_t *vf, char*
 	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;

Modified: trunk/libmpcodecs/vf_tile.c
==============================================================================
--- trunk/libmpcodecs/vf_tile.c	(original)
+++ trunk/libmpcodecs/vf_tile.c	Fri May 16 02:23:02 2008
@@ -172,7 +172,7 @@ static int put_image(struct vf_instance_
     }
     else {
         /* Skip the frame */
-        return(0);
+        return 0;
     }
 }
 
@@ -237,7 +237,7 @@ static int parse_int(char **s, int *rt, 
         }
         else if (**s != '\0') {
             /* Error, we got some wrong char */
-            return(1);
+            return 1;
         }
     }
     else {
@@ -245,7 +245,7 @@ static int parse_int(char **s, int *rt, 
     }
 
     *rt = t;
-    return(0);
+    return 0;
 
 }
 
@@ -263,7 +263,7 @@ static int open(vf_instance_t *vf, char*
     /* 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 @@ static int open(vf_instance_t *vf, char*
 
     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)) {

Modified: trunk/libmpcodecs/vf_vo.c
==============================================================================
--- trunk/libmpcodecs/vf_vo.c	(original)
+++ trunk/libmpcodecs/vf_vo.c	Fri May 16 02:23:02 2008
@@ -103,13 +103,13 @@ static int control(struct vf_instance_s*
     {
 	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:



More information about the MPlayer-cvslog mailing list