[FFmpeg-devel] rockplayer patches to ffmpeg

Måns Rullgård mans
Thu Feb 10 18:22:27 CET 2011


Vladimir Pantelic <vladoman at gmail.com> writes:

> We removed configure script and replaced it by Android.mk,

That's the source of their problems.

> 3) some mangling of AAC/NEON support?!?!
>
> diff -uwbr ffmpeg_svn/libavcodec//arm/aac.h rockplayer/libavcodec//arm/aac.h
> --- ffmpeg_svn/libavcodec//arm/aac.h	2010-02-12 15:26:57.000000000 +0100
> +++ rockplayer/libavcodec//arm/aac.h	2010-06-14 22:43:08.000000000 +0200
> @@ -23,7 +23,7 @@
>  
>  #include "config.h"
>  
> -#if HAVE_NEON && HAVE_INLINE_ASM
> +#if HAVE_NEON && HAVE_INLINE_ASM && HAVE_ARMVFP && 0

This is obviously wrong.

>  #define VMUL2 VMUL2
>  static inline float *VMUL2(float *dst, const float *v, unsigned idx,
> @@ -132,6 +132,6 @@
>      return dst;
>  }
>  
> -#endif /* HAVE_NEON && HAVE_INLINE_ASM */
> +#endif /* HAVE_NEON && HAVE_INLINE_ASM && HAVE_ARMVFP*/
>  
>  #endif /* AVCODEC_ARM_AAC_H */
> diff -uwbr ffmpeg_svn/libavcodec//arm/dcadsp_init_arm.c rockplayer/libavcodec//arm/dcadsp_init_arm.c
> --- ffmpeg_svn/libavcodec//arm/dcadsp_init_arm.c	2011-02-10 16:47:58.000000000 +0100
> +++ rockplayer/libavcodec//arm/dcadsp_init_arm.c	2010-06-14 22:43:08.000000000 +0200
> @@ -22,11 +22,16 @@
>  #include "libavutil/attributes.h"
>  #include "libavcodec/dcadsp.h"
>  
> +#if HAVE_NEON
> +
>  void ff_dca_lfe_fir_neon(float *out, const float *in, const float *coefs,
>                           int decifactor, float scale, float bias);
> +#endif
>  
>  void av_cold ff_dcadsp_init_arm(DCADSPContext *s)
>  {
> +#if HAVE_NEON
>      if (HAVE_NEON)
>          s->lfe_fir = ff_dca_lfe_fir_neon;
> +#endif
>  }

Test with both preprocessor and compiler, just in case?

> diff -uwbr ffmpeg_svn/libavcodec//arm/dsputil_init_neon.c rockplayer/libavcodec//arm/dsputil_init_neon.c
> --- ffmpeg_svn/libavcodec//arm/dsputil_init_neon.c	2011-02-10 16:44:18.000000000 +0100
> +++ rockplayer/libavcodec//arm/dsputil_init_neon.c	2010-06-14 22:43:08.000000000 +0200
> @@ -171,6 +171,8 @@
>  
>  void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
>  {
> +	//ADDED BY water.e
> +	if (avctx->codec_id == CODEC_ID_AAC) return;
>      if (!avctx->lowres) {
>          if (avctx->idct_algo == FF_IDCT_AUTO ||
>              avctx->idct_algo == FF_IDCT_SIMPLENEON) {
> @@ -297,11 +299,12 @@
>      }
>  
>      c->vector_fmul                = ff_vector_fmul_neon;
> -    c->vector_fmul_window         = ff_vector_fmul_window_neon;
> -    c->vector_fmul_scalar         = ff_vector_fmul_scalar_neon;
> +    //ADDED BY water.e
> +//    c->vector_fmul_window         = ff_vector_fmul_window_neon;
> +//    c->vector_fmul_scalar         = ff_vector_fmul_scalar_neon;
>      c->butterflies_float          = ff_butterflies_float_neon;
>      c->scalarproduct_float        = ff_scalarproduct_float_neon;
> -    c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_neon;
> +//    c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_neon;
>      c->vector_fmul_reverse        = ff_vector_fmul_reverse_neon;
>      c->vector_fmul_add            = ff_vector_fmul_add_neon;
>      c->vector_clipf               = ff_vector_clipf_neon;

These functions are all affected by the floating-point calling
convention.  They obviously set HAVE_VFP_ARGS to the wrong value.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list