Lines Matching refs:var1
87 | Performs the addition (var1+var2) with overflow control and saturation;|
95 | var1 |
97 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
101 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
116 Word16 add (Word16 var1, Word16 var2)
121 L_sum = (Word32)var1 + (Word32)var2;
134 | Performs the subtraction (var1+var2) with overflow control and satu- |
142 | var1 |
144 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
148 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
162 Word16 sub(Word16 var1, Word16 var2)
167 L_diff = (Word32) var1 - var2;
180 | Absolute value of var1; abs_s(-32768) = 32767. |
186 | var1 |
188 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
201 //Word16 abs_s (Word16 var1)
205 // if (var1 == MIN_16)
211 // if (var1 < 0)
213 // var_out = (Word16)-var1;
217 // var_out = var1;
231 | Arithmetically shift the 16 bit input var1 left var2 positions.Zero fill|
233 | var1 right by -var2 with sign extension. Saturate the result in case of |
240 | var1 |
242 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
246 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
261 Word16 shl (Word16 var1, Word16 var2)
270 var_out = shr (var1, (Word16)-var2);
274 result = (Word32) var1 *((Word32) 1 << var2);
276 if ((var2 > 15 && var1 != 0) || (result != (Word32) ((Word16) result)))
279 var_out = (Word16)((var1 > 0) ? MAX_16 : MIN_16);
298 | Arithmetically shift the 16 bit input var1 right var2 positions with |
299 | sign extension. If var2 is negative, arithmetically shift var1 left by |
307 | var1 |
309 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
313 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
328 Word16 shr (Word16 var1, Word16 var2)
336 var_out = shl (var1, (Word16)-var2);
342 var_out = (Word16)((var1 < 0) ? -1 : 0);
346 if (var1 < 0)
348 var_out = (Word16)(~((~var1) >> var2));
352 var_out = (Word16)(var1 >> var2);
368 | Performs the multiplication of var1 by var2 and gives a 16 bit result |
370 | mult(var1,var2) = extract_l(L_shr((var1 times var2),15)) and |
377 | var1 |
379 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
383 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
397 Word16 mult (Word16 var1, Word16 var2)
402 L_product = (Word32) var1 *(Word32) var2;
421 | L_mult is the 32 bit result of the multiplication of var1 times var2 |
423 | L_mult(var1,var2) = L_shl((var1 times var2),1) and |
430 | var1 |
432 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
436 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
451 Word32 L_mult(Word16 var1, Word16 var2)
455 L_var_out = (Word32) var1 *(Word32) var2;
477 | Negate var1 with saturation, saturate in the case where input is -32768:|
478 | negate(var1) = sub(0,var1). |
484 | var1 |
486 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
499 //Word16 negate (Word16 var1)
503 // var_out = (Word16)((var1 == MIN_16) ? MAX_16 : -var1);
636 | Multiply var1 by var2 and shift the result left by 1. Add the 32 bit |
638 | L_mac(L_var3,var1,var2) = L_add(L_var3,L_mult(var1,var2)). |
647 | var1 |
649 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
653 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
667 Word32 L_mac (Word32 L_var3, Word16 var1, Word16 var2)
672 L_product = L_mult(var1, var2);
685 | Multiply var1 by var2 and shift the result left by 1. Subtract the 32 |
687 | L_msu(L_var3,var1,var2) = L_sub(L_var3,L_mult(var1,var2)). |
696 | var1 |
698 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
702 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
717 Word32 L_msu (Word32 L_var3, Word16 var1, Word16 var2)
722 L_product = L_mult(var1, var2);
877 | mult_r(var1,var2) = extract_l(L_shr(((var1 * var2) + 16384),15)) and |
884 | var1 |
886 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
890 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
904 Word16 mult_r (Word16 var1, Word16 var2)
909 L_product_arr = (Word32) var1 *(Word32) var2; /* product */
944 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
1009 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
1060 | Same as shr(var1,var2) but with rounding. Saturate the result in case of|
1063 | if (sub(shl(shr(var1,var2),1),shr(var1,sub(var2,1)))) |
1066 | shr_r(var1,var2) = shr(var1,var2) |
1068 | shr_r(var1,var2) = add(shr(var1,var2),1) |
1070 | shr_r(var1,var2) = shr(var1,var2). |
1076 | var1 |
1078 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
1082 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
1096 Word16 shr_r (Word16 var1, Word16 var2)
1106 var_out = shr (var1, var2);
1110 if ((var1 & ((Word16) 1 << (var2 - 1))) != 0)
1127 | Multiply var1 by var2 and shift the result left by 1. Add the 32 bit |
1131 | mac_r(L_var3,var1,var2) = round(L_mac(L_var3,var1,var2)) |
1140 | var1 |
1142 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
1146 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
1160 Word16 mac_r (Word32 L_var3, Word16 var1, Word16 var2)
1164 L_var3 = L_mac (L_var3, var1, var2);
1178 | Multiply var1 by var2 and shift the result left by 1. Subtract the 32 |
1182 | msu_r(L_var3,var1,var2) = round(L_msu(L_var3,var1,var2)) |
1191 | var1 |
1193 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
1197 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
1211 Word16 msu_r (Word32 L_var3, Word16 var1
1215 L_var3 = L_msu (L_var3, var1, var2);
1229 | Deposit the 16 bit var1 into the 16 MS bits of the 32 bit output. The |
1236 | var1 |
1238 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
1251 //Word32 L_deposit_h (Word16 var1)
1255 // L_var_out = (Word32) var1 << 16;
1267 | Deposit the 16 bit var1 into the 16 LS bits of the 32 bit output. The |
1274 | var1 |
1276 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
1289 //Word32 L_deposit_l (Word16 var1)
1293 // L_var_out = (Word32) var1;
1323 | range : 0x8000 0000 <= var1 <= 0x7fff ffff. |
1327 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
1381 | range : 0x8000 0000 <= var1 <= 0x7fff ffff. |
1424 | ble var1 for positive values on the interval with minimum of 16384 and |
1428 | norm_var1 = shl(var1,norm_s(var1)). |
1434 | var1 |
1436 | range : 0xffff 8000 <= var1 <= 0x0000 7fff. |
1451 Word16 norm_s (Word16 var1)
1455 if (var1 == 0)
1461 if (var1 == -1)
1467 if (var1 < 0)
1469 var1 = (Word16)~var1;
1471 for (var_out = 0; var1 < 0x4000; var_out++)
1473 var1 <<= 1;
1488 | Produces a result which is the fractional integer division of var1 by |
1489 | var2; var1 and var2 must be positive and var2 must be greater or equal |
1490 | to var1; the result is positive (leading bit equal to 0) and truncated |
1492 | If var1 = var2 then div(var1,var2) = 32767. |
1498 | var1 |
1500 | range : 0x0000 0000 <= var1 <= var2 and var2 != 0. |
1504 | range : var1 <= var2 <= 0x0000 7fff and var2 != 0. |
1520 Word16 div_s (Word16 var1, Word16 var2)
1527 if (var1 == 0)
1533 if (var1 == var2)
1539 L_num = L_deposit_l (var1);
1579 | range : 0x8000 0000 <= var1 <= 0x7fff ffff. |