Changeset 517
- Timestamp:
- Jun 18, 2006 1:59:14 AM (18 years ago)
- Location:
- pjproject/trunk/pjmedia/src/pjmedia-codec/gsm
- Files:
-
- 2 added
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-codec/gsm/code.c
r176 r517 15 15 # include "proto.h" 16 16 extern char * memcpy P((char *, char *, int)); 17 #endif18 19 #ifdef HAS_STRING_H20 #include <string.h>21 17 #endif 22 18 … … 64 60 word * dpp = dp; /* [ 0...39 ] */ 65 61 66 static word e[50];67 68 62 word so[160]; 69 63 … … 77 71 so+k*40, /* d [0..39] IN */ 78 72 dp, /* dp [-120..-1] IN */ 79 e + 5,/* e [0..39] OUT */73 S->e + 5, /* e [0..39] OUT */ 80 74 dpp, /* dpp [0..39] OUT */ 81 75 Nc++, … … 83 77 84 78 Gsm_RPE_Encoding ( S, 85 e + 5,/* e ][0..39][ IN/OUT */79 S->e + 5,/* e ][0..39][ IN/OUT */ 86 80 xmaxc++, Mc++, xMc ); 87 81 /* 88 82 * Gsm_Update_of_reconstructed_short_time_residual_signal 89 * ( dpp, e + 5, dp );83 * ( dpp, S->e + 5, dp ); 90 84 */ 91 85 … … 93 87 register longword ltmp; 94 88 for (i = 0; i <= 39; i++) 95 dp[ i ] = GSM_ADD( e[5 + i], dpp[i] );89 dp[ i ] = GSM_ADD( S->e[5 + i], dpp[i] ); 96 90 } 97 91 dp += 40; -
pjproject/trunk/pjmedia/src/pjmedia-codec/gsm/config.h
r433 r517 10 10 #define CONFIG_H 11 11 12 / /#define SIGHANDLER_T int //* signal handlers are void */13 / /#define HAS_SYSV_SIGNAL 1 //* sigs not blocked/reset? */12 /*efine SIGHANDLER_T int /* signal handlers are void */ 13 /*efine HAS_SYSV_SIGNAL 1 /* sigs not blocked/reset? */ 14 14 15 #define HAS_STDLIB_H 1/* /usr/include/stdlib.h */16 //#define HAS_LIMITS_H 1 //* /usr/include/limits.h */17 #define HAS_FCNTL_H 1/* /usr/include/fcntl.h */18 //#define HAS_ERRNO_DECL 1 //* errno.h declares errno */15 #define HAS_STDLIB_H 1 /* /usr/include/stdlib.h */ 16 #define HAS_LIMITS_H 1 /* /usr/include/limits.h */ 17 #define HAS_FCNTL_H 1 /* /usr/include/fcntl.h */ 18 #define HAS_ERRNO_DECL 1 /* errno.h declares errno */ 19 19 20 #define HAS_FSTAT 1/* fstat syscall */21 #define HAS_FCHMOD 1/* fchmod syscall */22 #define HAS_CHMOD 1/* chmod syscall */23 #define HAS_FCHOWN 1/* fchown syscall */24 #define HAS_CHOWN 1/* chown syscall */25 / /#define HAS__FSETMODE 1 //* _fsetmode -- set file mode */20 #define HAS_FSTAT 1 /* fstat syscall */ 21 #define HAS_FCHMOD 1 /* fchmod syscall */ 22 #define HAS_CHMOD 1 /* chmod syscall */ 23 #define HAS_FCHOWN 1 /* fchown syscall */ 24 #define HAS_CHOWN 1 /* chown syscall */ 25 /*efine HAS__FSETMODE 1 /* _fsetmode -- set file mode */ 26 26 27 #define HAS_STRING_H 1/* /usr/include/string.h */28 / /#define HAS_STRINGS_H 1 //* /usr/include/strings.h */27 #define HAS_STRING_H 1 /* /usr/include/string.h */ 28 /*efine HAS_STRINGS_H 1 /* /usr/include/strings.h */ 29 29 30 #define HAS_UNISTD_H 1 /* /usr/include/unistd.h */ 31 #define HAS_UTIME 1 /* POSIX utime(path, times) */ 32 //#define HAS_UTIMES 1 // * use utimes() syscall instead*/ 33 #define HAS_UTIME_H 1 /* UTIME header file */ 34 //#define HAS_UTIMBUF 1 // * struct utimbuf */ 35 //#define HAS_UTIMEUSEC 1 // * microseconds in utimbuf? */ 36 30 #define HAS_UNISTD_H 1 /* /usr/include/unistd.h */ 31 #define HAS_UTIME 1 /* POSIX utime(path, times) */ 32 /*efine HAS_UTIMES 1 /* use utimes() syscall instead */ 33 #define HAS_UTIME_H 1 /* UTIME header file */ 34 #define HAS_UTIMBUF 1 /* struct utimbuf */ 35 /*efine HAS_UTIMEUSEC 1 /* microseconds in utimbuf? */ 37 36 38 37 #endif /* CONFIG_H */ 39 -
pjproject/trunk/pjmedia/src/pjmedia-codec/gsm/gsm_implode.c
r176 r517 117 117 118 118 uword sr = 0; 119 if (s->frame_index == 0) { 120 121 sr = *c++; 122 LARc[0] = sr & 0x3f; sr >>= 6; 123 sr |= (uword)*c++ << 2; 124 LARc[1] = sr & 0x3f; sr >>= 6; 125 sr |= (uword)*c++ << 4; 126 LARc[2] = sr & 0x1f; sr >>= 5; 127 LARc[3] = sr & 0x1f; sr >>= 5; 128 sr |= (uword)*c++ << 2; 129 LARc[4] = sr & 0xf; sr >>= 4; 130 LARc[5] = sr & 0xf; sr >>= 4; 131 sr |= (uword)*c++ << 2; /* 5 */ 132 LARc[6] = sr & 0x7; sr >>= 3; 133 LARc[7] = sr & 0x7; sr >>= 3; 134 sr |= (uword)*c++ << 4; 135 Nc[0] = sr & 0x7f; sr >>= 7; 136 bc[0] = sr & 0x3; sr >>= 2; 137 Mc[0] = sr & 0x3; sr >>= 2; 138 sr |= (uword)*c++ << 1; 139 xmaxc[0] = sr & 0x3f; sr >>= 6; 140 #undef xmc 119 if (s->frame_index) { 120 sr = sr >> 6 | LARc[0] << 10; 121 sr = sr >> 6 | LARc[1] << 10; 122 *c++ = sr >> 4; 123 sr = sr >> 5 | LARc[2] << 11; 124 *c++ = sr >> 7; 125 sr = sr >> 5 | LARc[3] << 11; 126 sr = sr >> 4 | LARc[4] << 12; 127 *c++ = sr >> 6; 128 sr = sr >> 4 | LARc[5] << 12; 129 sr = sr >> 3 | LARc[6] << 13; 130 *c++ = sr >> 7; 131 sr = sr >> 3 | LARc[7] << 13; 132 sr = sr >> 7 | Nc[0] << 9; 133 *c++ = sr >> 5; 134 sr = sr >> 2 | bc[0] << 14; 135 sr = sr >> 2 | Mc[0] << 14; 136 sr = sr >> 6 | xmaxc[0] << 10; 137 *c++ = sr >> 3; 138 #undef xmc 141 139 #define xmc (source + 12) 142 xmc[0] = sr & 0x7; sr >>= 3; 143 sr = *c++; 144 xmc[1] = sr & 0x7; sr >>= 3; 145 xmc[2] = sr & 0x7; sr >>= 3; 146 sr |= (uword)*c++ << 2; 147 xmc[3] = sr & 0x7; sr >>= 3; 148 xmc[4] = sr & 0x7; sr >>= 3; 149 xmc[5] = sr & 0x7; sr >>= 3; 150 sr |= (uword)*c++ << 1; /* 10 */ 151 xmc[6] = sr & 0x7; sr >>= 3; 152 xmc[7] = sr & 0x7; sr >>= 3; 153 xmc[8] = sr & 0x7; sr >>= 3; 154 sr = *c++; 155 xmc[9] = sr & 0x7; sr >>= 3; 156 xmc[10] = sr & 0x7; sr >>= 3; 157 sr |= (uword)*c++ << 2; 158 xmc[11] = sr & 0x7; sr >>= 3; 159 xmc[12] = sr & 0x7; sr >>= 3; 160 sr |= (uword)*c++ << 4; 161 Nc[1] = sr & 0x7f; sr >>= 7; 162 bc[1] = sr & 0x3; sr >>= 2; 163 Mc[1] = sr & 0x3; sr >>= 2; 164 sr |= (uword)*c++ << 1; 165 xmaxc[1] = sr & 0x3f; sr >>= 6; 140 141 sr = sr >> 3 | xmc[0] << 13; 142 *c++ = sr >> 8; 143 sr = sr >> 3 | xmc[1] << 13; 144 sr = sr >> 3 | xmc[2] << 13; 145 sr = sr >> 3 | xmc[3] << 13; 146 *c++ = sr >> 7; 147 sr = sr >> 3 | xmc[4] << 13; 148 sr = sr >> 3 | xmc[5] << 13; 149 sr = sr >> 3 | xmc[6] << 13; 150 *c++ = sr >> 6; 151 sr = sr >> 3 | xmc[7] << 13; 152 sr = sr >> 3 | xmc[8] << 13; 153 *c++ = sr >> 8; 154 sr = sr >> 3 | xmc[9] << 13; 155 sr = sr >> 3 | xmc[10] << 13; 156 sr = sr >> 3 | xmc[11] << 13; 157 *c++ = sr >> 7; 158 sr = sr >> 3 | xmc[12] << 13; 159 sr = sr >> 7 | Nc[1] << 9; 160 *c++ = sr >> 5; 161 sr = sr >> 2 | bc[1] << 14; 162 sr = sr >> 2 | Mc[1] << 14; 163 sr = sr >> 6 | xmaxc[1] << 10; 164 *c++ = sr >> 3; 166 165 #undef xmc 167 166 #define xmc (source + 29 - 13) 168 xmc[13] = sr & 0x7; sr >>= 3; 169 sr = *c++; /* 15 */ 170 xmc[14] = sr & 0x7; sr >>= 3; 171 xmc[15] = sr & 0x7; sr >>= 3; 172 sr |= (uword)*c++ << 2; 173 xmc[16] = sr & 0x7; sr >>= 3; 174 xmc[17] = sr & 0x7; sr >>= 3; 175 xmc[18] = sr & 0x7; sr >>= 3; 176 sr |= (uword)*c++ << 1; 177 xmc[19] = sr & 0x7; sr >>= 3; 178 xmc[20] = sr & 0x7; sr >>= 3; 179 xmc[21] = sr & 0x7; sr >>= 3; 180 sr = *c++; 181 xmc[22] = sr & 0x7; sr >>= 3; 182 xmc[23] = sr & 0x7; sr >>= 3; 183 sr |= (uword)*c++ << 2; 184 xmc[24] = sr & 0x7; sr >>= 3; 185 xmc[25] = sr & 0x7; sr >>= 3; 186 sr |= (uword)*c++ << 4; /* 20 */ 187 Nc[2] = sr & 0x7f; sr >>= 7; 188 bc[2] = sr & 0x3; sr >>= 2; 189 Mc[2] = sr & 0x3; sr >>= 2; 190 sr |= (uword)*c++ << 1; 191 xmaxc[2] = sr & 0x3f; sr >>= 6; 167 168 sr = sr >> 3 | xmc[13] << 13; 169 *c++ = sr >> 8; 170 sr = sr >> 3 | xmc[14] << 13; 171 sr = sr >> 3 | xmc[15] << 13; 172 sr = sr >> 3 | xmc[16] << 13; 173 *c++ = sr >> 7; 174 sr = sr >> 3 | xmc[17] << 13; 175 sr = sr >> 3 | xmc[18] << 13; 176 sr = sr >> 3 | xmc[19] << 13; 177 *c++ = sr >> 6; 178 sr = sr >> 3 | xmc[20] << 13; 179 sr = sr >> 3 | xmc[21] << 13; 180 *c++ = sr >> 8; 181 sr = sr >> 3 | xmc[22] << 13; 182 sr = sr >> 3 | xmc[23] << 13; 183 sr = sr >> 3 | xmc[24] << 13; 184 *c++ = sr >> 7; 185 sr = sr >> 3 | xmc[25] << 13; 186 sr = sr >> 7 | Nc[2] << 9; 187 *c++ = sr >> 5; 188 sr = sr >> 2 | bc[2] << 14; 189 sr = sr >> 2 | Mc[2] << 14; 190 sr = sr >> 6 | xmaxc[2] << 10; 191 *c++ = sr >> 3; 192 192 #undef xmc 193 193 #define xmc (source + 46 - 26) 194 xmc[26] = sr & 0x7; sr >>= 3; 195 sr = *c++; 196 xmc[27] = sr & 0x7; sr >>= 3; 197 xmc[28] = sr & 0x7; sr >>= 3; 198 sr |= (uword)*c++ << 2; 199 xmc[29] = sr & 0x7; sr >>= 3; 200 xmc[30] = sr & 0x7; sr >>= 3; 201 xmc[31] = sr & 0x7; sr >>= 3; 202 sr |= (uword)*c++ << 1; 203 xmc[32] = sr & 0x7; sr >>= 3; 204 xmc[33] = sr & 0x7; sr >>= 3; 205 xmc[34] = sr & 0x7; sr >>= 3; 206 sr = *c++; /* 25 */ 207 xmc[35] = sr & 0x7; sr >>= 3; 208 xmc[36] = sr & 0x7; sr >>= 3; 209 sr |= (uword)*c++ << 2; 210 xmc[37] = sr & 0x7; sr >>= 3; 211 xmc[38] = sr & 0x7; sr >>= 3; 212 sr |= (uword)*c++ << 4; 213 Nc[3] = sr & 0x7f; sr >>= 7; 214 bc[3] = sr & 0x3; sr >>= 2; 215 Mc[3] = sr & 0x3; sr >>= 2; 216 sr |= (uword)*c++ << 1; 217 xmaxc[3] = sr & 0x3f; sr >>= 6; 194 195 sr = sr >> 3 | xmc[26] << 13; 196 *c++ = sr >> 8; 197 sr = sr >> 3 | xmc[27] << 13; 198 sr = sr >> 3 | xmc[28] << 13; 199 sr = sr >> 3 | xmc[29] << 13; 200 *c++ = sr >> 7; 201 sr = sr >> 3 | xmc[30] << 13; 202 sr = sr >> 3 | xmc[31] << 13; 203 sr = sr >> 3 | xmc[32] << 13; 204 *c++ = sr >> 6; 205 sr = sr >> 3 | xmc[33] << 13; 206 sr = sr >> 3 | xmc[34] << 13; 207 *c++ = sr >> 8; 208 sr = sr >> 3 | xmc[35] << 13; 209 sr = sr >> 3 | xmc[36] << 13; 210 sr = sr >> 3 | xmc[37] << 13; 211 *c++ = sr >> 7; 212 sr = sr >> 3 | xmc[38] << 13; 213 sr = sr >> 7 | Nc[3] << 9; 214 *c++ = sr >> 5; 215 sr = sr >> 2 | bc[3] << 14; 216 sr = sr >> 2 | Mc[3] << 14; 217 sr = sr >> 6 | xmaxc[3] << 10; 218 *c++ = sr >> 3; 218 219 #undef xmc 219 220 #define xmc (source + 63 - 39) 220 221 221 xmc[39] = sr & 0x7; sr >>= 3; 222 sr = *c++; 223 xmc[40] = sr & 0x7; sr >>= 3; 224 xmc[41] = sr & 0x7; sr >>= 3; 225 sr |= (uword)*c++ << 2; /* 30 */ 226 xmc[42] = sr & 0x7; sr >>= 3; 227 xmc[43] = sr & 0x7; sr >>= 3; 228 xmc[44] = sr & 0x7; sr >>= 3; 229 sr |= (uword)*c++ << 1; 230 xmc[45] = sr & 0x7; sr >>= 3; 231 xmc[46] = sr & 0x7; sr >>= 3; 232 xmc[47] = sr & 0x7; sr >>= 3; 233 sr = *c++; 234 xmc[48] = sr & 0x7; sr >>= 3; 235 xmc[49] = sr & 0x7; sr >>= 3; 236 sr |= (uword)*c++ << 2; 237 xmc[50] = sr & 0x7; sr >>= 3; 238 xmc[51] = sr & 0x7; sr >>= 3; 239 240 s->frame_chain = sr & 0xf; 222 sr = sr >> 3 | xmc[39] << 13; 223 *c++ = sr >> 8; 224 sr = sr >> 3 | xmc[40] << 13; 225 sr = sr >> 3 | xmc[41] << 13; 226 sr = sr >> 3 | xmc[42] << 13; 227 *c++ = sr >> 7; 228 sr = sr >> 3 | xmc[43] << 13; 229 sr = sr >> 3 | xmc[44] << 13; 230 sr = sr >> 3 | xmc[45] << 13; 231 *c++ = sr >> 6; 232 sr = sr >> 3 | xmc[46] << 13; 233 sr = sr >> 3 | xmc[47] << 13; 234 *c++ = sr >> 8; 235 sr = sr >> 3 | xmc[48] << 13; 236 sr = sr >> 3 | xmc[49] << 13; 237 sr = sr >> 3 | xmc[50] << 13; 238 *c++ = sr >> 7; 239 sr = sr >> 3 | xmc[51] << 13; 240 sr = sr >> 4; 241 *c = sr >> 8; 242 s->frame_chain = *c; 241 243 } 242 244 else { 243 sr = s ->frame_chain;244 sr |= (uword)*c++ << 4; /* 1 */245 LARc[0] = sr & 0x3f; sr >>=6;246 LARc[1] = sr & 0x3f; sr >>= 6;247 sr = *c++;248 LARc[2] = sr & 0x1f; sr >>= 5;249 sr |= (uword)*c++ << 3;250 LARc[3] = sr & 0x1f; sr >>= 5;251 LARc[4] = sr & 0xf; sr >>= 4;252 sr |= (uword)*c++ <<2;253 LARc[5] = sr & 0xf; sr >>= 4;254 LARc[6] = sr & 0x7; sr >>=3;255 LARc[7] = sr & 0x7; sr >>=3;256 sr = *c++; /* 5 */257 Nc[0] = sr & 0x7f; sr >>= 7;258 sr |= (uword)*c++ << 1;259 bc[0] = sr & 0x3; sr >>= 2;260 Mc[0] = sr & 0x3; sr >>= 2;261 sr |= (uword)*c++ << 5;262 xmaxc[0] = sr & 0x3f; sr >>= 6;263 #undef 245 sr = sr >> 4 | s->frame_chain << 12; 246 sr = sr >> 6 | LARc[0] << 10; 247 *c++ = sr >> 6; 248 sr = sr >> 6 | LARc[1] << 10; 249 *c++ = sr >> 8; 250 sr = sr >> 5 | LARc[2] << 11; 251 sr = sr >> 5 | LARc[3] << 11; 252 *c++ = sr >> 6; 253 sr = sr >> 4 | LARc[4] << 12; 254 sr = sr >> 4 | LARc[5] << 12; 255 *c++ = sr >> 6; 256 sr = sr >> 3 | LARc[6] << 13; 257 sr = sr >> 3 | LARc[7] << 13; 258 *c++ = sr >> 8; 259 sr = sr >> 7 | Nc[0] << 9; 260 sr = sr >> 2 | bc[0] << 14; 261 *c++ = sr >> 7; 262 sr = sr >> 2 | Mc[0] << 14; 263 sr = sr >> 6 | xmaxc[0] << 10; 264 *c++ = sr >> 7; 265 #undef xmc 264 266 #define xmc (source + 12) 265 xmc[0] = sr & 0x7; sr >>= 3; 266 xmc[1] = sr & 0x7; sr >>= 3; 267 sr |= (uword)*c++ << 1; 268 xmc[2] = sr & 0x7; sr >>= 3; 269 xmc[3] = sr & 0x7; sr >>= 3; 270 xmc[4] = sr & 0x7; sr >>= 3; 271 sr = *c++; 272 xmc[5] = sr & 0x7; sr >>= 3; 273 xmc[6] = sr & 0x7; sr >>= 3; 274 sr |= (uword)*c++ << 2; /* 10 */ 275 xmc[7] = sr & 0x7; sr >>= 3; 276 xmc[8] = sr & 0x7; sr >>= 3; 277 xmc[9] = sr & 0x7; sr >>= 3; 278 sr |= (uword)*c++ << 1; 279 xmc[10] = sr & 0x7; sr >>= 3; 280 xmc[11] = sr & 0x7; sr >>= 3; 281 xmc[12] = sr & 0x7; sr >>= 3; 282 sr = *c++; 283 Nc[1] = sr & 0x7f; sr >>= 7; 284 sr |= (uword)*c++ << 1; 285 bc[1] = sr & 0x3; sr >>= 2; 286 Mc[1] = sr & 0x3; sr >>= 2; 287 sr |= (uword)*c++ << 5; 288 xmaxc[1] = sr & 0x3f; sr >>= 6; 267 268 sr = sr >> 3 | xmc[0] << 13; 269 sr = sr >> 3 | xmc[1] << 13; 270 sr = sr >> 3 | xmc[2] << 13; 271 *c++ = sr >> 6; 272 sr = sr >> 3 | xmc[3] << 13; 273 sr = sr >> 3 | xmc[4] << 13; 274 *c++ = sr >> 8; 275 sr = sr >> 3 | xmc[5] << 13; 276 sr = sr >> 3 | xmc[6] << 13; 277 sr = sr >> 3 | xmc[7] << 13; 278 *c++ = sr >> 7; 279 sr = sr >> 3 | xmc[8] << 13; 280 sr = sr >> 3 | xmc[9] << 13; 281 sr = sr >> 3 | xmc[10] << 13; 282 *c++ = sr >> 6; 283 sr = sr >> 3 | xmc[11] << 13; 284 sr = sr >> 3 | xmc[12] << 13; 285 *c++ = sr >> 8; 286 sr = sr >> 7 | Nc[1] << 9; 287 sr = sr >> 2 | bc[1] << 14; 288 *c++ = sr >> 7; 289 sr = sr >> 2 | Mc[1] << 14; 290 sr = sr >> 6 | xmaxc[1] << 10; 291 *c++ = sr >> 7; 289 292 #undef xmc 290 293 #define xmc (source + 29 - 13) 291 xmc[13] = sr & 0x7; sr >>= 3; 292 xmc[14] = sr & 0x7; sr >>= 3; 293 sr |= (uword)*c++ << 1; /* 15 */ 294 xmc[15] = sr & 0x7; sr >>= 3; 295 xmc[16] = sr & 0x7; sr >>= 3; 296 xmc[17] = sr & 0x7; sr >>= 3; 297 sr = *c++; 298 xmc[18] = sr & 0x7; sr >>= 3; 299 xmc[19] = sr & 0x7; sr >>= 3; 300 sr |= (uword)*c++ << 2; 301 xmc[20] = sr & 0x7; sr >>= 3; 302 xmc[21] = sr & 0x7; sr >>= 3; 303 xmc[22] = sr & 0x7; sr >>= 3; 304 sr |= (uword)*c++ << 1; 305 xmc[23] = sr & 0x7; sr >>= 3; 306 xmc[24] = sr & 0x7; sr >>= 3; 307 xmc[25] = sr & 0x7; sr >>= 3; 308 sr = *c++; 309 Nc[2] = sr & 0x7f; sr >>= 7; 310 sr |= (uword)*c++ << 1; /* 20 */ 311 bc[2] = sr & 0x3; sr >>= 2; 312 Mc[2] = sr & 0x3; sr >>= 2; 313 sr |= (uword)*c++ << 5; 314 xmaxc[2] = sr & 0x3f; sr >>= 6; 294 295 sr = sr >> 3 | xmc[13] << 13; 296 sr = sr >> 3 | xmc[14] << 13; 297 sr = sr >> 3 | xmc[15] << 13; 298 *c++ = sr >> 6; 299 sr = sr >> 3 | xmc[16] << 13; 300 sr = sr >> 3 | xmc[17] << 13; 301 *c++ = sr >> 8; 302 sr = sr >> 3 | xmc[18] << 13; 303 sr = sr >> 3 | xmc[19] << 13; 304 sr = sr >> 3 | xmc[20] << 13; 305 *c++ = sr >> 7; 306 sr = sr >> 3 | xmc[21] << 13; 307 sr = sr >> 3 | xmc[22] << 13; 308 sr = sr >> 3 | xmc[23] << 13; 309 *c++ = sr >> 6; 310 sr = sr >> 3 | xmc[24] << 13; 311 sr = sr >> 3 | xmc[25] << 13; 312 *c++ = sr >> 8; 313 sr = sr >> 7 | Nc[2] << 9; 314 sr = sr >> 2 | bc[2] << 14; 315 *c++ = sr >> 7; 316 sr = sr >> 2 | Mc[2] << 14; 317 sr = sr >> 6 | xmaxc[2] << 10; 318 *c++ = sr >> 7; 315 319 #undef xmc 316 320 #define xmc (source + 46 - 26) 317 xmc[26] = sr & 0x7; sr >>= 3; 318 xmc[27] = sr & 0x7; sr >>= 3; 319 sr |= (uword)*c++ << 1; 320 xmc[28] = sr & 0x7; sr >>= 3; 321 xmc[29] = sr & 0x7; sr >>= 3; 322 xmc[30] = sr & 0x7; sr >>= 3; 323 sr = *c++; 324 xmc[31] = sr & 0x7; sr >>= 3; 325 xmc[32] = sr & 0x7; sr >>= 3; 326 sr |= (uword)*c++ << 2; 327 xmc[33] = sr & 0x7; sr >>= 3; 328 xmc[34] = sr & 0x7; sr >>= 3; 329 xmc[35] = sr & 0x7; sr >>= 3; 330 sr |= (uword)*c++ << 1; /* 25 */ 331 xmc[36] = sr & 0x7; sr >>= 3; 332 xmc[37] = sr & 0x7; sr >>= 3; 333 xmc[38] = sr & 0x7; sr >>= 3; 334 sr = *c++; 335 Nc[3] = sr & 0x7f; sr >>= 7; 336 sr |= (uword)*c++ << 1; 337 bc[3] = sr & 0x3; sr >>= 2; 338 Mc[3] = sr & 0x3; sr >>= 2; 339 sr |= (uword)*c++ << 5; 340 xmaxc[3] = sr & 0x3f; sr >>= 6; 321 322 sr = sr >> 3 | xmc[26] << 13; 323 sr = sr >> 3 | xmc[27] << 13; 324 sr = sr >> 3 | xmc[28] << 13; 325 *c++ = sr >> 6; 326 sr = sr >> 3 | xmc[29] << 13; 327 sr = sr >> 3 | xmc[30] << 13; 328 *c++ = sr >> 8; 329 sr = sr >> 3 | xmc[31] << 13; 330 sr = sr >> 3 | xmc[32] << 13; 331 sr = sr >> 3 | xmc[33] << 13; 332 *c++ = sr >> 7; 333 sr = sr >> 3 | xmc[34] << 13; 334 sr = sr >> 3 | xmc[35] << 13; 335 sr = sr >> 3 | xmc[36] << 13; 336 *c++ = sr >> 6; 337 sr = sr >> 3 | xmc[37] << 13; 338 sr = sr >> 3 | xmc[38] << 13; 339 *c++ = sr >> 8; 340 sr = sr >> 7 | Nc[3] << 9; 341 sr = sr >> 2 | bc[3] << 14; 342 *c++ = sr >> 7; 343 sr = sr >> 2 | Mc[3] << 14; 344 sr = sr >> 6 | xmaxc[3] << 10; 345 *c++ = sr >> 7; 341 346 #undef xmc 342 347 #define xmc (source + 63 - 39) 343 348 344 xmc[39] = sr & 0x7; sr >>= 3; 345 xmc[40] = sr & 0x7; sr >>= 3; 346 sr |= (uword)*c++ << 1; 347 xmc[41] = sr & 0x7; sr >>= 3; 348 xmc[42] = sr & 0x7; sr >>= 3; 349 xmc[43] = sr & 0x7; sr >>= 3; 350 sr = *c++; /* 30 */ 351 xmc[44] = sr & 0x7; sr >>= 3; 352 xmc[45] = sr & 0x7; sr >>= 3; 353 sr |= (uword)*c++ << 2; 354 xmc[46] = sr & 0x7; sr >>= 3; 355 xmc[47] = sr & 0x7; sr >>= 3; 356 xmc[48] = sr & 0x7; sr >>= 3; 357 sr |= (uword)*c++ << 1; 358 xmc[49] = sr & 0x7; sr >>= 3; 359 xmc[50] = sr & 0x7; sr >>= 3; 360 xmc[51] = sr & 0x7; sr >>= 3; 349 sr = sr >> 3 | xmc[39] << 13; 350 sr = sr >> 3 | xmc[40] << 13; 351 sr = sr >> 3 | xmc[41] << 13; 352 *c++ = sr >> 6; 353 sr = sr >> 3 | xmc[42] << 13; 354 sr = sr >> 3 | xmc[43] << 13; 355 *c++ = sr >> 8; 356 sr = sr >> 3 | xmc[44] << 13; 357 sr = sr >> 3 | xmc[45] << 13; 358 sr = sr >> 3 | xmc[46] << 13; 359 *c++ = sr >> 7; 360 sr = sr >> 3 | xmc[47] << 13; 361 sr = sr >> 3 | xmc[48] << 13; 362 sr = sr >> 3 | xmc[49] << 13; 363 *c++ = sr >> 6; 364 sr = sr >> 3 | xmc[50] << 13; 365 sr = sr >> 3 | xmc[51] << 13; 366 *c++ = sr >> 8; 361 367 } 362 368 } … … 365 371 { 366 372 367 *c++ = ((GSM_MAGIC & 0xF) << 4) /* 1 */368 | ((LARc[0] >> 2) & 0xF);369 *c++ = ((LARc[0] & 0x3) << 6)370 | (LARc[1] & 0x3F);371 *c++ = ((LARc[2] & 0x1F) << 3)372 | ((LARc[3] >> 2) & 0x7);373 *c++ = ((LARc[3] & 0x3) << 6)374 | ((LARc[4] & 0xF) << 2)375 | ((LARc[5] >> 2) & 0x3);376 *c++ = ((LARc[5] & 0x3) << 6)377 | ((LARc[6] & 0x7) << 3)378 | (LARc[7] & 0x7);379 380 381 *c++ = ((Nc[0] & 0x7F) << 1)382 383 384 | ((bc[0] >> 1) & 0x1);385 *c++ = ((bc[0] & 0x1) << 7)386 387 388 | ((Mc[0] & 0x3) << 5)389 390 | ((xmaxc[0] >> 1) & 0x1F);391 *c++ = ((xmaxc[0] & 0x1) << 7)373 *c++ = ((GSM_MAGIC & 0xF) << 4) /* 1 */ 374 | ((LARc[0] >> 2) & 0xF); 375 *c++ = ((LARc[0] & 0x3) << 6) 376 | (LARc[1] & 0x3F); 377 *c++ = ((LARc[2] & 0x1F) << 3) 378 | ((LARc[3] >> 2) & 0x7); 379 *c++ = ((LARc[3] & 0x3) << 6) 380 | ((LARc[4] & 0xF) << 2) 381 | ((LARc[5] >> 2) & 0x3); 382 *c++ = ((LARc[5] & 0x3) << 6) 383 | ((LARc[6] & 0x7) << 3) 384 | (LARc[7] & 0x7); 385 386 387 *c++ = ((Nc[0] & 0x7F) << 1) 388 389 390 | ((bc[0] >> 1) & 0x1); 391 *c++ = ((bc[0] & 0x1) << 7) 392 393 394 | ((Mc[0] & 0x3) << 5) 395 396 | ((xmaxc[0] >> 1) & 0x1F); 397 *c++ = ((xmaxc[0] & 0x1) << 7) 392 398 393 399 #undef xmc 394 400 #define xmc (source + 12) 395 401 396 | ((xmc[0] & 0x7) << 4)397 | ((xmc[1] & 0x7) << 1)398 | ((xmc[2] >> 2) & 0x1);399 *c++ = ((xmc[2] & 0x3) << 6)400 | ((xmc[3] & 0x7) << 3)401 | (xmc[4] & 0x7);402 *c++ = ((xmc[5] & 0x7) << 5) /* 10 */403 | ((xmc[6] & 0x7) << 2)404 | ((xmc[7] >> 1) & 0x3);405 *c++ = ((xmc[7] & 0x1) << 7)406 | ((xmc[8] & 0x7) << 4)407 | ((xmc[9] & 0x7) << 1)408 | ((xmc[10] >> 2) & 0x1);409 *c++ = ((xmc[10] & 0x3) << 6)410 | ((xmc[11] & 0x7) << 3)411 | (xmc[12] & 0x7);412 413 414 *c++ = ((Nc[1] & 0x7F) << 1)415 416 417 | ((bc[1] >> 1) & 0x1);418 *c++ = ((bc[1] & 0x1) << 7)419 420 421 | ((Mc[1] & 0x3) << 5)422 423 424 | ((xmaxc[1] >> 1) & 0x1F);425 *c++ = ((xmaxc[1] & 0x1) << 7)402 | ((xmc[0] & 0x7) << 4) 403 | ((xmc[1] & 0x7) << 1) 404 | ((xmc[2] >> 2) & 0x1); 405 *c++ = ((xmc[2] & 0x3) << 6) 406 | ((xmc[3] & 0x7) << 3) 407 | (xmc[4] & 0x7); 408 *c++ = ((xmc[5] & 0x7) << 5) /* 10 */ 409 | ((xmc[6] & 0x7) << 2) 410 | ((xmc[7] >> 1) & 0x3); 411 *c++ = ((xmc[7] & 0x1) << 7) 412 | ((xmc[8] & 0x7) << 4) 413 | ((xmc[9] & 0x7) << 1) 414 | ((xmc[10] >> 2) & 0x1); 415 *c++ = ((xmc[10] & 0x3) << 6) 416 | ((xmc[11] & 0x7) << 3) 417 | (xmc[12] & 0x7); 418 419 420 *c++ = ((Nc[1] & 0x7F) << 1) 421 422 423 | ((bc[1] >> 1) & 0x1); 424 *c++ = ((bc[1] & 0x1) << 7) 425 426 427 | ((Mc[1] & 0x3) << 5) 428 429 430 | ((xmaxc[1] >> 1) & 0x1F); 431 *c++ = ((xmaxc[1] & 0x1) << 7) 426 432 427 433 #undef xmc 428 434 #define xmc (source + 29 - 13) 429 435 430 | ((xmc[13] & 0x7) << 4)431 | ((xmc[14] & 0x7) << 1)432 | ((xmc[15] >> 2) & 0x1);433 *c++ = ((xmc[15] & 0x3) << 6)434 | ((xmc[16] & 0x7) << 3)435 | (xmc[17] & 0x7);436 *c++ = ((xmc[18] & 0x7) << 5)437 | ((xmc[19] & 0x7) << 2)438 | ((xmc[20] >> 1) & 0x3);439 *c++ = ((xmc[20] & 0x1) << 7)440 | ((xmc[21] & 0x7) << 4)441 | ((xmc[22] & 0x7) << 1)442 | ((xmc[23] >> 2) & 0x1);443 *c++ = ((xmc[23] & 0x3) << 6)444 | ((xmc[24] & 0x7) << 3)445 | (xmc[25] & 0x7);446 447 448 *c++ = ((Nc[2] & 0x7F) << 1) /* 20 */449 450 451 | ((bc[2] >> 1) & 0x1);452 *c++ = ((bc[2] & 0x1) << 7)453 454 455 | ((Mc[2] & 0x3) << 5)456 457 458 | ((xmaxc[2] >> 1) & 0x1F);459 *c++ = ((xmaxc[2] & 0x1) << 7)436 | ((xmc[13] & 0x7) << 4) 437 | ((xmc[14] & 0x7) << 1) 438 | ((xmc[15] >> 2) & 0x1); 439 *c++ = ((xmc[15] & 0x3) << 6) 440 | ((xmc[16] & 0x7) << 3) 441 | (xmc[17] & 0x7); 442 *c++ = ((xmc[18] & 0x7) << 5) 443 | ((xmc[19] & 0x7) << 2) 444 | ((xmc[20] >> 1) & 0x3); 445 *c++ = ((xmc[20] & 0x1) << 7) 446 | ((xmc[21] & 0x7) << 4) 447 | ((xmc[22] & 0x7) << 1) 448 | ((xmc[23] >> 2) & 0x1); 449 *c++ = ((xmc[23] & 0x3) << 6) 450 | ((xmc[24] & 0x7) << 3) 451 | (xmc[25] & 0x7); 452 453 454 *c++ = ((Nc[2] & 0x7F) << 1) /* 20 */ 455 456 457 | ((bc[2] >> 1) & 0x1); 458 *c++ = ((bc[2] & 0x1) << 7) 459 460 461 | ((Mc[2] & 0x3) << 5) 462 463 464 | ((xmaxc[2] >> 1) & 0x1F); 465 *c++ = ((xmaxc[2] & 0x1) << 7) 460 466 461 467 #undef xmc 462 468 #define xmc (source + 46 - 26) 463 469 464 | ((xmc[26] & 0x7) << 4)465 | ((xmc[27] & 0x7) << 1)466 | ((xmc[28] >> 2) & 0x1);467 *c++ = ((xmc[28] & 0x3) << 6)468 | ((xmc[29] & 0x7) << 3)469 | (xmc[30] & 0x7);470 *c++ = ((xmc[31] & 0x7) << 5)471 | ((xmc[32] & 0x7) << 2)472 | ((xmc[33] >> 1) & 0x3);473 *c++ = ((xmc[33] & 0x1) << 7)474 | ((xmc[34] & 0x7) << 4)475 | ((xmc[35] & 0x7) << 1)476 | ((xmc[36] >> 2) & 0x1);477 *c++ = ((xmc[36] & 0x3) << 6)478 | ((xmc[37] & 0x7) << 3)479 | (xmc[38] & 0x7);480 481 482 *c++ = ((Nc[3] & 0x7F) << 1)483 484 485 | ((bc[3] >> 1) & 0x1);486 *c++ = ((bc[3] & 0x1) << 7)487 488 489 | ((Mc[3] & 0x3) << 5)490 491 492 | ((xmaxc[3] >> 1) & 0x1F);493 *c++ = ((xmaxc[3] & 0x1) << 7)470 | ((xmc[26] & 0x7) << 4) 471 | ((xmc[27] & 0x7) << 1) 472 | ((xmc[28] >> 2) & 0x1); 473 *c++ = ((xmc[28] & 0x3) << 6) 474 | ((xmc[29] & 0x7) << 3) 475 | (xmc[30] & 0x7); 476 *c++ = ((xmc[31] & 0x7) << 5) 477 | ((xmc[32] & 0x7) << 2) 478 | ((xmc[33] >> 1) & 0x3); 479 *c++ = ((xmc[33] & 0x1) << 7) 480 | ((xmc[34] & 0x7) << 4) 481 | ((xmc[35] & 0x7) << 1) 482 | ((xmc[36] >> 2) & 0x1); 483 *c++ = ((xmc[36] & 0x3) << 6) 484 | ((xmc[37] & 0x7) << 3) 485 | (xmc[38] & 0x7); 486 487 488 *c++ = ((Nc[3] & 0x7F) << 1) 489 490 491 | ((bc[3] >> 1) & 0x1); 492 *c++ = ((bc[3] & 0x1) << 7) 493 494 495 | ((Mc[3] & 0x3) << 5) 496 497 498 | ((xmaxc[3] >> 1) & 0x1F); 499 *c++ = ((xmaxc[3] & 0x1) << 7) 494 500 495 501 #undef xmc 496 502 #define xmc (source + 63 - 39) 497 503 498 | ((xmc[39] & 0x7) << 4)499 | ((xmc[40] & 0x7) << 1)500 | ((xmc[41] >> 2) & 0x1);501 *c++ = ((xmc[41] & 0x3) << 6) /* 30 */502 | ((xmc[42] & 0x7) << 3)503 | (xmc[43] & 0x7);504 *c++ = ((xmc[44] & 0x7) << 5)505 | ((xmc[45] & 0x7) << 2)506 | ((xmc[46] >> 1) & 0x3);507 *c++ = ((xmc[46] & 0x1) << 7)508 | ((xmc[47] & 0x7) << 4)509 | ((xmc[48] & 0x7) << 1)510 | ((xmc[49] >> 2) & 0x1);511 *c++ = ((xmc[49] & 0x3) << 6)512 | ((xmc[50] & 0x7) << 3)513 | (xmc[51] & 0x7);504 | ((xmc[39] & 0x7) << 4) 505 | ((xmc[40] & 0x7) << 1) 506 | ((xmc[41] >> 2) & 0x1); 507 *c++ = ((xmc[41] & 0x3) << 6) /* 30 */ 508 | ((xmc[42] & 0x7) << 3) 509 | (xmc[43] & 0x7); 510 *c++ = ((xmc[44] & 0x7) << 5) 511 | ((xmc[45] & 0x7) << 2) 512 | ((xmc[46] >> 1) & 0x3); 513 *c++ = ((xmc[46] & 0x1) << 7) 514 | ((xmc[47] & 0x7) << 4) 515 | ((xmc[48] & 0x7) << 1) 516 | ((xmc[49] >> 2) & 0x1); 517 *c++ = ((xmc[49] & 0x3) << 6) 518 | ((xmc[50] & 0x7) << 3) 519 | (xmc[51] & 0x7); 514 520 } 515 521 } -
pjproject/trunk/pjmedia/src/pjmedia-codec/gsm/private.h
r176 r517 19 19 20 20 word dp0[ 280 ]; 21 word e[ 50 ]; /* code.c */ 21 22 22 23 word z1; /* preprocessing.c, Offset_com. */ -
pjproject/trunk/pjmedia/src/pjmedia-codec/gsm/proto.h
r176 r517 9 9 #ifndef PROTO_H 10 10 #define PROTO_H 11 12 #ifdef _MSC_VER13 # pragma warning(push, 3)14 # pragma warning(disable: 4131) // .. uses old-style declarato15 # pragma warning(disable: 4244) // conversion from 'x ' to 'y', possible loss of data16 # pragma warning(disable: 4761) // integral size mismatch17 #endif18 19 #define NeedFunctionPrototypes 120 21 11 22 12 #if __cplusplus
Note: See TracChangeset
for help on using the changeset viewer.