FFmpeg
Data Structures | Macros | Functions
sbc.h File Reference
#include "avcodec.h"
#include "libavutil/crc.h"

Go to the source code of this file.

Data Structures

struct  sbc_frame
 

Macros

#define MSBC_BLOCKS   15
 
#define SBC_FREQ_16000   0x00
 
#define SBC_FREQ_32000   0x01
 
#define SBC_FREQ_44100   0x02
 
#define SBC_FREQ_48000   0x03
 
#define SBC_BLK_4   0x00
 
#define SBC_BLK_8   0x01
 
#define SBC_BLK_12   0x02
 
#define SBC_BLK_16   0x03
 
#define SBC_MODE_MONO   0x00
 
#define SBC_MODE_DUAL_CHANNEL   0x01
 
#define SBC_MODE_STEREO   0x02
 
#define SBC_MODE_JOINT_STEREO   0x03
 
#define SBC_AM_LOUDNESS   0x00
 
#define SBC_AM_SNR   0x01
 
#define SBC_SB_4   0x00
 
#define SBC_SB_8   0x01
 
#define SBC_SYNCWORD   0x9C
 
#define MSBC_SYNCWORD   0xAD
 
#define SBCDEC_FIXED_EXTRA_BITS   2
 
#define SBC_ALIGN   16
 

Functions

uint8_t ff_sbc_crc8 (const AVCRC *crc_ctx, const uint8_t *data, size_t len)
 
void ff_sbc_calculate_bits (const struct sbc_frame *frame, int(*bits)[8])
 

Detailed Description

SBC common definitions for the encoder and decoder

Definition in file sbc.h.

Macro Definition Documentation

◆ MSBC_BLOCKS

#define MSBC_BLOCKS   15

Definition at line 39 of file sbc.h.

◆ SBC_FREQ_16000

#define SBC_FREQ_16000   0x00

Definition at line 42 of file sbc.h.

◆ SBC_FREQ_32000

#define SBC_FREQ_32000   0x01

Definition at line 43 of file sbc.h.

◆ SBC_FREQ_44100

#define SBC_FREQ_44100   0x02

Definition at line 44 of file sbc.h.

◆ SBC_FREQ_48000

#define SBC_FREQ_48000   0x03

Definition at line 45 of file sbc.h.

◆ SBC_BLK_4

#define SBC_BLK_4   0x00

Definition at line 48 of file sbc.h.

◆ SBC_BLK_8

#define SBC_BLK_8   0x01

Definition at line 49 of file sbc.h.

◆ SBC_BLK_12

#define SBC_BLK_12   0x02

Definition at line 50 of file sbc.h.

◆ SBC_BLK_16

#define SBC_BLK_16   0x03

Definition at line 51 of file sbc.h.

◆ SBC_MODE_MONO

#define SBC_MODE_MONO   0x00

Definition at line 54 of file sbc.h.

◆ SBC_MODE_DUAL_CHANNEL

#define SBC_MODE_DUAL_CHANNEL   0x01

Definition at line 55 of file sbc.h.

◆ SBC_MODE_STEREO

#define SBC_MODE_STEREO   0x02

Definition at line 56 of file sbc.h.

◆ SBC_MODE_JOINT_STEREO

#define SBC_MODE_JOINT_STEREO   0x03

Definition at line 57 of file sbc.h.

◆ SBC_AM_LOUDNESS

#define SBC_AM_LOUDNESS   0x00

Definition at line 60 of file sbc.h.

◆ SBC_AM_SNR

#define SBC_AM_SNR   0x01

Definition at line 61 of file sbc.h.

◆ SBC_SB_4

#define SBC_SB_4   0x00

Definition at line 64 of file sbc.h.

◆ SBC_SB_8

#define SBC_SB_8   0x01

Definition at line 65 of file sbc.h.

◆ SBC_SYNCWORD

#define SBC_SYNCWORD   0x9C

Definition at line 68 of file sbc.h.

◆ MSBC_SYNCWORD

#define MSBC_SYNCWORD   0xAD

Definition at line 69 of file sbc.h.

◆ SBCDEC_FIXED_EXTRA_BITS

#define SBCDEC_FIXED_EXTRA_BITS   2

Definition at line 72 of file sbc.h.

◆ SBC_ALIGN

#define SBC_ALIGN   16

Definition at line 78 of file sbc.h.

Function Documentation

◆ ff_sbc_crc8()

uint8_t ff_sbc_crc8 ( const AVCRC crc_ctx,
const uint8_t data,
size_t  len 
)

Definition at line 55 of file sbc.c.

Referenced by sbc_pack_frame(), and sbc_unpack_frame().

◆ ff_sbc_calculate_bits()

void ff_sbc_calculate_bits ( const struct sbc_frame frame,
int(*)  bits[8] 
)

Definition at line 79 of file sbc.c.

Referenced by sbc_pack_frame(), and sbc_unpack_frame().