aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-10-30 15:58:34 -0300
committerJames Almer <jamrial@gmail.com>2017-10-30 15:58:40 -0300
commitcc8c2d3609b26f777f4e73236ce1c41055ed70ab (patch)
treef14ea5d0502c441a8dd563b0c6e85883cad11210 /libavcodec
parent63f82ab3897b7b01252a7f8b377887622ebaa024 (diff)
parent358adef0305618219522858e471edf7e0cb4043e (diff)
downloadffmpeg-cc8c2d3609b26f777f4e73236ce1c41055ed70ab.tar.gz
Merge commit '358adef0305618219522858e471edf7e0cb4043e'
* commit '358adef0305618219522858e471edf7e0cb4043e': hevc: Add NEON IDCT DC functions for bitdepth 8 See 03cecf45c134ebbaecb62505fe444ade423ea7dc Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/arm/hevcdsp_idct_neon.S152
-rw-r--r--libavcodec/arm/hevcdsp_init_neon.c16
2 files changed, 84 insertions, 84 deletions
diff --git a/libavcodec/arm/hevcdsp_idct_neon.S b/libavcodec/arm/hevcdsp_idct_neon.S
index b59496ec25..8f831a37f2 100644
--- a/libavcodec/arm/hevcdsp_idct_neon.S
+++ b/libavcodec/arm/hevcdsp_idct_neon.S
@@ -29,82 +29,6 @@ const trans, align=4
.short 57, 43, 25, 9
endconst
-function ff_hevc_idct_4x4_dc_neon_8, export=1
- ldrsh r1, [r0]
- ldr r2, =0x20
- add r1, #1
- asr r1, #1
- add r1, r2
- asr r1, #6
- vdup.16 q0, r1
- vdup.16 q1, r1
- vst1.16 {q0, q1}, [r0]
- bx lr
-endfunc
-
-function ff_hevc_idct_8x8_dc_neon_8, export=1
- ldrsh r1, [r0]
- ldr r2, =0x20
- add r1, #1
- asr r1, #1
- add r1, r2
- asr r1, #6
- vdup.16 q8, r1
- vdup.16 q9, r1
- vmov.16 q10, q8
- vmov.16 q11, q8
- vmov.16 q12, q8
- vmov.16 q13, q8
- vmov.16 q14, q8
- vmov.16 q15, q8
- vstm r0, {q8-q15}
- bx lr
-endfunc
-
-function ff_hevc_idct_16x16_dc_neon_8, export=1
- ldrsh r1, [r0]
- ldr r2, =0x20
- add r1, #1
- asr r1, #1
- add r1, r2
- asr r1, #6
- vdup.16 q8, r1
- vdup.16 q9, r1
- vmov.16 q10, q8
- vmov.16 q11, q8
- vmov.16 q12, q8
- vmov.16 q13, q8
- vmov.16 q14, q8
- vmov.16 q15, q8
- vstm r0!, {q8-q15}
- vstm r0!, {q8-q15}
- vstm r0!, {q8-q15}
- vstm r0, {q8-q15}
- bx lr
-endfunc
-
-function ff_hevc_idct_32x32_dc_neon_8, export=1
- ldrsh r1, [r0]
- ldr r2, =0x20
- add r1, #1
- asr r1, #1
- add r1, r2
- asr r1, #6
- mov r3, #16
- vdup.16 q8, r1
- vdup.16 q9, r1
- vmov.16 q10, q8
- vmov.16 q11, q8
- vmov.16 q12, q8
- vmov.16 q13, q8
- vmov.16 q14, q8
- vmov.16 q15, q8
-1: subs r3, #1
- vstm r0!, {q8-q15}
- bne 1b
- bx lr
-endfunc
-
function ff_hevc_add_residual_4x4_neon_8, export=1
vldm r1, {q0-q1}
vld1.32 d4[0], [r0], r2
@@ -235,6 +159,82 @@ function ff_hevc_transform_luma_4x4_neon_8, export=1
bx lr
endfunc
+function ff_hevc_idct_4x4_dc_8_neon, export=1
+ ldrsh r1, [r0]
+ ldr r2, =0x20
+ add r1, #1
+ asr r1, #1
+ add r1, r2
+ asr r1, #6
+ vdup.16 q0, r1
+ vdup.16 q1, r1
+ vst1.16 {q0, q1}, [r0, :128]
+ bx lr
+endfunc
+
+function ff_hevc_idct_8x8_dc_8_neon, export=1
+ ldrsh r1, [r0]
+ ldr r2, =0x20
+ add r1, #1
+ asr r1, #1
+ add r1, r2
+ asr r1, #6
+ vdup.16 q8, r1
+ vdup.16 q9, r1
+ vmov.16 q10, q8
+ vmov.16 q11, q8
+ vmov.16 q12, q8
+ vmov.16 q13, q8
+ vmov.16 q14, q8
+ vmov.16 q15, q8
+ vstm r0, {q8-q15}
+ bx lr
+endfunc
+
+function ff_hevc_idct_16x16_dc_8_neon, export=1
+ ldrsh r1, [r0]
+ ldr r2, =0x20
+ add r1, #1
+ asr r1, #1
+ add r1, r2
+ asr r1, #6
+ vdup.16 q8, r1
+ vdup.16 q9, r1
+ vmov.16 q10, q8
+ vmov.16 q11, q8
+ vmov.16 q12, q8
+ vmov.16 q13, q8
+ vmov.16 q14, q8
+ vmov.16 q15, q8
+ vstm r0!, {q8-q15}
+ vstm r0!, {q8-q15}
+ vstm r0!, {q8-q15}
+ vstm r0, {q8-q15}
+ bx lr
+endfunc
+
+function ff_hevc_idct_32x32_dc_8_neon, export=1
+ ldrsh r1, [r0]
+ ldr r2, =0x20
+ add r1, #1
+ asr r1, #1
+ add r1, r2
+ asr r1, #6
+ mov r3, #16
+ vdup.16 q8, r1
+ vdup.16 q9, r1
+ vmov.16 q10, q8
+ vmov.16 q11, q8
+ vmov.16 q12, q8
+ vmov.16 q13, q8
+ vmov.16 q14, q8
+ vmov.16 q15, q8
+1: subs r3, #1
+ vstm r0!, {q8-q15}
+ bne 1b
+ bx lr
+endfunc
+
.macro sum_sub out, in, c, op
.ifc \op, +
vmlal.s16 \out, \in, \c
diff --git a/libavcodec/arm/hevcdsp_init_neon.c b/libavcodec/arm/hevcdsp_init_neon.c
index 562ebf96d1..9537561513 100644
--- a/libavcodec/arm/hevcdsp_init_neon.c
+++ b/libavcodec/arm/hevcdsp_init_neon.c
@@ -27,16 +27,16 @@ void ff_hevc_v_loop_filter_luma_neon(uint8_t *_pix, ptrdiff_t _stride, int _beta
void ff_hevc_h_loop_filter_luma_neon(uint8_t *_pix, ptrdiff_t _stride, int _beta, int *_tc, uint8_t *_no_p, uint8_t *_no_q);
void ff_hevc_v_loop_filter_chroma_neon(uint8_t *_pix, ptrdiff_t _stride, int *_tc, uint8_t *_no_p, uint8_t *_no_q);
void ff_hevc_h_loop_filter_chroma_neon(uint8_t *_pix, ptrdiff_t _stride, int *_tc, uint8_t *_no_p, uint8_t *_no_q);
+void ff_hevc_idct_4x4_dc_8_neon(int16_t *coeffs);
+void ff_hevc_idct_8x8_dc_8_neon(int16_t *coeffs);
+void ff_hevc_idct_16x16_dc_8_neon(int16_t *coeffs);
+void ff_hevc_idct_32x32_dc_8_neon(int16_t *coeffs);
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);
-void ff_hevc_idct_4x4_dc_neon_8(int16_t *coeffs);
-void ff_hevc_idct_8x8_dc_neon_8(int16_t *coeffs);
-void ff_hevc_idct_16x16_dc_neon_8(int16_t *coeffs);
-void ff_hevc_idct_32x32_dc_neon_8(int16_t *coeffs);
void ff_hevc_transform_luma_4x4_neon_8(int16_t *coeffs);
void ff_hevc_add_residual_4x4_neon_8(uint8_t *_dst, int16_t *coeffs,
ptrdiff_t stride);
@@ -154,13 +154,13 @@ av_cold void ff_hevc_dsp_init_neon(HEVCDSPContext *c, const int bit_depth)
c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_neon;
c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_neon;
c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_neon;
+ c->idct_dc[0] = ff_hevc_idct_4x4_dc_8_neon;
+ c->idct_dc[1] = ff_hevc_idct_8x8_dc_8_neon;
+ c->idct_dc[2] = ff_hevc_idct_16x16_dc_8_neon;
+ c->idct_dc[3] = ff_hevc_idct_32x32_dc_8_neon;
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;
- c->idct_dc[0] = ff_hevc_idct_4x4_dc_neon_8;
- c->idct_dc[1] = ff_hevc_idct_8x8_dc_neon_8;
- c->idct_dc[2] = ff_hevc_idct_16x16_dc_neon_8;
- c->idct_dc[3] = ff_hevc_idct_32x32_dc_neon_8;
c->add_residual[0] = ff_hevc_add_residual_4x4_neon_8;
c->add_residual[1] = ff_hevc_add_residual_8x8_neon_8;
c->add_residual[2] = ff_hevc_add_residual_16x16_neon_8;