diff armv4l/simple_idct_arm.S @ 2979:bfabfdf9ce55 libavcodec

COSMETICS: tabs --> spaces, some prettyprinting
author diego
date Thu, 22 Dec 2005 01:10:11 +0000
parents ef2149182f1c
children 0b546eab515d
line wrap: on
line diff
--- a/armv4l/simple_idct_arm.S	Wed Dec 21 17:50:40 2005 +0000
+++ b/armv4l/simple_idct_arm.S	Thu Dec 22 01:10:11 2005 +0000
@@ -51,9 +51,9 @@
 #define COL_SHIFTED_1 524288 /* 1<< (COL_SHIFT-1) */
 
 
-	.text
-	.align
-	.global simple_idct_ARM
+        .text
+        .align
+        .global simple_idct_ARM
 
 simple_idct_ARM:
         @@ void simple_idct_ARM(int16_t *block)
@@ -120,8 +120,8 @@
         ldr r11, [r12, #offW7]   @ R11=W7
         mul r5, r10, r7          @ R5=W5*ROWr16[1]=b2 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
         mul r7, r11, r7          @ R7=W7*ROWr16[1]=b3 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
-		teq r2, #0               @ if null avoid muls
-		mlane r0, r9, r2, r0     @ R0+=W3*ROWr16[3]=b0 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
+                teq r2, #0               @ if null avoid muls
+                mlane r0, r9, r2, r0     @ R0+=W3*ROWr16[3]=b0 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
         rsbne r2, r2, #0         @ R2=-ROWr16[3]
         mlane r1, r11, r2, r1    @ R1-=W7*ROWr16[3]=b1 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
         mlane r5, r8, r2, r5     @ R5-=W1*ROWr16[3]=b2 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
@@ -147,7 +147,7 @@
         @@ MAC16(b3, -W1, row[7]);
         @@ MAC16(b1, -W5, row[7]);
         mov r3, r3, asr #16      @ R3=ROWr16[5]
-		teq r3, #0               @ if null avoid muls
+                teq r3, #0               @ if null avoid muls
         mlane r0, r10, r3, r0    @ R0+=W5*ROWr16[5]=b0
         mov r4, r4, asr #16      @ R4=ROWr16[7]
         mlane r5, r11, r3, r5    @ R5+=W7*ROWr16[5]=b2
@@ -155,7 +155,7 @@
         rsbne r3, r3, #0         @ R3=-ROWr16[5]
         mlane r1, r8, r3, r1     @ R7-=W1*ROWr16[5]=b1
         @@ R3 is free now
-		teq r4, #0               @ if null avoid muls
+                teq r4, #0               @ if null avoid muls
         mlane r0, r11, r4, r0    @ R0+=W7*ROWr16[7]=b0
         mlane r5, r9, r4, r5     @ R5+=W3*ROWr16[7]=b2
         rsbne r4, r4, #0         @ R4=-ROWr16[7]
@@ -187,7 +187,7 @@
         teq r2, #0
         beq __end_bef_a_evaluation
 
-	add r2, r6, r11          @ R2=a0+W6*ROWr16[2] (a1)
+        add r2, r6, r11          @ R2=a0+W6*ROWr16[2] (a1)
         mul r11, r8, r4          @ R11=W2*ROWr16[2]
         sub r4, r6, r11          @ R4=a0-W2*ROWr16[2] (a3)
         add r6, r6, r11          @ R6=a0+W2*ROWr16[2] (a0)
@@ -203,7 +203,7 @@
         @@ a2 -= W4*row[4]
         @@ a3 += W4*row[4]
         ldrsh r11, [r14, #8]     @ R11=ROWr16[4]
-		teq r11, #0              @ if null avoid muls
+                teq r11, #0              @ if null avoid muls
         mulne r11, r9, r11       @ R11=W4*ROWr16[4]
         @@ R9 is free now
         ldrsh r9, [r14, #12]     @ R9=ROWr16[6]
@@ -212,7 +212,7 @@
         subne r3, r3, r11        @ R3-=W4*ROWr16[4] (a2)
         addne r4, r4, r11        @ R4+=W4*ROWr16[4] (a3)
         @@ W6 alone is no more useful, save W2*ROWr16[6] in it instead
-		teq r9, #0               @ if null avoid muls
+                teq r9, #0               @ if null avoid muls
         mulne r11, r10, r9       @ R11=W6*ROWr16[6]
         addne r6, r6, r11        @ R6+=W6*ROWr16[6] (a0)
         mulne r10, r8, r9        @ R10=W2*ROWr16[6]
@@ -294,165 +294,165 @@
 
 
 
-	@@ at this point, R0=block, R1-R11 (free)
-	@@     R12=__const_ptr_, R14=&block[n]
-	add r14, r0, #14        @ R14=&block[7], better start from the last col, and decrease the value until col=0, i.e. R14=block.
+        @@ at this point, R0=block, R1-R11 (free)
+        @@     R12=__const_ptr_, R14=&block[n]
+        add r14, r0, #14        @ R14=&block[7], better start from the last col, and decrease the value until col=0, i.e. R14=block.
 __col_loop:
 
 __b_evaluation2:
-	@@ at this point, R0=block (temp),  R1-R11 (free)
-	@@     R12=__const_ptr_, R14=&block[n]
-	@@ proceed with b0-b3 first, followed by a0-a3
-	@@ MUL16(b0, W1, col[8x1]);
-	@@ MUL16(b1, W3, col[8x1]);
-	@@ MUL16(b2, W5, col[8x1]);
-	@@ MUL16(b3, W7, col[8x1]);
-	@@ MAC16(b0, W3, col[8x3]);
-	@@ MAC16(b1, -W7, col[8x3]);
-	@@ MAC16(b2, -W1, col[8x3]);
-	@@ MAC16(b3, -W5, col[8x3]);
-	ldr r8, [r12, #offW1]    @ R8=W1
-	ldrsh r7, [r14, #16]
-	mul r0, r8, r7           @ R0=W1*ROWr16[1]=b0 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
-	ldr r9, [r12, #offW3]    @ R9=W3
-	ldr r10, [r12, #offW5]   @ R10=W5
-	mul r1, r9, r7           @ R1=W3*ROWr16[1]=b1 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
-	ldr r11, [r12, #offW7]   @ R11=W7
-	mul r5, r10, r7          @ R5=W5*ROWr16[1]=b2 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
-	ldrsh r2, [r14, #48]
-	mul r7, r11, r7          @ R7=W7*ROWr16[1]=b3 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
-	teq r2, #0               @ if 0, then avoid muls
-	mlane r0, r9, r2, r0     @ R0+=W3*ROWr16[3]=b0 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
-	rsbne r2, r2, #0         @ R2=-ROWr16[3]
-	mlane r1, r11, r2, r1    @ R1-=W7*ROWr16[3]=b1 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
-	mlane r5, r8, r2, r5     @ R5-=W1*ROWr16[3]=b2 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
-	mlane r7, r10, r2, r7    @ R7-=W5*ROWr16[3]=b3 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
+        @@ at this point, R0=block (temp),  R1-R11 (free)
+        @@     R12=__const_ptr_, R14=&block[n]
+        @@ proceed with b0-b3 first, followed by a0-a3
+        @@ MUL16(b0, W1, col[8x1]);
+        @@ MUL16(b1, W3, col[8x1]);
+        @@ MUL16(b2, W5, col[8x1]);
+        @@ MUL16(b3, W7, col[8x1]);
+        @@ MAC16(b0, W3, col[8x3]);
+        @@ MAC16(b1, -W7, col[8x3]);
+        @@ MAC16(b2, -W1, col[8x3]);
+        @@ MAC16(b3, -W5, col[8x3]);
+        ldr r8, [r12, #offW1]    @ R8=W1
+        ldrsh r7, [r14, #16]
+        mul r0, r8, r7           @ R0=W1*ROWr16[1]=b0 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
+        ldr r9, [r12, #offW3]    @ R9=W3
+        ldr r10, [r12, #offW5]   @ R10=W5
+        mul r1, r9, r7           @ R1=W3*ROWr16[1]=b1 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
+        ldr r11, [r12, #offW7]   @ R11=W7
+        mul r5, r10, r7          @ R5=W5*ROWr16[1]=b2 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
+        ldrsh r2, [r14, #48]
+        mul r7, r11, r7          @ R7=W7*ROWr16[1]=b3 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
+        teq r2, #0               @ if 0, then avoid muls
+        mlane r0, r9, r2, r0     @ R0+=W3*ROWr16[3]=b0 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
+        rsbne r2, r2, #0         @ R2=-ROWr16[3]
+        mlane r1, r11, r2, r1    @ R1-=W7*ROWr16[3]=b1 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
+        mlane r5, r8, r2, r5     @ R5-=W1*ROWr16[3]=b2 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
+        mlane r7, r10, r2, r7    @ R7-=W5*ROWr16[3]=b3 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
 
-	@@ at this point, R0=b0,  R1=b1, R2 (free), R3 (free), R4 (free),
-	@@     R5=b2, R6 (free), R7=b3, R8=W1, R9=W3, R10=W5, R11=W7,
-	@@     R12=__const_ptr_, R14=&block[n]
-	@@ MAC16(b0, W5, col[5x8]);
-	@@ MAC16(b2, W7, col[5x8]);
-	@@ MAC16(b3, W3, col[5x8]);
-	@@ MAC16(b1, -W1, col[5x8]);
-	@@ MAC16(b0, W7, col[7x8]);
-	@@ MAC16(b2, W3, col[7x8]);
-	@@ MAC16(b3, -W1, col[7x8]);
-	@@ MAC16(b1, -W5, col[7x8]);
-	ldrsh r3, [r14, #80]     @ R3=COLr16[5x8]
-	teq r3, #0               @ if 0 then avoid muls
-	mlane r0, r10, r3, r0    @ R0+=W5*ROWr16[5x8]=b0
-	mlane r5, r11, r3, r5    @ R5+=W7*ROWr16[5x8]=b2
-	mlane r7, r9, r3, r7     @ R7+=W3*ROWr16[5x8]=b3
-	rsbne r3, r3, #0         @ R3=-ROWr16[5x8]
-	ldrsh r4, [r14, #112]    @ R4=COLr16[7x8]
-	mlane r1, r8, r3, r1     @ R7-=W1*ROWr16[5x8]=b1
-	@@ R3 is free now
-	teq r4, #0               @ if 0 then avoid muls
-	mlane r0, r11, r4, r0    @ R0+=W7*ROWr16[7x8]=b0
-	mlane r5, r9, r4, r5     @ R5+=W3*ROWr16[7x8]=b2
-	rsbne r4, r4, #0         @ R4=-ROWr16[7x8]
-	mlane r7, r8, r4, r7     @ R7-=W1*ROWr16[7x8]=b3
-	mlane r1, r10, r4, r1    @ R1-=W5*ROWr16[7x8]=b1
-	@@ R4 is free now
+        @@ at this point, R0=b0,  R1=b1, R2 (free), R3 (free), R4 (free),
+        @@     R5=b2, R6 (free), R7=b3, R8=W1, R9=W3, R10=W5, R11=W7,
+        @@     R12=__const_ptr_, R14=&block[n]
+        @@ MAC16(b0, W5, col[5x8]);
+        @@ MAC16(b2, W7, col[5x8]);
+        @@ MAC16(b3, W3, col[5x8]);
+        @@ MAC16(b1, -W1, col[5x8]);
+        @@ MAC16(b0, W7, col[7x8]);
+        @@ MAC16(b2, W3, col[7x8]);
+        @@ MAC16(b3, -W1, col[7x8]);
+        @@ MAC16(b1, -W5, col[7x8]);
+        ldrsh r3, [r14, #80]     @ R3=COLr16[5x8]
+        teq r3, #0               @ if 0 then avoid muls
+        mlane r0, r10, r3, r0    @ R0+=W5*ROWr16[5x8]=b0
+        mlane r5, r11, r3, r5    @ R5+=W7*ROWr16[5x8]=b2
+        mlane r7, r9, r3, r7     @ R7+=W3*ROWr16[5x8]=b3
+        rsbne r3, r3, #0         @ R3=-ROWr16[5x8]
+        ldrsh r4, [r14, #112]    @ R4=COLr16[7x8]
+        mlane r1, r8, r3, r1     @ R7-=W1*ROWr16[5x8]=b1
+        @@ R3 is free now
+        teq r4, #0               @ if 0 then avoid muls
+        mlane r0, r11, r4, r0    @ R0+=W7*ROWr16[7x8]=b0
+        mlane r5, r9, r4, r5     @ R5+=W3*ROWr16[7x8]=b2
+        rsbne r4, r4, #0         @ R4=-ROWr16[7x8]
+        mlane r7, r8, r4, r7     @ R7-=W1*ROWr16[7x8]=b3
+        mlane r1, r10, r4, r1    @ R1-=W5*ROWr16[7x8]=b1
+        @@ R4 is free now
 __end_b_evaluation2:
-	@@ at this point, R0=b0,  R1=b1, R2 (free), R3 (free), R4 (free),
-	@@     R5=b2, R6 (free), R7=b3, R8 (free), R9 (free), R10 (free), R11 (free),
-	@@     R12=__const_ptr_, R14=&block[n]
+        @@ at this point, R0=b0,  R1=b1, R2 (free), R3 (free), R4 (free),
+        @@     R5=b2, R6 (free), R7=b3, R8 (free), R9 (free), R10 (free), R11 (free),
+        @@     R12=__const_ptr_, R14=&block[n]
 
 __a_evaluation2:
-	@@ a0 = (W4 * col[8x0]) + (1 << (COL_SHIFT - 1));
-	@@ a1 = a0 + W6 * row[2];
-	@@ a2 = a0 - W6 * row[2];
-	@@ a3 = a0 - W2 * row[2];
-	@@ a0 = a0 + W2 * row[2];
-	ldrsh r6, [r14, #0]
-	ldr r9, [r12, #offW4]    @ R9=W4
-	mul r6, r9, r6           @ R6=W4*ROWr16[0]
-	ldr r10, [r12, #offW6]   @ R10=W6
-	ldrsh r4, [r14, #32]      @ R4=ROWr16[2] (a3 not defined yet)
-	add r6, r6, #COL_SHIFTED_1 @ R6=W4*ROWr16[0] + 1<<(COL_SHIFT-1) (a0)
-	mul r11, r10, r4         @ R11=W6*ROWr16[2]
-	ldr r8, [r12, #offW2]    @ R8=W2
-	add r2, r6, r11          @ R2=a0+W6*ROWr16[2] (a1)
-	sub r3, r6, r11          @ R3=a0-W6*ROWr16[2] (a2)
-	mul r11, r8, r4          @ R11=W2*ROWr16[2]
-	sub r4, r6, r11          @ R4=a0-W2*ROWr16[2] (a3)
-	add r6, r6, r11          @ R6=a0+W2*ROWr16[2] (a0)
+        @@ a0 = (W4 * col[8x0]) + (1 << (COL_SHIFT - 1));
+        @@ a1 = a0 + W6 * row[2];
+        @@ a2 = a0 - W6 * row[2];
+        @@ a3 = a0 - W2 * row[2];
+        @@ a0 = a0 + W2 * row[2];
+        ldrsh r6, [r14, #0]
+        ldr r9, [r12, #offW4]    @ R9=W4
+        mul r6, r9, r6           @ R6=W4*ROWr16[0]
+        ldr r10, [r12, #offW6]   @ R10=W6
+        ldrsh r4, [r14, #32]     @ R4=ROWr16[2] (a3 not defined yet)
+        add r6, r6, #COL_SHIFTED_1 @ R6=W4*ROWr16[0] + 1<<(COL_SHIFT-1) (a0)
+        mul r11, r10, r4         @ R11=W6*ROWr16[2]
+        ldr r8, [r12, #offW2]    @ R8=W2
+        add r2, r6, r11          @ R2=a0+W6*ROWr16[2] (a1)
+        sub r3, r6, r11          @ R3=a0-W6*ROWr16[2] (a2)
+        mul r11, r8, r4          @ R11=W2*ROWr16[2]
+        sub r4, r6, r11          @ R4=a0-W2*ROWr16[2] (a3)
+        add r6, r6, r11          @ R6=a0+W2*ROWr16[2] (a0)
 
-	@@ at this point, R0=b0,  R1=b1, R2=a1, R3=a2, R4=a3,
-	@@     R5=b2, R6=a0, R7=b3, R8=W2, R9=W4, R10=W6, R11 (free),
-	@@     R12=__const_ptr_, R14=&block[n]
-	@@ a0 += W4*row[4]
-	@@ a1 -= W4*row[4]
-	@@ a2 -= W4*row[4]
-	@@ a3 += W4*row[4]
-	ldrsh r11, [r14, #64]     @ R11=ROWr16[4]
-	teq r11, #0              @ if null avoid muls
-	mulne r11, r9, r11       @ R11=W4*ROWr16[4]
-	@@ R9 is free now
-	addne r6, r6, r11        @ R6+=W4*ROWr16[4] (a0)
-	subne r2, r2, r11        @ R2-=W4*ROWr16[4] (a1)
-	subne r3, r3, r11        @ R3-=W4*ROWr16[4] (a2)
-	ldrsh r9, [r14, #96]     @ R9=ROWr16[6]
-	addne r4, r4, r11        @ R4+=W4*ROWr16[4] (a3)
-	@@ W6 alone is no more useful, save W2*ROWr16[6] in it instead
-	teq r9, #0               @ if null avoid muls
-	mulne r11, r10, r9       @ R11=W6*ROWr16[6]
-	addne r6, r6, r11        @ R6+=W6*ROWr16[6] (a0)
-	mulne r10, r8, r9        @ R10=W2*ROWr16[6]
-	@@ a0 += W6*row[6];
-	@@ a3 -= W6*row[6];
-	@@ a1 -= W2*row[6];
-	@@ a2 += W2*row[6];
-	subne r4, r4, r11        @ R4-=W6*ROWr16[6] (a3)
-	subne r2, r2, r10        @ R2-=W2*ROWr16[6] (a1)
-	addne r3, r3, r10        @ R3+=W2*ROWr16[6] (a2)
+        @@ at this point, R0=b0,  R1=b1, R2=a1, R3=a2, R4=a3,
+        @@     R5=b2, R6=a0, R7=b3, R8=W2, R9=W4, R10=W6, R11 (free),
+        @@     R12=__const_ptr_, R14=&block[n]
+        @@ a0 += W4*row[4]
+        @@ a1 -= W4*row[4]
+        @@ a2 -= W4*row[4]
+        @@ a3 += W4*row[4]
+        ldrsh r11, [r14, #64]    @ R11=ROWr16[4]
+        teq r11, #0              @ if null avoid muls
+        mulne r11, r9, r11       @ R11=W4*ROWr16[4]
+        @@ R9 is free now
+        addne r6, r6, r11        @ R6+=W4*ROWr16[4] (a0)
+        subne r2, r2, r11        @ R2-=W4*ROWr16[4] (a1)
+        subne r3, r3, r11        @ R3-=W4*ROWr16[4] (a2)
+        ldrsh r9, [r14, #96]     @ R9=ROWr16[6]
+        addne r4, r4, r11        @ R4+=W4*ROWr16[4] (a3)
+        @@ W6 alone is no more useful, save W2*ROWr16[6] in it instead
+        teq r9, #0               @ if null avoid muls
+        mulne r11, r10, r9       @ R11=W6*ROWr16[6]
+        addne r6, r6, r11        @ R6+=W6*ROWr16[6] (a0)
+        mulne r10, r8, r9        @ R10=W2*ROWr16[6]
+        @@ a0 += W6*row[6];
+        @@ a3 -= W6*row[6];
+        @@ a1 -= W2*row[6];
+        @@ a2 += W2*row[6];
+        subne r4, r4, r11        @ R4-=W6*ROWr16[6] (a3)
+        subne r2, r2, r10        @ R2-=W2*ROWr16[6] (a1)
+        addne r3, r3, r10        @ R3+=W2*ROWr16[6] (a2)
 __end_a_evaluation2:
-	@@ at this point, R0=b0,  R1=b1, R2=a1, R3=a2, R4=a3,
-	@@     R5=b2, R6=a0, R7=b3, R8 (free), R9 (free), R10 (free), R11 (free),
-	@@     R12=__const_ptr_, R14=&block[n]
-	@@ col[0 ] = ((a0 + b0) >> COL_SHIFT);
-	@@ col[8 ] = ((a1 + b1) >> COL_SHIFT);
-	@@ col[16] = ((a2 + b2) >> COL_SHIFT);
-	@@ col[24] = ((a3 + b3) >> COL_SHIFT);
-	@@ col[32] = ((a3 - b3) >> COL_SHIFT);
-	@@ col[40] = ((a2 - b2) >> COL_SHIFT);
-	@@ col[48] = ((a1 - b1) >> COL_SHIFT);
-	@@ col[56] = ((a0 - b0) >> COL_SHIFT);
-	@@@@@ no optimisation here @@@@@
-	add r8, r6, r0           @ R8=a0+b0
-	add r9, r2, r1           @ R9=a1+b1
-	mov r8, r8, asr #COL_SHIFT
-	mov r9, r9, asr #COL_SHIFT
-	strh r8, [r14, #0]
-	strh r9, [r14, #16]
-	add r8, r3, r5           @ R8=a2+b2
-	add r9, r4, r7           @ R9=a3+b3
-	mov r8, r8, asr #COL_SHIFT
-	mov r9, r9, asr #COL_SHIFT
-	strh r8, [r14, #32]
-	strh r9, [r14, #48]
-	sub r8, r4, r7           @ R8=a3-b3
-	sub r9, r3, r5           @ R9=a2-b2
-	mov r8, r8, asr #COL_SHIFT
-	mov r9, r9, asr #COL_SHIFT
-	strh r8, [r14, #64]
-	strh r9, [r14, #80]
-	sub r8, r2, r1           @ R8=a1-b1
-	sub r9, r6, r0           @ R9=a0-b0
-	mov r8, r8, asr #COL_SHIFT
-	mov r9, r9, asr #COL_SHIFT
-	strh r8, [r14, #96]
-	strh r9, [r14, #112]
+        @@ at this point, R0=b0,  R1=b1, R2=a1, R3=a2, R4=a3,
+        @@     R5=b2, R6=a0, R7=b3, R8 (free), R9 (free), R10 (free), R11 (free),
+        @@     R12=__const_ptr_, R14=&block[n]
+        @@ col[0 ] = ((a0 + b0) >> COL_SHIFT);
+        @@ col[8 ] = ((a1 + b1) >> COL_SHIFT);
+        @@ col[16] = ((a2 + b2) >> COL_SHIFT);
+        @@ col[24] = ((a3 + b3) >> COL_SHIFT);
+        @@ col[32] = ((a3 - b3) >> COL_SHIFT);
+        @@ col[40] = ((a2 - b2) >> COL_SHIFT);
+        @@ col[48] = ((a1 - b1) >> COL_SHIFT);
+        @@ col[56] = ((a0 - b0) >> COL_SHIFT);
+        @@@@@ no optimisation here @@@@@
+        add r8, r6, r0           @ R8=a0+b0
+        add r9, r2, r1           @ R9=a1+b1
+        mov r8, r8, asr #COL_SHIFT
+        mov r9, r9, asr #COL_SHIFT
+        strh r8, [r14, #0]
+        strh r9, [r14, #16]
+        add r8, r3, r5           @ R8=a2+b2
+        add r9, r4, r7           @ R9=a3+b3
+        mov r8, r8, asr #COL_SHIFT
+        mov r9, r9, asr #COL_SHIFT
+        strh r8, [r14, #32]
+        strh r9, [r14, #48]
+        sub r8, r4, r7           @ R8=a3-b3
+        sub r9, r3, r5           @ R9=a2-b2
+        mov r8, r8, asr #COL_SHIFT
+        mov r9, r9, asr #COL_SHIFT
+        strh r8, [r14, #64]
+        strh r9, [r14, #80]
+        sub r8, r2, r1           @ R8=a1-b1
+        sub r9, r6, r0           @ R9=a0-b0
+        mov r8, r8, asr #COL_SHIFT
+        mov r9, r9, asr #COL_SHIFT
+        strh r8, [r14, #96]
+        strh r9, [r14, #112]
 
 __end_col_loop:
-	@@ at this point, R0-R11 (free)
-	@@     R12=__const_ptr_, R14=&block[n]
-	ldr r0, [sp, #0]         @ R0=block
-	teq r0, r14              @ compare current &block[n] to block, when block is reached, the loop is finished.
-	sub r14, r14, #2
-	bne __col_loop
+        @@ at this point, R0-R11 (free)
+        @@     R12=__const_ptr_, R14=&block[n]
+        ldr r0, [sp, #0]         @ R0=block
+        teq r0, r14              @ compare current &block[n] to block, when block is reached, the loop is finished.
+        sub r14, r14, #2
+        bne __col_loop
 
 
 
@@ -466,15 +466,15 @@
 
 @@ kind of sub-function, here not to overload the common case.
 __end_bef_a_evaluation:
-	add r2, r6, r11          @ R2=a0+W6*ROWr16[2] (a1)
+        add r2, r6, r11          @ R2=a0+W6*ROWr16[2] (a1)
         mul r11, r8, r4          @ R11=W2*ROWr16[2]
         sub r4, r6, r11          @ R4=a0-W2*ROWr16[2] (a3)
         add r6, r6, r11          @ R6=a0+W2*ROWr16[2] (a0)
-	bal __end_a_evaluation
+        bal __end_a_evaluation
 
 
 __constant_ptr__:  @@ see #defines at the beginning of the source code for values.
-	.align
+        .align
         .word   W1
         .word   W2
         .word   W3