* qatar/master: ARM: allow runtime masking of CPU features dsputil: remove unused functions mov: Treat keyframe indexes as 1-origin if starting at non-zero. mov: Take stps entries into consideration also about key_off. Remove lowres video decoding Conflicts: ffmpeg.c ffplay.c libavcodec/arm/vp8dsp_init_arm.c libavcodec/libopenjpegdec.c libavcodec/mjpegdec.c libavcodec/mpegvideo.c libavcodec/utils.c libavformat/mov.c
Showing the changes to libavcodec/arm (17 of 52 files). Show all
Unified · Split
| @@ -19,6 +19,8 @@ · 18 unmodified lines | |||
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #include <stdint.h> | 21 | #include <stdint.h> |
| 22 | |||
| 23 | #include "libavutil/arm/cpu.h" | ||
| 22 | #include "libavutil/attributes.h" | 24 | #include "libavutil/attributes.h" |
| 23 | #include "libavcodec/ac3dsp.h" | 25 | #include "libavcodec/ac3dsp.h" |
| 24 | #include "config.h" | 26 | #include "config.h" |
| @@ -47,13 +49,15 @@ void ff_ac3_update_bap_counts_arm(uint16_t mant_cnt[16], uint8_t *bap, int len); · 22 unmodified lines | |||
| 47 | 49 | ||
| 48 | av_cold void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact) | 50 | av_cold void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact) |
| 49 | { | 51 | { |
| 52 | int cpu_flags = av_get_cpu_flags(); | ||
| 53 | |||
| 50 | c->update_bap_counts = ff_ac3_update_bap_counts_arm; | 54 | c->update_bap_counts = ff_ac3_update_bap_counts_arm; |
| 51 | 55 | ||
| 52 | if (HAVE_ARMV6) { | 56 | if (have_armv6(cpu_flags)) { |
| 53 | c->bit_alloc_calc_bap = ff_ac3_bit_alloc_calc_bap_armv6; | 57 | c->bit_alloc_calc_bap = ff_ac3_bit_alloc_calc_bap_armv6; |
| 54 | } | 58 | } |
| 55 | 59 | ||
| 56 | if (HAVE_NEON) { | 60 | if (have_neon(cpu_flags)) { |
| 57 | c->ac3_exponent_min = ff_ac3_exponent_min_neon; | 61 | c->ac3_exponent_min = ff_ac3_exponent_min_neon; |
| 58 | c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_neon; | 62 | c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_neon; |
| 59 | c->ac3_lshift_int16 = ff_ac3_lshift_int16_neon; | 63 | c->ac3_lshift_int16 = ff_ac3_lshift_int16_neon; |
| @@ -19,6 +19,8 @@ · 18 unmodified lines | |||
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #include "config.h" | 21 | #include "config.h" |
| 22 | |||
| 23 | #include "libavutil/arm/cpu.h" | ||
| 22 | #include "libavutil/attributes.h" | 24 | #include "libavutil/attributes.h" |
| 23 | #include "libavcodec/dcadsp.h" | 25 | #include "libavcodec/dcadsp.h" |
| 24 | 26 | ||
| @@ -27,6 +29,8 @@ void ff_dca_lfe_fir_neon(float *out, const float *in, const float *coefs, · 2 unmodified lines | |||
| 27 | 29 | ||
| 28 | av_cold void ff_dcadsp_init_arm(DCADSPContext *s) | 30 | av_cold void ff_dcadsp_init_arm(DCADSPContext *s) |
| 29 | { | 31 | { |
| 30 | if (HAVE_NEON) | 32 | int cpu_flags = av_get_cpu_flags(); |
| 33 | |||
| 34 | if (have_neon(cpu_flags)) | ||
| 31 | s->lfe_fir = ff_dca_lfe_fir_neon; | 35 | s->lfe_fir = ff_dca_lfe_fir_neon; |
| 32 | } | 36 | } |
| @@ -19,6 +19,7 @@ · 18 unmodified lines | |||
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | #include "libavutil/arm/cpu.h" | ||
| 22 | #include "libavcodec/dsputil.h" | 23 | #include "libavcodec/dsputil.h" |
| 23 | #include "dsputil_arm.h" | 24 | #include "dsputil_arm.h" |
| 24 | 25 | ||
| @@ -76,11 +77,12 @@ static void simple_idct_arm_add(uint8_t *dest, int line_size, DCTELEM *block) · 51 unmodified lines | |||
| 76 | void ff_dsputil_init_arm(DSPContext* c, AVCodecContext *avctx) | 77 | void ff_dsputil_init_arm(DSPContext* c, AVCodecContext *avctx) |
| 77 | { | 78 | { |
| 78 | const int high_bit_depth = avctx->bits_per_raw_sample > 8; | 79 | const int high_bit_depth = avctx->bits_per_raw_sample > 8; |
| 80 | int cpu_flags = av_get_cpu_flags(); | ||
| 79 | 81 | ||
| 80 | ff_put_pixels_clamped = c->put_pixels_clamped; | 82 | ff_put_pixels_clamped = c->put_pixels_clamped; |
| 81 | ff_add_pixels_clamped = c->add_pixels_clamped; | 83 | ff_add_pixels_clamped = c->add_pixels_clamped; |
| 82 | 84 | ||
| 83 | if (!avctx->lowres && avctx->bits_per_raw_sample <= 8) { | 85 | if (avctx->bits_per_raw_sample <= 8) { |
| 84 | if(avctx->idct_algo == FF_IDCT_AUTO || | 86 | if(avctx->idct_algo == FF_IDCT_AUTO || |
| 85 | avctx->idct_algo == FF_IDCT_ARM){ | 87 | avctx->idct_algo == FF_IDCT_ARM){ |
| 86 | c->idct_put = j_rev_dct_arm_put; | 88 | c->idct_put = j_rev_dct_arm_put; |
| @@ -117,8 +119,8 @@ void ff_dsputil_init_arm(DSPContext* c, AVCodecContext *avctx) · 30 unmodified lines | |||
| 117 | c->put_no_rnd_pixels_tab[1][3] = ff_put_no_rnd_pixels8_xy2_arm; | 119 | c->put_no_rnd_pixels_tab[1][3] = ff_put_no_rnd_pixels8_xy2_arm; |
| 118 | } | 120 | } |
| 119 | 121 | ||
| 120 | if (HAVE_ARMV5TE) ff_dsputil_init_armv5te(c, avctx); | 122 | if (have_armv5te(cpu_flags)) ff_dsputil_init_armv5te(c, avctx); |
| 121 | if (HAVE_ARMV6) ff_dsputil_init_armv6(c, avctx); | 123 | if (have_armv6(cpu_flags)) ff_dsputil_init_armv6(c, avctx); |
| 122 | if (HAVE_ARMVFP) ff_dsputil_init_vfp(c, avctx); | 124 | if (have_vfp(cpu_flags)) ff_dsputil_init_vfp(c, avctx); |
| 123 | if (HAVE_NEON) ff_dsputil_init_neon(c, avctx); | 125 | if (have_neon(cpu_flags)) ff_dsputil_init_neon(c, avctx); |
| 124 | } | 126 | } |
| @@ -29,7 +29,7 @@ void ff_prefetch_arm(void *mem, int stride, int h); · 28 unmodified lines | |||
| 29 | 29 | ||
| 30 | av_cold void ff_dsputil_init_armv5te(DSPContext *c, AVCodecContext *avctx) | 30 | av_cold void ff_dsputil_init_armv5te(DSPContext *c, AVCodecContext *avctx) |
| 31 | { | 31 | { |
| 32 | if (!avctx->lowres && avctx->bits_per_raw_sample <= 8 && | 32 | if (avctx->bits_per_raw_sample <= 8 && |
| 33 | (avctx->idct_algo == FF_IDCT_AUTO || | 33 | (avctx->idct_algo == FF_IDCT_AUTO || |
| 34 | avctx->idct_algo == FF_IDCT_SIMPLEARMV5TE)) { | 34 | avctx->idct_algo == FF_IDCT_SIMPLEARMV5TE)) { |
| 35 | c->idct_put = ff_simple_idct_put_armv5te; | 35 | c->idct_put = ff_simple_idct_put_armv5te; |
| @@ -74,7 +74,7 @@ av_cold void ff_dsputil_init_armv6(DSPContext *c, AVCodecContext *avctx) · 73 unmodified lines | |||
| 74 | { | 74 | { |
| 75 | const int high_bit_depth = avctx->bits_per_raw_sample > 8; | 75 | const int high_bit_depth = avctx->bits_per_raw_sample > 8; |
| 76 | 76 | ||
| 77 | if (!avctx->lowres && avctx->bits_per_raw_sample <= 8 && | 77 | if (avctx->bits_per_raw_sample <= 8 && |
| 78 | (avctx->idct_algo == FF_IDCT_AUTO || | 78 | (avctx->idct_algo == FF_IDCT_AUTO || |
| 79 | avctx->idct_algo == FF_IDCT_SIMPLEARMV6)) { | 79 | avctx->idct_algo == FF_IDCT_SIMPLEARMV6)) { |
| 80 | c->idct_put = ff_simple_idct_put_armv6; | 80 | c->idct_put = ff_simple_idct_put_armv6; |
| @@ -182,7 +182,7 @@ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx) · 181 unmodified lines | |||
| 182 | { | 182 | { |
| 183 | const int high_bit_depth = avctx->bits_per_raw_sample > 8; | 183 | const int high_bit_depth = avctx->bits_per_raw_sample > 8; |
| 184 | 184 | ||
| 185 | if (!avctx->lowres && avctx->bits_per_raw_sample <= 8) { | 185 | if (avctx->bits_per_raw_sample <= 8) { |
| 186 | if (avctx->idct_algo == FF_IDCT_AUTO || | 186 | if (avctx->idct_algo == FF_IDCT_AUTO || |
| 187 | avctx->idct_algo == FF_IDCT_SIMPLENEON) { | 187 | avctx->idct_algo == FF_IDCT_SIMPLENEON) { |
| 188 | c->idct_put = ff_simple_idct_put_neon; | 188 | c->idct_put = ff_simple_idct_put_neon; |
| @@ -18,6 +18,7 @@ · 17 unmodified lines | |||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #include "libavutil/arm/cpu.h" | ||
| 21 | #include "libavcodec/dsputil.h" | 22 | #include "libavcodec/dsputil.h" |
| 22 | #include "dsputil_arm.h" | 23 | #include "dsputil_arm.h" |
| 23 | 24 | ||
| @@ -28,7 +29,9 @@ void ff_vector_fmul_reverse_vfp(float *dst, const float *src0, · 4 unmodified lines | |||
| 28 | 29 | ||
| 29 | void ff_dsputil_init_vfp(DSPContext* c, AVCodecContext *avctx) | 30 | void ff_dsputil_init_vfp(DSPContext* c, AVCodecContext *avctx) |
| 30 | { | 31 | { |
| 31 | if (!HAVE_VFPV3) | 32 | int cpu_flags = av_get_cpu_flags(); |
| 33 | |||
| 34 | if (!have_vfpv3(cpu_flags)) | ||
| 32 | c->vector_fmul = ff_vector_fmul_vfp; | 35 | c->vector_fmul = ff_vector_fmul_vfp; |
| 33 | c->vector_fmul_reverse = ff_vector_fmul_reverse_vfp; | 36 | c->vector_fmul_reverse = ff_vector_fmul_reverse_vfp; |
| 34 | } | 37 | } |
| @@ -18,6 +18,8 @@ · 17 unmodified lines | |||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #include "libavutil/arm/cpu.h" | ||
| 22 | |||
| 21 | #define CONFIG_FFT_FLOAT 0 | 23 | #define CONFIG_FFT_FLOAT 0 |
| 22 | #include "libavcodec/fft.h" | 24 | #include "libavcodec/fft.h" |
| 23 | 25 | ||
| @@ -27,7 +29,9 @@ void ff_mdct_fixed_calcw_neon(FFTContext *s, FFTDouble *o, const FFTSample *i); · 3 unmodified lines | |||
| 27 | 29 | ||
| 28 | av_cold void ff_fft_fixed_init_arm(FFTContext *s) | 30 | av_cold void ff_fft_fixed_init_arm(FFTContext *s) |
| 29 | { | 31 | { |
| 30 | if (HAVE_NEON) { | 32 | int cpu_flags = av_get_cpu_flags(); |
| 33 | |||
| 34 | if (have_neon(cpu_flags)) { | ||
| 31 | s->fft_permutation = FF_FFT_PERM_SWAP_LSBS; | 35 | s->fft_permutation = FF_FFT_PERM_SWAP_LSBS; |
| 32 | s->fft_calc = ff_fft_fixed_calc_neon; | 36 | s->fft_calc = ff_fft_fixed_calc_neon; |
| 33 | 37 | ||
| @@ -18,6 +18,7 @@ · 17 unmodified lines | |||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #include "libavutil/arm/cpu.h" | ||
| 21 | #include "libavcodec/fft.h" | 22 | #include "libavcodec/fft.h" |
| 22 | #include "libavcodec/rdft.h" | 23 | #include "libavcodec/rdft.h" |
| 23 | #include "libavcodec/synth_filter.h" | 24 | #include "libavcodec/synth_filter.h" |
| @@ -39,7 +40,9 @@ void ff_synth_filter_float_neon(FFTContext *imdct, · 15 unmodified lines | |||
| 39 | 40 | ||
| 40 | av_cold void ff_fft_init_arm(FFTContext *s) | 41 | av_cold void ff_fft_init_arm(FFTContext *s) |
| 41 | { | 42 | { |
| 42 | if (HAVE_NEON) { | 43 | int cpu_flags = av_get_cpu_flags(); |
| 44 | |||
| 45 | if (have_neon(cpu_flags)) { | ||
| 43 | s->fft_permute = ff_fft_permute_neon; | 46 | s->fft_permute = ff_fft_permute_neon; |
| 44 | s->fft_calc = ff_fft_calc_neon; | 47 | s->fft_calc = ff_fft_calc_neon; |
| 45 | #if CONFIG_MDCT | 48 | #if CONFIG_MDCT |
| @@ -54,7 +57,9 @@ av_cold void ff_fft_init_arm(FFTContext *s) · 8 unmodified lines | |||
| 54 | #if CONFIG_RDFT | 57 | #if CONFIG_RDFT |
| 55 | av_cold void ff_rdft_init_arm(RDFTContext *s) | 58 | av_cold void ff_rdft_init_arm(RDFTContext *s) |
| 56 | { | 59 | { |
| 57 | if (HAVE_NEON) | 60 | int cpu_flags = av_get_cpu_flags(); |
| 61 | |||
| 62 | if (have_neon(cpu_flags)) | ||
| 58 | s->rdft_calc = ff_rdft_calc_neon; | 63 | s->rdft_calc = ff_rdft_calc_neon; |
| 59 | } | 64 | } |
| 60 | #endif | 65 | #endif |
| @@ -62,7 +67,9 @@ av_cold void ff_rdft_init_arm(RDFTContext *s) · 1 unmodified line | |||
| 62 | #if CONFIG_DCA_DECODER | 67 | #if CONFIG_DCA_DECODER |
| 63 | av_cold void ff_synth_filter_init_arm(SynthFilterContext *s) | 68 | av_cold void ff_synth_filter_init_arm(SynthFilterContext *s) |
| 64 | { | 69 | { |
| 65 | if (HAVE_NEON) | 70 | int cpu_flags = av_get_cpu_flags(); |
| 71 | |||
| 72 | if (have_neon(cpu_flags)) | ||
| 66 | s->synth_filter_float = ff_synth_filter_float_neon; | 73 | s->synth_filter_float = ff_synth_filter_float_neon; |
| 67 | } | 74 | } |
| 68 | #endif | 75 | #endif |
| @@ -20,6 +20,7 @@ · 19 unmodified lines | |||
| 20 | 20 | ||
| 21 | #include <stdint.h> | 21 | #include <stdint.h> |
| 22 | 22 | ||
| 23 | #include "libavutil/arm/cpu.h" | ||
| 23 | #include "libavcodec/avcodec.h" | 24 | #include "libavcodec/avcodec.h" |
| 24 | #include "libavcodec/fmtconvert.h" | 25 | #include "libavcodec/fmtconvert.h" |
| 25 | 26 | ||
| @@ -33,11 +34,13 @@ void ff_float_to_int16_vfp(int16_t *dst, const float *src, long len); · 7 unmodified lines | |||
| 33 | 34 | ||
| 34 | void ff_fmt_convert_init_arm(FmtConvertContext *c, AVCodecContext *avctx) | 35 | void ff_fmt_convert_init_arm(FmtConvertContext *c, AVCodecContext *avctx) |
| 35 | { | 36 | { |
| 36 | if (HAVE_ARMVFP && HAVE_ARMV6) { | 37 | int cpu_flags = av_get_cpu_flags(); |
| 38 | |||
| 39 | if (have_vfp(cpu_flags) && have_armv6(cpu_flags)) { | ||
| 37 | c->float_to_int16 = ff_float_to_int16_vfp; | 40 | c->float_to_int16 = ff_float_to_int16_vfp; |
| 38 | } | 41 | } |
| 39 | 42 | ||
| 40 | if (HAVE_NEON) { | 43 | if (have_neon(cpu_flags)) { |
| 41 | c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_neon; | 44 | c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_neon; |
| 42 | 45 | ||
| 43 | if (!(avctx->flags & CODEC_FLAG_BITEXACT)) { | 46 | if (!(avctx->flags & CODEC_FLAG_BITEXACT)) { |
| @@ -20,6 +20,7 @@ · 19 unmodified lines | |||
| 20 | 20 | ||
| 21 | #include <stdint.h> | 21 | #include <stdint.h> |
| 22 | 22 | ||
| 23 | #include "libavutil/arm/cpu.h" | ||
| 23 | #include "libavcodec/dsputil.h" | 24 | #include "libavcodec/dsputil.h" |
| 24 | #include "libavcodec/h264dsp.h" | 25 | #include "libavcodec/h264dsp.h" |
| 25 | 26 | ||
| @@ -99,5 +100,8 @@ static void ff_h264dsp_init_neon(H264DSPContext *c, const int bit_depth, const i · 73 unmodified lines | |||
| 99 | 100 | ||
| 100 | void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) | 101 | void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) |
| 101 | { | 102 | { |
| 102 | if (HAVE_NEON) ff_h264dsp_init_neon(c, bit_depth, chroma_format_idc); | 103 | int cpu_flags = av_get_cpu_flags(); |
| 104 | |||
| 105 | if (have_neon(cpu_flags)) | ||
| 106 | ff_h264dsp_init_neon(c, bit_depth, chroma_format_idc); | ||
| 103 | } | 107 | } |
| @@ -20,6 +20,7 @@ · 19 unmodified lines | |||
| 20 | 20 | ||
| 21 | #include <stdint.h> | 21 | #include <stdint.h> |
| 22 | 22 | ||
| 23 | #include "libavutil/arm/cpu.h" | ||
| 23 | #include "libavcodec/h264pred.h" | 24 | #include "libavcodec/h264pred.h" |
| 24 | 25 | ||
| 25 | void ff_pred16x16_vert_neon(uint8_t *src, int stride); | 26 | void ff_pred16x16_vert_neon(uint8_t *src, int stride); |
| @@ -77,5 +78,8 @@ static void ff_h264_pred_init_neon(H264PredContext *h, int codec_id, const int b · 51 unmodified lines | |||
| 77 | 78 | ||
| 78 | void ff_h264_pred_init_arm(H264PredContext *h, int codec_id, int bit_depth, const int chroma_format_idc) | 79 | void ff_h264_pred_init_arm(H264PredContext *h, int codec_id, int bit_depth, const int chroma_format_idc) |
| 79 | { | 80 | { |
| 80 | if (HAVE_NEON) ff_h264_pred_init_neon(h, codec_id, bit_depth, chroma_format_idc); | 81 | int cpu_flags = av_get_cpu_flags(); |
| 82 | |||
| 83 | if (have_neon(cpu_flags)) | ||
| 84 | ff_h264_pred_init_neon(h, codec_id, bit_depth, chroma_format_idc); | ||
| 81 | } | 85 | } |
| @@ -19,6 +19,8 @@ · 18 unmodified lines | |||
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #include <stdint.h> | 21 | #include <stdint.h> |
| 22 | |||
| 23 | #include "libavutil/arm/cpu.h" | ||
| 22 | #include "libavcodec/mpegaudiodsp.h" | 24 | #include "libavcodec/mpegaudiodsp.h" |
| 23 | #include "config.h" | 25 | #include "config.h" |
| 24 | 26 | ||
| @@ -27,7 +29,9 @@ void ff_mpadsp_apply_window_fixed_armv6(int32_t *synth_buf, int32_t *window, · 2 unmodified lines | |||
| 27 | 29 | ||
| 28 | void ff_mpadsp_init_arm(MPADSPContext *s) | 30 | void ff_mpadsp_init_arm(MPADSPContext *s) |
| 29 | { | 31 | { |
| 30 | if (HAVE_ARMV6) { | 32 | int cpu_flags = av_get_cpu_flags(); |
| 33 | |||
| 34 | if (have_armv6(cpu_flags)) { | ||
| 31 | s->apply_window_fixed = ff_mpadsp_apply_window_fixed_armv6; | 35 | s->apply_window_fixed = ff_mpadsp_apply_window_fixed_armv6; |
| 32 | } | 36 | } |
| 33 | } | 37 | } |
| @@ -18,6 +18,7 @@ · 17 unmodified lines | |||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #include "libavutil/arm/cpu.h" | ||
| 21 | #include "libavcodec/avcodec.h" | 22 | #include "libavcodec/avcodec.h" |
| 22 | #include "libavcodec/dsputil.h" | 23 | #include "libavcodec/dsputil.h" |
| 23 | #include "libavcodec/mpegvideo.h" | 24 | #include "libavcodec/mpegvideo.h" |
| @@ -40,11 +41,12 @@ void ff_dct_unquantize_h263_intra_neon(MpegEncContext *s, DCTELEM *block, · 16 unmodified lines | |||
| 40 | 41 | ||
| 41 | void ff_MPV_common_init_arm(MpegEncContext *s) | 42 | void ff_MPV_common_init_arm(MpegEncContext *s) |
| 42 | { | 43 | { |
| 43 | #if HAVE_ARMV5TE | 44 | int cpu_flags = av_get_cpu_flags(); |
| 44 | ff_MPV_common_init_armv5te(s); | 45 | |
| 45 | #endif | 46 | if (have_armv5te(cpu_flags)) |
| 47 | ff_MPV_common_init_armv5te(s); | ||
| 46 | 48 | ||
| 47 | if (HAVE_NEON) { | 49 | if (have_neon(cpu_flags)) { |
| 48 | s->dct_unquantize_h263_intra = ff_dct_unquantize_h263_intra_neon; | 50 | s->dct_unquantize_h263_intra = ff_dct_unquantize_h263_intra_neon; |
| 49 | s->dct_unquantize_h263_inter = ff_dct_unquantize_h263_inter_neon; | 51 | s->dct_unquantize_h263_inter = ff_dct_unquantize_h263_inter_neon; |
| 50 | } | 52 | } |
| @@ -19,6 +19,7 @@ · 18 unmodified lines | |||
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #include "config.h" | 21 | #include "config.h" |
| 22 | #include "libavutil/arm/cpu.h" | ||
| 22 | #include "libavutil/attributes.h" | 23 | #include "libavutil/attributes.h" |
| 23 | #include "libavcodec/sbrdsp.h" | 24 | #include "libavcodec/sbrdsp.h" |
| 24 | 25 | ||
| @@ -51,7 +52,9 @@ void ff_sbr_hf_apply_noise_3_neon(float Y[64][2], const float *s_m, · 26 unmodified lines | |||
| 51 | 52 | ||
| 52 | av_cold void ff_sbrdsp_init_arm(SBRDSPContext *s) | 53 | av_cold void ff_sbrdsp_init_arm(SBRDSPContext *s) |
| 53 | { | 54 | { |
| 54 | if (HAVE_NEON) { | 55 | int cpu_flags = av_get_cpu_flags(); |
| 56 | |||
| 57 | if (have_neon(cpu_flags)) { | ||
| 55 | s->sum64x5 = ff_sbr_sum64x5_neon; | 58 | s->sum64x5 = ff_sbr_sum64x5_neon; |
| 56 | s->sum_square = ff_sbr_sum_square_neon; | 59 | s->sum_square = ff_sbr_sum_square_neon; |
| 57 | s->neg_odd_64 = ff_sbr_neg_odd_64_neon; | 60 | s->neg_odd_64 = ff_sbr_neg_odd_64_neon; |
| @@ -19,6 +19,8 @@ · 18 unmodified lines | |||
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #include <stdint.h> | 21 | #include <stdint.h> |
| 22 | |||
| 23 | #include "libavutil/arm/cpu.h" | ||
| 22 | #include "libavcodec/avcodec.h" | 24 | #include "libavcodec/avcodec.h" |
| 23 | #include "libavcodec/vp56dsp.h" | 25 | #include "libavcodec/vp56dsp.h" |
| 24 | 26 | ||
| @@ -27,7 +29,9 @@ void ff_vp6_edge_filter_ver_neon(uint8_t *yuv, int stride, int t); · 2 unmodified lines | |||
| 27 | 29 | ||
| 28 | void ff_vp56dsp_init_arm(VP56DSPContext *s, enum CodecID codec) | 30 | void ff_vp56dsp_init_arm(VP56DSPContext *s, enum CodecID codec) |
| 29 | { | 31 | { |
| 30 | if (codec != CODEC_ID_VP5 && HAVE_NEON) { | 32 | int cpu_flags = av_get_cpu_flags(); |
| 33 | |||
| 34 | if (codec != CODEC_ID_VP5 && have_neon(cpu_flags)) { | ||
| 31 | s->edge_filter_hor = ff_vp6_edge_filter_hor_neon; | 35 | s->edge_filter_hor = ff_vp6_edge_filter_hor_neon; |
| 32 | s->edge_filter_ver = ff_vp6_edge_filter_ver_neon; | 36 | s->edge_filter_ver = ff_vp6_edge_filter_ver_neon; |
| 33 | } | 37 | } |
| @@ -17,6 +17,8 @@ · 16 unmodified lines | |||
| 17 | */ | 17 | */ |
| 18 | 18 | ||
| 19 | #include <stdint.h> | 19 | #include <stdint.h> |
| 20 | |||
| 21 | #include "libavutil/arm/cpu.h" | ||
| 20 | #include "libavcodec/vp8dsp.h" | 22 | #include "libavcodec/vp8dsp.h" |
| 21 | 23 | ||
| 22 | void ff_vp8_luma_dc_wht_dc_armv6(DCTELEM block[4][4][16], DCTELEM dc[16]); | 24 | void ff_vp8_luma_dc_wht_dc_armv6(DCTELEM block[4][4][16], DCTELEM dc[16]); |
| @@ -301,7 +303,9 @@ av_cold void ff_vp8dsp_init_arm(VP8DSPContext *dsp) · 278 unmodified lines | |||
| 301 | dsp->put_vp8_bilinear_pixels_tab[2][2][0] = ff_put_vp8_bilin4_v_##opt; \ | 303 | dsp->put_vp8_bilinear_pixels_tab[2][2][0] = ff_put_vp8_bilin4_v_##opt; \ |
| 302 | dsp->put_vp8_bilinear_pixels_tab[2][2][1] = ff_put_vp8_bilin4_hv_##opt; \ | 304 | dsp->put_vp8_bilinear_pixels_tab[2][2][1] = ff_put_vp8_bilin4_hv_##opt; \ |
| 303 | dsp->put_vp8_bilinear_pixels_tab[2][2][2] = ff_put_vp8_bilin4_hv_##opt | 305 | dsp->put_vp8_bilinear_pixels_tab[2][2][2] = ff_put_vp8_bilin4_hv_##opt |
| 304 | if (HAVE_NEON) { | 306 | int cpu_flags = av_get_cpu_flags(); |
| 307 | |||
| 308 | if (have_neon(cpu_flags)) { | ||
| 305 | set_func_ptrs(neon); | 309 | set_func_ptrs(neon); |
| 306 | } else if (HAVE_ARMV6) { | 310 | } else if (HAVE_ARMV6) { |
| 307 | set_func_ptrs(armv6); | 311 | set_func_ptrs(armv6); |