diff --git a/libavcodec/ass.c b/libavcodec/ass.c index 3585b93d03..098050a1a6 100644 --- a/libavcodec/ass.c +++ b/libavcodec/ass.c @@ -39,11 +39,11 @@ * the layout of the numpad (1-3 sub, 4-6 mid, 7-9 top) * @return >= 0 on success otherwise an error code <0 */ -static int ff_ass_subtitle_header(AVCodecContext *avctx, - const char *font, int font_size, - int color, int back_color, - int bold, int italic, int underline, - int alignment) +static int ass_subtitle_header(AVCodecContext *avctx, + const char *font, int font_size, + int color, int back_color, + int bold, int italic, int underline, + int alignment) { char header[512]; @@ -69,14 +69,14 @@ static int ff_ass_subtitle_header(AVCodecContext *avctx, int ff_ass_subtitle_header_default(AVCodecContext *avctx) { - return ff_ass_subtitle_header(avctx, ASS_DEFAULT_FONT, - ASS_DEFAULT_FONT_SIZE, - ASS_DEFAULT_COLOR, - ASS_DEFAULT_BACK_COLOR, - ASS_DEFAULT_BOLD, - ASS_DEFAULT_ITALIC, - ASS_DEFAULT_UNDERLINE, - ASS_DEFAULT_ALIGNMENT); + return ass_subtitle_header(avctx, ASS_DEFAULT_FONT, + ASS_DEFAULT_FONT_SIZE, + ASS_DEFAULT_COLOR, + ASS_DEFAULT_BACK_COLOR, + ASS_DEFAULT_BOLD, + ASS_DEFAULT_ITALIC, + ASS_DEFAULT_UNDERLINE, + ASS_DEFAULT_ALIGNMENT); } void ff_ass_init(AVSubtitle *sub) diff --git a/libavcodec/cavsdsp.c b/libavcodec/cavsdsp.c index 70c8f35b7f..2716e33b2d 100644 --- a/libavcodec/cavsdsp.c +++ b/libavcodec/cavsdsp.c @@ -421,77 +421,77 @@ static void OPNAME ## cavs_filt16_hv_ ## NAME(uint8_t *dst, uint8_t *src1, uint8 }\ #define CAVS_MC(OPNAME, SIZE) \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc10_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +static void OPNAME ## cavs_qpel ## SIZE ## _mc10_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ {\ OPNAME ## cavs_filt ## SIZE ## _h_qpel_l(dst, src, stride, stride);\ }\ \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc20_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +static void OPNAME ## cavs_qpel ## SIZE ## _mc20_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ {\ OPNAME ## cavs_filt ## SIZE ## _h_hpel(dst, src, stride, stride);\ }\ \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc30_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +static void OPNAME ## cavs_qpel ## SIZE ## _mc30_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ {\ OPNAME ## cavs_filt ## SIZE ## _h_qpel_r(dst, src, stride, stride);\ }\ \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc01_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +static void OPNAME ## cavs_qpel ## SIZE ## _mc01_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ {\ OPNAME ## cavs_filt ## SIZE ## _v_qpel_l(dst, src, stride, stride);\ }\ \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc02_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +static void OPNAME ## cavs_qpel ## SIZE ## _mc02_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ {\ OPNAME ## cavs_filt ## SIZE ## _v_hpel(dst, src, stride, stride);\ }\ \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc03_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +static void OPNAME ## cavs_qpel ## SIZE ## _mc03_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ {\ OPNAME ## cavs_filt ## SIZE ## _v_qpel_r(dst, src, stride, stride);\ }\ \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc22_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +static void OPNAME ## cavs_qpel ## SIZE ## _mc22_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ {\ OPNAME ## cavs_filt ## SIZE ## _hv_jj(dst, src, NULL, stride, stride); \ }\ \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc11_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +static void OPNAME ## cavs_qpel ## SIZE ## _mc11_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ {\ OPNAME ## cavs_filt ## SIZE ## _hv_egpr(dst, src, src, stride, stride); \ }\ \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc13_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +static void OPNAME ## cavs_qpel ## SIZE ## _mc13_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ {\ OPNAME ## cavs_filt ## SIZE ## _hv_egpr(dst, src, src+stride, stride, stride); \ }\ \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc31_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +static void OPNAME ## cavs_qpel ## SIZE ## _mc31_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ {\ OPNAME ## cavs_filt ## SIZE ## _hv_egpr(dst, src, src+1, stride, stride); \ }\ \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc33_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +static void OPNAME ## cavs_qpel ## SIZE ## _mc33_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ {\ OPNAME ## cavs_filt ## SIZE ## _hv_egpr(dst, src, src+stride+1,stride, stride); \ }\ \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc21_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +static void OPNAME ## cavs_qpel ## SIZE ## _mc21_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ {\ OPNAME ## cavs_filt ## SIZE ## _hv_ff(dst, src, src+stride+1,stride, stride); \ }\ \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc12_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +static void OPNAME ## cavs_qpel ## SIZE ## _mc12_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ {\ OPNAME ## cavs_filt ## SIZE ## _hv_ii(dst, src, src+stride+1,stride, stride); \ }\ \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc32_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +static void OPNAME ## cavs_qpel ## SIZE ## _mc32_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ {\ OPNAME ## cavs_filt ## SIZE ## _hv_kk(dst, src, src+stride+1,stride, stride); \ }\ \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc23_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +static void OPNAME ## cavs_qpel ## SIZE ## _mc23_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ {\ OPNAME ## cavs_filt ## SIZE ## _hv_qq(dst, src, src+stride+1,stride, stride); \ }\ @@ -527,29 +527,29 @@ CAVS_MC(put_, 16) CAVS_MC(avg_, 8) CAVS_MC(avg_, 16) -#define ff_put_cavs_qpel8_mc00_c ff_put_pixels8x8_c -#define ff_avg_cavs_qpel8_mc00_c ff_avg_pixels8x8_c -#define ff_put_cavs_qpel16_mc00_c ff_put_pixels16x16_c -#define ff_avg_cavs_qpel16_mc00_c ff_avg_pixels16x16_c +#define put_cavs_qpel8_mc00_c ff_put_pixels8x8_c +#define avg_cavs_qpel8_mc00_c ff_avg_pixels8x8_c +#define put_cavs_qpel16_mc00_c ff_put_pixels16x16_c +#define avg_cavs_qpel16_mc00_c ff_avg_pixels16x16_c av_cold void ff_cavsdsp_init(CAVSDSPContext* c, AVCodecContext *avctx) { #define dspfunc(PFX, IDX, NUM) \ - c->PFX ## _pixels_tab[IDX][ 0] = ff_ ## PFX ## NUM ## _mc00_c; \ - c->PFX ## _pixels_tab[IDX][ 1] = ff_ ## PFX ## NUM ## _mc10_c; \ - c->PFX ## _pixels_tab[IDX][ 2] = ff_ ## PFX ## NUM ## _mc20_c; \ - c->PFX ## _pixels_tab[IDX][ 3] = ff_ ## PFX ## NUM ## _mc30_c; \ - c->PFX ## _pixels_tab[IDX][ 4] = ff_ ## PFX ## NUM ## _mc01_c; \ - c->PFX ## _pixels_tab[IDX][ 5] = ff_ ## PFX ## NUM ## _mc11_c; \ - c->PFX ## _pixels_tab[IDX][ 6] = ff_ ## PFX ## NUM ## _mc21_c; \ - c->PFX ## _pixels_tab[IDX][ 7] = ff_ ## PFX ## NUM ## _mc31_c; \ - c->PFX ## _pixels_tab[IDX][ 8] = ff_ ## PFX ## NUM ## _mc02_c; \ - c->PFX ## _pixels_tab[IDX][ 9] = ff_ ## PFX ## NUM ## _mc12_c; \ - c->PFX ## _pixels_tab[IDX][10] = ff_ ## PFX ## NUM ## _mc22_c; \ - c->PFX ## _pixels_tab[IDX][11] = ff_ ## PFX ## NUM ## _mc32_c; \ - c->PFX ## _pixels_tab[IDX][12] = ff_ ## PFX ## NUM ## _mc03_c; \ - c->PFX ## _pixels_tab[IDX][13] = ff_ ## PFX ## NUM ## _mc13_c; \ - c->PFX ## _pixels_tab[IDX][14] = ff_ ## PFX ## NUM ## _mc23_c; \ - c->PFX ## _pixels_tab[IDX][15] = ff_ ## PFX ## NUM ## _mc33_c + c->PFX ## _pixels_tab[IDX][ 0] = PFX ## NUM ## _mc00_c; \ + c->PFX ## _pixels_tab[IDX][ 1] = PFX ## NUM ## _mc10_c; \ + c->PFX ## _pixels_tab[IDX][ 2] = PFX ## NUM ## _mc20_c; \ + c->PFX ## _pixels_tab[IDX][ 3] = PFX ## NUM ## _mc30_c; \ + c->PFX ## _pixels_tab[IDX][ 4] = PFX ## NUM ## _mc01_c; \ + c->PFX ## _pixels_tab[IDX][ 5] = PFX ## NUM ## _mc11_c; \ + c->PFX ## _pixels_tab[IDX][ 6] = PFX ## NUM ## _mc21_c; \ + c->PFX ## _pixels_tab[IDX][ 7] = PFX ## NUM ## _mc31_c; \ + c->PFX ## _pixels_tab[IDX][ 8] = PFX ## NUM ## _mc02_c; \ + c->PFX ## _pixels_tab[IDX][ 9] = PFX ## NUM ## _mc12_c; \ + c->PFX ## _pixels_tab[IDX][10] = PFX ## NUM ## _mc22_c; \ + c->PFX ## _pixels_tab[IDX][11] = PFX ## NUM ## _mc32_c; \ + c->PFX ## _pixels_tab[IDX][12] = PFX ## NUM ## _mc03_c; \ + c->PFX ## _pixels_tab[IDX][13] = PFX ## NUM ## _mc13_c; \ + c->PFX ## _pixels_tab[IDX][14] = PFX ## NUM ## _mc23_c; \ + c->PFX ## _pixels_tab[IDX][15] = PFX ## NUM ## _mc33_c dspfunc(put_cavs_qpel, 0, 16); dspfunc(put_cavs_qpel, 1, 8); dspfunc(avg_cavs_qpel, 0, 16); diff --git a/libavcodec/dct.c b/libavcodec/dct.c index 0128c7d3e5..4dbbff867b 100644 --- a/libavcodec/dct.c +++ b/libavcodec/dct.c @@ -40,7 +40,7 @@ /* cos((M_PI * x / (2 * n)) */ #define COS(s, n, x) (s->costab[x]) -static void ff_dst_calc_I_c(DCTContext *ctx, FFTSample *data) +static void dst_calc_I_c(DCTContext *ctx, FFTSample *data) { int n = 1 << ctx->nbits; int i; @@ -70,7 +70,7 @@ static void ff_dst_calc_I_c(DCTContext *ctx, FFTSample *data) data[n - 1] = 0; } -static void ff_dct_calc_I_c(DCTContext *ctx, FFTSample *data) +static void dct_calc_I_c(DCTContext *ctx, FFTSample *data) { int n = 1 << ctx->nbits; int i; @@ -100,7 +100,7 @@ static void ff_dct_calc_I_c(DCTContext *ctx, FFTSample *data) data[i] = data[i - 2] - data[i]; } -static void ff_dct_calc_III_c(DCTContext *ctx, FFTSample *data) +static void dct_calc_III_c(DCTContext *ctx, FFTSample *data) { int n = 1 << ctx->nbits; int i; @@ -133,7 +133,7 @@ static void ff_dct_calc_III_c(DCTContext *ctx, FFTSample *data) } } -static void ff_dct_calc_II_c(DCTContext *ctx, FFTSample *data) +static void dct_calc_II_c(DCTContext *ctx, FFTSample *data) { int n = 1 << ctx->nbits; int i; @@ -201,10 +201,10 @@ av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse) s->csc2[i] = 0.5 / sin((M_PI / (2 * n) * (2 * i + 1))); switch (inverse) { - case DCT_I : s->dct_calc = ff_dct_calc_I_c; break; - case DCT_II : s->dct_calc = ff_dct_calc_II_c; break; - case DCT_III: s->dct_calc = ff_dct_calc_III_c; break; - case DST_I : s->dct_calc = ff_dst_calc_I_c; break; + case DCT_I : s->dct_calc = dct_calc_I_c; break; + case DCT_II : s->dct_calc = dct_calc_II_c; break; + case DCT_III: s->dct_calc = dct_calc_III_c; break; + case DST_I : s->dct_calc = dst_calc_I_c; break; } } diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 6f965bede9..97a79b4e58 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -2483,12 +2483,12 @@ static void vector_clip_int32_c(int32_t *dst, const int32_t *src, int32_t min, } while (len > 0); } -static void ff_jref_idct_put(uint8_t *dest, int line_size, int16_t *block) +static void jref_idct_put(uint8_t *dest, int line_size, int16_t *block) { ff_j_rev_dct (block); put_pixels_clamped_c(block, dest, line_size); } -static void ff_jref_idct_add(uint8_t *dest, int line_size, int16_t *block) +static void jref_idct_add(uint8_t *dest, int line_size, int16_t *block) { ff_j_rev_dct (block); add_pixels_clamped_c(block, dest, line_size); @@ -2557,8 +2557,8 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) c->idct_permutation_type = FF_NO_IDCT_PERM; } else { if(avctx->idct_algo==FF_IDCT_INT){ - c->idct_put= ff_jref_idct_put; - c->idct_add= ff_jref_idct_add; + c->idct_put= jref_idct_put; + c->idct_add= jref_idct_add; c->idct = ff_j_rev_dct; c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM; }else if(avctx->idct_algo==FF_IDCT_FAAN){ diff --git a/libavcodec/fft.c b/libavcodec/fft.c index 5026d2e865..0b8140a08e 100644 --- a/libavcodec/fft.c +++ b/libavcodec/fft.c @@ -65,8 +65,8 @@ COSTABLE_CONST FFTSample * const FFT_NAME(ff_cos_tabs)[] = { FFT_NAME(ff_cos_65536), }; -static void ff_fft_permute_c(FFTContext *s, FFTComplex *z); -static void ff_fft_calc_c(FFTContext *s, FFTComplex *z); +static void fft_permute_c(FFTContext *s, FFTComplex *z); +static void fft_calc_c(FFTContext *s, FFTComplex *z); static int split_radix_permutation(int i, int n, int inverse) { @@ -149,8 +149,8 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse) s->inverse = inverse; s->fft_permutation = FF_FFT_PERM_DEFAULT; - s->fft_permute = ff_fft_permute_c; - s->fft_calc = ff_fft_calc_c; + s->fft_permute = fft_permute_c; + s->fft_calc = fft_calc_c; #if CONFIG_MDCT s->imdct_calc = ff_imdct_calc_c; s->imdct_half = ff_imdct_half_c; @@ -189,7 +189,7 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse) return -1; } -static void ff_fft_permute_c(FFTContext *s, FFTComplex *z) +static void fft_permute_c(FFTContext *s, FFTComplex *z) { int j, np; const uint16_t *revtab = s->revtab; @@ -346,7 +346,7 @@ static void (* const fft_dispatch[])(FFTComplex*) = { fft2048, fft4096, fft8192, fft16384, fft32768, fft65536, }; -static void ff_fft_calc_c(FFTContext *s, FFTComplex *z) +static void fft_calc_c(FFTContext *s, FFTComplex *z) { fft_dispatch[s->nbits-2](z); } diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index 49756a7dc5..8872c6c2f6 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -147,7 +147,7 @@ static int h261_decode_gob_header(H261Context *h) * Decode the group of blocks / video packet header. * @return <0 if no resync found */ -static int ff_h261_resync(H261Context *h) +static int h261_resync(H261Context *h) { MpegEncContext *const s = &h->s; int left, ret; @@ -627,7 +627,7 @@ retry: s->mb_y = 0; while (h->gob_number < (s->mb_height == 18 ? 12 : 5)) { - if (ff_h261_resync(h) < 0) + if (h261_resync(h) < 0) break; h261_decode_gob(h); } diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 3c98c84788..aa930d9e82 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -33,7 +33,7 @@ #include -static int ff_h264_find_frame_end(H264Context *h, const uint8_t *buf, int buf_size) +static int h264_find_frame_end(H264Context *h, const uint8_t *buf, int buf_size) { int i; uint32_t state; @@ -265,7 +265,7 @@ static int h264_parse(AVCodecParserContext *s, if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){ next= buf_size; }else{ - next= ff_h264_find_frame_end(h, buf, buf_size); + next = h264_find_frame_end(h, buf, buf_size); if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { *poutbuf = NULL; @@ -275,7 +275,7 @@ static int h264_parse(AVCodecParserContext *s, if(next<0 && next != END_NOT_FOUND){ assert(pc->last_index + next >= 0 ); - ff_h264_find_frame_end(h, &pc->buffer[pc->last_index + next], -next); //update state + h264_find_frame_end(h, &pc->buffer[pc->last_index + next], -next); // update state } } diff --git a/libavcodec/mlpdsp.c b/libavcodec/mlpdsp.c index 2944ce8432..7e6da6e470 100644 --- a/libavcodec/mlpdsp.c +++ b/libavcodec/mlpdsp.c @@ -23,10 +23,10 @@ #include "mlpdsp.h" #include "mlp.h" -static void ff_mlp_filter_channel(int32_t *state, const int32_t *coeff, - int firorder, int iirorder, - unsigned int filter_shift, int32_t mask, int blocksize, - int32_t *sample_buffer) +static void mlp_filter_channel(int32_t *state, const int32_t *coeff, + int firorder, int iirorder, + unsigned int filter_shift, int32_t mask, + int blocksize, int32_t *sample_buffer) { int32_t *firbuf = state; int32_t *iirbuf = state + MAX_BLOCKSIZE + MAX_FIR_ORDER; @@ -58,7 +58,7 @@ static void ff_mlp_filter_channel(int32_t *state, const int32_t *coeff, void ff_mlpdsp_init(MLPDSPContext *c) { - c->mlp_filter_channel = ff_mlp_filter_channel; + c->mlp_filter_channel = mlp_filter_channel; if (ARCH_X86) ff_mlpdsp_init_x86(c); } diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index 91304c5377..04ae49ec48 100644 --- a/libavcodec/motion_est.c +++ b/libavcodec/motion_est.c @@ -1104,8 +1104,8 @@ int ff_pre_estimate_p_frame_motion(MpegEncContext * s, return dmin; } -static int ff_estimate_motion_b(MpegEncContext * s, - int mb_x, int mb_y, int16_t (*mv_table)[2], int ref_index, int f_code) +static int estimate_motion_b(MpegEncContext *s, int mb_x, int mb_y, + int16_t (*mv_table)[2], int ref_index, int f_code) { MotionEstContext * const c= &s->me; int mx, my, dmin; @@ -1522,10 +1522,12 @@ void ff_estimate_b_frame_motion(MpegEncContext * s, dmin= INT_MAX; //FIXME penalty stuff for non mpeg4 c->skip=0; - fmin= ff_estimate_motion_b(s, mb_x, mb_y, s->b_forw_mv_table, 0, s->f_code) + 3*penalty_factor; + fmin = estimate_motion_b(s, mb_x, mb_y, s->b_forw_mv_table, 0, s->f_code) + + 3 * penalty_factor; c->skip=0; - bmin= ff_estimate_motion_b(s, mb_x, mb_y, s->b_back_mv_table, 2, s->b_code) + 2*penalty_factor; + bmin = estimate_motion_b(s, mb_x, mb_y, s->b_back_mv_table, 2, s->b_code) + + 2 * penalty_factor; av_dlog(s, " %d %d ", s->b_forw_mv_table[xy][0], s->b_forw_mv_table[xy][1]); c->skip=0; diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index e3e19422a4..fa6ac04785 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -165,7 +165,7 @@ static const int32_t scale_factor_mult2[3][3] = { * Convert region offsets to region sizes and truncate * size to big_values. */ -static void ff_region_offset2size(GranuleDef *g) +static void region_offset2size(GranuleDef *g) { int i, k, j = 0; g->region_size[2] = 576 / 2; @@ -176,7 +176,7 @@ static void ff_region_offset2size(GranuleDef *g) } } -static void ff_init_short_region(MPADecodeContext *s, GranuleDef *g) +static void init_short_region(MPADecodeContext *s, GranuleDef *g) { if (g->block_type == 2) { if (s->sample_rate_index != 8) @@ -194,7 +194,8 @@ static void ff_init_short_region(MPADecodeContext *s, GranuleDef *g) g->region_size[1] = (576 / 2); } -static void ff_init_long_region(MPADecodeContext *s, GranuleDef *g, int ra1, int ra2) +static void init_long_region(MPADecodeContext *s, GranuleDef *g, + int ra1, int ra2) { int l; g->region_size[0] = band_index_long[s->sample_rate_index][ra1 + 1] >> 1; @@ -203,7 +204,7 @@ static void ff_init_long_region(MPADecodeContext *s, GranuleDef *g, int ra1, int g->region_size[1] = band_index_long[s->sample_rate_index][ l] >> 1; } -static void ff_compute_band_indexes(MPADecodeContext *s, GranuleDef *g) +static void compute_band_indexes(MPADecodeContext *s, GranuleDef *g) { if (g->block_type == 2) { if (g->switch_point) { @@ -1354,7 +1355,7 @@ static int mp_decode_layer3(MPADecodeContext *s) g->table_select[i] = get_bits(&s->gb, 5); for (i = 0; i < 3; i++) g->subblock_gain[i] = get_bits(&s->gb, 3); - ff_init_short_region(s, g); + init_short_region(s, g); } else { int region_address1, region_address2; g->block_type = 0; @@ -1366,10 +1367,10 @@ static int mp_decode_layer3(MPADecodeContext *s) region_address2 = get_bits(&s->gb, 3); av_dlog(s->avctx, "region1=%d region2=%d\n", region_address1, region_address2); - ff_init_long_region(s, g, region_address1, region_address2); + init_long_region(s, g, region_address1, region_address2); } - ff_region_offset2size(g); - ff_compute_band_indexes(s, g); + region_offset2size(g); + compute_band_indexes(s, g); g->preflag = 0; if (!s->lsf) diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c index 3705610fbb..355baddf33 100644 --- a/libavcodec/ra144.c +++ b/libavcodec/ra144.c @@ -1504,8 +1504,8 @@ const int16_t * const ff_lpc_refl_cb[10]={ lpc_refl_cb6, lpc_refl_cb7, lpc_refl_cb8, lpc_refl_cb9, lpc_refl_cb10 }; -static void ff_add_wav(int16_t *dest, int n, int skip_first, int *m, const int16_t *s1, - const int8_t *s2, const int8_t *s3) +static void add_wav(int16_t *dest, int n, int skip_first, int *m, + const int16_t *s1, const int8_t *s2, const int8_t *s3) { int i; int v[3]; @@ -1709,8 +1709,8 @@ void ff_subblock_synthesis(RA144Context *ractx, const uint16_t *lpc_coefs, block = ractx->adapt_cb + BUFFERSIZE - BLOCKSIZE; - ff_add_wav(block, gain, cba_idx, m, cba_idx? buffer_a: NULL, - ff_cb1_vects[cb1_idx], ff_cb2_vects[cb2_idx]); + add_wav(block, gain, cba_idx, m, cba_idx? buffer_a: NULL, + ff_cb1_vects[cb1_idx], ff_cb2_vects[cb2_idx]); memcpy(ractx->curr_sblock, ractx->curr_sblock + BLOCKSIZE, LPC_ORDER*sizeof(*ractx->curr_sblock)); diff --git a/libavcodec/rdft.c b/libavcodec/rdft.c index 116cfa4366..54cf14aa21 100644 --- a/libavcodec/rdft.c +++ b/libavcodec/rdft.c @@ -54,7 +54,7 @@ static SINTABLE_CONST FFTSample * const ff_sin_tabs[] = { * the two real FFTs into one complex FFT. Unmangle the results. * ref: http://www.engineeringproductivitytools.com/stuff/T0001/PT10.HTM */ -static void ff_rdft_calc_c(RDFTContext* s, FFTSample* data) +static void rdft_calc_c(RDFTContext *s, FFTSample *data) { int i, i1, i2; FFTComplex ev, od; @@ -120,7 +120,7 @@ av_cold int ff_rdft_init(RDFTContext *s, int nbits, enum RDFTransformType trans) s->tsin[i] = sin(i*theta); } #endif - s->rdft_calc = ff_rdft_calc_c; + s->rdft_calc = rdft_calc_c; if (ARCH_ARM) ff_rdft_init_arm(s); diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 67e5165143..0d621449f2 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -49,7 +49,7 @@ #include static int volatile entangled_thread_counter = 0; -static int (*ff_lockmgr_cb)(void **mutex, enum AVLockOp op); +static int (*lockmgr_cb)(void **mutex, enum AVLockOp op); static void *codec_mutex; static void *avformat_mutex; @@ -869,8 +869,8 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code av_dict_copy(&tmp, *options, 0); /* If there is a user-supplied mutex locking routine, call it. */ - if (ff_lockmgr_cb) { - if ((*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN)) + if (lockmgr_cb) { + if ((*lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN)) return -1; } @@ -1066,8 +1066,8 @@ end: entangled_thread_counter--; /* Release any user-supplied mutex. */ - if (ff_lockmgr_cb) { - (*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_RELEASE); + if (lockmgr_cb) { + (*lockmgr_cb)(&codec_mutex, AV_LOCK_RELEASE); } if (options) { av_dict_free(options); @@ -1515,8 +1515,8 @@ void avsubtitle_free(AVSubtitle *sub) av_cold int avcodec_close(AVCodecContext *avctx) { /* If there is a user-supplied mutex locking routine, call it. */ - if (ff_lockmgr_cb) { - if ((*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN)) + if (lockmgr_cb) { + if ((*lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN)) return -1; } @@ -1554,8 +1554,8 @@ av_cold int avcodec_close(AVCodecContext *avctx) entangled_thread_counter--; /* Release any user-supplied mutex. */ - if (ff_lockmgr_cb) { - (*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_RELEASE); + if (lockmgr_cb) { + (*lockmgr_cb)(&codec_mutex, AV_LOCK_RELEASE); } return 0; } @@ -2106,19 +2106,19 @@ AVHWAccel *ff_find_hwaccel(enum AVCodecID codec_id, enum AVPixelFormat pix_fmt) int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)) { - if (ff_lockmgr_cb) { - if (ff_lockmgr_cb(&codec_mutex, AV_LOCK_DESTROY)) + if (lockmgr_cb) { + if (lockmgr_cb(&codec_mutex, AV_LOCK_DESTROY)) return -1; - if (ff_lockmgr_cb(&avformat_mutex, AV_LOCK_DESTROY)) + if (lockmgr_cb(&avformat_mutex, AV_LOCK_DESTROY)) return -1; } - ff_lockmgr_cb = cb; + lockmgr_cb = cb; - if (ff_lockmgr_cb) { - if (ff_lockmgr_cb(&codec_mutex, AV_LOCK_CREATE)) + if (lockmgr_cb) { + if (lockmgr_cb(&codec_mutex, AV_LOCK_CREATE)) return -1; - if (ff_lockmgr_cb(&avformat_mutex, AV_LOCK_CREATE)) + if (lockmgr_cb(&avformat_mutex, AV_LOCK_CREATE)) return -1; } return 0; @@ -2126,8 +2126,8 @@ int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)) int avpriv_lock_avformat(void) { - if (ff_lockmgr_cb) { - if ((*ff_lockmgr_cb)(&avformat_mutex, AV_LOCK_OBTAIN)) + if (lockmgr_cb) { + if ((*lockmgr_cb)(&avformat_mutex, AV_LOCK_OBTAIN)) return -1; } return 0; @@ -2135,8 +2135,8 @@ int avpriv_lock_avformat(void) int avpriv_unlock_avformat(void) { - if (ff_lockmgr_cb) { - if ((*ff_lockmgr_cb)(&avformat_mutex, AV_LOCK_RELEASE)) + if (lockmgr_cb) { + if ((*lockmgr_cb)(&avformat_mutex, AV_LOCK_RELEASE)) return -1; } return 0;