dsputil: Add ff_ prefix to the dsputil*_init* functions

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö 2012-02-15 12:06:44 +02:00
parent 99560a4caa
commit 9cf0841ef3
75 changed files with 103 additions and 103 deletions

View File

@ -880,7 +880,7 @@ static av_cold void common_init(AVCodecContext *avctx)
{
FourXContext * const f = avctx->priv_data;
dsputil_init(&f->dsp, avctx);
ff_dsputil_init(&f->dsp, avctx);
f->avctx = avctx;
}

View File

@ -804,7 +804,7 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
ff_aac_sbr_init();
dsputil_init(&ac->dsp, avctx);
ff_dsputil_init(&ac->dsp, avctx);
ff_fmt_convert_init(&ac->fmt_conv, avctx);
ac->random_state = 0x1f2e3d4c;

View File

@ -669,7 +669,7 @@ static av_cold int dsp_init(AVCodecContext *avctx, AACEncContext *s)
{
int ret = 0;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
// window init
ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024);

View File

@ -167,7 +167,7 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx)
ff_mdct_init(&s->imdct_256, 8, 1, 1.0);
ff_mdct_init(&s->imdct_512, 9, 1, 1.0);
ff_kbd_window_init(s->window, 5.0, 256);
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
ff_ac3dsp_init(&s->ac3dsp, avctx->flags & CODEC_FLAG_BITEXACT);
ff_fmt_convert_init(&s->fmt_conv, avctx);
av_lfg_init(&s->dith_state, 0);

View File

@ -2468,7 +2468,7 @@ av_cold int ff_ac3_encode_init(AVCodecContext *avctx)
avctx->coded_frame= avcodec_alloc_frame();
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
ff_ac3dsp_init(&s->ac3dsp, avctx->flags & CODEC_FLAG_BITEXACT);
dprint_options(s);

View File

@ -268,7 +268,7 @@ static void put_pixels16_axp_asm(uint8_t *block, const uint8_t *pixels,
put_pixels_axp_asm(block + 8, pixels + 8, line_size, h);
}
void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx)
void ff_dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;

View File

@ -1724,7 +1724,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
}
}
dsputil_init(&ctx->dsp, avctx);
ff_dsputil_init(&ctx->dsp, avctx);
avcodec_get_frame_defaults(&ctx->frame);
avctx->coded_frame = &ctx->frame;

View File

@ -231,7 +231,7 @@ static av_cold int ape_decode_init(AVCodecContext *avctx)
filter_alloc_fail);
}
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
avcodec_get_frame_defaults(&s->frame);

View File

@ -73,7 +73,7 @@ static void simple_idct_arm_add(uint8_t *dest, int line_size, DCTELEM *block)
ff_add_pixels_clamped(block, dest, line_size);
}
void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
void ff_dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;

View File

@ -519,7 +519,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
static av_cold void common_init(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data;
dsputil_init(&a->dsp, avctx);
ff_dsputil_init(&a->dsp, avctx);
a->mb_width = (avctx->width + 15) / 16;
a->mb_height = (avctx->height + 15) / 16;

View File

@ -380,7 +380,7 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx)
ff_atrac_generate_tables();
dsputil_init(&q->dsp, avctx);
ff_dsputil_init(&q->dsp, avctx);
ff_fmt_convert_init(&q->fmt_conv, avctx);
q->bands[0] = q->low;

View File

@ -1037,7 +1037,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
q->matrix_coeff_index_next[i] = 3;
}
dsputil_init(&dsp, avctx);
ff_dsputil_init(&dsp, avctx);
ff_fmt_convert_init(&q->fmt_conv, avctx);
q->pUnits = av_mallocz(sizeof(channel_unit)*q->channels);

View File

