diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-01-23 16:01:47 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-01-23 16:01:47 +0000 |
commit | 2591d91ebeab0e2243a3b8262b4710ce262929ad (patch) | |
tree | 513b9de20d32e706d9dc7af6aa93f701dc0dce08 /draw/draw_scale.c | |
parent | 03611f8dd4b349042e0edc29ea43f84d32f5601c (diff) | |
download | mupdf-2591d91ebeab0e2243a3b8262b4710ce262929ad.tar.xz |
Update ARM optimised scaling code in line with recent changes.
The ARM optimised code relied on the size of the weights structure
which was changed by the addition of a new member as part of the
patch scaling changes. Fix the code here, and add a note to the
structure in the hopes that this will avoid such breakages happening
in future.
Diffstat (limited to 'draw/draw_scale.c')
-rw-r--r-- | draw/draw_scale.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/draw/draw_scale.c b/draw/draw_scale.c index b34f9770..b2e28b7b 100644 --- a/draw/draw_scale.c +++ b/draw/draw_scale.c @@ -260,6 +260,8 @@ leave enough space) and then reordering afterwards. typedef struct fz_weights_s fz_weights; +/* This structure is accessed from ARM code - bear this in mind before + * altering it! */ struct fz_weights_s { int flip; /* true if outputting reversed */ @@ -616,7 +618,7 @@ scale_row_to_temp1(int *dst, unsigned char *src, fz_weights *weights) "@ r1 = src \n" "@ r2 = weights \n" "ldr r12,[r2],#4 @ r12= flip \n" - "ldr r3, [r2],#16 @ r3 = count r2 = &index\n" + "ldr r3, [r2],#20 @ r3 = count r2 = &index\n" "ldr r4, [r2] @ r4 = index[0] \n" "cmp r12,#0 @ if (flip) \n" "beq 4f @ { \n" @@ -676,7 +678,7 @@ scale_row_to_temp2(int *dst, unsigned char *src, fz_weights *weights) "@ r1 = src \n" "@ r2 = weights \n" "ldr r12,[r2],#4 @ r12= flip \n" - "ldr r3, [r2],#16 @ r3 = count r2 = &index\n" + "ldr r3, [r2],#20 @ r3 = count r2 = &index\n" "ldr r4, [r2] @ r4 = index[0] \n" "cmp r12,#0 @ if (flip) \n" "beq 4f @ { \n" @@ -740,7 +742,7 @@ scale_row_to_temp4(int *dst, unsigned char *src, fz_weights *weights) "@ r1 = src \n" "@ r2 = weights \n" "ldr r12,[r2],#4 @ r12= flip \n" - "ldr r3, [r2],#16 @ r3 = count r2 = &index\n" + "ldr r3, [r2],#20 @ r3 = count r2 = &index\n" "ldr r4, [r2] @ r4 = index[0] \n" "cmp r12,#0 @ if (flip) \n" "beq 4f @ { \n" @@ -814,7 +816,7 @@ scale_row_from_temp(unsigned char *dst, int *src, fz_weights *weights, int width asm volatile( ENTER_ARM "ldr r12,[r13] @ r12= row \n" - "add r2, r2, #20 @ r2 = weights->index \n" + "add r2, r2, #24 @ r2 = weights->index \n" "stmfd r13!,{r4-r11,r14} \n" "@ r0 = dst \n" "@ r1 = src \n" |