diff options
author | Christophe GISQUET <christophe.gisquet@gmail.com> | 2012-01-03 20:38:29 +0100 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2012-01-16 19:26:41 +0100 |
commit | 9ba9c3402499d90e54f8aa111b62c278206d11af (patch) | |
tree | ac059d08bf032cfbf7454c02e72bd5175a2e5b70 /libavcodec/arm/rv34dsp_neon.S | |
parent | ffa0923eee7707acf07a0847b6bac89b86e227dc (diff) | |
download | ffmpeg-streaming-9ba9c3402499d90e54f8aa111b62c278206d11af.zip ffmpeg-streaming-9ba9c3402499d90e54f8aa111b62c278206d11af.tar.gz |
rv34: 1-pass inter MB reconstruction
Implement 1-pass inverse transform and reconstruction for inter blocks.
Diffstat (limited to 'libavcodec/arm/rv34dsp_neon.S')
-rw-r--r-- | libavcodec/arm/rv34dsp_neon.S | 59 |
1 files changed, 12 insertions, 47 deletions
diff --git a/libavcodec/arm/rv34dsp_neon.S b/libavcodec/arm/rv34dsp_neon.S index 1e8d4b4..a156412 100644 --- a/libavcodec/arm/rv34dsp_neon.S +++ b/libavcodec/arm/rv34dsp_neon.S @@ -21,11 +21,7 @@ #include "asm.S" .macro rv34_inv_transform - mov r1, #16 - vld1.16 {d28}, [r0,:64], r1 @ block[i+8*0] - vld1.16 {d29}, [r0,:64], r1 @ block[i+8*1] - vld1.16 {d30}, [r0,:64], r1 @ block[i+8*2] - vld1.16 {d31}, [r0,:64], r1 @ block[i+8*3] + vld1.16 {q14-q15}, [r0,:128] vmov.s16 d0, #13 vshll.s16 q12, d29, #3 vshll.s16 q13, d29, #4 @@ -35,12 +31,12 @@ vmlal.s16 q10, d30, d0 vmull.s16 q11, d28, d0 vmlsl.s16 q11, d30, d0 - vsubw.s16 q12, q12, d29 @ z2 = block[i+8*1]*7 - vaddw.s16 q13, q13, d29 @ z3 = block[i+8*1]*17 + vsubw.s16 q12, q12, d29 @ z2 = block[i+4*1]*7 + vaddw.s16 q13, q13, d29 @ z3 = block[i+4*1]*17 vsubw.s16 q9, q9, d31 vaddw.s16 q1, q1, d31 - vadd.s32 q13, q13, q9 @ z3 = 17*block[i+8*1] + 7*block[i+8*3] - vsub.s32 q12, q12, q1 @ z2 = 7*block[i+8*1] - 17*block[i+8*3] + vadd.s32 q13, q13, q9 @ z3 = 17*block[i+4*1] + 7*block[i+4*3] + vsub.s32 q12, q12, q1 @ z2 = 7*block[i+4*1] - 17*block[i+4*3] vadd.s32 q1, q10, q13 @ z0 + z3 vadd.s32 q2, q11, q12 @ z1 + z2 vsub.s32 q8, q10, q13 @ z0 - z3 @@ -70,24 +66,8 @@ vsub.s32 q15, q14, q9 @ z0 - z3 .endm -/* void ff_rv34_inv_transform_neon(DCTELEM *block); */ -function ff_rv34_inv_transform_neon, export=1 - mov r2, r0 - rv34_inv_transform - vrshrn.s32 d1, q2, #10 @ (z1 + z2) >> 10 - vrshrn.s32 d0, q1, #10 @ (z0 + z3) >> 10 - vrshrn.s32 d2, q3, #10 @ (z1 - z2) >> 10 - vrshrn.s32 d3, q15, #10 @ (z0 - z3) >> 10 - vst4.16 {d0[0], d1[0], d2[0], d3[0]}, [r2,:64], r1 - vst4.16 {d0[1], d1[1], d2[1], d3[1]}, [r2,:64], r1 - vst4.16 {d0[2], d1[2], d2[2], d3[2]}, [r2,:64], r1 - vst4.16 {d0[3], d1[3], d2[3], d3[3]}, [r2,:64], r1 - bx lr -endfunc - /* void rv34_inv_transform_noround_neon(DCTELEM *block); */ function ff_rv34_inv_transform_noround_neon, export=1 - mov r2, r0 rv34_inv_transform vshl.s32 q11, q2, #1 vshl.s32 q10, q1, #1 @@ -101,38 +81,23 @@ function ff_rv34_inv_transform_noround_neon, export=1 vshrn.s32 d1, q11, #11 @ (z1 + z2)*3 >> 11 vshrn.s32 d2, q12, #11 @ (z1 - z2)*3 >> 11 vshrn.s32 d3, q13, #11 @ (z0 - z3)*3 >> 11 - vst4.16 {d0[0], d1[0], d2[0], d3[0]}, [r2,:64], r1 - vst4.16 {d0[1], d1[1], d2[1], d3[1]}, [r2,:64], r1 - vst4.16 {d0[2], d1[2], d2[2], d3[2]}, [r2,:64], r1 - vst4.16 {d0[3], d1[3], d2[3], d3[3]}, [r2,:64], r1 + vst4.16 {d0[0], d1[0], d2[0], d3[0]}, [r0,:64]! + vst4.16 {d0[1], d1[1], d2[1], d3[1]}, [r0,:64]! + vst4.16 {d0[2], d1[2], d2[2], d3[2]}, [r0,:64]! + vst4.16 {d0[3], d1[3], d2[3], d3[3]}, [r0,:64]! bx lr endfunc -/* void rv34_inv_transform_dc_c(DCTELEM *block) */ -function ff_rv34_inv_transform_dc_neon, export=1 - vld1.16 {d28[]}, [r0,:16] @ block[0] - vmov.i16 d4, #169 - mov r1, #16 - vmull.s16 q3, d28, d4 - vrshrn.s32 d0, q3, #10 - vst1.16 {d0}, [r0,:64], r1 - vst1.16 {d0}, [r0,:64], r1 - vst1.16 {d0}, [r0,:64], r1 - vst1.16 {d0}, [r0,:64], r1 - bx lr -endfunc /* void rv34_inv_transform_dc_noround_c(DCTELEM *block) */ function ff_rv34_inv_transform_noround_dc_neon, export=1 vld1.16 {d28[]}, [r0,:16] @ block[0] vmov.i16 d4, #251 vorr.s16 d4, #256 @ 13^2 * 3 - mov r1, #16 vmull.s16 q3, d28, d4 vshrn.s32 d0, q3, #11 - vst1.64 {d0}, [r0,:64], r1 - vst1.64 {d0}, [r0,:64], r1 - vst1.64 {d0}, [r0,:64], r1 - vst1.64 {d0}, [r0,:64], r1 + vmov.i16 d1, d0 + vst1.64 {q0}, [r0,:128]! + vst1.64 {q0}, [r0,:128]! bx lr endfunc |