7#ifndef ZEPHYR_INCLUDE_LIB_SBC_H_
8#define ZEPHYR_INCLUDE_LIB_SBC_H_
14#include "sbc_encoder.h"
15#include "oi_codec_sbc.h"
42 SBC_ENC_PARAMS sbc_encoder_params;
115 OI_CODEC_SBC_DECODER_CONTEXT context;
116 uint32_t context_data[CODEC_DATA_WORDS(2, SBC_CODEC_FAST_FILTER_BUFFERS)];
139 void *out_data,
uint32_t *out_size);
sbc_ch_mode
SBC channel mode.
Definition sbc.h:19
@ SBC_CH_MODE_MONO
Mono channel.
Definition sbc.h:21
@ SBC_CH_MODE_JOINT_STEREO
Joint stereo channel.
Definition sbc.h:27
@ SBC_CH_MODE_STEREO
Stereo channel.
Definition sbc.h:25
@ SBC_CH_MODE_DUAL_CHANNEL
Dual channel.
Definition sbc.h:23
sbc_alloc_mthd
SBC allocation method.
Definition sbc.h:31
@ SBC_ALLOC_MTHD_LOUDNESS
Loudness allocation method.
Definition sbc.h:33
@ SBC_ALLOC_MTHD_SNR
SNR allocation method.
Definition sbc.h:35
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:112
Encoder initialization parameters.
Definition sbc.h:47
enum sbc_alloc_mthd alloc_mthd
Allocation method.
Definition sbc.h:57
uint8_t min_bitpool
Minimum bitpool.
Definition sbc.h:63
uint8_t ch_num
Number of channels.
Definition sbc.h:61
uint32_t samp_freq
Sample frequency.
Definition sbc.h:51
uint8_t max_bitpool
Maximum bitpool.
Definition sbc.h:65
uint32_t bit_rate
Bit rate after encoded.
Definition sbc.h:49
uint8_t blk_len
Block length.
Definition sbc.h:53
uint8_t subband
Number of subbands.
Definition sbc.h:55
enum sbc_ch_mode ch_mode
Channel mode.
Definition sbc.h:59
SBC encoder.
Definition sbc.h:39