@ -195,7 +195,7 @@ static int bfin_pix_abs8_xy2 (void *c, uint8_t *blk1, uint8_t *blk2, int line_si
*/
void dsputil_init_bfin( DSPContext* c, AVCodecContext *avctx )
void ff_dsputil_init_bfin( DSPContext* c, AVCodecContext *avctx )
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;

View File

@ -1298,7 +1298,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
avctx->pix_fmt = c->has_alpha ? PIX_FMT_YUVA420P : PIX_FMT_YUV420P;
avctx->idct_algo = FF_IDCT_BINK;
dsputil_init(&c->dsp, avctx);
ff_dsputil_init(&c->dsp, avctx);
ff_binkdsp_init(&c->bdsp);
init_bundles(c);

View File

@ -79,7 +79,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
int i;
int frame_len_bits;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
ff_fmt_convert_init(&s->fmt_conv, avctx);
/* determine frame length */

View File

@ -1933,7 +1933,7 @@ static av_cold int dca_decode_init(AVCodecContext *avctx)
s->avctx = avctx;
dca_init_vlcs();
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
ff_mdct_init(&s->imdct, 6, 1, 1.0);
ff_synth_filter_init(&s->synth);
ff_dcadsp_init(&s->dcadsp);

View File

@ -127,7 +127,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si
ctx->avctx->pix_fmt = PIX_FMT_YUV422P10;
ctx->avctx->bits_per_raw_sample = 10;
if (ctx->bit_depth != 10) {
dsputil_init(&ctx->dsp, ctx->avctx);
ff_dsputil_init(&ctx->dsp, ctx->avctx);
ctx->bit_depth = 10;
ctx->decode_dct_block = dnxhd_decode_dct_block_10;
}
@ -135,7 +135,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si
ctx->avctx->pix_fmt = PIX_FMT_YUV422P;
ctx->avctx->bits_per_raw_sample = 8;
if (ctx->bit_depth != 8) {
dsputil_init(&ctx->dsp, ctx->avctx);
ff_dsputil_init(&ctx->dsp, ctx->avctx);
ctx->bit_depth = 8;
ctx->decode_dct_block = dnxhd_decode_dct_block_8;
}

View File

@ -261,7 +261,7 @@ static int dnxhd_encode_init(AVCodecContext *avctx)
avctx->bits_per_raw_sample = ctx->cid_table->bit_depth;
dsputil_init(&ctx->m.dsp, avctx);
ff_dsputil_init(&ctx->m.dsp, avctx);
ff_dct_common_init(&ctx->m);
if (!ctx->m.dct_quantize)
ctx->m.dct_quantize = ff_dct_quantize_c;

View File

@ -2747,7 +2747,7 @@ static void ff_jref_idct1_add(uint8_t *dest, int line_size, DCTELEM *block)
static void just_return(void *mem av_unused, int stride av_unused, int h av_unused) { return; }
/* init static data */
av_cold void dsputil_static_init(void)
av_cold void ff_dsputil_static_init(void)
{
int i;
@ -2784,7 +2784,7 @@ int ff_check_alignment(void){
return 0;
}
av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx)
av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx)
{
int i;
@ -3136,14 +3136,14 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx)
}
if (HAVE_MMX) dsputil_init_mmx (c, avctx);
if (ARCH_ARM) dsputil_init_arm (c, avctx);
if (HAVE_VIS) dsputil_init_vis (c, avctx);
if (ARCH_ALPHA) dsputil_init_alpha (c, avctx);
if (ARCH_PPC) dsputil_init_ppc (c, avctx);
if (HAVE_MMI) dsputil_init_mmi (c, avctx);
if (ARCH_SH4) dsputil_init_sh4 (c, avctx);
if (ARCH_BFIN) dsputil_init_bfin (c, avctx);
if (HAVE_MMX) ff_dsputil_init_mmx (c, avctx);
if (ARCH_ARM) ff_dsputil_init_arm (c, avctx);
if (HAVE_VIS) ff_dsputil_init_vis (c, avctx);
if (ARCH_ALPHA) ff_dsputil_init_alpha (c, avctx);
if (ARCH_PPC) ff_dsputil_init_ppc (c, avctx);
if (HAVE_MMI) ff_dsputil_init_mmi (c, avctx);
if (ARCH_SH4) ff_dsputil_init_sh4 (c, avctx);
if (ARCH_BFIN) ff_dsputil_init_bfin (c, avctx);
for(i=0; i<64; i++){
if(!c->put_2tap_qpel_pixels_tab[0][i])

View File

@ -580,8 +580,8 @@ typedef struct DSPContext {
op_fill_func fill_block_tab[2];
} DSPContext;
void dsputil_static_init(void);
void dsputil_init(DSPContext* p, AVCodecContext *avctx);
void ff_dsputil_static_init(void);
void ff_dsputil_init(DSPContext* p, AVCodecContext *avctx);
int ff_check_alignment(void);
@ -640,14 +640,14 @@ static inline int get_penalty_factor(int lambda, int lambda2, int type){
}
}
void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx);
void dsputil_init_arm(DSPContext* c, AVCodecContext *avctx);
void dsputil_init_bfin(DSPContext* c, AVCodecContext *avctx);
void dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx);
void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx);
void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx);
void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx);
void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx);
void ff_dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx);
void ff_dsputil_init_arm(DSPContext* c, AVCodecContext *avctx);
void ff_dsputil_init_bfin(DSPContext* c, AVCodecContext *avctx);
void ff_dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx);
void ff_dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx);
void ff_dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx);
void ff_dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx);
void ff_dsputil_init_vis(DSPContext* c, AVCodecContext *avctx);
void ff_dsputil_init_dwt(DSPContext *c);
void ff_intrax8dsp_init(DSPContext* c, AVCodecContext *avctx);

