OLD | NEW |
1 /* Copyright (c) 2007-2008 CSIRO | 1 /* Copyright (c) 2007-2008 CSIRO |
2 Copyright (c) 2007-2009 Xiph.Org Foundation | 2 Copyright (c) 2007-2009 Xiph.Org Foundation |
3 Written by Jean-Marc Valin */ | 3 Written by Jean-Marc Valin */ |
4 /* | 4 /* |
5 Redistribution and use in source and binary forms, with or without | 5 Redistribution and use in source and binary forms, with or without |
6 modification, are permitted provided that the following conditions | 6 modification, are permitted provided that the following conditions |
7 are met: | 7 are met: |
8 | 8 |
9 - Redistributions of source code must retain the above copyright | 9 - Redistributions of source code must retain the above copyright |
10 notice, this list of conditions and the following disclaimer. | 10 notice, this list of conditions and the following disclaimer. |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 *cap++ = (unsigned char)max_bits; | 238 *cap++ = (unsigned char)max_bits; |
239 } | 239 } |
240 } | 240 } |
241 } | 241 } |
242 } | 242 } |
243 | 243 |
244 #endif /* CUSTOM_MODES */ | 244 #endif /* CUSTOM_MODES */ |
245 | 245 |
246 #define ALLOC_STEPS 6 | 246 #define ALLOC_STEPS 6 |
247 | 247 |
248 static inline int interp_bits2pulses(const CELTMode *m, int start, int end, int
skip_start, | 248 static OPUS_INLINE int interp_bits2pulses(const CELTMode *m, int start, int end,
int skip_start, |
249 const int *bits1, const int *bits2, const int *thresh, const int *cap, opu
s_int32 total, opus_int32 *_balance, | 249 const int *bits1, const int *bits2, const int *thresh, const int *cap, opu
s_int32 total, opus_int32 *_balance, |
250 int skip_rsv, int *intensity, int intensity_rsv, int *dual_stereo, int dua
l_stereo_rsv, int *bits, | 250 int skip_rsv, int *intensity, int intensity_rsv, int *dual_stereo, int dua
l_stereo_rsv, int *bits, |
251 int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int
prev, int signalBandwidth) | 251 int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int
prev, int signalBandwidth) |
252 { | 252 { |
253 opus_int32 psum; | 253 opus_int32 psum; |
254 int lo, hi; | 254 int lo, hi; |
255 int i, j; | 255 int i, j; |
256 int logM; | 256 int logM; |
257 int stereo; | 257 int stereo; |
258 int codedBands=-1; | 258 int codedBands=-1; |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 bits1[j] = bits1j; | 629 bits1[j] = bits1j; |
630 bits2[j] = bits2j; | 630 bits2[j] = bits2j; |
631 } | 631 } |
632 codedBands = interp_bits2pulses(m, start, end, skip_start, bits1, bits2, thre
sh, cap, | 632 codedBands = interp_bits2pulses(m, start, end, skip_start, bits1, bits2, thre
sh, cap, |
633 total, balance, skip_rsv, intensity, intensity_rsv, dual_stereo, dual_s
tereo_rsv, | 633 total, balance, skip_rsv, intensity, intensity_rsv, dual_stereo, dual_s
tereo_rsv, |
634 pulses, ebits, fine_priority, C, LM, ec, encode, prev, signalBandwidth)
; | 634 pulses, ebits, fine_priority, C, LM, ec, encode, prev, signalBandwidth)
; |
635 RESTORE_STACK; | 635 RESTORE_STACK; |
636 return codedBands; | 636 return codedBands; |
637 } | 637 } |
638 | 638 |
OLD | NEW |