[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
Yuriy Kaminskiy
yumkam at mail.ru
Tue Feb 16 19:39:57 CET 2010
On 16.02.2010 19:16, diego wrote:
> 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);
> }
>
>
I'm not sure, and cannot test, but I think this is wrong. __builtin_new/delete
seems exported for use in {14_4,28_8}.so.6.0, not internally used by
ad_readaud.c at all.
> 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);
> }
>
same here.
> 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, ...)
Same here, exported for use in codecs (some function below certainly used in
codecs, for some I don't see imports in xanimdlls-20040626.tar.bz2, not sure
about other version/arch/...)
> {
> 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)
too.
> {
> 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)())
too.
> {
> // 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)
too.
> {
> return GetTimer(); //(GetRelativeTime());
> }
>
> -void XA_dummy(void)
> +static void XA_dummy(void)
not sure
> {
> 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)
used in codecs
> {
> 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)
too.
> {
> 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,
too.
> 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,
not sure
> 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,
not sure
> 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)
used in codecs
> {
> 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,
not sure
> 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)
used
> {
> 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,
not sure
> 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)
used
> {
> 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,
not sure
> 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)
used
> {
> mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "XA_YUV221111_Func('image_type: %d')\n",image_type);
> return (void *)XA_YUV221111_Convert;
>
More information about the MPlayer-cvslog
mailing list