View File

@ -319,7 +319,7 @@ static av_cold int dvvideo_init(AVCodecContext *avctx)
}
/* Generic DSP setup */
dsputil_init(&dsp, avctx);
ff_dsputil_init(&dsp, avctx);
ff_set_cmp(&dsp, dsp.ildct_cmp, avctx->ildct_cmp);
s->get_pixels = dsp.get_pixels;
s->ildct_cmp = dsp.ildct_cmp[5];

View File

@ -65,7 +65,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
avctx->pix_fmt = PIX_FMT_YUV420P;
if (avctx->idct_algo == FF_IDCT_AUTO)
avctx->idct_algo = FF_IDCT_EA;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct);
ff_mpeg12_init_vlcs();
return 0;

View File

@ -50,7 +50,7 @@ static av_cold int tgq_decode_init(AVCodecContext *avctx){
s->avctx = avctx;
if(avctx->idct_algo==FF_IDCT_AUTO)
avctx->idct_algo=FF_IDCT_EA;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct);
avctx->time_base = (AVRational){1, 15};
avctx->pix_fmt = PIX_FMT_YUV420P;

View File

@ -48,7 +48,7 @@ static av_cold int tqi_decode_init(AVCodecContext *avctx)
s->avctx = avctx;
if(avctx->idct_algo==FF_IDCT_AUTO)
avctx->idct_algo=FF_IDCT_EA;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct);
s->qscale = 1;
avctx->time_base = (AVRational){1, 15};

View File

@ -659,7 +659,7 @@ static av_cold int common_init(AVCodecContext *avctx){
s->avctx= avctx;
s->flags= avctx->flags;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
s->width = avctx->width;
s->height= avctx->height;

View File

@ -66,7 +66,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
s->avctx = avctx;
s->tmpbuf = NULL;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
return 0;
}

View File

@ -557,7 +557,7 @@ retry:
if (s->codec_id == CODEC_ID_MPEG4 && s->xvid_build>=0 && avctx->idct_algo == FF_IDCT_AUTO && (av_get_cpu_flags() & AV_CPU_FLAG_MMX)) {
avctx->idct_algo= FF_IDCT_XVIDMMX;
avctx->coded_width= 0; // force reinit
// dsputil_init(&s->dsp, avctx);
// ff_dsputil_init(&s->dsp, avctx);
s->picture_number=0;
}
#endif

