7#ifndef ZEPHYR_INCLUDE_LIB_SBC_H_
8#define ZEPHYR_INCLUDE_LIB_SBC_H_
13#include "sbc_encoder.h"
14#include "oi_codec_sbc.h"
41 SBC_ENC_PARAMS sbc_encoder_params;
114 OI_CODEC_SBC_DECODER_CONTEXT context;
115 uint32_t context_data[CODEC_DATA_WORDS(2, SBC_CODEC_FAST_FILTER_BUFFERS)];
138 void *out_data,
uint32_t *out_size);
sbc_ch_mode
SBC channel mode.
Definition sbc.h:18
@ SBC_CH_MODE_MONO
Mono channel.
Definition sbc.h:20
@ SBC_CH_MODE_JOINT_STEREO
Joint stereo channel.
Definition sbc.h:26
@ SBC_CH_MODE_STEREO
Stereo channel.
Definition sbc.h:24
@ SBC_CH_MODE_DUAL_CHANNEL
Dual channel.
Definition sbc.h:22
sbc_alloc_mthd
SBC allocation method.
Definition sbc.h:30
@ SBC_ALLOC_MTHD_LOUDNESS
Loudness allocation method.
Definition sbc.h:32
@ SBC_ALLOC_MTHD_SNR
SNR allocation method.
Definition sbc.h:34
int sbc_frame_bytes(struct sbc_encoder *encoder)
Return the number of PCM bytes in a frame.
int sbc_setup_encoder(struct sbc_encoder *encoder, struct sbc_encoder_init_param *param)
Setup encoder.
uint32_t sbc_encode(struct sbc_encoder *encoder, const void *in_data, void *out_data)
Encode a frame.
int sbc_frame_samples(struct sbc_encoder *encoder)
Return the number of PCM samples in a frame.
int sbc_frame_encoded_bytes(struct sbc_encoder *encoder)
Return the encoded size of one frame.
int sbc_setup_decoder(struct sbc_decoder *decoder)
Setup the SBC decoder.
int sbc_decode(struct sbc_decoder *decoder, const void **in_data, uint32_t *in_size, void *out_data, uint32_t *out_size)
Decode a frame.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
SBC decoder.
Definition sbc.h:111
Encoder initialization parameters.
Definition sbc.h:46
enum sbc_alloc_mthd alloc_mthd
Allocation method.
Definition sbc.h:56
uint8_t min_bitpool
Minimum bitpool.
Definition sbc.h:62
uint8_t ch_num
Number of channels.
Definition sbc.h:60
uint32_t samp_freq
Sample frequency.
Definition sbc.h:50
uint8_t max_bitpool
Maximum bitpool.
Definition sbc.h:64
uint32_t bit_rate
Bit rate after encoded.
Definition sbc.h:48
uint8_t blk_len
Block length.
Definition sbc.h:52
uint8_t subband
Number of subbands.
Definition sbc.h:54
enum sbc_ch_mode ch_mode
Channel mode.
Definition sbc.h:58
SBC encoder.
Definition sbc.h:38