summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vp8/common/arm/armv6/sixtappredict8x4_v6.asm37
-rw-r--r--vp8/common/arm/neon/loopfilterhorizontaledge_uv_neon.asm46
-rw-r--r--vp8/common/arm/neon/loopfilterhorizontaledge_y_neon.asm46
-rw-r--r--vp8/common/arm/neon/loopfilterverticaledge_uv_neon.asm47
-rw-r--r--vp8/common/arm/neon/loopfilterverticaledge_y_neon.asm47
-rw-r--r--vp8/common/arm/neon/mbloopfilterhorizontaledge_uv_neon.asm56
-rw-r--r--vp8/common/arm/neon/mbloopfilterhorizontaledge_y_neon.asm54
-rw-r--r--vp8/common/arm/neon/mbloopfilterverticaledge_uv_neon.asm53
-rw-r--r--vp8/common/arm/neon/mbloopfilterverticaledge_y_neon.asm55
-rw-r--r--vp8/decoder/onyxd_int.h1
-rw-r--r--vp8/decoder/reconintra_mt.c (renamed from vp8/common/reconintra_mt.c)0
-rw-r--r--vp8/decoder/threading.c15
-rw-r--r--vp8/vp8_common.mk2
-rw-r--r--vp8/vp8dx.mk2
14 files changed, 101 insertions, 360 deletions
diff --git a/vp8/common/arm/armv6/sixtappredict8x4_v6.asm b/vp8/common/arm/armv6/sixtappredict8x4_v6.asm
index 8fb80ef29..8b9939484 100644
--- a/vp8/common/arm/armv6/sixtappredict8x4_v6.asm
+++ b/vp8/common/arm/armv6/sixtappredict8x4_v6.asm
@@ -25,10 +25,10 @@
;and the result is stored in transpose.
|vp8_sixtap_predict8x4_armv6| PROC
stmdb sp!, {r4 - r11, lr}
- sub sp, sp, #184 ;reserve space on stack for temporary storage: 20x(8+1) +4
+ str r3, [sp, #-184]! ;reserve space on stack for temporary storage, store yoffset
cmp r2, #0 ;skip first_pass filter if xoffset=0
- str r3, [sp], #4 ;store yoffset
+ add lr, sp, #4 ;point to temporary buffer
beq skip_firstpass_filter
;first-pass filter
@@ -45,7 +45,6 @@
mov r2, #0x90000 ; height=9 is top part of counter
sub r1, r1, #8
- mov lr, #20
|first_pass_hloop_v6|
ldrb r6, [r0, #-5] ; load source data
@@ -83,10 +82,10 @@
tst r2, #0xff ; test loop counter
usat r11, #8, r11, asr #7
add r12, r12, #0x40
- strh r11, [sp], lr ; result is transposed and stored, which
+ strh r11, [lr], #20 ; result is transposed and stored, which
usat r12, #8, r12, asr #7
- strh r12, [sp], lr
+ strh r12, [lr], #20
movne r11, r6
movne r12, r7
@@ -107,8 +106,7 @@
subs r2, r2, #0x10000
- mov r6, #158
- sub sp, sp, r6
+ sub lr, lr, #158
add r0, r0, r1 ; move to next input line
@@ -116,10 +114,7 @@
;second pass filter
secondpass_filter
- mov r1, #18
- sub sp, sp, r1 ; 18+4
-
- ldr r3, [sp, #-4] ; load back yoffset
+ ldr r3, [sp], #4 ; load back yoffset
ldr r0, [sp, #216] ; load dst address from stack 180+36
ldr r1, [sp, #220] ; load dst stride from stack 180+40
@@ -192,30 +187,28 @@ skip_firstpass_filter
sub r0, r0, r1, lsl #1
sub r1, r1, #8
mov r2, #9
- mov r3, #20
skip_firstpass_hloop
ldrb r4, [r0], #1 ; load data
subs r2, r2, #1
ldrb r5, [r0], #1
- strh r4, [sp], r3 ; store it to immediate buffer
+ strh r4, [lr], #20 ; store it to immediate buffer
ldrb r6, [r0], #1 ; load data
- strh r5, [sp], r3
+ strh r5, [lr], #20
ldrb r7, [r0], #1
- strh r6, [sp], r3
+ strh r6, [lr], #20
ldrb r8, [r0], #1
- strh r7, [sp], r3
+ strh r7, [lr], #20
ldrb r9, [r0], #1
- strh r8, [sp], r3
+ strh r8, [lr], #20
ldrb r10, [r0], #1
- strh r9, [sp], r3
+ strh r9, [lr], #20
ldrb r11, [r0], #1
- strh r10, [sp], r3
+ strh r10, [lr], #20
add r0, r0, r1 ; move to next input line
- strh r11, [sp], r3
+ strh r11, [lr], #20
- mov r4, #158
- sub sp, sp, r4 ; move over to next column
+ sub lr, lr, #158 ; move over to next column
bne skip_firstpass_hloop
b secondpass_filter
diff --git a/vp8/common/arm/neon/loopfilterhorizontaledge_uv_neon.asm b/vp8/common/arm/neon/loopfilterhorizontaledge_uv_neon.asm
index c0c3e337c..23ace0f95 100644
--- a/vp8/common/arm/neon/loopfilterhorizontaledge_uv_neon.asm
+++ b/vp8/common/arm/neon/loopfilterhorizontaledge_uv_neon.asm
@@ -55,8 +55,7 @@
vld1.s8 {d4[], d5[]}, [r12] ; thresh
ldr r12, _lfhuv_coeff_
- ;vp8_filter_mask() function
- ;vp8_hevmask() function
+ ; vp8_filter_mask
vabd.u8 q11, q3, q4 ; abs(p3 - p2)
vabd.u8 q12, q4, q5 ; abs(p2 - p1)
vabd.u8 q13, q5, q6 ; abs(p1 - p0)
@@ -65,22 +64,19 @@
vabd.u8 q4, q10, q9 ; abs(q3 - q2)
vabd.u8 q9, q6, q7 ; abs(p0 - q0)
- vcge.u8 q15, q1, q11 ; (abs(p3 - p2) > limit)*-1
- vcge.u8 q12, q1, q12 ; (abs(p2 - p1) > limit)*-1
- vcge.u8 q10, q1, q13 ; (abs(p1 - p0) > limit)*-1
- vcge.u8 q11, q1, q14 ; (abs(q1 - q0) > limit)*-1
+ vmax.u8 q11, q11, q12
+ vmax.u8 q12, q13, q14
+ vmax.u8 q3, q3, q4
+ vmax.u8 q15, q11, q12
+ ; vp8_hevmask
vcgt.u8 q13, q13, q2 ; (abs(p1 - p0) > thresh)*-1
vcgt.u8 q14, q14, q2 ; (abs(q1 - q0) > thresh)*-1
+ vmax.u8 q15, q15, q3
- vcge.u8 q3, q1, q3 ; (abs(q2 - q1) > limit)*-1
- vcge.u8 q4, q1, q4 ; (abs(q3 - q2) > limit)*-1
vadd.u8 q0, q0, q0 ; flimit * 2
vadd.u8 q0, q0, q1 ; flimit * 2 + limit
-
- vand q15, q15, q12
- vand q10, q10, q11
- vand q3, q3, q4
+ vcge.u8 q15, q1, q15 ; (max > limit) * -1
vabd.u8 q2, q5, q8 ; abs(p1 - q1)
vqadd.u8 q9, q9, q9 ; abs(p0 - q0) * 2
@@ -90,8 +86,6 @@
vld1.u8 {q0}, [r12]!
- vand q15, q15, q10
-
;vp8_filter() function
veor q7, q7, q0 ; qs0: q0 offset to convert to a signed value
veor q6, q6, q0 ; ps0: p0 offset to convert to a signed value
@@ -100,26 +94,20 @@
;;;;;;;;;;;;;;
vld1.u8 {q10}, [r12]!
- ;vqsub.s8 q2, q7, q6 ; ( qs0 - ps0)
vsubl.s8 q2, d14, d12 ; ( qs0 - ps0)
vsubl.s8 q11, d15, d13
- vand q3, q3, q9
vmovl.u8 q4, d20
vqsub.s8 q1, q5, q8 ; vp8_filter = vp8_signed_char_clamp(ps1-qs1)
vorr q14, q13, q14 ; q14: vp8_hevmask
- ;vmul.i8 q2, q2, q10 ; 3 * ( qs0 - ps0)
vmul.i16 q2, q2, q4 ; 3 * ( qs0 - ps0)
vmul.i16 q11, q11, q4
vand q1, q1, q14 ; vp8_filter &= hev
- vand q15, q15, q3 ; q15: vp8_filter_mask
- ;;
- ;vld1.u8 {q4}, [r12]! ;no need 7 any more
+ vand q15, q15, q9 ; vp8_filter_mask
- ;vqadd.s8 q1, q1, q2
vaddw.s8 q2, q2, d2
vaddw.s8 q11, q11, d3
@@ -130,21 +118,6 @@
;;
vand q1, q1, q15 ; vp8_filter &= mask
- ;;
-;;;;;;;;;;;;
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Change for VP8 from VP7
-; vand q2, q1, q4 ; s = vp8_filter & 7
-; vqadd.s8 q1, q1, q9 ; vp8_filter = vp8_signed_char_clamp(vp8_filter+4)
- ;;;;
-; vshr.s8 q1, q1, #3 ; vp8_filter >>= 3
-; vceq.i8 q2, q2, q9 ; s = (s==4)*-1
- ;;
-; ;calculate output
-; vqsub.s8 q10, q7, q1 ; u = vp8_signed_char_clamp(qs0 - vp8_filter)
-; vqadd.s8 q11, q2, q1 ; u = vp8_signed_char_clamp(s + vp8_filter)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; q10=3
vqadd.s8 q2, q1, q10 ; Filter2 = vp8_signed_char_clamp(vp8_filter+3)
vqadd.s8 q1, q1, q9 ; Filter1 = vp8_signed_char_clamp(vp8_filter+4)
vshr.s8 q2, q2, #3 ; Filter2 >>= 3
@@ -168,7 +141,6 @@
;;
vqadd.s8 q13, q5, q1 ; u = vp8_signed_char_clamp(ps1 + vp8_filter)
- ;vqadd.s8 q11, q6, q11 ; u = vp8_signed_char_clamp(ps0 + u)
vqsub.s8 q12, q8, q1 ; u = vp8_signed_char_clamp(qs1 - vp8_filter)
;
diff --git a/vp8/common/arm/neon/loopfilterhorizontaledge_y_neon.asm b/vp8/common/arm/neon/loopfilterhorizontaledge_y_neon.asm
index a8314cdd7..e1896e4d8 100644
--- a/vp8/common/arm/neon/loopfilterhorizontaledge_y_neon.asm
+++ b/vp8/common/arm/neon/loopfilterhorizontaledge_y_neon.asm
@@ -39,8 +39,7 @@
ldr r12, _lfhy_coeff_
vld1.u8 {q7}, [r0], r1 ; q0
- ;vp8_filter_mask() function
- ;vp8_hevmask() function
+ ; vp8_filter_mask
vabd.u8 q11, q3, q4 ; abs(p3 - p2)
vld1.u8 {q8}, [r0], r1 ; q1
vabd.u8 q12, q4, q5 ; abs(p2 - p1)
@@ -52,22 +51,19 @@
vabd.u8 q4, q10, q9 ; abs(q3 - q2)
vabd.u8 q9, q6, q7 ; abs(p0 - q0)
- vcge.u8 q15, q1, q11 ; (abs(p3 - p2) > limit)*-1
- vcge.u8 q12, q1, q12 ; (abs(p2 - p1) > limit)*-1
- vcge.u8 q10, q1, q13 ; (abs(p1 - p0) > limit)*-1
- vcge.u8 q11, q1, q14 ; (abs(q1 - q0) > limit)*-1
+ vmax.u8 q11, q11, q12
+ vmax.u8 q12, q13, q14
+ vmax.u8 q3, q3, q4
+ vmax.u8 q15, q11, q12
+ ; vp8_hevmask
vcgt.u8 q13, q13, q2 ; (abs(p1 - p0) > thresh)*-1
vcgt.u8 q14, q14, q2 ; (abs(q1 - q0) > thresh)*-1
+ vmax.u8 q15, q15, q3
- vcge.u8 q3, q1, q3 ; (abs(q2 - q1) > limit)*-1
- vcge.u8 q4, q1, q4 ; (abs(q3 - q2) > limit)*-1
vadd.u8 q0, q0, q0 ; flimit * 2
vadd.u8 q0, q0, q1 ; flimit * 2 + limit
-
- vand q15, q15, q12
- vand q10, q10, q11
- vand q3, q3, q4
+ vcge.u8 q15, q1, q15
vabd.u8 q2, q5, q8 ; abs(p1 - q1)
vqadd.u8 q9, q9, q9 ; abs(p0 - q0) * 2
@@ -77,8 +73,6 @@
vld1.u8 {q0}, [r12]!
- vand q15, q15, q10
-
;vp8_filter() function
veor q7, q7, q0 ; qs0: q0 offset to convert to a signed value
veor q6, q6, q0 ; ps0: p0 offset to convert to a signed value
@@ -87,26 +81,20 @@
;;;;;;;;;;;;;;
vld1.u8 {q10}, [r12]!
- ;vqsub.s8 q2, q7, q6 ; ( qs0 - ps0)
vsubl.s8 q2, d14, d12 ; ( qs0 - ps0)
vsubl.s8 q11, d15, d13
- vand q3, q3, q9
vmovl.u8 q4, d20
vqsub.s8 q1, q5, q8 ; vp8_filter = vp8_signed_char_clamp(ps1-qs1)
vorr q14, q13, q14 ; q14: vp8_hevmask
- ;vmul.i8 q2, q2, q10 ; 3 * ( qs0 - ps0)
vmul.i16 q2, q2, q4 ; 3 * ( qs0 - ps0)
vmul.i16 q11, q11, q4
vand q1, q1, q14 ; vp8_filter &= hev
- vand q15, q15, q3 ; q15: vp8_filter_mask
- ;;
- ;vld1.u8 {q4}, [r12]! ;no need 7 any more
+ vand q15, q15, q9 ; vp8_filter_mask
- ;vqadd.s8 q1, q1, q2
vaddw.s8 q2, q2, d2
vaddw.s8 q11, q11, d3
@@ -117,21 +105,6 @@
;;
vand q1, q1, q15 ; vp8_filter &= mask
- ;;
-;;;;;;;;;;;;
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Change for VP8 from VP7
-; vand q2, q1, q4 ; s = vp8_filter & 7
-; vqadd.s8 q1, q1, q9 ; vp8_filter = vp8_signed_char_clamp(vp8_filter+4)
- ;;;;
-; vshr.s8 q1, q1, #3 ; vp8_filter >>= 3
-; vceq.i8 q2, q2, q9 ; s = (s==4)*-1
- ;;
-; ;calculate output
-; vqsub.s8 q10, q7, q1 ; u = vp8_signed_char_clamp(qs0 - vp8_filter)
-; vqadd.s8 q11, q2, q1 ; u = vp8_signed_char_clamp(s + vp8_filter)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; q10=3
vqadd.s8 q2, q1, q10 ; Filter2 = vp8_signed_char_clamp(vp8_filter+3)
vqadd.s8 q1, q1, q9 ; Filter1 = vp8_signed_char_clamp(vp8_filter+4)
vshr.s8 q2, q2, #3 ; Filter2 >>= 3
@@ -153,7 +126,6 @@
add r2, r1, r0
vqadd.s8 q13, q5, q1 ; u = vp8_signed_char_clamp(ps1 + vp8_filter)
- ;vqadd.s8 q11, q6, q11 ; u = vp8_signed_char_clamp(ps0 + u)
vqsub.s8 q12, q8, q1 ; u = vp8_signed_char_clamp(qs1 - vp8_filter)
add r3, r2, r1
diff --git a/vp8/common/arm/neon/loopfilterverticaledge_uv_neon.asm b/vp8/common/arm/neon/loopfilterverticaledge_uv_neon.asm
index 57913d2bc..a9c2d12f0 100644
--- a/vp8/common/arm/neon/loopfilterverticaledge_uv_neon.asm
+++ b/vp8/common/arm/neon/loopfilterverticaledge_uv_neon.asm
@@ -71,8 +71,7 @@
vld1.s8 {d4[], d5[]}, [r12] ; thresh
ldr r12, _vlfuv_coeff_
- ;vp8_filter_mask() function
- ;vp8_hevmask() function
+ ; vp8_filter_mask
vabd.u8 q11, q3, q4 ; abs(p3 - p2)
vabd.u8 q12, q4, q5 ; abs(p2 - p1)
vabd.u8 q13, q5, q6 ; abs(p1 - p0)
@@ -81,22 +80,19 @@
vabd.u8 q4, q10, q9 ; abs(q3 - q2)
vabd.u8 q9, q6, q7 ; abs(p0 - q0)
- vcge.u8 q15, q1, q11 ; (abs(p3 - p2) > limit)*-1
- vcge.u8 q12, q1, q12 ; (abs(p2 - p1) > limit)*-1
- vcge.u8 q10, q1, q13 ; (abs(p1 - p0) > limit)*-1
- vcge.u8 q11, q1, q14 ; (abs(q1 - q0) > limit)*-1
+ vmax.u8 q11, q11, q12
+ vmax.u8 q12, q13, q14
+ vmax.u8 q3, q3, q4
+ vmax.u8 q15, q11, q12
+ ; vp8_hevmask
vcgt.u8 q13, q13, q2 ; (abs(p1 - p0) > thresh)*-1
vcgt.u8 q14, q14, q2 ; (abs(q1 - q0) > thresh)*-1
+ vmax.u8 q15, q15, q3
- vcge.u8 q3, q1, q3 ; (abs(q2 - q1) > limit)*-1
- vcge.u8 q4, q1, q4 ; (abs(q3 - q2) > limit)*-1
vadd.u8 q0, q0, q0 ; flimit * 2
vadd.u8 q0, q0, q1 ; flimit * 2 + limit
-
- vand q15, q15, q12
- vand q10, q10, q11
- vand q3, q3, q4
+ vcge.u8 q15, q1, q15
vabd.u8 q2, q5, q8 ; abs(p1 - q1)
vqadd.u8 q9, q9, q9 ; abs(p0 - q0) * 2
@@ -106,9 +102,6 @@
vld1.u8 {q0}, [r12]!
- vand q15, q15, q10
-
-
;vp8_filter() function
veor q7, q7, q0 ; qs0: q0 offset to convert to a signed value
veor q6, q6, q0 ; ps0: p0 offset to convert to a signed value
@@ -117,26 +110,20 @@
;;;;;;;;;;;;;;
vld1.u8 {q10}, [r12]!
- ;vqsub.s8 q2, q7, q6 ; ( qs0 - ps0)
vsubl.s8 q2, d14, d12 ; ( qs0 - ps0)
vsubl.s8 q11, d15, d13
- vand q3, q3, q9
vmovl.u8 q4, d20
vqsub.s8 q1, q5, q8 ; vp8_filter = vp8_signed_char_clamp(ps1-qs1)
vorr q14, q13, q14 ; q14: vp8_hevmask
- ;vmul.i8 q2, q2, q10 ; 3 * ( qs0 - ps0)
vmul.i16 q2, q2, q4 ; 3 * ( qs0 - ps0)
vmul.i16 q11, q11, q4
vand q1, q1, q14 ; vp8_filter &= hev
- vand q15, q15, q3 ; q15: vp8_filter_mask
- ;;
- ;vld1.u8 {q4}, [r12]! ;no need 7 any more
+ vand q15, q15, q9 ; vp8_filter_mask
- ;vqadd.s8 q1, q1, q2
vaddw.s8 q2, q2, d2
vaddw.s8 q11, q11, d3
@@ -147,21 +134,6 @@
;;
vand q1, q1, q15 ; vp8_filter &= mask
- ;;
-;;;;;;;;;;;;
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Change for VP8 from VP7
-; vand q2, q1, q4 ; s = vp8_filter & 7
-; vqadd.s8 q1, q1, q9 ; vp8_filter = vp8_signed_char_clamp(vp8_filter+4)
- ;;;;
-; vshr.s8 q1, q1, #3 ; vp8_filter >>= 3
-; vceq.i8 q2, q2, q9 ; s = (s==4)*-1
- ;;
-; ;calculate output
-; vqsub.s8 q10, q7, q1 ; u = vp8_signed_char_clamp(qs0 - vp8_filter)
-; vqadd.s8 q11, q2, q1 ; u = vp8_signed_char_clamp(s + vp8_filter)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; q10=3
vqadd.s8 q2, q1, q10 ; Filter2 = vp8_signed_char_clamp(vp8_filter+3)
vqadd.s8 q1, q1, q9 ; Filter1 = vp8_signed_char_clamp(vp8_filter+4)
vshr.s8 q2, q2, #3 ; Filter2 >>= 3
@@ -182,7 +154,6 @@
add r2, r2, #2
vqadd.s8 q13, q5, q1 ; u = vp8_signed_char_clamp(ps1 + vp8_filter)
- ;vqadd.s8 q11, q6, q11 ; u = vp8_signed_char_clamp(ps0 + u)
vqsub.s8 q12, q8, q1 ; u = vp8_signed_char_clamp(qs1 - vp8_filter)
veor q7, q10, q0 ; *oq0 = u^0x80
diff --git a/vp8/common/arm/neon/loopfilterverticaledge_y_neon.asm b/vp8/common/arm/neon/loopfilterverticaledge_y_neon.asm
index 2eb695ff0..64a49bb41 100644
--- a/vp8/common/arm/neon/loopfilterverticaledge_y_neon.asm
+++ b/vp8/common/arm/neon/loopfilterverticaledge_y_neon.asm
@@ -67,8 +67,7 @@
vtrn.8 q7, q8
vtrn.8 q9, q10
- ;vp8_filter_mask() function
- ;vp8_hevmask() function
+ ; vp8_filter_mask
vabd.u8 q11, q3, q4 ; abs(p3 - p2)
vabd.u8 q12, q4, q5 ; abs(p2 - p1)
vabd.u8 q13, q5, q6 ; abs(p1 - p0)
@@ -77,22 +76,19 @@
vabd.u8 q4, q10, q9 ; abs(q3 - q2)
vabd.u8 q9, q6, q7 ; abs(p0 - q0)
- vcge.u8 q15, q1, q11 ; (abs(p3 - p2) > limit)*-1
- vcge.u8 q12, q1, q12 ; (abs(p2 - p1) > limit)*-1
- vcge.u8 q10, q1, q13 ; (abs(p1 - p0) > limit)*-1
- vcge.u8 q11, q1, q14 ; (abs(q1 - q0) > limit)*-1
+ vmax.u8 q11, q11, q12
+ vmax.u8 q12, q13, q14
+ vmax.u8 q3, q3, q4
+ vmax.u8 q15, q11, q12
+ ; vp8_hevmask
vcgt.u8 q13, q13, q2 ; (abs(p1 - p0) > thresh)*-1
vcgt.u8 q14, q14, q2 ; (abs(q1 - q0) > thresh)*-1
+ vmax.u8 q15, q15, q3
- vcge.u8 q3, q1, q3 ; (abs(q2 - q1) > limit)*-1
- vcge.u8 q4, q1, q4 ; (abs(q3 - q2) > limit)*-1
vadd.u8 q0, q0, q0 ; flimit * 2
vadd.u8 q0, q0, q1 ; flimit * 2 + limit
-
- vand q15, q15, q12
- vand q10, q10, q11
- vand q3, q3, q4
+ vcge.u8 q15, q1, q15
vabd.u8 q2, q5, q8 ; abs(p1 - q1)
vqadd.u8 q9, q9, q9 ; abs(p0 - q0) * 2
@@ -102,9 +98,6 @@
vld1.u8 {q0}, [r12]!
- vand q15, q15, q10
-
-
;vp8_filter() function
veor q7, q7, q0 ; qs0: q0 offset to convert to a signed value
veor q6, q6, q0 ; ps0: p0 offset to convert to a signed value
@@ -113,26 +106,20 @@
;;;;;;;;;;;;;;
vld1.u8 {q10}, [r12]!
- ;vqsub.s8 q2, q7, q6 ; ( qs0 - ps0)
vsubl.s8 q2, d14, d12 ; ( qs0 - ps0)
vsubl.s8 q11, d15, d13
- vand q3, q3, q9
vmovl.u8 q4, d20
vqsub.s8 q1, q5, q8 ; vp8_filter = vp8_signed_char_clamp(ps1-qs1)
vorr q14, q13, q14 ; q14: vp8_hevmask
- ;vmul.i8 q2, q2, q10 ; 3 * ( qs0 - ps0)
vmul.i16 q2, q2, q4 ; 3 * ( qs0 - ps0)
vmul.i16 q11, q11, q4
vand q1, q1, q14 ; vp8_filter &= hev
- vand q15, q15, q3 ; q15: vp8_filter_mask
- ;;
- ;vld1.u8 {q4}, [r12]! ;no need 7 any more
+ vand q15, q15, q9 ; vp8_filter_mask
- ;vqadd.s8 q1, q1, q2
vaddw.s8 q2, q2, d2
vaddw.s8 q11, q11, d3
@@ -143,21 +130,6 @@
;;
vand q1, q1, q15 ; vp8_filter &= mask
- ;;
-;;;;;;;;;;;;
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Change for VP8 from VP7
-; vand q2, q1, q4 ; s = vp8_filter & 7
-; vqadd.s8 q1, q1, q9 ; vp8_filter = vp8_signed_char_clamp(vp8_filter+4)
- ;;;;
-; vshr.s8 q1, q1, #3 ; vp8_filter >>= 3
-; vceq.i8 q2, q2, q9 ; s = (s==4)*-1
- ;;
-; ;calculate output
-; vqsub.s8 q10, q7, q1 ; u = vp8_signed_char_clamp(qs0 - vp8_filter)
-; vqadd.s8 q11, q2, q1 ; u = vp8_signed_char_clamp(s + vp8_filter)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; q10=3
vqadd.s8 q2, q1, q10 ; Filter2 = vp8_signed_char_clamp(vp8_filter+3)
vqadd.s8 q1, q1, q9 ; Filter1 = vp8_signed_char_clamp(vp8_filter+4)
vshr.s8 q2, q2, #3 ; Filter2 >>= 3
@@ -178,7 +150,6 @@
;
vqadd.s8 q13, q5, q1 ; u = vp8_signed_char_clamp(ps1 + vp8_filter)
- ;vqadd.s8 q11, q6, q11 ; u = vp8_signed_char_clamp(ps0 + u)
vqsub.s8 q12, q8, q1 ; u = vp8_signed_char_clamp(qs1 - vp8_filter)
veor q7, q10, q0 ; *oq0 = u^0x80
diff --git a/vp8/common/arm/neon/mbloopfilterhorizontaledge_uv_neon.asm b/vp8/common/arm/neon/mbloopfilterhorizontaledge_uv_neon.asm
index 4576a6a8f..52ab059db 100644
--- a/vp8/common/arm/neon/mbloopfilterhorizontaledge_uv_neon.asm
+++ b/vp8/common/arm/neon/mbloopfilterhorizontaledge_uv_neon.asm
@@ -52,8 +52,7 @@
ldr r12, _mbhlfuv_coeff_
- ;vp8_filter_mask() function
- ;vp8_hevmask() function
+ ; vp8_filter_mask
vabd.u8 q11, q3, q4 ; abs(p3 - p2)
vabd.u8 q12, q4, q5 ; abs(p2 - p1)
vabd.u8 q13, q5, q6 ; abs(p1 - p0)
@@ -61,29 +60,25 @@
vabd.u8 q3, q9, q8 ; abs(q2 - q1)
vabd.u8 q0, q10, q9 ; abs(q3 - q2)
- vcge.u8 q15, q1, q11 ; (abs(p3 - p2) > limit)*-1
- vcge.u8 q12, q1, q12 ; (abs(p2 - p1) > limit)*-1
- vcge.u8 q10, q1, q13 ; (abs(p1 - p0) > limit)*-1
- vcge.u8 q11, q1, q14 ; (abs(q1 - q0) > limit)*-1
- vcge.u8 q3, q1, q3 ; (abs(q2 - q1) > limit)*-1
- vcge.u8 q0, q1, q0 ; (abs(q3 - q2) > limit)*-1
-
- vand q15, q15, q12
+ vmax.u8 q11, q11, q12
+ vmax.u8 q12, q13, q14
+ vmax.u8 q3, q3, q0
+ vmax.u8 q15, q11, q12
vabd.u8 q12, q6, q7 ; abs(p0 - q0)
+ ; vp8_hevmask
vcgt.u8 q13, q13, q2 ; (abs(p1 - p0) > thresh)*-1
vcgt.u8 q14, q14, q2 ; (abs(q1 - q0) > thresh)*-1
+ vmax.u8 q15, q15, q3
vld1.s8 {d4[], d5[]}, [r2] ; flimit
- vand q10, q10, q11
- vand q3, q3, q0
-
vld1.u8 {q0}, [r12]!
vadd.u8 q2, q2, q2 ; flimit * 2
vadd.u8 q2, q2, q1 ; flimit * 2 + limit
+ vcge.u8 q15, q1, q15
vabd.u8 q1, q5, q8 ; abs(p1 - q1)
vqadd.u8 q12, q12, q12 ; abs(p0 - q0) * 2
@@ -91,8 +86,6 @@
vqadd.u8 q12, q12, q1 ; abs(p0 - q0) * 2 + abs(p1 - q1) / 2
vcge.u8 q12, q2, q12 ; (abs(p0 - q0)*2 + abs(p1 - q1)/2 > flimit*2 + limit)*-1
- vand q15, q15, q10
-
;vp8_filter() function
veor q7, q7, q0 ; qs0: q0 offset to convert to a signed value
veor q6, q6, q0 ; ps0: p0 offset to convert to a signed value
@@ -103,29 +96,23 @@
;;;;;;;;;;;;;
vorr q14, q13, q14 ; q14: vp8_hevmask
- ;vqsub.s8 q2, q7, q6 ; ( qs0 - ps0)
vsubl.s8 q2, d14, d12 ; ( qs0 - ps0)
vsubl.s8 q13, d15, d13
vqsub.s8 q1, q5, q8 ; vp8_filter = vp8_signed_char_clamp(ps1-qs1)
- ;vadd.s8 q10, q2, q2 ; 3 * ( qs0 - ps0)
vadd.s16 q10, q2, q2 ; 3 * ( qs0 - ps0)
vadd.s16 q11, q13, q13
+ vand q15, q15, q12 ; vp8_filter_mask
- vand q3, q3, q12
-
- ;vadd.s8 q2, q2, q10
vadd.s16 q2, q2, q10
vadd.s16 q13, q13, q11
vld1.u8 {q12}, [r12]! ;#3
- ;vqadd.s8 q1, q1, q2 ; vp8_filter + 3 * ( qs0 - ps0)
vaddw.s8 q2, q2, d2 ; vp8_filter + 3 * ( qs0 - ps0)
vaddw.s8 q13, q13, d3
- vand q15, q15, q3 ; q15: vp8_filter_mask
vld1.u8 {q11}, [r12]! ;#4
vqmovn.s16 d2, q2 ; vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * ( qs0 - ps0))
@@ -139,32 +126,7 @@
vand q13, q1, q14 ; Filter2: q13; Filter2 &= hev
vld1.u8 {d7}, [r12]! ;#9
- ;
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Change for VP8 from VP7
-; vand q2, q13, q12 ; s = Filter2 & 7
-
-; vqadd.s8 q13, q13, q11 ; Filter2 = vp8_signed_char_clamp(Filter2+4)
-; vld1.u8 {d6}, [r12]! ;#18
-; sub r0, r0, r1, lsl #3
-; sub r3, r3, r1, lsl #3
-
-; vshr.s8 q13, q13, #3 ; Filter2 >>= 3
-; vceq.i8 q2, q2, q11 ; s = (s==4)*-1
-
-; add r0, r0, r1
-; add r3, r3, r1
-
-; vqsub.s8 q7, q7, q13 ; qs0 = vp8_signed_char_clamp(qs0 - Filter2)
-; vqadd.s8 q11, q2, q13 ; u = vp8_signed_char_clamp(s + Filter2)
-
-; vld1.u8 {d5}, [r12]! ;#27
-; vmov q10, q15
-; vmov q12, q15
-
-; vqadd.s8 q6, q6, q11 ; ps0 = vp8_signed_char_clamp(ps0 + u)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
vqadd.s8 q2, q13, q11 ; Filter1 = vp8_signed_char_clamp(Filter2+4)
vqadd.s8 q13, q13, q12 ; Filter2 = vp8_signed_char_clamp(Filter2+3)
diff --git a/vp8/common/arm/neon/mbloopfilterhorizontaledge_y_neon.asm b/vp8/common/arm/neon/mbloopfilterhorizontaledge_y_neon.asm
index 8e85caa45..b0755b05f 100644
--- a/vp8/common/arm/neon/mbloopfilterhorizontaledge_y_neon.asm
+++ b/vp8/common/arm/neon/mbloopfilterhorizontaledge_y_neon.asm
@@ -36,8 +36,7 @@
ldr r12, _mbhlfy_coeff_
vld1.u8 {q6}, [r0], r1 ; p0
- ;vp8_filter_mask() function
- ;vp8_hevmask() function
+ ; vp8_filter_mask
vabd.u8 q11, q3, q4 ; abs(p3 - p2)
vld1.u8 {q7}, [r0], r1 ; q0
vabd.u8 q12, q4, q5 ; abs(p2 - p1)
@@ -49,29 +48,25 @@
vabd.u8 q3, q9, q8 ; abs(q2 - q1)
vabd.u8 q0, q10, q9 ; abs(q3 - q2)
- vcge.u8 q15, q1, q11 ; (abs(p3 - p2) > limit)*-1
- vcge.u8 q12, q1, q12 ; (abs(p2 - p1) > limit)*-1
- vcge.u8 q10, q1, q13 ; (abs(p1 - p0) > limit)*-1
- vcge.u8 q11, q1, q14 ; (abs(q1 - q0) > limit)*-1
- vcge.u8 q3, q1, q3 ; (abs(q2 - q1) > limit)*-1
- vcge.u8 q0, q1, q0 ; (abs(q3 - q2) > limit)*-1
-
- vand q15, q15, q12
+ vmax.u8 q11, q11, q12
+ vmax.u8 q12, q13, q14
+ vmax.u8 q3, q3, q0
+ vmax.u8 q15, q11, q12
vabd.u8 q12, q6, q7 ; abs(p0 - q0)
+ ; vp8_hevmask
vcgt.u8 q13, q13, q2 ; (abs(p1 - p0) > thresh)*-1
vcgt.u8 q14, q14, q2 ; (abs(q1 - q0) > thresh)*-1
+ vmax.u8 q15, q15, q3
vld1.s8 {d4[], d5[]}, [r2] ; flimit
- vand q10, q10, q11
- vand q3, q3, q0
-
vld1.u8 {q0}, [r12]!
vadd.u8 q2, q2, q2 ; flimit * 2
vadd.u8 q2, q2, q1 ; flimit * 2 + limit
+ vcge.u8 q15, q1, q15
vabd.u8 q1, q5, q8 ; abs(p1 - q1)
vqadd.u8 q12, q12, q12 ; abs(p0 - q0) * 2
@@ -79,8 +74,6 @@
vqadd.u8 q12, q12, q1 ; abs(p0 - q0) * 2 + abs(p1 - q1) / 2
vcge.u8 q12, q2, q12 ; (abs(p0 - q0)*2 + abs(p1 - q1)/2 > flimit*2 + limit)*-1
- vand q15, q15, q10
-
;vp8_filter() function
veor q7, q7, q0 ; qs0: q0 offset to convert to a signed value
veor q6, q6, q0 ; ps0: p0 offset to convert to a signed value
@@ -91,29 +84,23 @@
;;;;;;;;;;;;;
vorr q14, q13, q14 ; q14: vp8_hevmask
- ;vqsub.s8 q2, q7, q6 ; ( qs0 - ps0)
vsubl.s8 q2, d14, d12 ; ( qs0 - ps0)
vsubl.s8 q13, d15, d13
vqsub.s8 q1, q5, q8 ; vp8_filter = vp8_signed_char_clamp(ps1-qs1)
- ;vadd.s8 q10, q2, q2 ; 3 * ( qs0 - ps0)
vadd.s16 q10, q2, q2 ; 3 * ( qs0 - ps0)
vadd.s16 q11, q13, q13
+ vand q15, q15, q12 ; vp8_filter_mask
- vand q3, q3, q12
-
- ;vadd.s8 q2, q2, q10
vadd.s16 q2, q2, q10
vadd.s16 q13, q13, q11
vld1.u8 {q12}, [r12]! ;#3
- ;vqadd.s8 q1, q1, q2 ; vp8_filter + 3 * ( qs0 - ps0)
vaddw.s8 q2, q2, d2 ; vp8_filter + 3 * ( qs0 - ps0)
vaddw.s8 q13, q13, d3
- vand q15, q15, q3 ; q15: vp8_filter_mask
vld1.u8 {q11}, [r12]! ;#4
vqmovn.s16 d2, q2 ; vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * ( qs0 - ps0))
@@ -129,29 +116,6 @@
vld1.u8 {d7}, [r12]! ;#9
sub r0, r0, r1, lsl #3
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Change for VP8 from VP7
-; vand q2, q13, q12 ; s = Filter2 & 7
-
-; vqadd.s8 q13, q13, q11 ; Filter2 = vp8_signed_char_clamp(Filter2+4)
-; vld1.u8 {d6}, [r12]! ;#18
-
-; add r0, r0, r1
-; add r2, r0, r1
-
-; vshr.s8 q13, q13, #3 ; Filter2 >>= 3
-; vceq.i8 q2, q2, q11 ; s = (s==4)*-1
-
-; add r3, r2, r1
-
-; vqsub.s8 q7, q7, q13 ; qs0 = vp8_signed_char_clamp(qs0 - Filter2)
-; vqadd.s8 q11, q2, q13 ; u = vp8_signed_char_clamp(s + Filter2)
-
-; vld1.u8 {d5}, [r12]! ;#27
-; vmov q10, q15
-; vmov q12, q15
-
-; vqadd.s8 q6, q6, q11 ; ps0 = vp8_signed_char_clamp(ps0 + u)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
vqadd.s8 q2, q13, q11 ; Filter1 = vp8_signed_char_clamp(Filter2+4)
vqadd.s8 q13, q13, q12 ; Filter2 = vp8_signed_char_clamp(Filter2+3)
diff --git a/vp8/common/arm/neon/mbloopfilterverticaledge_uv_neon.asm b/vp8/common/arm/neon/mbloopfilterverticaledge_uv_neon.asm
index d9dbdcfe5..33cd55e1c 100644
--- a/vp8/common/arm/neon/mbloopfilterverticaledge_uv_neon.asm
+++ b/vp8/common/arm/neon/mbloopfilterverticaledge_uv_neon.asm
@@ -71,8 +71,7 @@
ldr r12, _mbvlfuv_coeff_
vst1.u8 {q10}, [sp]!
- ;vp8_filter_mask() function
- ;vp8_hevmask() function
+ ; vp8_filter_mask
vabd.u8 q11, q3, q4 ; abs(p3 - p2)
vabd.u8 q12, q4, q5 ; abs(p2 - p1)
vabd.u8 q13, q5, q6 ; abs(p1 - p0)
@@ -80,29 +79,25 @@
vabd.u8 q3, q9, q8 ; abs(q2 - q1)
vabd.u8 q0, q10, q9 ; abs(q3 - q2)
- vcge.u8 q15, q1, q11 ; (abs(p3 - p2) > limit)*-1
- vcge.u8 q12, q1, q12 ; (abs(p2 - p1) > limit)*-1
- vcge.u8 q10, q1, q13 ; (abs(p1 - p0) > limit)*-1
- vcge.u8 q11, q1, q14 ; (abs(q1 - q0) > limit)*-1
- vcge.u8 q3, q1, q3 ; (abs(q2 - q1) > limit)*-1
- vcge.u8 q0, q1, q0 ; (abs(q3 - q2) > limit)*-1
-
- vand q15, q15, q12
+ vmax.u8 q11, q11, q12
+ vmax.u8 q12, q13, q14
+ vmax.u8 q3, q3, q0
+ vmax.u8 q15, q11, q12
vabd.u8 q12, q6, q7 ; abs(p0 - q0)
+ ; vp8_hevmask
vcgt.u8 q13, q13, q2 ; (abs(p1 - p0) > thresh)*-1
vcgt.u8 q14, q14, q2 ; (abs(q1 - q0) > thresh)*-1
+ vmax.u8 q15, q15, q3
vld1.s8 {d4[], d5[]}, [r2] ; flimit
- vand q10, q10, q11
- vand q3, q3, q0
-
vld1.u8 {q0}, [r12]!
vadd.u8 q2, q2, q2 ; flimit * 2
vadd.u8 q2, q2, q1 ; flimit * 2 + limit
+ vcge.u8 q15, q1, q15
vabd.u8 q1, q5, q8 ; abs(p1 - q1)
vqadd.u8 q12, q12, q12 ; abs(p0 - q0) * 2
@@ -110,8 +105,6 @@
vqadd.u8 q12, q12, q1 ; abs(p0 - q0) * 2 + abs(p1 - q1) / 2
vcge.u8 q12, q2, q12 ; (abs(p0 - q0)*2 + abs(p1 - q1)/2 > flimit*2 + limit)*-1
- vand q15, q15, q10
-
;vp8_filter() function
veor q7, q7, q0 ; qs0: q0 offset to convert to a signed value
veor q6, q6, q0 ; ps0: p0 offset to convert to a signed value
@@ -122,29 +115,23 @@
;;;;;;;;;;;;;
vorr q14, q13, q14 ; q14: vp8_hevmask
- ;vqsub.s8 q2, q7, q6 ; ( qs0 - ps0)
vsubl.s8 q2, d14, d12 ; ( qs0 - ps0)
vsubl.s8 q13, d15, d13
vqsub.s8 q1, q5, q8 ; vp8_filter = vp8_signed_char_clamp(ps1-qs1)
- ;vadd.s8 q10, q2, q2 ; 3 * ( qs0 - ps0)
vadd.s16 q10, q2, q2 ; 3 * ( qs0 - ps0)
vadd.s16 q11, q13, q13
+ vand q15, q15, q12 ; vp8_filter_mask
- vand q3, q3, q12
-
- ;vadd.s8 q2, q2, q10
vadd.s16 q2, q2, q10
vadd.s16 q13, q13, q11
vld1.u8 {q12}, [r12]! ;#3
- ;vqadd.s8 q1, q1, q2 ; vp8_filter + 3 * ( qs0 - ps0)
vaddw.s8 q2, q2, d2 ; vp8_filter + 3 * ( qs0 - ps0)
vaddw.s8 q13, q13, d3
- vand q15, q15, q3 ; q15: vp8_filter_mask
vld1.u8 {q11}, [r12]! ;#4
vqmovn.s16 d2, q2 ; vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * ( qs0 - ps0))
@@ -160,28 +147,6 @@
vld1.u8 {d7}, [r12]! ;#9
;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Change for VP8 from VP7
-; vand q2, q13, q12 ; s = Filter2 & 7
-
-; vqadd.s8 q13, q13, q11 ; Filter2 = vp8_signed_char_clamp(Filter2+4)
-; vld1.u8 {d6}, [r12]! ;#18
-
-; sub r0, r0, r1, lsl #3
-; sub r3, r3, r1, lsl #3
-; sub sp, sp, #32
-
-; vshr.s8 q13, q13, #3 ; Filter2 >>= 3
-; vceq.i8 q2, q2, q11 ; s = (s==4)*-1
-
-; vqsub.s8 q7, q7, q13 ; qs0 = vp8_signed_char_clamp(qs0 - Filter2)
-; vqadd.s8 q11, q2, q13 ; u = vp8_signed_char_clamp(s + Filter2)
-
-; vld1.u8 {d5}, [r12]! ;#27
-; vmov q10, q15
-; vmov q12, q15
-
-; vqadd.s8 q6, q6, q11 ; ps0 = vp8_signed_char_clamp(ps0 + u)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
vqadd.s8 q2, q13, q11 ; Filter1 = vp8_signed_char_clamp(Filter2+4)
vqadd.s8 q13, q13, q12 ; Filter2 = vp8_signed_char_clamp(Filter2+3)
diff --git a/vp8/common/arm/neon/mbloopfilterverticaledge_y_neon.asm b/vp8/common/arm/neon/mbloopfilterverticaledge_y_neon.asm
index bdffc62ee..f51fd0bd4 100644
--- a/vp8/common/arm/neon/mbloopfilterverticaledge_y_neon.asm
+++ b/vp8/common/arm/neon/mbloopfilterverticaledge_y_neon.asm
@@ -69,8 +69,7 @@
ldr r12, _mbvlfy_coeff_
vst1.u8 {q10}, [sp]!
- ;vp8_filter_mask() function
- ;vp8_hevmask() function
+ ; vp8_filter_mask
vabd.u8 q11, q3, q4 ; abs(p3 - p2)
vabd.u8 q12, q4, q5 ; abs(p2 - p1)
vabd.u8 q13, q5, q6 ; abs(p1 - p0)
@@ -78,29 +77,25 @@
vabd.u8 q3, q9, q8 ; abs(q2 - q1)
vabd.u8 q0, q10, q9 ; abs(q3 - q2)
- vcge.u8 q15, q1, q11 ; (abs(p3 - p2) > limit)*-1
- vcge.u8 q12, q1, q12 ; (abs(p2 - p1) > limit)*-1
- vcge.u8 q10, q1, q13 ; (abs(p1 - p0) > limit)*-1
- vcge.u8 q11, q1, q14 ; (abs(q1 - q0) > limit)*-1
- vcge.u8 q3, q1, q3 ; (abs(q2 - q1) > limit)*-1
- vcge.u8 q0, q1, q0 ; (abs(q3 - q2) > limit)*-1
-
- vand q15, q15, q12
+ vmax.u8 q11, q11, q12
+ vmax.u8 q12, q13, q14
+ vmax.u8 q3, q3, q0
+ vmax.u8 q15, q11, q12
vabd.u8 q12, q6, q7 ; abs(p0 - q0)
+ ; vp8_hevmask
vcgt.u8 q13, q13, q2 ; (abs(p1 - p0) > thresh)*-1
vcgt.u8 q14, q14, q2 ; (abs(q1 - q0) > thresh)*-1
+ vmax.u8 q15, q15, q3
vld1.s8 {d4[], d5[]}, [r2] ; flimit
- vand q10, q10, q11
- vand q3, q3, q0
-
vld1.u8 {q0}, [r12]!
vadd.u8 q2, q2, q2 ; flimit * 2
vadd.u8 q2, q2, q1 ; flimit * 2 + limit
+ vcge.u8 q15, q1, q15
vabd.u8 q1, q5, q8 ; abs(p1 - q1)
vqadd.u8 q12, q12, q12 ; abs(p0 - q0) * 2
@@ -108,8 +103,6 @@
vqadd.u8 q12, q12, q1 ; abs(p0 - q0) * 2 + abs(p1 - q1) / 2
vcge.u8 q12, q2, q12 ; (abs(p0 - q0)*2 + abs(p1 - q1)/2 > flimit*2 + limit)*-1
- vand q15, q15, q10
-
;vp8_filter() function
veor q7, q7, q0 ; qs0: q0 offset to convert to a signed value
veor q6, q6, q0 ; ps0: p0 offset to convert to a signed value
@@ -120,29 +113,23 @@
;;;;;;;;;;;;;
vorr q14, q13, q14 ; q14: vp8_hevmask
- ;vqsub.s8 q2, q7, q6 ; ( qs0 - ps0)
vsubl.s8 q2, d14, d12 ; ( qs0 - ps0)
vsubl.s8 q13, d15, d13
vqsub.s8 q1, q5, q8 ; vp8_filter = vp8_signed_char_clamp(ps1-qs1)
- ;vadd.s8 q10, q2, q2 ; 3 * ( qs0 - ps0)
vadd.s16 q10, q2, q2 ; 3 * ( qs0 - ps0)
vadd.s16 q11, q13, q13
+ vand q15, q15, q12 ; vp8_filter_mask
- vand q3, q3, q12
-
- ;vadd.s8 q2, q2, q10
vadd.s16 q2, q2, q10
vadd.s16 q13, q13, q11
vld1.u8 {q12}, [r12]! ;#3
- ;vqadd.s8 q1, q1, q2 ; vp8_filter + 3 * ( qs0 - ps0)
vaddw.s8 q2, q2, d2 ; vp8_filter + 3 * ( qs0 - ps0)
vaddw.s8 q13, q13, d3
- vand q15, q15, q3 ; q15: vp8_filter_mask
vld1.u8 {q11}, [r12]! ;#4
vqmovn.s16 d2, q2 ; vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * ( qs0 - ps0))
@@ -158,30 +145,6 @@
vld1.u8 {d7}, [r12]! ;#9
;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Change for VP8 from VP7
-; vand q2, q13, q12 ; s = Filter2 & 7
-
-; vqadd.s8 q13, q13, q11 ; Filter2 = vp8_signed_char_clamp(Filter2+4)
-; vld1.u8 {d6}, [r12]! ;#18
-
-; sub r0, r0, r1, lsl #4
-; sub sp, sp, #32
-; add r2, r0, r1
-
-; vshr.s8 q13, q13, #3 ; Filter2 >>= 3
-; vceq.i8 q2, q2, q11 ; s = (s==4)*-1
-
-; add r3, r2, r1
-
-; vqsub.s8 q7, q7, q13 ; qs0 = vp8_signed_char_clamp(qs0 - Filter2)
-; vqadd.s8 q11, q2, q13 ; u = vp8_signed_char_clamp(s + Filter2)
-
-; vld1.u8 {d5}, [r12]! ;#27
-; vmov q10, q15
-; vmov q12, q15
-
-; vqadd.s8 q6, q6, q11 ; ps0 = vp8_signed_char_clamp(ps0 + u)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
vqadd.s8 q2, q13, q11 ; Filter1 = vp8_signed_char_clamp(Filter2+4)
vqadd.s8 q13, q13, q12 ; Filter2 = vp8_signed_char_clamp(Filter2+3)
diff --git a/vp8/decoder/onyxd_int.h b/vp8/decoder/onyxd_int.h
index ab926e61d..522ac22d2 100644
--- a/vp8/decoder/onyxd_int.h
+++ b/vp8/decoder/onyxd_int.h
@@ -96,6 +96,7 @@ typedef struct VP8Decompressor
// variable for threading
#if CONFIG_MULTITHREAD
int mt_baseline_filter_level[MAX_MB_SEGMENTS];
+ int sync_range;
int *mt_current_mb_col; // Each row remembers its already decoded column.
unsigned char **mt_yabove_row; // mb_rows x width
diff --git a/vp8/common/reconintra_mt.c b/vp8/decoder/reconintra_mt.c
index 4d395629d..4d395629d 100644
--- a/vp8/common/reconintra_mt.c
+++ b/vp8/decoder/reconintra_mt.c
diff --git a/vp8/decoder/threading.c b/vp8/decoder/threading.c
index 93bc69e72..56dd5ef8e 100644
--- a/vp8/decoder/threading.c
+++ b/vp8/decoder/threading.c
@@ -257,6 +257,7 @@ THREAD_FUNCTION vp8_thread_decoding_proc(void *p_data)
int mb_row;
int num_part = 1 << pbi->common.multi_token_partition;
volatile int *last_row_current_mb_col;
+ int nsync = pbi->sync_range;
for (mb_row = ithread+1; mb_row < pc->mb_rows; mb_row += (pbi->decoding_thread_count + 1))
{
@@ -292,9 +293,9 @@ THREAD_FUNCTION vp8_thread_decoding_proc(void *p_data)
for (mb_col = 0; mb_col < pc->mb_cols; mb_col++)
{
- if ((mb_col & 7) == 0)
+ if ((mb_col & (nsync-1)) == 0)
{
- while (mb_col > (*last_row_current_mb_col - 8) && *last_row_current_mb_col != pc->mb_cols - 1)
+ while (mb_col > (*last_row_current_mb_col - nsync) && *last_row_current_mb_col != pc->mb_cols - 1)
{
x86_pause_hint();
thread_sleep(0);
@@ -608,6 +609,11 @@ int vp8mt_alloc_temp_buffers(VP8D_COMP *pbi, int width, int prev_mb_rows)
if ((width & 0xf) != 0)
width += 16 - (width & 0xf);
+ if (width < 640) pbi->sync_range = 1;
+ else if (width <= 1280) pbi->sync_range = 8;
+ else if (width <= 2560) pbi->sync_range =16;
+ else pbi->sync_range = 32;
+
uv_width = width >>1;
// Allocate an int for each mb row.
@@ -764,6 +770,7 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
int num_part = 1 << pbi->common.multi_token_partition;
int i, j;
volatile int *last_row_current_mb_col = NULL;
+ int nsync = pbi->sync_range;
int filter_level;
loop_filter_info *lfi = pc->lf_info;
@@ -832,8 +839,8 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
for (mb_col = 0; mb_col < pc->mb_cols; mb_col++)
{
- if ( mb_row > 0 && (mb_col & 7) == 0){
- while (mb_col > (*last_row_current_mb_col - 8) && *last_row_current_mb_col != pc->mb_cols - 1)
+ if ( mb_row > 0 && (mb_col & (nsync-1)) == 0){
+ while (mb_col > (*last_row_current_mb_col - nsync) && *last_row_current_mb_col != pc->mb_cols - 1)
{
x86_pause_hint();
thread_sleep(0);
diff --git a/vp8/vp8_common.mk b/vp8/vp8_common.mk
index b357b28bc..ecca18a0a 100644
--- a/vp8/vp8_common.mk
+++ b/vp8/vp8_common.mk
@@ -81,8 +81,6 @@ VP8_COMMON_SRCS-yes += common/recon.c
VP8_COMMON_SRCS-yes += common/reconinter.c
VP8_COMMON_SRCS-yes += common/reconintra.c
VP8_COMMON_SRCS-yes += common/reconintra4x4.c
-VP8_COMMON_SRCS-yes += common/reconintra_mt.h
-VP8_COMMON_SRCS-yes += common/reconintra_mt.c
VP8_COMMON_SRCS-yes += common/setupintrarecon.c
VP8_COMMON_SRCS-yes += common/swapyv12buffer.c
VP8_COMMON_SRCS-yes += common/textblit.c
diff --git a/vp8/vp8dx.mk b/vp8/vp8dx.mk
index 941961708..1acd67453 100644
--- a/vp8/vp8dx.mk
+++ b/vp8/vp8dx.mk
@@ -67,6 +67,8 @@ VP8_DX_SRCS-yes += decoder/treereader.h
VP8_DX_SRCS-yes += decoder/onyxd_if.c
VP8_DX_SRCS-yes += decoder/threading.c
VP8_DX_SRCS-yes += decoder/idct_blk.c
+VP8_DX_SRCS-$(CONFIG_MULTITHREAD) += decoder/reconintra_mt.h
+VP8_DX_SRCS-$(CONFIG_MULTITHREAD) += decoder/reconintra_mt.c
VP8_DX_SRCS-yes := $(filter-out $(VP8_DX_SRCS_REMOVE-yes),$(VP8_DX_SRCS-yes))