diff options
Diffstat (limited to 'lib/rbcodec/codecs/libspeex/quant_lsp_bfin.h')
-rw-r--r-- | lib/rbcodec/codecs/libspeex/quant_lsp_bfin.h | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/lib/rbcodec/codecs/libspeex/quant_lsp_bfin.h b/lib/rbcodec/codecs/libspeex/quant_lsp_bfin.h index 917047bb56..087b466b75 100644 --- a/lib/rbcodec/codecs/libspeex/quant_lsp_bfin.h +++ b/lib/rbcodec/codecs/libspeex/quant_lsp_bfin.h | |||
@@ -55,9 +55,9 @@ static int lsp_quant( | |||
55 | 55 | ||
56 | __asm__ __volatile__ | 56 | __asm__ __volatile__ |
57 | ( | 57 | ( |
58 | " %0 = 1 (X);\n\t" /* %0: best_dist */ | 58 | " %0 = 1 (X);\n\t" /* %0: best_dist */ |
59 | " %0 <<= 30;\n\t" | 59 | " %0 <<= 30;\n\t" |
60 | " %1 = 0 (X);\n\t" /* %1: best_i */ | 60 | " %1 = 0 (X);\n\t" /* %1: best_i */ |
61 | " P2 = %3\n\t" /* P2: ptr to cdbk */ | 61 | " P2 = %3\n\t" /* P2: ptr to cdbk */ |
62 | " R5 = 0;\n\t" /* R5: best cb entry */ | 62 | " R5 = 0;\n\t" /* R5: best cb entry */ |
63 | 63 | ||
@@ -68,19 +68,19 @@ static int lsp_quant( | |||
68 | " B0 = %2;\n\t" | 68 | " B0 = %2;\n\t" |
69 | 69 | ||
70 | " R2.L = W [I0++];\n\t" | 70 | " R2.L = W [I0++];\n\t" |
71 | " LSETUP (lq1, lq2) LC0 = %4;\n\t" | 71 | " LSETUP (1f, 2f) LC0 = %4;\n\t" |
72 | "lq1: R3 = 0;\n\t" /* R3: dist */ | 72 | "1: R3 = 0;\n\t" /* R3: dist */ |
73 | " LSETUP (lq3, lq4) LC1 = %5;\n\t" | 73 | " LSETUP (3f, 4f) LC1 = %5;\n\t" |
74 | "lq3: R1 = B [P2++] (X);\n\t" | 74 | "3: R1 = B [P2++] (X);\n\t" |
75 | " R1 <<= 5;\n\t" | 75 | " R1 <<= 5;\n\t" |
76 | " R0.L = R2.L - R1.L || R2.L = W [I0++];\n\t" | 76 | " R0.L = R2.L - R1.L || R2.L = W [I0++];\n\t" |
77 | " R0 = R0.L*R0.L;\n\t" | 77 | " R0 = R0.L*R0.L;\n\t" |
78 | "lq4: R3 = R3 + R0;\n\t" | 78 | "4: R3 = R3 + R0;\n\t" |
79 | 79 | ||
80 | " cc =R3<%0;\n\t" | 80 | " cc =R3<%0;\n\t" |
81 | " if cc %0=R3;\n\t" | 81 | " if cc %0=R3;\n\t" |
82 | " if cc %1=R5;\n\t" | 82 | " if cc %1=R5;\n\t" |
83 | "lq2: R5 += 1;\n\t" | 83 | "2: R5 += 1;\n\t" |
84 | " L0 = 0;\n\t" | 84 | " L0 = 0;\n\t" |
85 | : "=&d" (best_dist), "=&d" (best_id) | 85 | : "=&d" (best_dist), "=&d" (best_id) |
86 | : "a" (x), "b" (cdbk), "a" (nbVec), "a" (nbDim) | 86 | : "a" (x), "b" (cdbk), "a" (nbVec), "a" (nbDim) |
@@ -117,9 +117,9 @@ static int lsp_weight_quant( | |||
117 | 117 | ||
118 | __asm__ __volatile__ | 118 | __asm__ __volatile__ |
119 | ( | 119 | ( |
120 | " %0 = 1 (X);\n\t" /* %0: best_dist */ | 120 | " %0 = 1 (X);\n\t" /* %0: best_dist */ |
121 | " %0 <<= 30;\n\t" | 121 | " %0 <<= 30;\n\t" |
122 | " %1 = 0 (X);\n\t" /* %1: best_i */ | 122 | " %1 = 0 (X);\n\t" /* %1: best_i */ |
123 | " P2 = %4\n\t" /* P2: ptr to cdbk */ | 123 | " P2 = %4\n\t" /* P2: ptr to cdbk */ |
124 | " R5 = 0;\n\t" /* R5: best cb entry */ | 124 | " R5 = 0;\n\t" /* R5: best cb entry */ |
125 | 125 | ||
@@ -128,27 +128,27 @@ static int lsp_weight_quant( | |||
128 | " L0 = R0;\n\t" | 128 | " L0 = R0;\n\t" |
129 | " L1 = R0;\n\t" | 129 | " L1 = R0;\n\t" |
130 | " I0 = %2;\n\t" /* %2: &x[0] */ | 130 | " I0 = %2;\n\t" /* %2: &x[0] */ |
131 | " I1 = %3;\n\t" /* %3: &weight[0] */ | 131 | " I1 = %3;\n\t" /* %3: &weight[0] */ |
132 | " B0 = %2;\n\t" | 132 | " B0 = %2;\n\t" |
133 | " B1 = %3;\n\t" | 133 | " B1 = %3;\n\t" |
134 | 134 | ||
135 | " LSETUP (lwq1, lwq2) LC0 = %5;\n\t" | 135 | " LSETUP (1f, 2f) LC0 = %5;\n\t" |
136 | "lwq1: R3 = 0 (X);\n\t" /* R3: dist */ | 136 | "1: R3 = 0 (X);\n\t" /* R3: dist */ |
137 | " LSETUP (lwq3, lwq4) LC1 = %6;\n\t" | 137 | " LSETUP (3f, 4f) LC1 = %6;\n\t" |
138 | "lwq3: R0.L = W [I0++] || R2.L = W [I1++];\n\t" | 138 | "3: R0.L = W [I0++] || R2.L = W [I1++];\n\t" |
139 | " R1 = B [P2++] (X);\n\t" | 139 | " R1 = B [P2++] (X);\n\t" |
140 | " R1 <<= 5;\n\t" | 140 | " R1 <<= 5;\n\t" |
141 | " R0.L = R0.L - R1.L;\n\t" | 141 | " R0.L = R0.L - R1.L;\n\t" |
142 | " R0 = R0.L*R0.L;\n\t" | 142 | " R0 = R0.L*R0.L;\n\t" |
143 | " A1 = R2.L*R0.L (M,IS);\n\t" | 143 | " A1 = R2.L*R0.L (M,IS);\n\t" |
144 | " A1 = A1 >>> 16;\n\t" | 144 | " A1 = A1 >>> 16;\n\t" |
145 | " R1 = (A1 += R2.L*R0.H) (IS);\n\t" | 145 | " R1 = (A1 += R2.L*R0.H) (IS);\n\t" |
146 | "lwq4: R3 = R3 + R1;\n\t" | 146 | "4: R3 = R3 + R1;\n\t" |
147 | 147 | ||
148 | " cc =R3<%0;\n\t" | 148 | " cc =R3<%0;\n\t" |
149 | " if cc %0=R3;\n\t" | 149 | " if cc %0=R3;\n\t" |
150 | " if cc %1=R5;\n\t" | 150 | " if cc %1=R5;\n\t" |
151 | "lwq2: R5 += 1;\n\t" | 151 | "2: R5 += 1;\n\t" |
152 | " L0 = 0;\n\t" | 152 | " L0 = 0;\n\t" |
153 | " L1 = 0;\n\t" | 153 | " L1 = 0;\n\t" |
154 | : "=&d" (best_dist), "=&d" (best_id) | 154 | : "=&d" (best_dist), "=&d" (best_id) |