View File

@ -1037,7 +1037,7 @@ static av_cold void common_init(H264Context *h){
h->dequant_coeff_pps= -1;
s->unrestricted_mv=1;
dsputil_init(&s->dsp, s->avctx); // needed so that idct permutation is known early
ff_dsputil_init(&s->dsp, s->avctx); // needed so that idct permutation is known early
memset(h->pps.scaling_matrix4, 16, 6*16*sizeof(uint8_t));
memset(h->pps.scaling_matrix8, 16, 2*64*sizeof(uint8_t));
@ -3941,7 +3941,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma, h->sps.chroma_format_idc);
ff_h264_pred_init(&h->hpc, s->codec_id, h->sps.bit_depth_luma, h->sps.chroma_format_idc);
s->dsp.dct_bits = h->sps.bit_depth_luma > 8 ? 32 : 16;
dsputil_init(&s->dsp, s->avctx);
ff_dsputil_init(&s->dsp, s->avctx);
} else {
av_log(avctx, AV_LOG_ERROR, "Unsupported bit depth: %d\n", h->sps.bit_depth_luma);
return -1;

View File

@ -415,7 +415,7 @@ static av_cold int common_init(AVCodecContext *avctx){
s->avctx= avctx;
s->flags= avctx->flags;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
s->width= avctx->width;
s->height= avctx->height;

View File

@ -166,7 +166,7 @@ static av_cold int imc_decode_init(AVCodecContext * avctx)
av_log(avctx, AV_LOG_INFO, "FFT init failed\n");
return ret;
}
dsputil_init(&q->dsp, avctx);
ff_dsputil_init(&q->dsp, avctx);
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
avctx->channel_layout = AV_CH_LAYOUT_MONO;

View File

@ -990,7 +990,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
build_requant_tab();
dsputil_init(&ctx->dsp, avctx);
ff_dsputil_init(&ctx->dsp, avctx);
allocate_frame_buffers(ctx, avctx);

View File

@ -1017,7 +1017,7 @@ static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
s->is_16bpp = avctx->bits_per_coded_sample == 16;
avctx->pix_fmt = s->is_16bpp ? PIX_FMT_RGB555 : PIX_FMT_PAL8;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
s->current_frame.data[0] = s->last_frame.data[0] =
s->second_last_frame.data[0] = NULL;

View File

@ -41,7 +41,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
{
JvContext *s = avctx->priv_data;
avctx->pix_fmt = PIX_FMT_PAL8;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
return 0;
}

View File

@ -571,7 +571,7 @@ static av_cold int lag_decode_init(AVCodecContext *avctx)
LagarithContext *l = avctx->priv_data;
l->avctx = avctx;
dsputil_init(&l->dsp, avctx);
ff_dsputil_init(&l->dsp, avctx);
return 0;
}

View File

@ -214,7 +214,7 @@ static int decode_frame(AVCodecContext *avctx,
static av_cold void mdec_common_init(AVCodecContext *avctx){
MDECContext * const a = avctx->priv_data;
dsputil_init(&a->dsp, avctx);
ff_dsputil_init(&a->dsp, avctx);
a->mb_width = (avctx->coded_width + 15) / 16;
a->mb_height = (avctx->coded_height + 15) / 16;

View File

@ -121,7 +121,7 @@ static av_cold int mimic_decode_init(AVCodecContext *avctx)
av_log(avctx, AV_LOG_ERROR, "error initializing vlc table\n");
return -1;
}
dsputil_init(&ctx->dsp, avctx);
ff_dsputil_init(&ctx->dsp, avctx);
ff_init_scantable(ctx->dsp.idct_permutation, &ctx->scantable, col_zag);
return 0;

View File

@ -135,7 +135,7 @@ static void put_pixels16_mmi(uint8_t *block, const uint8_t *pixels, int line_siz
}
void dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx)
void ff_dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx)
{
const int idct_algo= avctx->idct_algo;
const int high_bit_depth = avctx->bits_per_raw_sample > 8;

View File

@ -90,7 +90,7 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
s->picture_ptr = &s->picture;
s->avctx = avctx;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct);
s->buffer_size = 0;
s->buffer = NULL;

