36 static const int sample_rates[4] = { 16000, 32000, 44100, 48000 };
43 if (data[0] ==
MSBC_SYNCWORD && data[1] == 0 && data[2] == 0) {
55 sr = (data[1] >> 6) & 0x03;
56 blocks = (((data[1] >> 4) & 0x03) + 1) << 2;
57 mode = (data[1] >> 2) & 0x03;
58 subbands = (((data[1] >> 0) & 0x01) + 1) << 2;
64 length = 4 + (subbands *
channels) / 2
66 + (joint * subbands)) + 7) / 8;
77 const uint8_t **poutbuf,
int *poutbuf_size,
113 *poutbuf_size = buf_size;
static int sbc_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
int duration
Duration of the current frame.
enum AVSampleFormat sample_fmt
audio sample format
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
void ff_parse_close(AVCodecParserContext *s)
#define SBC_MODE_JOINT_STEREO
static int sbc_parse_header(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t *data, size_t len)
int frame_size
Number of samples per channel in an audio frame.
int sample_rate
samples per second
#define SBC_MODE_DUAL_CHANNEL
main external API structure.
AVCodecParser ff_sbc_parser
#define PARSER_FLAG_COMPLETE_FRAMES
SBC common definitions for the encoder and decoder.
int channels
number of audio channels
mode
Use these values in ebur128_init (or'ed).