libosmocoding 1.11.1
Osmocom GSM/GPRS/EGPRS L1 channel coding library
Loading...
Searching...
No Matches
gsm0503_amr_dtx.c File Reference
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <osmocom/core/bits.h>
#include <osmocom/core/conv.h>
#include <osmocom/core/utils.h>
#include <osmocom/coding/gsm0503_amr_dtx.h>
#include <osmocom/coding/gsm0503_parity.h>
#include <osmocom/gsm/gsm0503.h>

Macros

#define S2U(b)

Functions

static bool detect_afs_id_marker (int *n_errors, int *n_bits_total, const sbit_t *sbits, uint8_t offset, uint8_t count, const ubit_t *id_marker, uint8_t id_marker_len)
static bool detect_ahs_id_marker (int *n_errors, int *n_bits_total, const sbit_t *sbits, const ubit_t *id_marker)
static bool detect_interleaved_ahs_id_marker (int *n_errors, int *n_bits_total, const sbit_t *sbits, uint8_t offset, uint8_t n_bits, const ubit_t *id_marker, uint8_t id_marker_len)
static bool detect_afs_sid_first (int *n_errors, int *n_bits_total, const sbit_t *sbits)
static bool detect_afs_sid_update (int *n_errors, int *n_bits_total, const sbit_t *sbits)
static int detect_afs_onset (int *n_errors, int *n_bits_total, const sbit_t *sbits)
static bool detect_ahs_sid_update (int *n_errors, int *n_bits_total, const sbit_t *sbits)
static bool detect_ahs_sid_first_p1 (int *n_errors, int *n_bits_total, const sbit_t *sbits)
static int detect_ahs_sid_first_p2 (int *n_errors, int *n_bits_total, const sbit_t *sbits)
static int detect_ahs_onset (int *n_errors, int *n_bits_total, const sbit_t *sbits)
static bool detect_ahs_sid_first_inh (int *n_errors, int *n_bits_total, const sbit_t *sbits)
static bool detect_ahs_sid_update_inh (int *n_errors, int *n_bits_total, const sbit_t *sbits)
enum gsm0503_amr_dtx_frames gsm0503_detect_afs_dtx_frame2 (int *n_errors, int *n_bits_total, int *mode_id, const sbit_t *sbits)
 Detect FR AMR DTX frame in unmapped, deinterleaved frame bits.
enum gsm0503_amr_dtx_frames gsm0503_detect_afs_dtx_frame (int *n_errors, int *n_bits_total, const ubit_t *ubits)
 Detect FR AMR DTX frame in unmapped, deinterleaved frame bits.
enum gsm0503_amr_dtx_frames gsm0503_detect_ahs_dtx_frame2 (int *n_errors, int *n_bits_total, int *mode_id, const sbit_t *sbits)
 Detect HR AMR DTX frame in unmapped, deinterleaved frame bits.
enum gsm0503_amr_dtx_frames gsm0503_detect_ahs_dtx_frame (int *n_errors, int *n_bits_total, const ubit_t *ubits)
 Detect HR AMR DTX frame in unmapped, deinterleaved frame bits.

Variables

static const ubit_t id_marker_1 [] = { 1, 0, 1, 1, 0, 0, 0, 0, 1 }
static const ubit_t id_marker_0 [] = { 0, 1, 0, 0, 1, 1, 1, 1, 0 }
static const ubit_t codec_mode_1_sid [] = { 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0 }
static const ubit_t codec_mode_2_sid [] = { 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0 }
static const ubit_t codec_mode_3_sid [] = { 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1 }
static const ubit_t codec_mode_4_sid [] = { 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1 }
const struct value_string gsm0503_amr_dtx_frame_names []

Macro Definition Documentation

◆ S2U

#define S2U ( b)

Function Documentation

◆ detect_afs_id_marker()

bool detect_afs_id_marker ( int * n_errors,
int * n_bits_total,
const sbit_t * sbits,
uint8_t offset,
uint8_t count,
const ubit_t * id_marker,
uint8_t id_marker_len )
static

◆ detect_afs_onset()

int detect_afs_onset ( int * n_errors,
int * n_bits_total,
const sbit_t * sbits )
static

◆ detect_afs_sid_first()

bool detect_afs_sid_first ( int * n_errors,
int * n_bits_total,
const sbit_t * sbits )
static

◆ detect_afs_sid_update()

bool detect_afs_sid_update ( int * n_errors,
int * n_bits_total,
const sbit_t * sbits )
static

◆ detect_ahs_id_marker()

bool detect_ahs_id_marker ( int * n_errors,
int * n_bits_total,
const sbit_t * sbits,
const ubit_t * id_marker )
static

References S2U.

Referenced by detect_ahs_sid_first_p1(), and detect_ahs_sid_update().

◆ detect_ahs_onset()

int detect_ahs_onset ( int * n_errors,
int * n_bits_total,
const sbit_t * sbits )
static

◆ detect_ahs_sid_first_inh()

bool detect_ahs_sid_first_inh ( int * n_errors,
int * n_bits_total,
const sbit_t * sbits )
static

◆ detect_ahs_sid_first_p1()

bool detect_ahs_sid_first_p1 ( int * n_errors,
int * n_bits_total,
const sbit_t * sbits )
static

◆ detect_ahs_sid_first_p2()

int detect_ahs_sid_first_p2 ( int * n_errors,
int * n_bits_total,
const sbit_t * sbits )
static

◆ detect_ahs_sid_update()

bool detect_ahs_sid_update ( int * n_errors,
int * n_bits_total,
const sbit_t * sbits )
static

◆ detect_ahs_sid_update_inh()

bool detect_ahs_sid_update_inh ( int * n_errors,
int * n_bits_total,
const sbit_t * sbits )
static

◆ detect_interleaved_ahs_id_marker()

bool detect_interleaved_ahs_id_marker ( int * n_errors,
int * n_bits_total,
const sbit_t * sbits,
uint8_t offset,
uint8_t n_bits,
const ubit_t * id_marker,
uint8_t id_marker_len )
static

Variable Documentation

◆ codec_mode_1_sid

const ubit_t codec_mode_1_sid[] = { 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0 }
static

◆ codec_mode_2_sid

const ubit_t codec_mode_2_sid[] = { 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0 }
static

◆ codec_mode_3_sid

const ubit_t codec_mode_3_sid[] = { 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1 }
static

◆ codec_mode_4_sid

const ubit_t codec_mode_4_sid[] = { 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1 }
static

◆ id_marker_0

const ubit_t id_marker_0[] = { 0, 1, 0, 0, 1, 1, 1, 1, 0 }
static

◆ id_marker_1

const ubit_t id_marker_1[] = { 1, 0, 1, 1, 0, 0, 0, 0, 1 }
static