[FFmpeg-cvslog] r15805 - trunk/libavcodec/armv4l/jrevdct_arm.S

mru subversion
Wed Nov 12 21:23:37 CET 2008


Author: mru
Date: Wed Nov 12 21:23:36 2008
New Revision: 15805

Log:
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).

Modified:
   trunk/libavcodec/armv4l/jrevdct_arm.S

Modified: trunk/libavcodec/armv4l/jrevdct_arm.S
==============================================================================
--- trunk/libavcodec/armv4l/jrevdct_arm.S	(original)
+++ trunk/libavcodec/armv4l/jrevdct_arm.S	Wed Nov 12 21:23:36 2008
@@ -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'
 




More information about the ffmpeg-cvslog mailing list