aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2008-11-12 20:23:36 +0000
committerMåns Rullgård <mans@mansr.com>2008-11-12 20:23:36 +0000
commit77753f874a7b95400a694eaf6739cc77539d6580 (patch)
tree6ca3245a9c54f1e33e56ffe40320a48216491967 /libavcodec
parent3a84713aaa5a0f83cbb3fdca62c83df609822c9c (diff)
downloadffmpeg-77753f874a7b95400a694eaf6739cc77539d6580.tar.gz
ARM: fix j_rev_dct_ARM
This is a bugfix for ARMv4 assembly implementation of 'j_rev_dct' function. The problem was in the incorrect partially empty row detection. Even if the first two coefficients in the row were nonzero, it handled this just like the case with only the first nonzero coefficient. Now this function produces exactly the same output as the stripped down reference C version of 'j_rev_dct' (with the nested checks like 'if (d6) { if (d2) { ...' always evaluated as true, avoiding shortcut branches). Originally committed as revision 15805 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/armv4l/jrevdct_arm.S10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/armv4l/jrevdct_arm.S b/libavcodec/armv4l/jrevdct_arm.S
index 90bc2784ec..b77315b0f5 100644
--- a/libavcodec/armv4l/jrevdct_arm.S
+++ b/libavcodec/armv4l/jrevdct_arm.S
@@ -68,22 +68,22 @@ function j_rev_dct_ARM, export=1
add r11, pc, #(const_array-.-8) @ r11 = base pointer to the constants array
row_loop:
ldrsh r0, [lr, # 0] @ r0 = 'd0'
- ldrsh r1, [lr, # 8] @ r1 = 'd1'
+ ldrsh r2, [lr, # 2] @ r2 = 'd2'
@ Optimization for row that have all items except the first set to 0
@ (this works as the DCTELEMS are always 4-byte aligned)
ldr r5, [lr, # 0]
- ldr r2, [lr, # 4]
+ ldr r6, [lr, # 4]
ldr r3, [lr, # 8]
ldr r4, [lr, #12]
orr r3, r3, r4
- orr r3, r3, r2
+ orr r3, r3, r6
orrs r5, r3, r5
beq end_of_row_loop @ nothing to be done as ALL of them are '0'
- orrs r2, r3, r1
+ orrs r3, r3, r2
beq empty_row
- ldrsh r2, [lr, # 2] @ r2 = 'd2'
+ ldrsh r1, [lr, # 8] @ r1 = 'd1'
ldrsh r4, [lr, # 4] @ r4 = 'd4'
ldrsh r6, [lr, # 6] @ r6 = 'd6'