Re: [libav-devel] [PATCH 3/3] aacps: NEON optimisations
Måns Rullgård m...@mansr.com writes: Mans Rullgard m...@mansr.com writes: Signed-off-by: Mans Rullgard m...@mansr.com --- libavcodec/aacpsdsp.c |3 + libavcodec/aacpsdsp.h |1 + libavcodec/arm/Makefile|6 +- libavcodec/arm/aacpsdsp_init_arm.c | 53 +++ libavcodec/arm/aacpsdsp_neon.S | 272 5 files changed, 333 insertions(+), 2 deletions(-) create mode 100644 libavcodec/arm/aacpsdsp_init_arm.c create mode 100644 libavcodec/arm/aacpsdsp_neon.S ping ping -- Måns Rullgård m...@mansr.com ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 3/3] aacps: NEON optimisations
On 04/05/12 05:15, Måns Rullgård wrote: Måns Rullgård m...@mansr.com writes: Mans Rullgard m...@mansr.com writes: Signed-off-by: Mans Rullgard m...@mansr.com --- libavcodec/aacpsdsp.c |3 + libavcodec/aacpsdsp.h |1 + libavcodec/arm/Makefile|6 +- libavcodec/arm/aacpsdsp_init_arm.c | 53 +++ libavcodec/arm/aacpsdsp_neon.S | 272 5 files changed, 333 insertions(+), 2 deletions(-) create mode 100644 libavcodec/arm/aacpsdsp_init_arm.c create mode 100644 libavcodec/arm/aacpsdsp_neon.S ping ping Seems ok to me. -- Luca Barbato Gentoo/linux http://dev.gentoo.org/~lu_zero ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 3/3] aacps: NEON optimisations
Måns Rullgård wrote: Mans Rullgardm...@mansr.com writes: Signed-off-by: Mans Rullgardm...@mansr.com --- libavcodec/aacpsdsp.c |3 + libavcodec/aacpsdsp.h |1 + libavcodec/arm/Makefile|6 +- libavcodec/arm/aacpsdsp_init_arm.c | 53 +++ libavcodec/arm/aacpsdsp_neon.S | 272 5 files changed, 333 insertions(+), 2 deletions(-) create mode 100644 libavcodec/arm/aacpsdsp_init_arm.c create mode 100644 libavcodec/arm/aacpsdsp_neon.S ping how much faster? if 50%, LGTM :) ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 3/3] aacps: NEON optimisations
Vladimir Pantelic vlado...@gmail.com writes: Måns Rullgård wrote: Mans Rullgardm...@mansr.com writes: Signed-off-by: Mans Rullgardm...@mansr.com --- libavcodec/aacpsdsp.c |3 + libavcodec/aacpsdsp.h |1 + libavcodec/arm/Makefile|6 +- libavcodec/arm/aacpsdsp_init_arm.c | 53 +++ libavcodec/arm/aacpsdsp_neon.S | 272 5 files changed, 333 insertions(+), 2 deletions(-) create mode 100644 libavcodec/arm/aacpsdsp_init_arm.c create mode 100644 libavcodec/arm/aacpsdsp_neon.S ping how much faster? if 50%, LGTM :) On Cortex-A8, a lot more. -- Måns Rullgård m...@mansr.com ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 3/3] aacps: NEON optimisations
Mans Rullgard m...@mansr.com writes: Signed-off-by: Mans Rullgard m...@mansr.com --- libavcodec/aacpsdsp.c |3 + libavcodec/aacpsdsp.h |1 + libavcodec/arm/Makefile|6 +- libavcodec/arm/aacpsdsp_init_arm.c | 53 +++ libavcodec/arm/aacpsdsp_neon.S | 272 5 files changed, 333 insertions(+), 2 deletions(-) create mode 100644 libavcodec/arm/aacpsdsp_init_arm.c create mode 100644 libavcodec/arm/aacpsdsp_neon.S ping -- Måns Rullgård m...@mansr.com ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 3/3] aacps: NEON optimisations
Signed-off-by: Mans Rullgard m...@mansr.com --- libavcodec/aacpsdsp.c |3 + libavcodec/aacpsdsp.h |1 + libavcodec/arm/Makefile|6 +- libavcodec/arm/aacpsdsp_init_arm.c | 53 +++ libavcodec/arm/aacpsdsp_neon.S | 272 5 files changed, 333 insertions(+), 2 deletions(-) create mode 100644 libavcodec/arm/aacpsdsp_init_arm.c create mode 100644 libavcodec/arm/aacpsdsp_neon.S diff --git a/libavcodec/aacpsdsp.c b/libavcodec/aacpsdsp.c index 89f5795..fc22f86 100644 --- a/libavcodec/aacpsdsp.c +++ b/libavcodec/aacpsdsp.c @@ -207,4 +207,7 @@ void ff_psdsp_init(PSDSPContext *s) s-decorrelate = ps_decorrelate_c; s-stereo_interpolate[0] = ps_stereo_interpolate_c; s-stereo_interpolate[1] = ps_stereo_interpolate_ipdopd_c; + +if (ARCH_ARM) +ff_psdsp_init_arm(s); } diff --git a/libavcodec/aacpsdsp.h b/libavcodec/aacpsdsp.h index 08d7490..93737d2 100644 --- a/libavcodec/aacpsdsp.h +++ b/libavcodec/aacpsdsp.h @@ -48,5 +48,6 @@ typedef struct PSDSPContext { } PSDSPContext; void ff_psdsp_init(PSDSPContext *s); +void ff_psdsp_init_arm(PSDSPContext *s); #endif /* LIBAVCODEC_AACPSDSP_H */ diff --git a/libavcodec/arm/Makefile b/libavcodec/arm/Makefile index 2f5cea7..dcf4c2f 100644 --- a/libavcodec/arm/Makefile +++ b/libavcodec/arm/Makefile @@ -1,7 +1,8 @@ OBJS-$(CONFIG_AC3DSP) += arm/ac3dsp_init_arm.o \ arm/ac3dsp_arm.o -OBJS-$(CONFIG_AAC_DECODER) += arm/sbrdsp_init_arm.o +OBJS-$(CONFIG_AAC_DECODER) += arm/sbrdsp_init_arm.o \ + arm/aacpsdsp_init_arm.o OBJS-$(CONFIG_DCA_DECODER) += arm/dcadsp_init_arm.o \ @@ -59,7 +60,8 @@ NEON-OBJS-$(CONFIG_H264PRED) += arm/h264pred_neon.o \ NEON-OBJS-$(CONFIG_AC3DSP) += arm/ac3dsp_neon.o -NEON-OBJS-$(CONFIG_AAC_DECODER)+= arm/sbrdsp_neon.o +NEON-OBJS-$(CONFIG_AAC_DECODER)+= arm/sbrdsp_neon.o \ + arm/aacpsdsp_neon.o NEON-OBJS-$(CONFIG_DCA_DECODER)+= arm/dcadsp_neon.o \ arm/synth_filter_neon.o \ diff --git a/libavcodec/arm/aacpsdsp_init_arm.c b/libavcodec/arm/aacpsdsp_init_arm.c new file mode 100644 index 000..7d2b30d --- /dev/null +++ b/libavcodec/arm/aacpsdsp_init_arm.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2012 Mans Rullgard + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include config.h +#include libavutil/attributes.h +#include libavcodec/aacpsdsp.h + +void ff_ps_add_squares_neon(float *dst, const float (*src)[2], int n); +void ff_ps_mul_pair_single_neon(float (*dst)[2], float (*src0)[2], +float *src1, int n); +void ff_ps_hybrid_analysis_neon(float (*out)[2], float (*in)[2], +const float (*filter)[8][2], +int stride, int n); +void ff_ps_hybrid_analysis_ileave_neon(float (*out)[32][2], float L[2][38][64], + int i, int len); +void ff_ps_hybrid_synthesis_deint_neon(float out[2][38][64], float (*in)[32][2], + int i, int len); +void ff_ps_decorrelate_neon(float (*out)[2], float (*delay)[2], +float (*ap_delay)[PS_QMF_TIME_SLOTS+PS_MAX_AP_DELAY][2], +const float phi_fract[2], float (*Q_fract)[2], +const float *transient_gain, float g_decay_slope, +int len); +void ff_ps_stereo_interpolate_neon(float (*l)[2], float (*r)[2], + float h[2][4], float h_step[2][4], + int len); + +av_cold void ff_psdsp_init_arm(PSDSPContext *s) +{ +if (HAVE_NEON) { +s-add_squares = ff_ps_add_squares_neon; +s-mul_pair_single = ff_ps_mul_pair_single_neon; +s-hybrid_synthesis_deint = ff_ps_hybrid_synthesis_deint_neon; +s-hybrid_analysis = ff_ps_hybrid_analysis_neon; +s-stereo_interpolate[0] = ff_ps_stereo_interpolate_neon; +} +} diff
Re: [libav-devel] [PATCH 3/3] aacps: NEON optimisations
On Tue, Mar 13, 2012 at 01:22:07PM +, Mans Rullgard wrote: --- /dev/null +++ b/libavcodec/arm/aacpsdsp_init_arm.c @@ -0,0 +1,53 @@ + +av_cold void ff_psdsp_init_arm(PSDSPContext *s) +{ +if (HAVE_NEON) { +s-add_squares = ff_ps_add_squares_neon; +s-mul_pair_single = ff_ps_mul_pair_single_neon; +s-hybrid_synthesis_deint = ff_ps_hybrid_synthesis_deint_neon; +s-hybrid_analysis = ff_ps_hybrid_analysis_neon; +s-stereo_interpolate[0] = ff_ps_stereo_interpolate_neon; It would be nice if you could align the = before pushing. Patch looks good to me, apart from the Assembly that I cannot comment on. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel