1 /* 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 /* 12 * arith_routines.h 13 * 14 * Functions for arithmetic coding. 15 * 16 */ 17 18 #ifndef MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_ARITH_ROUTINES_H_ 19 #define MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_ARITH_ROUTINES_H_ 20 21 #include "modules/audio_coding/codecs/isac/main/source/structs.h" 22 23 int WebRtcIsac_EncLogisticMulti2( 24 Bitstr* streamdata, /* in-/output struct containing bitstream */ 25 int16_t* dataQ7, /* input: data vector */ 26 const uint16_t* 27 env, /* input: side info vector defining the width of the pdf */ 28 const int N, /* input: data vector length */ 29 const int16_t isSWB12kHz); /* if the codec is working in 12kHz bandwidth */ 30 31 /* returns the number of bytes in the stream */ 32 int WebRtcIsac_EncTerminate( 33 Bitstr* streamdata); /* in-/output struct containing bitstream */ 34 35 /* returns the number of bytes in the stream so far */ 36 int WebRtcIsac_DecLogisticMulti2( 37 int16_t* data, /* output: data vector */ 38 Bitstr* streamdata, /* in-/output struct containing bitstream */ 39 const uint16_t* 40 env, /* input: side info vector defining the width of the pdf */ 41 const int16_t* dither, /* input: dither vector */ 42 const int N, /* input: data vector length */ 43 const int16_t isSWB12kHz); /* if the codec is working in 12kHz bandwidth */ 44 45 void WebRtcIsac_EncHistMulti( 46 Bitstr* streamdata, /* in-/output struct containing bitstream */ 47 const int* data, /* input: data vector */ 48 const uint16_t* const* cdf, /* input: array of cdf arrays */ 49 const int N); /* input: data vector length */ 50 51 int WebRtcIsac_DecHistBisectMulti( 52 int* data, /* output: data vector */ 53 Bitstr* streamdata, /* in-/output struct containing bitstream */ 54 const uint16_t* const* cdf, /* input: array of cdf arrays */ 55 const uint16_t* 56 cdf_size, /* input: array of cdf table sizes+1 (power of two: 2^k) */ 57 const int N); /* input: data vector length */ 58 59 int WebRtcIsac_DecHistOneStepMulti( 60 int* data, /* output: data vector */ 61 Bitstr* streamdata, /* in-/output struct containing bitstream */ 62 const uint16_t* const* cdf, /* input: array of cdf arrays */ 63 const uint16_t* 64 init_index, /* input: vector of initial cdf table search entries */ 65 const int N); /* input: data vector length */ 66 67 #endif /* MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_ARITH_ROUTINES_H_ */ 68