Commit 1270dd3c authored by mru's avatar mru

save one cycle


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7799 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 640f7476
...@@ -51,13 +51,13 @@ w57: .long W57 ...@@ -51,13 +51,13 @@ w57: .long W57
Compute partial IDCT of single row. Compute partial IDCT of single row.
shift = left-shift amount shift = left-shift amount
a1 = source address a1 = source address
a3 = row[2,0] a3 = row[2,0] <= 2 cycles
a4 = row[3,1] a4 = row[3,1]
ip = w42 <= 2 cycles
Output in registers v1--v8 Output in registers v1--v8
*/ */
.macro idct_row shift .macro idct_row shift
ldr ip, [pc, #(w42-.-8)] /* ip = W4 | (W2 << 16) */
ldr lr, [pc, #(w46-.-8)] /* lr = W4 | (W6 << 16) */ ldr lr, [pc, #(w46-.-8)] /* lr = W4 | (W6 << 16) */
mov a2, #(1<<(\shift-1)) mov a2, #(1<<(\shift-1))
smlad v1, a3, ip, a2 smlad v1, a3, ip, a2
...@@ -204,6 +204,7 @@ idct_row_armv6: ...@@ -204,6 +204,7 @@ idct_row_armv6:
cmpeq lr, a3, lsr #16 cmpeq lr, a3, lsr #16
beq 1f beq 1f
str a2, [sp, #-4]! str a2, [sp, #-4]!
ldr ip, [pc, #(w42-.-8)] /* ip = W4 | (W2 << 16) */
cmp lr, #0 cmp lr, #0
beq 2f beq 2f
...@@ -249,6 +250,7 @@ idct_col_armv6: ...@@ -249,6 +250,7 @@ idct_col_armv6:
stmfd sp!, {a2, lr} stmfd sp!, {a2, lr}
ldr a3, [a1] /* a3 = row[2,0] */ ldr a3, [a1] /* a3 = row[2,0] */
ldr ip, [pc, #(w42-.-8)] /* ip = W4 | (W2 << 16) */
ldr a4, [a1, #8] /* a4 = row[3,1] */ ldr a4, [a1, #8] /* a4 = row[3,1] */
idct_row COL_SHIFT idct_row COL_SHIFT
ldr a2, [sp], #4 ldr a2, [sp], #4
...@@ -278,6 +280,7 @@ idct_col_put_armv6: ...@@ -278,6 +280,7 @@ idct_col_put_armv6:
stmfd sp!, {a2, a3, lr} stmfd sp!, {a2, a3, lr}
ldr a3, [a1] /* a3 = row[2,0] */ ldr a3, [a1] /* a3 = row[2,0] */
ldr ip, [pc, #(w42-.-8)] /* ip = W4 | (W2 << 16) */
ldr a4, [a1, #8] /* a4 = row[3,1] */ ldr a4, [a1, #8] /* a4 = row[3,1] */
idct_row COL_SHIFT idct_row COL_SHIFT
ldmfd sp!, {a2, a3} ldmfd sp!, {a2, a3}
...@@ -309,6 +312,7 @@ idct_col_add_armv6: ...@@ -309,6 +312,7 @@ idct_col_add_armv6:
stmfd sp!, {a2, a3, lr} stmfd sp!, {a2, a3, lr}
ldr a3, [a1] /* a3 = row[2,0] */ ldr a3, [a1] /* a3 = row[2,0] */
ldr ip, [pc, #(w42-.-8)] /* ip = W4 | (W2 << 16) */
ldr a4, [a1, #8] /* a4 = row[3,1] */ ldr a4, [a1, #8] /* a4 = row[3,1] */
idct_row COL_SHIFT idct_row COL_SHIFT
ldmfd sp!, {a2, a3} ldmfd sp!, {a2, a3}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment