[MPlayer-cvslog] r30597 - in trunk/libmpcodecs: ad_liba52.c ad_realaud.c vd_ffmpeg.c vd_ijpg.c vd_realvid.c vd_xanim.c vf_2xsai.c

diego subversion at mplayerhq.hu
Tue Feb 16 17:16:42 CET 2010


Author: diego
Date: Tue Feb 16 17:16:42 2010
New Revision: 30597

Log:
Mark functions not used outside of their files as static.

Modified:
   trunk/libmpcodecs/ad_liba52.c
   trunk/libmpcodecs/ad_realaud.c
   trunk/libmpcodecs/vd_ffmpeg.c
   trunk/libmpcodecs/vd_ijpg.c
   trunk/libmpcodecs/vd_realvid.c
   trunk/libmpcodecs/vd_xanim.c
   trunk/libmpcodecs/vf_2xsai.c

Modified: trunk/libmpcodecs/ad_liba52.c
==============================================================================
--- trunk/libmpcodecs/ad_liba52.c	Tue Feb 16 16:03:03 2010	(r30596)
+++ trunk/libmpcodecs/ad_liba52.c	Tue Feb 16 17:16:42 2010	(r30597)
@@ -74,7 +74,8 @@ static const ad_info_t info =
 
 LIBAD_EXTERN(liba52)
 
-int a52_fillbuff(sh_audio_t *sh_audio){
+static int a52_fillbuff(sh_audio_t *sh_audio)
+{
 int length=0;
 int flags=0;
 int sample_rate=0;
@@ -138,7 +139,8 @@ int channels=0;
   return (flags&A52_LFE) ? (channels+1) : channels;
 }
 
-sample_t dynrng_call (sample_t c, void *data) {
+static sample_t dynrng_call (sample_t c, void *data)
+{
 //	fprintf(stderr, "(%lf, %lf): %lf\n", (double)c, (double)a52_drc_level, (double)pow((double)c, a52_drc_level));
 	return pow((double)c, a52_drc_level);
 }

Modified: trunk/libmpcodecs/ad_realaud.c
==============================================================================
--- trunk/libmpcodecs/ad_realaud.c	Tue Feb 16 16:03:03 2010	(r30596)
+++ trunk/libmpcodecs/ad_realaud.c	Tue Feb 16 17:16:42 2010	(r30597)
@@ -41,12 +41,14 @@ static const ad_info_t info =  {
 
 LIBAD_EXTERN(realaud)
 
-void *__builtin_new(unsigned long size) {
+static void *__builtin_new(unsigned long size)
+{
 	return malloc(size);
 }
 
 // required for cook's uninit:
-void __builtin_delete(void* ize) {
+static void __builtin_delete(void* ize)
+{
 	free(ize);
 }
 

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	Tue Feb 16 16:03:03 2010	(r30596)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Tue Feb 16 17:16:42 2010	(r30597)
@@ -172,7 +172,8 @@ static int control(sh_video_t *sh, int c
     return CONTROL_UNKNOWN;
 }
 
-void mp_msp_av_log_callback(void *ptr, int level, const char *fmt, va_list vl)
+static void mp_msp_av_log_callback(void *ptr, int level, const char *fmt,
+                                   va_list vl)
 {
     static int print_prefix=1;
     AVClass *avc= ptr ? *(AVClass **)ptr : NULL;
@@ -766,7 +767,8 @@ typedef struct dp_hdr_s {
     uint32_t chunktab;        // offset to chunk offset array
 } dp_hdr_t;
 
-void swap_palette(void *pal) {
+static void swap_palette(void *pal)
+{
     int i;
     uint32_t *p = pal;
     for (i = 0; i < AVPALETTE_COUNT; i++)

Modified: trunk/libmpcodecs/vd_ijpg.c
==============================================================================
--- trunk/libmpcodecs/vd_ijpg.c	Tue Feb 16 16:03:03 2010	(r30596)
+++ trunk/libmpcodecs/vd_ijpg.c	Tue Feb 16 17:16:42 2010	(r30597)
@@ -110,7 +110,7 @@ METHODDEF(void) skip_input_data (j_decom
 
 METHODDEF(void) term_source (j_decompress_ptr cinfo) { }
 
-GLOBAL(void) jpeg_buf_src ( j_decompress_ptr cinfo, char * inbuf,int bufsize )
+static GLOBAL(void) jpeg_buf_src (j_decompress_ptr cinfo, char * inbuf, int bufsize)
 {
  my_src_ptr src;
  if (cinfo->src == NULL) cinfo->src=malloc( sizeof( my_source_mgr ) );

Modified: trunk/libmpcodecs/vd_realvid.c
==============================================================================
--- trunk/libmpcodecs/vd_realvid.c	Tue Feb 16 16:03:03 2010	(r30596)
+++ trunk/libmpcodecs/vd_realvid.c	Tue Feb 16 17:16:42 2010	(r30597)
@@ -84,15 +84,18 @@ static int bufsz = 0;
 static int dll_type = 0; /* 0 = unix dlopen, 1 = win32 dll */
 #endif
 
-void *__builtin_vec_new(unsigned long size) {
+static void *__builtin_vec_new(unsigned long size)
+{
 	return malloc(size);
 }
 
-void __builtin_vec_delete(void *mem) {
+static void __builtin_vec_delete(void *mem)
+{
 	free(mem);
 }
 
-void __pure_virtual(void) {
+static void __pure_virtual(void)
+{
 	printf("FATAL: __pure_virtual() called!\n");
 //	exit(1);
 }

Modified: trunk/libmpcodecs/vd_xanim.c
==============================================================================
--- trunk/libmpcodecs/vd_xanim.c	Tue Feb 16 16:03:03 2010	(r30596)
+++ trunk/libmpcodecs/vd_xanim.c	Tue Feb 16 17:16:42 2010	(r30597)
@@ -335,7 +335,7 @@ static int xacodec_query(sh_video_t *sh,
     }
 }
 
-void XA_Print(char *fmt, ...)
+static void XA_Print(char *fmt, ...)
 {
     va_list vallist;
     char buf[1024];
@@ -351,7 +351,7 @@ void XA_Print(char *fmt, ...)
 /* 0 is no debug (needed by 3ivX) */
 long xa_debug = 0;
 
-void TheEnd1(char *err_mess)
+static void TheEnd1(char *err_mess)
 {
     XA_Print("error: %s - exiting\n", err_mess);
     /* we should exit here... */
@@ -359,7 +359,7 @@ void TheEnd1(char *err_mess)
     return;
 }
 
-void XA_Add_Func_To_Free_Chain(XA_ANIM_HDR *anim_hdr, void (*function)())
+static void XA_Add_Func_To_Free_Chain(XA_ANIM_HDR *anim_hdr, void (*function)())
 {
 //    XA_Print("XA_Add_Func_To_Free_Chain('anim_hdr: %08x', 'function: %08x')",
 //	    anim_hdr, function);
@@ -370,30 +370,29 @@ void XA_Add_Func_To_Free_Chain(XA_ANIM_H
     return;
 }
 
-
-unsigned long XA_Time_Read(void)
+static unsigned long XA_Time_Read(void)
 {
     return GetTimer(); //(GetRelativeTime());
 }
 
-void XA_dummy(void)
+static void XA_dummy(void)
 {
     XA_Print("dummy() called");
 }
 
-void XA_Gen_YUV_Tabs(XA_ANIM_HDR *anim_hdr)
+static void XA_Gen_YUV_Tabs(XA_ANIM_HDR *anim_hdr)
 {
     XA_Print("XA_Gen_YUV_Tabs('anim_hdr: %08x')", anim_hdr);
     return;
 }
 
-void JPG_Setup_Samp_Limit_Table(XA_ANIM_HDR *anim_hdr)
+static void JPG_Setup_Samp_Limit_Table(XA_ANIM_HDR *anim_hdr)
 {
     XA_Print("JPG_Setup_Samp_Limit_Table('anim_hdr: %08x')", anim_hdr);
     return;
 }
 
-void JPG_Alloc_MCU_Bufs(XA_ANIM_HDR *anim_hdr, unsigned int width,
+static void JPG_Alloc_MCU_Bufs(XA_ANIM_HDR *anim_hdr, unsigned int width,
 	unsigned int height, unsigned int full_flag)
 {
     XA_Print("JPG_Alloc_MCU_Bufs('anim_hdr: %08x', 'width: %d', 'height: %d', 'full_flag: %d')",
@@ -423,7 +422,7 @@ typedef struct
     image->planes[1][((x)>>1)+((y)>>1)*image->stride[1]]=cmap2x2->clr1_0;\
     image->planes[2][((x)>>1)+((y)>>1)*image->stride[2]]=cmap2x2->clr1_1;
 
-void XA_2x2_OUT_1BLK_Convert(unsigned char *image_p, unsigned int x, unsigned int y,
+static void XA_2x2_OUT_1BLK_Convert(unsigned char *image_p, unsigned int x, unsigned int y,
     unsigned int imagex, XA_2x2_Color *cmap2x2)
 {
     mp_image_t *mpi = (mp_image_t *)image_p;
@@ -440,7 +439,7 @@ void XA_2x2_OUT_1BLK_Convert(unsigned ch
     return;
 }
 
-void XA_2x2_OUT_4BLKS_Convert(unsigned char *image_p, unsigned int x, unsigned int y,
+static void XA_2x2_OUT_4BLKS_Convert(unsigned char *image_p, unsigned int x, unsigned int y,
     unsigned int imagex, XA_2x2_Color *cm0, XA_2x2_Color *cm1, XA_2x2_Color *cm2,
     XA_2x2_Color *cm3)
 {
@@ -453,7 +452,7 @@ void XA_2x2_OUT_4BLKS_Convert(unsigned c
     return;
 }
 
-void *YUV2x2_Blk_Func(unsigned int image_type, int blks, unsigned int dith_flag)
+static void *YUV2x2_Blk_Func(unsigned int image_type, int blks, unsigned int dith_flag)
 {
     mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "YUV2x2_Blk_Func(image_type=%d, blks=%d, dith_flag=%d)\n",
 	image_type, blks, dith_flag);
@@ -470,7 +469,7 @@ void *YUV2x2_Blk_Func(unsigned int image
 
 //  Take Four Y's and UV and put them into a 2x2 Color structure.
 
-void XA_YUV_2x2_clr(XA_2x2_Color *cmap2x2, unsigned int Y0, unsigned int Y1,
+static void XA_YUV_2x2_clr(XA_2x2_Color *cmap2x2, unsigned int Y0, unsigned int Y1,
     unsigned int Y2, unsigned int Y3, unsigned int U, unsigned int V,
     unsigned int map_flag, unsigned int *map, XA_CHDR *chdr)
 {
@@ -487,7 +486,7 @@ void XA_YUV_2x2_clr(XA_2x2_Color *cmap2x
   return;
 }
 
-void *YUV2x2_Map_Func(unsigned int image_type, unsigned int dith_type)
+static void *YUV2x2_Map_Func(unsigned int image_type, unsigned int dith_type)
 {
     mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "YUV2x2_Map_Func('image_type: %d', 'dith_type: %d')",
 	    image_type, dith_type);
@@ -522,7 +521,7 @@ YUVTabs def_yuv_tabs;
 
 /* -------------- YUV 4x4 1x1 1x1  (4:1:0 aka YVU9) [Indeo 3,4,5] ------------------ */
 
-void XA_YUV1611_Convert(unsigned char *image_p, unsigned int imagex, unsigned int imagey,
+static void XA_YUV1611_Convert(unsigned char *image_p, unsigned int imagex, unsigned int imagey,
     unsigned int i_x, unsigned int i_y, YUVBufs *yuv, YUVTabs *yuv_tabs,
     unsigned int map_flag, unsigned int *map, XA_CHDR *chdr)
 {
@@ -594,7 +593,7 @@ void XA_YUV1611_Convert(unsigned char *i
     }
 }
 
-void *XA_YUV1611_Func(unsigned int image_type)
+static 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;
@@ -602,7 +601,7 @@ void *XA_YUV1611_Func(unsigned int image
 
 /* --------------- YUV 2x2 1x1 1x1 (4:2:0 aka YV12) [3ivX,H263] ------------ */
 
-void XA_YUV221111_Convert(unsigned char *image_p, unsigned int imagex, unsigned int imagey,
+static void XA_YUV221111_Convert(unsigned char *image_p, unsigned int imagex, unsigned int imagey,
     unsigned int i_x, unsigned int i_y, YUVBufs *yuv, YUVTabs *yuv_tabs, unsigned int map_flag,
     unsigned int *map, XA_CHDR *chdr)
 {
@@ -632,7 +631,7 @@ void XA_YUV221111_Convert(unsigned char 
     mpi->stride[1]=mpi->stride[2]=uvstride;  //=i_x/4; // yuv->uv_w
 }
 
-void *XA_YUV221111_Func(unsigned int image_type)
+static 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;

Modified: trunk/libmpcodecs/vf_2xsai.c
==============================================================================
--- trunk/libmpcodecs/vf_2xsai.c	Tue Feb 16 16:03:03 2010	(r30596)
+++ trunk/libmpcodecs/vf_2xsai.c	Tue Feb 16 17:16:42 2010	(r30597)
@@ -43,7 +43,7 @@ static int PixelsPerMask = 2;
 #define makecol(r,g,b) (r+(g<<8)+(b<<16))
 #define makecol_depth(d,r,g,b) (r+(g<<8)+(b<<16))
 
-int Init_2xSaI(int d)
+static int Init_2xSaI(int d)
 {
 
 	int minr = 0, ming = 0, minb = 0;
@@ -95,9 +95,10 @@ int Init_2xSaI(int d)
 	+ ((((A & qlowpixelMask) + (B & qlowpixelMask) + (C & qlowpixelMask) + (D & qlowpixelMask)) >> 2) & qlowpixelMask)
 
 
-void Super2xSaI_ex(uint8_t *src, uint32_t src_pitch,
-		   uint8_t *dst, uint32_t dst_pitch,
-		   uint32_t width, uint32_t height, int sbpp) {
+static void Super2xSaI_ex(uint8_t *src, uint32_t src_pitch,
+                          uint8_t *dst, uint32_t dst_pitch,
+                          uint32_t width, uint32_t height, int sbpp)
+{
 
 	unsigned int x, y;
 	uint32_t color[16];


More information about the MPlayer-cvslog mailing list