mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Merge commit '088f38a4f9f54bb923405c67c9e72d96d90aa284'
* commit '088f38a4f9f54bb923405c67c9e72d96d90aa284': avcodec: Drop unnecessary ff_ name prefixes from static functions Conflicts: libavcodec/ass.c libavcodec/h264_parser.c libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
04fa818779
@ -54,13 +54,13 @@ int ff_ass_subtitle_header(AVCodecContext *avctx,
|
|||||||
int ff_ass_subtitle_header_default(AVCodecContext *avctx)
|
int ff_ass_subtitle_header_default(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
return ff_ass_subtitle_header(avctx, ASS_DEFAULT_FONT,
|
return ff_ass_subtitle_header(avctx, ASS_DEFAULT_FONT,
|
||||||
ASS_DEFAULT_FONT_SIZE,
|
ASS_DEFAULT_FONT_SIZE,
|
||||||
ASS_DEFAULT_COLOR,
|
ASS_DEFAULT_COLOR,
|
||||||
ASS_DEFAULT_BACK_COLOR,
|
ASS_DEFAULT_BACK_COLOR,
|
||||||
ASS_DEFAULT_BOLD,
|
ASS_DEFAULT_BOLD,
|
||||||
ASS_DEFAULT_ITALIC,
|
ASS_DEFAULT_ITALIC,
|
||||||
ASS_DEFAULT_UNDERLINE,
|
ASS_DEFAULT_UNDERLINE,
|
||||||
ASS_DEFAULT_ALIGNMENT);
|
ASS_DEFAULT_ALIGNMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void insert_ts(AVBPrint *buf, int ts)
|
static void insert_ts(AVBPrint *buf, int ts)
|
||||||
|
@ -421,77 +421,77 @@ static void OPNAME ## cavs_filt16_hv_ ## NAME(uint8_t *dst, uint8_t *src1, uint8
|
|||||||
}\
|
}\
|
||||||
|
|
||||||
#define CAVS_MC(OPNAME, SIZE) \
|
#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);\
|
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);\
|
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);\
|
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);\
|
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);\
|
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);\
|
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); \
|
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); \
|
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); \
|
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); \
|
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); \
|
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); \
|
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); \
|
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); \
|
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); \
|
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_, 8)
|
||||||
CAVS_MC(avg_, 16)
|
CAVS_MC(avg_, 16)
|
||||||
|
|
||||||
#define ff_put_cavs_qpel8_mc00_c ff_put_pixels8x8_c
|
#define put_cavs_qpel8_mc00_c ff_put_pixels8x8_c
|
||||||
#define ff_avg_cavs_qpel8_mc00_c ff_avg_pixels8x8_c
|
#define avg_cavs_qpel8_mc00_c ff_avg_pixels8x8_c
|
||||||
#define ff_put_cavs_qpel16_mc00_c ff_put_pixels16x16_c
|
#define put_cavs_qpel16_mc00_c ff_put_pixels16x16_c
|
||||||
#define ff_avg_cavs_qpel16_mc00_c ff_avg_pixels16x16_c
|
#define avg_cavs_qpel16_mc00_c ff_avg_pixels16x16_c
|
||||||
|
|
||||||
av_cold void ff_cavsdsp_init(CAVSDSPContext* c, AVCodecContext *avctx) {
|
av_cold void ff_cavsdsp_init(CAVSDSPContext* c, AVCodecContext *avctx) {
|
||||||
#define dspfunc(PFX, IDX, NUM) \
|
#define dspfunc(PFX, IDX, NUM) \
|
||||||
c->PFX ## _pixels_tab[IDX][ 0] = ff_ ## PFX ## NUM ## _mc00_c; \
|
c->PFX ## _pixels_tab[IDX][ 0] = PFX ## NUM ## _mc00_c; \
|
||||||
c->PFX ## _pixels_tab[IDX][ 1] = ff_ ## PFX ## NUM ## _mc10_c; \
|
c->PFX ## _pixels_tab[IDX][ 1] = PFX ## NUM ## _mc10_c; \
|
||||||
c->PFX ## _pixels_tab[IDX][ 2] = ff_ ## PFX ## NUM ## _mc20_c; \
|
c->PFX ## _pixels_tab[IDX][ 2] = PFX ## NUM ## _mc20_c; \
|
||||||
c->PFX ## _pixels_tab[IDX][ 3] = ff_ ## PFX ## NUM ## _mc30_c; \
|
c->PFX ## _pixels_tab[IDX][ 3] = PFX ## NUM ## _mc30_c; \
|
||||||
c->PFX ## _pixels_tab[IDX][ 4] = ff_ ## PFX ## NUM ## _mc01_c; \
|
c->PFX ## _pixels_tab[IDX][ 4] = PFX ## NUM ## _mc01_c; \
|
||||||
c->PFX ## _pixels_tab[IDX][ 5] = ff_ ## PFX ## NUM ## _mc11_c; \
|
c->PFX ## _pixels_tab[IDX][ 5] = PFX ## NUM ## _mc11_c; \
|
||||||
c->PFX ## _pixels_tab[IDX][ 6] = ff_ ## PFX ## NUM ## _mc21_c; \
|
c->PFX ## _pixels_tab[IDX][ 6] = PFX ## NUM ## _mc21_c; \
|
||||||
c->PFX ## _pixels_tab[IDX][ 7] = ff_ ## PFX ## NUM ## _mc31_c; \
|
c->PFX ## _pixels_tab[IDX][ 7] = PFX ## NUM ## _mc31_c; \
|
||||||
c->PFX ## _pixels_tab[IDX][ 8] = ff_ ## PFX ## NUM ## _mc02_c; \
|
c->PFX ## _pixels_tab[IDX][ 8] = PFX ## NUM ## _mc02_c; \
|
||||||
c->PFX ## _pixels_tab[IDX][ 9] = ff_ ## PFX ## NUM ## _mc12_c; \
|
c->PFX ## _pixels_tab[IDX][ 9] = PFX ## NUM ## _mc12_c; \
|
||||||
c->PFX ## _pixels_tab[IDX][10] = ff_ ## PFX ## NUM ## _mc22_c; \
|
c->PFX ## _pixels_tab[IDX][10] = PFX ## NUM ## _mc22_c; \
|
||||||
c->PFX ## _pixels_tab[IDX][11] = ff_ ## PFX ## NUM ## _mc32_c; \
|
c->PFX ## _pixels_tab[IDX][11] = PFX ## NUM ## _mc32_c; \
|
||||||
c->PFX ## _pixels_tab[IDX][12] = ff_ ## PFX ## NUM ## _mc03_c; \
|
c->PFX ## _pixels_tab[IDX][12] = PFX ## NUM ## _mc03_c; \
|
||||||
c->PFX ## _pixels_tab[IDX][13] = ff_ ## PFX ## NUM ## _mc13_c; \
|
c->PFX ## _pixels_tab[IDX][13] = PFX ## NUM ## _mc13_c; \
|
||||||
c->PFX ## _pixels_tab[IDX][14] = ff_ ## PFX ## NUM ## _mc23_c; \
|
c->PFX ## _pixels_tab[IDX][14] = PFX ## NUM ## _mc23_c; \
|
||||||
c->PFX ## _pixels_tab[IDX][15] = ff_ ## PFX ## NUM ## _mc33_c
|
c->PFX ## _pixels_tab[IDX][15] = PFX ## NUM ## _mc33_c
|
||||||
dspfunc(put_cavs_qpel, 0, 16);
|
dspfunc(put_cavs_qpel, 0, 16);
|
||||||
dspfunc(put_cavs_qpel, 1, 8);
|
dspfunc(put_cavs_qpel, 1, 8);
|
||||||
dspfunc(avg_cavs_qpel, 0, 16);
|
dspfunc(avg_cavs_qpel, 0, 16);
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
/* cos((M_PI * x / (2 * n)) */
|
/* cos((M_PI * x / (2 * n)) */
|
||||||
#define COS(s, n, x) (s->costab[x])
|
#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 n = 1 << ctx->nbits;
|
||||||
int i;
|
int i;
|
||||||
@ -70,7 +70,7 @@ static void ff_dst_calc_I_c(DCTContext *ctx, FFTSample *data)
|
|||||||
data[n - 1] = 0;
|
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 n = 1 << ctx->nbits;
|
||||||
int i;
|
int i;
|
||||||
@ -100,7 +100,7 @@ static void ff_dct_calc_I_c(DCTContext *ctx, FFTSample *data)
|
|||||||
data[i] = data[i - 2] - data[i];
|
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 n = 1 << ctx->nbits;
|
||||||
int i;
|
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 n = 1 << ctx->nbits;
|
||||||
int i;
|
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)));
|
s->csc2[i] = 0.5 / sin((M_PI / (2 * n) * (2 * i + 1)));
|
||||||
|
|
||||||
switch (inverse) {
|
switch (inverse) {
|
||||||
case DCT_I : s->dct_calc = ff_dct_calc_I_c; break;
|
case DCT_I : s->dct_calc = dct_calc_I_c; break;
|
||||||
case DCT_II : s->dct_calc = ff_dct_calc_II_c; break;
|
case DCT_II : s->dct_calc = dct_calc_II_c; break;
|
||||||
case DCT_III: s->dct_calc = ff_dct_calc_III_c; break;
|
case DCT_III: s->dct_calc = dct_calc_III_c; break;
|
||||||
case DST_I : s->dct_calc = ff_dst_calc_I_c; break;
|
case DST_I : s->dct_calc = dst_calc_I_c; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2598,12 +2598,12 @@ static void vector_clip_int32_c(int32_t *dst, const int32_t *src, int32_t min,
|
|||||||
} while (len > 0);
|
} 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);
|
ff_j_rev_dct (block);
|
||||||
put_pixels_clamped_c(block, dest, line_size);
|
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);
|
ff_j_rev_dct (block);
|
||||||
add_pixels_clamped_c(block, dest, line_size);
|
add_pixels_clamped_c(block, dest, line_size);
|
||||||
@ -2719,8 +2719,8 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx)
|
|||||||
c->idct_permutation_type = FF_NO_IDCT_PERM;
|
c->idct_permutation_type = FF_NO_IDCT_PERM;
|
||||||
} else {
|
} else {
|
||||||
if(avctx->idct_algo==FF_IDCT_INT){
|
if(avctx->idct_algo==FF_IDCT_INT){
|
||||||
c->idct_put= ff_jref_idct_put;
|
c->idct_put= jref_idct_put;
|
||||||
c->idct_add= ff_jref_idct_add;
|
c->idct_add= jref_idct_add;
|
||||||
c->idct = ff_j_rev_dct;
|
c->idct = ff_j_rev_dct;
|
||||||
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
|
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
|
||||||
}else if(avctx->idct_algo==FF_IDCT_FAAN){
|
}else if(avctx->idct_algo==FF_IDCT_FAAN){
|
||||||
|
@ -65,8 +65,8 @@ COSTABLE_CONST FFTSample * const FFT_NAME(ff_cos_tabs)[] = {
|
|||||||
FFT_NAME(ff_cos_65536),
|
FFT_NAME(ff_cos_65536),
|
||||||
};
|
};
|
||||||
|
|
||||||
static void ff_fft_permute_c(FFTContext *s, FFTComplex *z);
|
static void fft_permute_c(FFTContext *s, FFTComplex *z);
|
||||||
static void ff_fft_calc_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)
|
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->inverse = inverse;
|
||||||
s->fft_permutation = FF_FFT_PERM_DEFAULT;
|
s->fft_permutation = FF_FFT_PERM_DEFAULT;
|
||||||
|
|
||||||
s->fft_permute = ff_fft_permute_c;
|
s->fft_permute = fft_permute_c;
|
||||||
s->fft_calc = ff_fft_calc_c;
|
s->fft_calc = fft_calc_c;
|
||||||
#if CONFIG_MDCT
|
#if CONFIG_MDCT
|
||||||
s->imdct_calc = ff_imdct_calc_c;
|
s->imdct_calc = ff_imdct_calc_c;
|
||||||
s->imdct_half = ff_imdct_half_c;
|
s->imdct_half = ff_imdct_half_c;
|
||||||
@ -190,7 +190,7 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ff_fft_permute_c(FFTContext *s, FFTComplex *z)
|
static void fft_permute_c(FFTContext *s, FFTComplex *z)
|
||||||
{
|
{
|
||||||
int j, np;
|
int j, np;
|
||||||
const uint16_t *revtab = s->revtab;
|
const uint16_t *revtab = s->revtab;
|
||||||
@ -347,7 +347,7 @@ static void (* const fft_dispatch[])(FFTComplex*) = {
|
|||||||
fft2048, fft4096, fft8192, fft16384, fft32768, fft65536,
|
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);
|
fft_dispatch[s->nbits-2](z);
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ static int h261_decode_gob_header(H261Context *h)
|
|||||||
* Decode the group of blocks / video packet header.
|
* Decode the group of blocks / video packet header.
|
||||||
* @return <0 if no resync found
|
* @return <0 if no resync found
|
||||||
*/
|
*/
|
||||||
static int ff_h261_resync(H261Context *h)
|
static int h261_resync(H261Context *h)
|
||||||
{
|
{
|
||||||
MpegEncContext *const s = &h->s;
|
MpegEncContext *const s = &h->s;
|
||||||
int left, ret;
|
int left, ret;
|
||||||
@ -632,7 +632,7 @@ retry:
|
|||||||
s->mb_y = 0;
|
s->mb_y = 0;
|
||||||
|
|
||||||
while (h->gob_number < (s->mb_height == 18 ? 12 : 5)) {
|
while (h->gob_number < (s->mb_height == 18 ? 12 : 5)) {
|
||||||
if (ff_h261_resync(h) < 0)
|
if (h261_resync(h) < 0)
|
||||||
break;
|
break;
|
||||||
h261_decode_gob(h);
|
h261_decode_gob(h);
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
|
|
||||||
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, j;
|
int i, j;
|
||||||
uint32_t state;
|
uint32_t state;
|
||||||
@ -313,7 +313,7 @@ static int h264_parse(AVCodecParserContext *s,
|
|||||||
if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){
|
if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){
|
||||||
next= buf_size;
|
next= buf_size;
|
||||||
}else{
|
}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) {
|
if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
|
||||||
*poutbuf = NULL;
|
*poutbuf = NULL;
|
||||||
@ -323,7 +323,7 @@ static int h264_parse(AVCodecParserContext *s,
|
|||||||
|
|
||||||
if(next<0 && next != END_NOT_FOUND){
|
if(next<0 && next != END_NOT_FOUND){
|
||||||
av_assert1(pc->last_index + next >= 0 );
|
av_assert1(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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,10 +23,10 @@
|
|||||||
#include "mlpdsp.h"
|
#include "mlpdsp.h"
|
||||||
#include "mlp.h"
|
#include "mlp.h"
|
||||||
|
|
||||||
static void ff_mlp_filter_channel(int32_t *state, const int32_t *coeff,
|
static void mlp_filter_channel(int32_t *state, const int32_t *coeff,
|
||||||
int firorder, int iirorder,
|
int firorder, int iirorder,
|
||||||
unsigned int filter_shift, int32_t mask, int blocksize,
|
unsigned int filter_shift, int32_t mask,
|
||||||
int32_t *sample_buffer)
|
int blocksize, int32_t *sample_buffer)
|
||||||
{
|
{
|
||||||
int32_t *firbuf = state;
|
int32_t *firbuf = state;
|
||||||
int32_t *iirbuf = state + MAX_BLOCKSIZE + MAX_FIR_ORDER;
|
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)
|
void ff_mlpdsp_init(MLPDSPContext *c)
|
||||||
{
|
{
|
||||||
c->mlp_filter_channel = ff_mlp_filter_channel;
|
c->mlp_filter_channel = mlp_filter_channel;
|
||||||
if (ARCH_X86)
|
if (ARCH_X86)
|
||||||
ff_mlpdsp_init_x86(c);
|
ff_mlpdsp_init_x86(c);
|
||||||
}
|
}
|
||||||
|
@ -1123,8 +1123,8 @@ int ff_pre_estimate_p_frame_motion(MpegEncContext * s,
|
|||||||
return dmin;
|
return dmin;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ff_estimate_motion_b(MpegEncContext * s,
|
static int estimate_motion_b(MpegEncContext *s, int mb_x, int mb_y,
|
||||||
int mb_x, int mb_y, int16_t (*mv_table)[2], int ref_index, int f_code)
|
int16_t (*mv_table)[2], int ref_index, int f_code)
|
||||||
{
|
{
|
||||||
MotionEstContext * const c= &s->me;
|
MotionEstContext * const c= &s->me;
|
||||||
int mx, my, dmin;
|
int mx, my, dmin;
|
||||||
@ -1541,10 +1541,12 @@ void ff_estimate_b_frame_motion(MpegEncContext * s,
|
|||||||
dmin= INT_MAX;
|
dmin= INT_MAX;
|
||||||
//FIXME penalty stuff for non mpeg4
|
//FIXME penalty stuff for non mpeg4
|
||||||
c->skip=0;
|
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;
|
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]);
|
av_dlog(s, " %d %d ", s->b_forw_mv_table[xy][0], s->b_forw_mv_table[xy][1]);
|
||||||
|
|
||||||
c->skip=0;
|
c->skip=0;
|
||||||
|
@ -166,7 +166,7 @@ static const int32_t scale_factor_mult2[3][3] = {
|
|||||||
* Convert region offsets to region sizes and truncate
|
* Convert region offsets to region sizes and truncate
|
||||||
* size to big_values.
|
* size to big_values.
|
||||||
*/
|
*/
|
||||||
static void ff_region_offset2size(GranuleDef *g)
|
static void region_offset2size(GranuleDef *g)
|
||||||
{
|
{
|
||||||
int i, k, j = 0;
|
int i, k, j = 0;
|
||||||
g->region_size[2] = 576 / 2;
|
g->region_size[2] = 576 / 2;
|
||||||
@ -177,7 +177,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 (g->block_type == 2) {
|
||||||
if (s->sample_rate_index != 8)
|
if (s->sample_rate_index != 8)
|
||||||
@ -195,7 +195,8 @@ static void ff_init_short_region(MPADecodeContext *s, GranuleDef *g)
|
|||||||
g->region_size[1] = (576 / 2);
|
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;
|
int l;
|
||||||
g->region_size[0] = band_index_long[s->sample_rate_index][ra1 + 1] >> 1;
|
g->region_size[0] = band_index_long[s->sample_rate_index][ra1 + 1] >> 1;
|
||||||
@ -204,7 +205,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;
|
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->block_type == 2) {
|
||||||
if (g->switch_point) {
|
if (g->switch_point) {
|
||||||
@ -1372,7 +1373,7 @@ static int mp_decode_layer3(MPADecodeContext *s)
|
|||||||
g->table_select[i] = get_bits(&s->gb, 5);
|
g->table_select[i] = get_bits(&s->gb, 5);
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
g->subblock_gain[i] = get_bits(&s->gb, 3);
|
g->subblock_gain[i] = get_bits(&s->gb, 3);
|
||||||
ff_init_short_region(s, g);
|
init_short_region(s, g);
|
||||||
} else {
|
} else {
|
||||||
int region_address1, region_address2;
|
int region_address1, region_address2;
|
||||||
g->block_type = 0;
|
g->block_type = 0;
|
||||||
@ -1384,10 +1385,10 @@ static int mp_decode_layer3(MPADecodeContext *s)
|
|||||||
region_address2 = get_bits(&s->gb, 3);
|
region_address2 = get_bits(&s->gb, 3);
|
||||||
av_dlog(s->avctx, "region1=%d region2=%d\n",
|
av_dlog(s->avctx, "region1=%d region2=%d\n",
|
||||||
region_address1, region_address2);
|
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);
|
region_offset2size(g);
|
||||||
ff_compute_band_indexes(s, g);
|
compute_band_indexes(s, g);
|
||||||
|
|
||||||
g->preflag = 0;
|
g->preflag = 0;
|
||||||
if (!s->lsf)
|
if (!s->lsf)
|
||||||
|
@ -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
|
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,
|
static void add_wav(int16_t *dest, int n, int skip_first, int *m,
|
||||||
const int8_t *s2, const int8_t *s3)
|
const int16_t *s1, const int8_t *s2, const int8_t *s3)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int v[3];
|
int v[3];
|
||||||
@ -1716,8 +1716,8 @@ void ff_subblock_synthesis(RA144Context *ractx, const int16_t *lpc_coefs,
|
|||||||
|
|
||||||
block = ractx->adapt_cb + BUFFERSIZE - BLOCKSIZE;
|
block = ractx->adapt_cb + BUFFERSIZE - BLOCKSIZE;
|
||||||
|
|
||||||
ff_add_wav(block, gain, cba_idx, m, cba_idx? buffer_a: NULL,
|
add_wav(block, gain, cba_idx, m, cba_idx? buffer_a: NULL,
|
||||||
ff_cb1_vects[cb1_idx], ff_cb2_vects[cb2_idx]);
|
ff_cb1_vects[cb1_idx], ff_cb2_vects[cb2_idx]);
|
||||||
|
|
||||||
memcpy(ractx->curr_sblock, ractx->curr_sblock + BLOCKSIZE,
|
memcpy(ractx->curr_sblock, ractx->curr_sblock + BLOCKSIZE,
|
||||||
LPC_ORDER*sizeof(*ractx->curr_sblock));
|
LPC_ORDER*sizeof(*ractx->curr_sblock));
|
||||||
|
@ -54,7 +54,7 @@ static SINTABLE_CONST FFTSample * const ff_sin_tabs[] = {
|
|||||||
* the two real FFTs into one complex FFT. Unmangle the results.
|
* the two real FFTs into one complex FFT. Unmangle the results.
|
||||||
* ref: http://www.engineeringproductivitytools.com/stuff/T0001/PT10.HTM
|
* 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;
|
int i, i1, i2;
|
||||||
FFTComplex ev, od;
|
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);
|
s->tsin[i] = sin(i*theta);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
s->rdft_calc = ff_rdft_calc_c;
|
s->rdft_calc = rdft_calc_c;
|
||||||
|
|
||||||
if (ARCH_ARM) ff_rdft_init_arm(s);
|
if (ARCH_ARM) ff_rdft_init_arm(s);
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
volatile int ff_avcodec_locked;
|
volatile int ff_avcodec_locked;
|
||||||
static int volatile entangled_thread_counter = 0;
|
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 *codec_mutex;
|
||||||
static void *avformat_mutex;
|
static void *avformat_mutex;
|
||||||
|
|
||||||
@ -2986,19 +2986,19 @@ AVHWAccel *ff_find_hwaccel(enum AVCodecID codec_id, enum AVPixelFormat pix_fmt)
|
|||||||
|
|
||||||
int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op))
|
int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op))
|
||||||
{
|
{
|
||||||
if (ff_lockmgr_cb) {
|
if (lockmgr_cb) {
|
||||||
if (ff_lockmgr_cb(&codec_mutex, AV_LOCK_DESTROY))
|
if (lockmgr_cb(&codec_mutex, AV_LOCK_DESTROY))
|
||||||
return -1;
|
return -1;
|
||||||
if (ff_lockmgr_cb(&avformat_mutex, AV_LOCK_DESTROY))
|
if (lockmgr_cb(&avformat_mutex, AV_LOCK_DESTROY))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ff_lockmgr_cb = cb;
|
lockmgr_cb = cb;
|
||||||
|
|
||||||
if (ff_lockmgr_cb) {
|
if (lockmgr_cb) {
|
||||||
if (ff_lockmgr_cb(&codec_mutex, AV_LOCK_CREATE))
|
if (lockmgr_cb(&codec_mutex, AV_LOCK_CREATE))
|
||||||
return -1;
|
return -1;
|
||||||
if (ff_lockmgr_cb(&avformat_mutex, AV_LOCK_CREATE))
|
if (lockmgr_cb(&avformat_mutex, AV_LOCK_CREATE))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -3006,8 +3006,8 @@ int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op))
|
|||||||
|
|
||||||
int ff_lock_avcodec(AVCodecContext *log_ctx)
|
int ff_lock_avcodec(AVCodecContext *log_ctx)
|
||||||
{
|
{
|
||||||
if (ff_lockmgr_cb) {
|
if (lockmgr_cb) {
|
||||||
if ((*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN))
|
if ((*lockmgr_cb)(&codec_mutex, AV_LOCK_OBTAIN))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
entangled_thread_counter++;
|
entangled_thread_counter++;
|
||||||
@ -3027,8 +3027,8 @@ int ff_unlock_avcodec(void)
|
|||||||
av_assert0(ff_avcodec_locked);
|
av_assert0(ff_avcodec_locked);
|
||||||
ff_avcodec_locked = 0;
|
ff_avcodec_locked = 0;
|
||||||
entangled_thread_counter--;
|
entangled_thread_counter--;
|
||||||
if (ff_lockmgr_cb) {
|
if (lockmgr_cb) {
|
||||||
if ((*ff_lockmgr_cb)(&codec_mutex, AV_LOCK_RELEASE))
|
if ((*lockmgr_cb)(&codec_mutex, AV_LOCK_RELEASE))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -3036,8 +3036,8 @@ int ff_unlock_avcodec(void)
|
|||||||
|
|
||||||
int avpriv_lock_avformat(void)
|
int avpriv_lock_avformat(void)
|
||||||
{
|
{
|
||||||
if (ff_lockmgr_cb) {
|
if (lockmgr_cb) {
|
||||||
if ((*ff_lockmgr_cb)(&avformat_mutex, AV_LOCK_OBTAIN))
|
if ((*lockmgr_cb)(&avformat_mutex, AV_LOCK_OBTAIN))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -3045,8 +3045,8 @@ int avpriv_lock_avformat(void)
|
|||||||
|
|
||||||
int avpriv_unlock_avformat(void)
|
int avpriv_unlock_avformat(void)
|
||||||
{
|
{
|
||||||
if (ff_lockmgr_cb) {
|
if (lockmgr_cb) {
|
||||||
if ((*ff_lockmgr_cb)(&avformat_mutex, AV_LOCK_RELEASE))
|
if ((*lockmgr_cb)(&avformat_mutex, AV_LOCK_RELEASE))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user