SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Member Functions | Public Attributes | List of all members
AudioG722::g722_encode_state Struct Reference

Public Member Functions

 g722_encode_state ()
 
void init (int rate, int options)
 

Public Attributes

int itu_test_mode
 
int packed
 
int eight_k
 
int bits_per_sample
 
int x [24]
 
struct {
   int   s
 
   int   sp
 
   int   sz
 
   int   r [3]
 
   int   a [3]
 
   int   ap [3]
 
   int   p [3]
 
   int   d [7]
 
   int   b [7]
 
   int   bp [7]
 
   int   sg [7]
 
   int   nb
 
   int   det
 
band [2]
 
unsigned int in_buffer
 
int in_bits
 
unsigned int out_buffer
 
int out_bits
 

Detailed Description

Definition at line 34 of file audiog722.h.

Constructor & Destructor Documentation

◆ g722_encode_state()

AudioG722::g722_encode_state::g722_encode_state ( )

Definition at line 83 of file audiog722.cpp.

References init().

84 {
85  init(64000, 0);
86 }
void init(int rate, int options)
Definition: audiog722.cpp:88
+ Here is the call graph for this function:

Member Function Documentation

◆ init()

void AudioG722::g722_encode_state::init ( int  rate,
int  options 
)

Definition at line 88 of file audiog722.cpp.

References band, bits_per_sample, eight_k, G722_PACKED, G722_SAMPLE_RATE_8000, in_bits, in_buffer, itu_test_mode, out_bits, out_buffer, packed, and x.

Referenced by g722_encode_state(), and AudioG722::init().

89 {
90  itu_test_mode = 0;
91  std::fill(x, x+24, 0);
92  in_buffer = 0;
93  in_bits = 0;
94  out_buffer = 0;
95  out_bits = 0;
96 
97  char *pBand = (char *) band;
98  std::fill(pBand, pBand + sizeof(band), 0);
99 
100  if (rate == 48000) {
101  bits_per_sample = 6;
102  } else if (rate == 56000) {
103  bits_per_sample = 7;
104  } else {
105  bits_per_sample = 8;
106  }
107 
108 
109  if ((options & G722_SAMPLE_RATE_8000)) {
110  eight_k = 1;
111  } else {
112  eight_k = 0;
113  }
114 
115  if ((options & G722_PACKED) && bits_per_sample != 8) {
116  packed = 1;
117  } else {
118  packed = 0;
119  }
120 
121  band[0].det = 32;
122  band[1].det = 8;
123 }
#define G722_PACKED
Definition: audiog722.cpp:23
struct AudioG722::g722_encode_state::@10 band[2]
#define G722_SAMPLE_RATE_8000
Definition: audiog722.cpp:22
+ Here is the caller graph for this function:

Member Data Documentation

◆ a

int AudioG722::g722_encode_state::a[3]

Definition at line 55 of file audiog722.h.

Referenced by AudioG722::block4().

◆ ap

int AudioG722::g722_encode_state::ap[3]

Definition at line 56 of file audiog722.h.

Referenced by AudioG722::block4().

◆ b

int AudioG722::g722_encode_state::b[7]

Definition at line 59 of file audiog722.h.

Referenced by AudioG722::block4().

◆ band

struct { ... } AudioG722::g722_encode_state::band[2]

◆ bits_per_sample

int AudioG722::g722_encode_state::bits_per_sample

6 for 48000kbps, 7 for 56000kbps, or 8 for 64000kbps.

Definition at line 44 of file audiog722.h.

Referenced by AudioG722::encode(), and init().

◆ bp

int AudioG722::g722_encode_state::bp[7]

Definition at line 60 of file audiog722.h.

Referenced by AudioG722::block4().

◆ d

int AudioG722::g722_encode_state::d[7]

Definition at line 58 of file audiog722.h.

Referenced by AudioG722::block4().

◆ det

int AudioG722::g722_encode_state::det

Definition at line 63 of file audiog722.h.

Referenced by AudioG722::encode().

◆ eight_k

int AudioG722::g722_encode_state::eight_k

TRUE if encode from 8k samples/second

Definition at line 42 of file audiog722.h.

Referenced by AudioG722::encode(), and init().

◆ in_bits

int AudioG722::g722_encode_state::in_bits

Definition at line 67 of file audiog722.h.

Referenced by init().

◆ in_buffer

unsigned int AudioG722::g722_encode_state::in_buffer

Definition at line 66 of file audiog722.h.

Referenced by init().

◆ itu_test_mode

int AudioG722::g722_encode_state::itu_test_mode

TRUE if the operating in the special ITU test mode, with the band split filters disabled.

Definition at line 38 of file audiog722.h.

Referenced by AudioG722::encode(), and init().

◆ nb

int AudioG722::g722_encode_state::nb

Definition at line 62 of file audiog722.h.

Referenced by AudioG722::encode().

◆ out_bits

int AudioG722::g722_encode_state::out_bits

Definition at line 69 of file audiog722.h.

Referenced by AudioG722::encode(), and init().

◆ out_buffer

unsigned int AudioG722::g722_encode_state::out_buffer

Definition at line 68 of file audiog722.h.

Referenced by AudioG722::encode(), and init().

◆ p

int AudioG722::g722_encode_state::p[3]

Definition at line 57 of file audiog722.h.

Referenced by AudioG722::block4().

◆ packed

int AudioG722::g722_encode_state::packed

TRUE if the G.722 data is packed

Definition at line 40 of file audiog722.h.

Referenced by AudioG722::encode(), and init().

◆ r

int AudioG722::g722_encode_state::r[3]

Definition at line 54 of file audiog722.h.

Referenced by AudioG722::block4().

◆ s

int AudioG722::g722_encode_state::s

Definition at line 51 of file audiog722.h.

Referenced by AudioG722::block4(), and AudioG722::encode().

◆ sg

int AudioG722::g722_encode_state::sg[7]

Definition at line 61 of file audiog722.h.

Referenced by AudioG722::block4().

◆ sp

int AudioG722::g722_encode_state::sp

Definition at line 52 of file audiog722.h.

Referenced by AudioG722::block4().

◆ sz

int AudioG722::g722_encode_state::sz

Definition at line 53 of file audiog722.h.

Referenced by AudioG722::block4().

◆ x

int AudioG722::g722_encode_state::x[24]

Signal history for the QMF

Definition at line 47 of file audiog722.h.

Referenced by AudioG722::encode(), and init().


The documentation for this struct was generated from the following files: