diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-02-16 16:16:42 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-02-16 16:16:42 +0000 |
commit | a6207aaa68400ffcba36c7abc6a0cd31ed9428e7 (patch) | |
tree | 025cabc86a22ff03a1618024104d501b5e2c5a4c /libmpcodecs | |
parent | 465f535c51f0b3c9050366fb4930c8a465a87f42 (diff) | |
download | mpv-a6207aaa68400ffcba36c7abc6a0cd31ed9428e7.tar.bz2 mpv-a6207aaa68400ffcba36c7abc6a0cd31ed9428e7.tar.xz |
libmpcodecs: Mark functions not used outside of their files as static.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30597 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/ad_liba52.c | 6 | ||||
-rw-r--r-- | libmpcodecs/ad_realaud.c | 6 | ||||
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 6 | ||||
-rw-r--r-- | libmpcodecs/vd_ijpg.c | 2 | ||||
-rw-r--r-- | libmpcodecs/vd_realvid.c | 9 | ||||
-rw-r--r-- | libmpcodecs/vd_xanim.c | 35 | ||||
-rw-r--r-- | libmpcodecs/vf_2xsai.c | 9 |
7 files changed, 41 insertions, 32 deletions
diff --git a/libmpcodecs/ad_liba52.c b/libmpcodecs/ad_liba52.c index ab20576787..cac671718a 100644 --- a/libmpcodecs/ad_liba52.c +++ b/libmpcodecs/ad_liba52.c @@ -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); } diff --git a/libmpcodecs/ad_realaud.c b/libmpcodecs/ad_realaud.c index 792a6a9e4b..c0fe074232 100644 --- a/libmpcodecs/ad_realaud.c +++ b/libmpcodecs/ad_realaud.c @@ -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); } diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 8c1e9ae9c3..29394317fe 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -172,7 +172,8 @@ static int control(sh_video_t *sh, int cmd, void *arg, ...){ 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++) diff --git a/libmpcodecs/vd_ijpg.c b/libmpcodecs/vd_ijpg.c index 42518e806b..81d681ad1f 100644 --- a/libmpcodecs/vd_ijpg.c +++ b/libmpcodecs/vd_ijpg.c @@ -110,7 +110,7 @@ METHODDEF(void) skip_input_data (j_decompress_ptr cinfo, long num_bytes) 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 ) ); diff --git a/libmpcodecs/vd_realvid.c b/libmpcodecs/vd_realvid.c index ee2f5f8407..3bbb44e636 100644 --- a/libmpcodecs/vd_realvid.c +++ b/libmpcodecs/vd_realvid.c @@ -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); } diff --git a/libmpcodecs/vd_xanim.c b/libmpcodecs/vd_xanim.c index a7f98add49..afa782afc8 100644 --- a/libmpcodecs/vd_xanim.c +++ b/libmpcodecs/vd_xanim.c @@ -335,7 +335,7 @@ static int xacodec_query(sh_video_t *sh, XA_CODEC_HDR *codec_hdr) } } -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_HDR *anim_hdr, void (*function)()) 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 char *image_p, unsigned int x, unsigned in 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 char *image_p, unsigned int x, unsigned i 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_type, int blks, unsigned int dith_flag) // 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 *cmap2x2, unsigned int Y0, unsigned int Y1, 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 *image_p, unsigned int imagex, unsigned in } } -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_type) /* --------------- 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 *image_p, unsigned int imagex, unsigned 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; diff --git a/libmpcodecs/vf_2xsai.c b/libmpcodecs/vf_2xsai.c index e28ada4818..83805b8794 100644 --- a/libmpcodecs/vf_2xsai.c +++ b/libmpcodecs/vf_2xsai.c @@ -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]; |