diff options
author | Mans Rullgard <mans@mansr.com> | 2011-06-14 11:29:48 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-06-23 07:31:54 +0100 |
commit | 8986fddc2bab92bd7d77a123ac70c4fb70c96c7c (patch) | |
tree | 73b8c4a57c98be10d4403dc69ec3019a1665b3f0 /libavcodec/arm/simple_idct_armv5te.S | |
parent | 9cd7b8549b71bcfced2062596fd9eecba092aeb1 (diff) | |
download | ffmpeg-8986fddc2bab92bd7d77a123ac70c4fb70c96c7c.tar.gz |
ARM: allow building in Thumb2 mode
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/arm/simple_idct_armv5te.S')
-rw-r--r-- | libavcodec/arm/simple_idct_armv5te.S | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/libavcodec/arm/simple_idct_armv5te.S b/libavcodec/arm/simple_idct_armv5te.S index 29ebf5c03c..24641e47b6 100644 --- a/libavcodec/arm/simple_idct_armv5te.S +++ b/libavcodec/arm/simple_idct_armv5te.S @@ -49,6 +49,7 @@ function idct_row_armv5te ldrd v1, [a1, #8] ldrd a3, [a1] /* a3 = row[1:0], a4 = row[3:2] */ orrs v1, v1, v2 + itt eq cmpeq v1, a4 cmpeq v1, a3, lsr #16 beq row_dc_only @@ -269,6 +270,7 @@ function idct_col_armv5te ldmfd sp!, {a3, a4} adds a2, a3, v1 mov a2, a2, lsr #20 + it mi orrmi a2, a2, #0xf000 add ip, a4, v2 mov ip, ip, asr #20 @@ -276,6 +278,7 @@ function idct_col_armv5te str a2, [a1] subs a3, a3, v1 mov a2, a3, lsr #20 + it mi orrmi a2, a2, #0xf000 sub a4, a4, v2 mov a4, a4, asr #20 @@ -285,6 +288,7 @@ function idct_col_armv5te subs a2, a3, v3 mov a2, a2, lsr #20 + it mi orrmi a2, a2, #0xf000 sub ip, a4, v4 mov ip, ip, asr #20 @@ -292,6 +296,7 @@ function idct_col_armv5te str a2, [a1, #(16*1)] adds a3, a3, v3 mov a2, a3, lsr #20 + it mi orrmi a2, a2, #0xf000 add a4, a4, v4 mov a4, a4, asr #20 @@ -301,6 +306,7 @@ function idct_col_armv5te adds a2, a3, v5 mov a2, a2, lsr #20 + it mi orrmi a2, a2, #0xf000 add ip, a4, v6 mov ip, ip, asr #20 @@ -308,6 +314,7 @@ function idct_col_armv5te str a2, [a1, #(16*2)] subs a3, a3, v5 mov a2, a3, lsr #20 + it mi orrmi a2, a2, #0xf000 sub a4, a4, v6 mov a4, a4, asr #20 @@ -317,6 +324,7 @@ function idct_col_armv5te adds a2, a3, v7 mov a2, a2, lsr #20 + it mi orrmi a2, a2, #0xf000 add ip, a4, fp mov ip, ip, asr #20 @@ -324,6 +332,7 @@ function idct_col_armv5te str a2, [a1, #(16*3)] subs a3, a3, v7 mov a2, a3, lsr #20 + it mi orrmi a2, a2, #0xf000 sub a4, a4, fp mov a4, a4, asr #20 @@ -335,15 +344,19 @@ endfunc .macro clip dst, src:vararg movs \dst, \src + it mi movmi \dst, #0 cmp \dst, #255 + it gt movgt \dst, #255 .endm .macro aclip dst, src:vararg adds \dst, \src + it mi movmi \dst, #0 cmp \dst, #255 + it gt movgt \dst, #255 .endm @@ -370,35 +383,35 @@ function idct_col_put_armv5te orr a2, a3, a4, lsl #8 rsb v2, lr, lr, lsl #3 ldmfd sp!, {a3, a4} - strh a2, [v2, v1]! + strh_pre a2, v2, v1 sub a2, a3, v3 clip a2, a2, asr #20 sub ip, a4, v4 clip ip, ip, asr #20 orr a2, a2, ip, lsl #8 - strh a2, [v1, lr]! + strh_pre a2, v1, lr add a3, a3, v3 clip a2, a3, asr #20 add a4, a4, v4 clip a4, a4, asr #20 orr a2, a2, a4, lsl #8 ldmfd sp!, {a3, a4} - strh a2, [v2, -lr]! + strh_dpre a2, v2, lr add a2, a3, v5 clip a2, a2, asr #20 add ip, a4, v6 clip ip, ip, asr #20 orr a2, a2, ip, lsl #8 - strh a2, [v1, lr]! + strh_pre a2, v1, lr sub a3, a3, v5 clip a2, a3, asr #20 sub a4, a4, v6 clip a4, a4, asr #20 orr a2, a2, a4, lsl #8 ldmfd sp!, {a3, a4} - strh a2, [v2, -lr]! + strh_dpre a2, v2, lr add a2, a3, v7 clip a2, a2, asr #20 @@ -411,7 +424,7 @@ function idct_col_put_armv5te sub a4, a4, fp clip a4, a4, asr #20 orr a2, a2, a4, lsl #8 - strh a2, [v2, -lr] + strh_dpre a2, v2, lr ldr pc, [sp], #4 endfunc @@ -436,7 +449,7 @@ function idct_col_add_armv5te ldr v1, [sp, #32] sub a4, a4, v2 rsb v2, v1, v1, lsl #3 - ldrh ip, [v2, lr]! + ldrh_pre ip, v2, lr strh a2, [lr] and a2, ip, #255 aclip a3, a2, a3, asr #20 @@ -448,7 +461,7 @@ function idct_col_add_armv5te strh a2, [v2] ldmfd sp!, {a3, a4} - ldrh ip, [lr, v1]! + ldrh_pre ip, lr, v1 sub a2, a3, v3 add a3, a3, v3 and v3, ip, #255 @@ -458,7 +471,7 @@ function idct_col_add_armv5te aclip v3, v3, ip, lsr #8 orr a2, a2, v3, lsl #8 add a4, a4, v4 - ldrh ip, [v2, -v1]! + ldrh_dpre ip, v2, v1 strh a2, [lr] and a2, ip, #255 aclip a3, a2, a3, asr #20 @@ -468,7 +481,7 @@ function idct_col_add_armv5te strh a2, [v2] ldmfd sp!, {a3, a4} - ldrh ip, [lr, v1]! + ldrh_pre ip, lr, v1 add a2, a3, v5 sub a3, a3, v5 and v3, ip, #255 @@ -478,7 +491,7 @@ function idct_col_add_armv5te aclip v3, v3, ip, lsr #8 orr a2, a2, v3, lsl #8 sub a4, a4, v6 - ldrh ip, [v2, -v1]! + ldrh_dpre ip, v2, v1 strh a2, [lr] and a2, ip, #255 aclip a3, a2, a3, asr #20 @@ -488,7 +501,7 @@ function idct_col_add_armv5te strh a2, [v2] ldmfd sp!, {a3, a4} - ldrh ip, [lr, v1]! + ldrh_pre ip, lr, v1 add a2, a3, v7 sub a3, a3, v7 and v3, ip, #255 @@ -498,7 +511,7 @@ function idct_col_add_armv5te aclip v3, v3, ip, lsr #8 orr a2, a2, v3, lsl #8 sub a4, a4, fp - ldrh ip, [v2, -v1]! + ldrh_dpre ip, v2, v1 strh a2, [lr] and a2, ip, #255 aclip a3, a2, a3, asr #20 |