View File

@ -238,7 +238,7 @@ static av_cold int mlp_decode_init(AVCodecContext *avctx)
m->avctx = avctx;
for (substr = 0; substr < MAX_SUBSTREAMS; substr++)
m->substream[substr].lossless_check_data = 0xffffffff;
dsputil_init(&m->dsp, avctx);
ff_dsputil_init(&m->dsp, avctx);
avcodec_get_frame_defaults(&m->frame);
avctx->coded_frame = &m->frame;

View File

@ -144,11 +144,11 @@ int main(int argc, char **argv)
ctx = avcodec_alloc_context3(NULL);
ctx->dsp_mask = AV_CPU_FLAG_FORCE;
dsputil_init(&cctx, ctx);
ff_dsputil_init(&cctx, ctx);
for (c = 0; c < flags_size; c++) {
int x;
ctx->dsp_mask = AV_CPU_FLAG_FORCE | flags[c];
dsputil_init(&mmxctx, ctx);
ff_dsputil_init(&mmxctx, ctx);
for (x = 0; x < 2; x++) {
printf("%s for %dx%d pixels\n", c ? "mmx2" : "mmx",

View File

@ -57,7 +57,7 @@ static av_cold int mp_decode_init(AVCodecContext *avctx)
motionpixels_tableinit();
mp->avctx = avctx;
dsputil_init(&mp->dsp, avctx);
ff_dsputil_init(&mp->dsp, avctx);
mp->changes_map = av_mallocz(avctx->width * h4);
mp->offset_bits_len = av_log2(avctx->width * avctx->height) + 1;
mp->vpt = av_mallocz(avctx->height * sizeof(YuvPixel));

View File

@ -74,7 +74,7 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx)
}
memset(c->oldDSCF, 0, sizeof(c->oldDSCF));
av_lfg_init(&c->rnd, 0xDEADBEEF);
dsputil_init(&c->dsp, avctx);
ff_dsputil_init(&c->dsp, avctx);
ff_mpadsp_init(&c->mpadsp);
c->dsp.bswap_buf((uint32_t*)buf, (const uint32_t*)avctx->extradata, 4);
ff_mpc_init();

View File

@ -118,7 +118,7 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx)
}
memset(c->oldDSCF, 0, sizeof(c->oldDSCF));
av_lfg_init(&c->rnd, 0xDEADBEEF);
dsputil_init(&c->dsp, avctx);
ff_dsputil_init(&c->dsp, avctx);
ff_mpadsp_init(&c->mpadsp);
ff_mpc_init();

View File

