On Sat, Mar 25, 2017 at 02:56:36PM +0100, Alexandra Hájková wrote:
> --- a/libavcodec/arm/Makefile
> +++ b/libavcodec/arm/Makefile
> @@ -113,6 +113,8 @@ NEON-OBJS-$(CONFIG_H264DSP) +=
> arm/h264dsp_neon.o \
> NEON-OBJS-$(CONFIG_H264PRED) += arm/h264pred_neon.o
> NEON-OBJS-$(CONFIG_H264QPEL) += arm/h264qpel_neon.o \
> arm/hpeldsp_neon.o
> +NEON-OBJS-$(CONFIG_HEVC_DECODER) += arm/hevc_idct.o \
> + arm/hevc_idct_init.o
> NEON-OBJS-$(CONFIG_HPELDSP) += arm/hpeldsp_init_neon.o \
> arm/hpeldsp_neon.o
> NEON-OBJS-$(CONFIG_IDCTDSP) += arm/idctdsp_init_neon.o \
This is not a subsystem you optimized, but a decoder, so it belongs
with the decoders. See the comments I added to this file.
> diff --git a/libavcodec/arm/hevc_idct.S b/libavcodec/arm/hevc_idct.S
> new file mode 100644
> index 0000000..89dbe22
> --- /dev/null
> +++ b/libavcodec/arm/hevc_idct.S
> @@ -0,0 +1,269 @@
> +.macro tr_8x4 shift, in0, in1, in2, in3, in4, in5, in6, in7
> + tr_4x4_8 \in0, \in2, \in4, \in6, q8, q9, q10, q11, q12, q13, q14, q15
> +
trailing whitespace
> --- /dev/null
> +++ b/libavcodec/arm/hevc_idct_init.c
The file should be called hevcdsp_init_arm.c to match x86 naming.
> @@ -0,0 +1,50 @@
> +
> +#include "libavutil/cpu.h"
> +#include "libavutil/arm/cpu.h"
libavutil/attributes.h
> +void ff_hevc_idct_4x4_8_neon(int16_t *coeffs, int col_limit);
> +void ff_hevc_idct_8x8_8_neon(int16_t *coeffs, int col_limit);
> +void ff_hevc_idct_16x16_8_neon(int16_t *coeffs, int col_limit);
> +void ff_hevc_idct_4x4_10_neon(int16_t *coeffs, int col_limit);
> +void ff_hevc_idct_8x8_10_neon(int16_t *coeffs, int col_limit);
> +void ff_hevc_idct_16x16_10_neon(int16_t *coeffs, int col_limit);
16x16 functions do not exist.
> +av_cold void ff_hevc_dsp_init_arm(HEVCDSPContext *c, int bit_depth)
> +{
> + int cpu_flags = av_get_cpu_flags();
> +
> + if (have_neon(cpu_flags)) {
> + if (bit_depth == 8) {
> + c->idct[0] = ff_hevc_idct_4x4_8_neon;
> + c->idct[1] = ff_hevc_idct_8x8_8_neon;
> +// c->idct[2] = ff_hevc_idct_16x16_8_neon;
> + }
> + if (bit_depth == 10) {
> + c->idct[0] = ff_hevc_idct_4x4_10_neon;
> + c->idct[1] = ff_hevc_idct_8x8_10_neon;
> +// c->idct[2] = ff_hevc_idct_16x16_10_neon;
> + }
> + }
> +}
Don't add commented-out cruft.
> --- a/libavcodec/hevcdsp.c
> +++ b/libavcodec/hevcdsp.c
> @@ -249,4 +249,6 @@ void ff_hevc_dsp_init(HEVCDSPContext *hevcdsp, int
> bit_depth)
> ff_hevc_dsp_init_ppc(hevcdsp, bit_depth);
> if (ARCH_X86)
> ff_hevc_dsp_init_x86(hevcdsp, bit_depth);
> + if (ARCH_ARM)
> + ff_hevc_dsp_init_arm(hevcdsp, bit_depth);
This was previously ordered.
> --- a/libavcodec/hevcdsp.h
> +++ b/libavcodec/hevcdsp.h
> @@ -118,6 +118,8 @@ void ff_hevc_dsp_init(HEVCDSPContext *hpc, int bit_depth);
> void ff_hevc_dsp_init_ppc(HEVCDSPContext *c, const int bit_depth);
> void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth);
>
> +void ff_hevc_dsp_init_arm(HEVCDSPContext *c, const int bit_depth);
As was this.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel