Ejemplo n.º 1
0
av_cold void ff_fmt_convert_init_arm(FmtConvertContext *c, AVCodecContext *avctx)
{
    int cpu_flags = av_get_cpu_flags();

    if (have_vfp(cpu_flags) && have_armv6(cpu_flags)) {
        if (!have_vfpv3(cpu_flags)) {
            // These functions don't use anything armv6 specific in themselves,
            // but ff_float_to_int16_vfp which is in the same assembly source
            // file does, thus the whole file requires armv6 to be built.
            c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_vfp;
            c->int32_to_float_fmul_array8 = ff_int32_to_float_fmul_array8_vfp;
        }

        c->float_to_int16 = ff_float_to_int16_vfp;
    }

    if (have_neon(cpu_flags)) {
        c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_neon;

        if (!(avctx->flags & CODEC_FLAG_BITEXACT)) {
            c->float_to_int16            = ff_float_to_int16_neon;
            c->float_to_int16_interleave = ff_float_to_int16_interleave_neon;
        }
    }
}
Ejemplo n.º 2
0
av_cold void ff_float_dsp_init_arm(AVFloatDSPContext *fdsp)
{
    int cpu_flags = av_get_cpu_flags();

    if (have_vfp(cpu_flags))
        ff_float_dsp_init_vfp(fdsp, cpu_flags);
    if (have_neon(cpu_flags))
        ff_float_dsp_init_neon(fdsp);
}
Ejemplo n.º 3
0
av_cold void ff_dcadsp_init_arm(DCADSPContext *s)
{
    int cpu_flags = av_get_cpu_flags();

    if (have_vfp(cpu_flags) && !have_vfpv3(cpu_flags)) {
        s->lfe_fir = ff_dca_lfe_fir_vfp;
        s->qmf_32_subbands = ff_dca_qmf_32_subbands_vfp;
    }
    if (have_neon(cpu_flags))
        s->lfe_fir = ff_dca_lfe_fir_neon;
}
Ejemplo n.º 4
0
av_cold void ff_fmt_convert_init_arm(FmtConvertContext *c, AVCodecContext *avctx)
{
    int cpu_flags = av_get_cpu_flags();

    if (have_vfp(cpu_flags)) {
        if (!have_vfpv3(cpu_flags)) {
            c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_vfp;
            c->int32_to_float_fmul_array8 = ff_int32_to_float_fmul_array8_vfp;
        }
    }

    if (have_neon(cpu_flags)) {
        c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_neon;
    }
}
Ejemplo n.º 5
0
av_cold void ff_fft_init_arm(FFTContext *s)
{
    int cpu_flags = av_get_cpu_flags();

    if (have_vfp(cpu_flags) && !have_vfpv3(cpu_flags)) {
        s->fft_calc     = ff_fft_calc_vfp;
#if CONFIG_MDCT
        s->imdct_half   = ff_imdct_half_vfp;
#endif
    }

    if (have_neon(cpu_flags)) {
#if CONFIG_FFT
        s->fft_permute  = ff_fft_permute_neon;
        s->fft_calc     = ff_fft_calc_neon;
#endif
#if CONFIG_MDCT
        s->imdct_calc   = ff_imdct_calc_neon;
        s->imdct_half   = ff_imdct_half_neon;
        s->mdct_calc    = ff_mdct_calc_neon;
        s->mdct_permutation = FF_MDCT_PERM_INTERLEAVE;
#endif
    }
}
Ejemplo n.º 6
0
av_cold void ff_fmt_convert_init_arm(FmtConvertContext *c, AVCodecContext *avctx)
{
    int cpu_flags = av_get_cpu_flags();

    if (have_vfp(cpu_flags)) {
        if (!have_vfpv3(cpu_flags)) {
            c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_vfp;
            c->int32_to_float_fmul_array8 = ff_int32_to_float_fmul_array8_vfp;
        }

        if (have_armv6(cpu_flags)) {
            c->float_to_int16 = ff_float_to_int16_vfp;
        }
    }

    if (have_neon(cpu_flags)) {
        c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_neon;

        if (!(avctx->flags & CODEC_FLAG_BITEXACT)) {
            c->float_to_int16            = ff_float_to_int16_neon;
            c->float_to_int16_interleave = ff_float_to_int16_interleave_neon;
        }
    }
}