@ -176,7 +176,7 @@ const uint8_t *avpriv_mpv_find_start_code(const uint8_t *restrict p,
/* init common dct for both encoder and decoder */
av_cold int ff_dct_common_init(MpegEncContext *s)
{
dsputil_init(&s->dsp, s->avctx);
ff_dsputil_init(&s->dsp, s->avctx);
s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_c;
s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_c;

View File

@ -122,7 +122,7 @@ static av_cold int decode_init(AVCodecContext * avctx) {
av_lfg_init(&s->random_state, 0);
ff_mdct_init(&s->imdct_ctx, 8, 1, 1.0);
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
if (avctx->request_sample_fmt == AV_SAMPLE_FMT_FLT) {
s->scale_bias = 1.0/(32768*8);

View File

@ -148,7 +148,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
avctx->frame_size = NELLY_SAMPLES;
s->avctx = avctx;
ff_mdct_init(&s->mdct_ctx, 8, 0, 32768.0);
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
/* Generate overlap window */
ff_sine_window_init(ff_sine_128, 128);

View File

@ -258,7 +258,7 @@ static av_cold int decode_init(AVCodecContext *avctx) {
c->codec_frameheader = avctx->codec_tag == MKTAG('R', 'J', 'P', 'G');
if (avctx->extradata_size)
get_quant(avctx, c, avctx->extradata, avctx->extradata_size);
dsputil_init(&c->dsp, avctx);
ff_dsputil_init(&c->dsp, avctx);
if (!codec_reinit(avctx, avctx->width, avctx->height, -1))
return 1;
return 0;

View File

@ -427,7 +427,7 @@ static av_cold int png_enc_init(AVCodecContext *avctx){
avcodec_get_frame_defaults(&s->picture);
avctx->coded_frame= &s->picture;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
s->filter_type = av_clip(avctx->prediction_method, PNG_FILTER_VALUE_NONE, PNG_FILTER_VALUE_MIXED);
if(avctx->pix_fmt == PIX_FMT_MONOBLACK)

View File

@ -1371,7 +1371,7 @@ static void avg_pixels8_xy2_altivec(uint8_t *block, const uint8_t *pixels, int l
}
}
void dsputil_init_altivec(DSPContext* c, AVCodecContext *avctx)
void ff_dsputil_init_altivec(DSPContext* c, AVCodecContext *avctx)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;

View File

@ -40,9 +40,9 @@ void ff_vp3_idct_altivec(DCTELEM *block);
void ff_vp3_idct_put_altivec(uint8_t *dest, int line_size, DCTELEM *block);
void ff_vp3_idct_add_altivec(uint8_t *dest, int line_size, DCTELEM *block);
void dsputil_h264_init_ppc(DSPContext* c, AVCodecContext *avctx);
void ff_dsputil_h264_init_ppc(DSPContext* c, AVCodecContext *avctx);
void dsputil_init_altivec(DSPContext* c, AVCodecContext *avctx);
void ff_dsputil_init_altivec(DSPContext* c, AVCodecContext *avctx);
void float_init_altivec(DSPContext* c, AVCodecContext *avctx);
void int_init_altivec(DSPContext* c, AVCodecContext *avctx);

View File

@ -143,7 +143,7 @@ static void prefetch_ppc(void *mem, int stride, int h)
} while(--h);
}
void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
void ff_dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
@ -163,10 +163,10 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
}
#if HAVE_ALTIVEC
if(CONFIG_H264_DECODER) dsputil_h264_init_ppc(c, avctx);
if(CONFIG_H264_DECODER) ff_dsputil_h264_init_ppc(c, avctx);
if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) {
dsputil_init_altivec(c, avctx);
ff_dsputil_init_altivec(c, avctx);
float_init_altivec(c, avctx);
int_init_altivec(c, avctx);
c->gmc1 = gmc1_altivec;

View File

@ -966,7 +966,7 @@ static void ff_biweight_h264_pixels ## W ## _altivec(uint8_t *dst, uint8_t *src,
H264_WEIGHT(16)
H264_WEIGHT( 8)
void dsputil_h264_init_ppc(DSPContext* c, AVCodecContext *avctx) {
void ff_dsputil_h264_init_ppc(DSPContext* c, AVCodecContext *avctx) {
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) {

View File

@ -62,7 +62,7 @@ static av_cold int ra288_decode_init(AVCodecContext *avctx)
{
RA288Context *ractx = avctx->priv_data;
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
dsputil_init(&ractx->dsp, avctx);
ff_dsputil_init(&ractx->dsp, avctx);
avcodec_get_frame_defaults(&ractx->frame);
avctx->coded_frame = &ractx->frame;

View File

@ -331,7 +331,7 @@ DEFFUNC(avg,no_rnd,xy,16,OP_XY,PACK)
#endif
void dsputil_init_align(DSPContext* c, AVCodecContext *avctx)
void ff_dsputil_init_align(DSPContext* c, AVCodecContext *avctx)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;

View File

@ -89,11 +89,11 @@ static void idct_add(uint8_t *dest, int line_size, DCTELEM *block)
}
}
void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx)
void ff_dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx)
{
const int idct_algo= avctx->idct_algo;
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
dsputil_init_align(c,avctx);
ff_dsputil_init_align(c,avctx);
if (!high_bit_depth)
c->clear_blocks = clear_blocks_sh4;

View File

@ -23,6 +23,6 @@
#include "libavcodec/dsputil.h"
void idct_sh4(DCTELEM *block);
void dsputil_init_align(DSPContext* c, AVCodecContext *avctx);
void ff_dsputil_init_align(DSPContext* c, AVCodecContext *avctx);
#endif /* AVCODEC_SH4_DSPUTIL_SH4_H */

View File

@ -390,7 +390,7 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){
s->avctx= avctx;
s->max_ref_frames=1; //just make sure its not an invalid value in case of no initial keyframe
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
ff_dwt_init(&s->dwt);
#define mcf(dx,dy)\

View File

@ -3949,7 +3949,7 @@ static int vis_level(void)
}
/* libavcodec initialization code */
void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx)
void ff_dsputil_init_vis(DSPContext* c, AVCodecContext *avctx)
{
/* VIS-specific optimizations */
int accel = vis_level ();

View File

@ -472,7 +472,7 @@ static av_cold int svq1_encode_init(AVCodecContext *avctx)
{
SVQ1Context * const s = avctx->priv_data;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
avctx->coded_frame= (AVFrame*)&s->picture;
s->frame_width = avctx->width;

View File

@ -824,7 +824,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
l->pic.data[0]=NULL;
avctx->pix_fmt = PIX_FMT_BGR24;
dsputil_init(&l->dsp, avctx);
ff_dsputil_init(&l->dsp, avctx);
l->last = av_malloc(4 * sizeof(int) * (avctx->width >> 2));
l->clast = av_malloc(4 * sizeof(int) * (avctx->width >> 2));

View File

@ -68,7 +68,7 @@ static av_cold int truespeech_decode_init(AVCodecContext * avctx)
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
dsputil_init(&c->dsp, avctx);
ff_dsputil_init(&c->dsp, avctx);
avcodec_get_frame_defaults(&c->frame);
avctx->coded_frame = &c->frame;

View File

@ -1153,7 +1153,7 @@ static av_cold int twin_decode_init(AVCodecContext *avctx)
return -1;
}
dsputil_init(&tctx->dsp, avctx);
ff_dsputil_init(&tctx->dsp, avctx);
if ((ret = init_mdct_win(tctx))) {
av_log(avctx, AV_LOG_ERROR, "Error initializing MDCT\n");
twin_decode_close(avctx);

View File

@ -109,7 +109,7 @@ static void avcodec_init(void)
return;
initialized = 1;
dsputil_static_init();
ff_dsputil_static_init();
}
static av_always_inline int codec_is_encoder(AVCodec *codec)

View File

@ -505,7 +505,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
c->avctx = avctx;
dsputil_init(&c->dsp, avctx);
ff_dsputil_init(&c->dsp, avctx);
if (avctx->extradata_size < 16) {
av_log(avctx, AV_LOG_ERROR, "Insufficient extradata size %d, should be at least 16\n",

View File

@ -191,7 +191,7 @@ static av_cold int vble_decode_init(AVCodecContext *avctx)
/* Stash for later use */
ctx->avctx = avctx;
dsputil_init(&ctx->dsp, avctx);
ff_dsputil_init(&ctx->dsp, avctx);
avctx->pix_fmt = PIX_FMT_YUV420P;
avctx->bits_per_raw_sample = 8;

View File

@ -978,7 +978,7 @@ static av_cold int vorbis_decode_init(AVCodecContext *avccontext)
int hdr_type, ret;
vc->avccontext = avccontext;
dsputil_init(&vc->dsp, avccontext);
ff_dsputil_init(&vc->dsp, avccontext);
ff_fmt_convert_init(&vc->fmt_conv, avccontext);
if (avccontext->request_sample_fmt == AV_SAMPLE_FMT_FLT) {

View File

@ -1677,7 +1677,7 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx)
avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
if(avctx->idct_algo==FF_IDCT_AUTO)
avctx->idct_algo=FF_IDCT_VP3;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct);

View File

@ -668,7 +668,7 @@ av_cold void ff_vp56_init(AVCodecContext *avctx, int flip, int has_alpha)
if (avctx->idct_algo == FF_IDCT_AUTO)
avctx->idct_algo = FF_IDCT_VP3;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
ff_vp56dsp_init(&s->vp56dsp, avctx->codec->id);
ff_init_scantable(s->dsp.idct_permutation, &s->scantable,ff_zigzag_direct);

View File

@ -1787,7 +1787,7 @@ static av_cold int vp8_decode_init(AVCodecContext *avctx)
s->avctx = avctx;
avctx->pix_fmt = PIX_FMT_YUV420P;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
ff_h264_pred_init(&s->hpc, CODEC_ID_VP8, 8, 1);
ff_vp8dsp_init(&s->vp8dsp);

View File

@ -126,7 +126,7 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
s->bit_rate = avctx->bit_rate;
s->block_align = avctx->block_align;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
ff_fmt_convert_init(&s->fmt_conv, avctx);
if (avctx->codec->id == CODEC_ID_WMAV1) {

View File

@ -281,7 +281,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
int num_possible_block_sizes;
s->avctx = avctx;
dsputil_init(&s->dsp, avctx);
ff_dsputil_init(&s->dsp, avctx);
ff_fmt_convert_init(&s->fmt_conv, avctx);
init_put_bits(&s->pb, s->frame_data, MAX_FRAMESIZE);

View File

@ -2336,7 +2336,7 @@ extern void ff_butterflies_float_interleave_sse(float *dst, const float *src0,
extern void ff_butterflies_float_interleave_avx(float *dst, const float *src0,
const float *src1, int len);
void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
void ff_dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
{
int mm_flags = av_get_cpu_flags();
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
@ -2844,5 +2844,5 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
}
if (CONFIG_ENCODERS)
dsputilenc_init_mmx(c, avctx);
ff_dsputilenc_init_mmx(c, avctx);
}

View File

@ -184,8 +184,8 @@ static inline void transpose4x4(uint8_t *dst, uint8_t *src, x86_reg dst_stride,
"pcmpeqd %%" #regd ", %%" #regd " \n\t" \
"psrlw $15, %%" #regd ::)
void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx);
void dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx);
void ff_dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx);
void ff_dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx);
void ff_add_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size);
void ff_put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size);

View File

@ -1095,7 +1095,7 @@ static int ssd_int8_vs_int16_mmx(const int8_t *pix1, const int16_t *pix2, int si
#endif //HAVE_SSSE3
void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx)
void ff_dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx)
{
int mm_flags = av_get_cpu_flags();
int bit_depth = avctx->bits_per_raw_sample;
@ -1192,5 +1192,5 @@ void dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx)
}
}
dsputil_init_pix_mmx(c, avctx);
ff_dsputil_init_pix_mmx(c, avctx);
}

View File

@ -422,7 +422,7 @@ static int sad16_xy2_ ## suf(void *v, uint8_t *blk2, uint8_t *blk1, int stride,
PIX_SAD(mmx)
PIX_SAD(mmx2)
void dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx)
void ff_dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx)
{
int mm_flags = av_get_cpu_flags();