Mercurial > mplayer.hg
changeset 30555:ad6740b58b0d
libmpcodecs: Mark functions not used outside of their files as static.
author | diego |
---|---|
date | Tue, 16 Feb 2010 16:16:42 +0000 |
parents | 321e9ea69b9f |
children | 358ac046eccc |
files | libmpcodecs/ad_liba52.c libmpcodecs/ad_realaud.c libmpcodecs/vd_ffmpeg.c libmpcodecs/vd_ijpg.c libmpcodecs/vd_realvid.c libmpcodecs/vd_xanim.c libmpcodecs/vf_2xsai.c |
diffstat | 7 files changed, 41 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/ad_liba52.c Tue Feb 16 15:03:03 2010 +0000 +++ b/libmpcodecs/ad_liba52.c Tue Feb 16 16:16:42 2010 +0000 @@ -74,7 +74,8 @@ 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 @@ 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); }
--- a/libmpcodecs/ad_realaud.c Tue Feb 16 15:03:03 2010 +0000 +++ b/libmpcodecs/ad_realaud.c Tue Feb 16 16:16:42 2010 +0000 @@ -41,12 +41,14 @@ 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); }
--- a/libmpcodecs/vd_ffmpeg.c Tue Feb 16 15:03:03 2010 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Tue Feb 16 16:16:42 2010 +0000 @@ -172,7 +172,8 @@ 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 @@ 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++)
--- a/libmpcodecs/vd_ijpg.c Tue Feb 16 15:03:03 2010 +0000 +++ b/libmpcodecs/vd_ijpg.c Tue Feb 16 16:16:42 2010 +0000 @@ -110,7 +110,7 @@ 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 ) );
--- a/libmpcodecs/vd_realvid.c Tue Feb 16 15:03:03 2010 +0000 +++ b/libmpcodecs/vd_realvid.c Tue Feb 16 16:16:42 2010 +0000 @@ -84,15 +84,18 @@ 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); }
--- a/libmpcodecs/vd_xanim.c Tue Feb 16 15:03:03 2010 +0000 +++ b/libmpcodecs/vd_xanim.c Tue Feb 16 16:16:42 2010 +0000 @@ -335,7 +335,7 @@ } } -void XA_Print(char *fmt, ...) +static void XA_Print(char *fmt, ...) { va_list vallist; char buf[1024]; @@ -351,7 +351,7 @@ /* 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ // 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 @@ 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 @@ /* -------------- 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_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 @@ /* --------------- 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 @@ 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;
--- a/libmpcodecs/vf_2xsai.c Tue Feb 16 15:03:03 2010 +0000 +++ b/libmpcodecs/vf_2xsai.c Tue Feb 16 16:16:42 2010 +0000 @@ -43,7 +43,7 @@ #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 @@ + ((((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];