FFmpeg
sbcdec.c
Go to the documentation of this file.
1 /*
2  * Bluetooth low-complexity, subband codec (SBC)
3  *
4  * Copyright (C) 2017 Aurelien Jacobs <aurel@gnuage.org>
5  * Copyright (C) 2012-2013 Intel Corporation
6  * Copyright (C) 2008-2010 Nokia Corporation
7  * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
8  * Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
9  * Copyright (C) 2005-2008 Brad Midgley <bmidgley@xmission.com>
10  *
11  * This file is part of FFmpeg.
12  *
13  * FFmpeg is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
18  * FFmpeg is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public
24  * License along with FFmpeg; if not, write to the Free Software
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26  */
27 
28 /**
29  * @file
30  * SBC decoder implementation
31  */
32 
33 #include "avcodec.h"
34 #include "internal.h"
36 #include "libavutil/intreadwrite.h"
37 #include "libavutil/mem_internal.h"
38 #include "sbc.h"
39 #include "sbcdec_data.h"
40 
42  int32_t V[2][170];
43  int offset[2][16];
44 };
45 
46 typedef struct SBCDecContext {
47  AVClass *class;
51 
52 /*
53  * Unpacks a SBC frame at the beginning of the stream in data,
54  * which has at most len bytes into frame.
55  * Returns the length in bytes of the packed frame, or a negative
56  * value on error. The error codes are:
57  *
58  * -1 Data stream too short
59  * -2 Sync byte incorrect
60  * -3 CRC8 incorrect
61  * -4 Bitpool value out of bounds
62  */
63 static int sbc_unpack_frame(const uint8_t *data, struct sbc_frame *frame,
64  size_t len)
65 {
66  unsigned int consumed;
67  /* Will copy the parts of the header that are relevant to crc
68  * calculation here */
69  uint8_t crc_header[11] = { 0 };
70  int crc_pos;
71  int32_t temp;
72 
73  uint32_t audio_sample;
74  int ch, sb, blk, bit; /* channel, subband, block and bit standard
75  counters */
76  int bits[2][8]; /* bits distribution */
77  uint32_t levels[2][8]; /* levels derived from that */
78 
79  if (len < 4)
80  return -1;
81 
82  if (data[0] == MSBC_SYNCWORD) {
83  if (data[1] != 0)
84  return -2;
85  if (data[2] != 0)
86  return -2;
87 
88  frame->frequency = SBC_FREQ_16000;
89  frame->blocks = MSBC_BLOCKS;
90  frame->allocation = LOUDNESS;
91  frame->mode = MONO;
92  frame->channels = 1;
93  frame->subbands = 8;
94  frame->bitpool = 26;
95  } else if (data[0] == SBC_SYNCWORD) {
96  frame->frequency = (data[1] >> 6) & 0x03;
97  frame->blocks = 4 * ((data[1] >> 4) & 0x03) + 4;
98  frame->mode = (data[1] >> 2) & 0x03;
99  frame->channels = frame->mode == MONO ? 1 : 2;
100  frame->allocation = (data[1] >> 1) & 0x01;
101  frame->subbands = data[1] & 0x01 ? 8 : 4;
102  frame->bitpool = data[2];
103 
104  if ((frame->mode == MONO || frame->mode == DUAL_CHANNEL) &&
105  frame->bitpool > 16 * frame->subbands)
106  return -4;
107 
108  if ((frame->mode == STEREO || frame->mode == JOINT_STEREO) &&
109  frame->bitpool > 32 * frame->subbands)
110  return -4;
111  } else
112  return -2;
113 
114  consumed = 32;
115  crc_header[0] = data[1];
116  crc_header[1] = data[2];
117  crc_pos = 16;
118 
119  if (frame->mode == JOINT_STEREO) {
120  if (len * 8 < consumed + frame->subbands)
121  return -1;
122 
123  frame->joint = 0x00;
124  for (sb = 0; sb < frame->subbands - 1; sb++)
125  frame->joint |= ((data[4] >> (7 - sb)) & 0x01) << sb;
126  if (frame->subbands == 4)
127  crc_header[crc_pos / 8] = data[4] & 0xf0;
128  else
129  crc_header[crc_pos / 8] = data[4];
130 
131  consumed += frame->subbands;
132  crc_pos += frame->subbands;
133  }
134 
135  if (len * 8 < consumed + (4 * frame->subbands * frame->channels))
136  return -1;
137 
138  for (ch = 0; ch < frame->channels; ch++) {
139  for (sb = 0; sb < frame->subbands; sb++) {
140  /* FIXME assert(consumed % 4 == 0); */
141  frame->scale_factor[ch][sb] =
142  (data[consumed >> 3] >> (4 - (consumed & 0x7))) & 0x0F;
143  crc_header[crc_pos >> 3] |=
144  frame->scale_factor[ch][sb] << (4 - (crc_pos & 0x7));
145 
146  consumed += 4;
147  crc_pos += 4;
148  }
149  }
150 
151  if (data[3] != ff_sbc_crc8(frame->crc_ctx, crc_header, crc_pos))
152  return -3;
153 
155 
156  for (ch = 0; ch < frame->channels; ch++) {
157  for (sb = 0; sb < frame->subbands; sb++)
158  levels[ch][sb] = (1 << bits[ch][sb]) - 1;
159  }
160 
161  for (blk = 0; blk < frame->blocks; blk++) {
162  for (ch = 0; ch < frame->channels; ch++) {
163  for (sb = 0; sb < frame->subbands; sb++) {
164  uint32_t shift;
165 
166  if (levels[ch][sb] == 0) {
167  frame->sb_sample[blk][ch][sb] = 0;
168  continue;
169  }
170 
171  shift = frame->scale_factor[ch][sb] +
173 
174  audio_sample = 0;
175  for (bit = 0; bit < bits[ch][sb]; bit++) {
176  if (consumed > len * 8)
177  return -1;
178 
179  if ((data[consumed >> 3] >> (7 - (consumed & 0x7))) & 0x01)
180  audio_sample |= 1 << (bits[ch][sb] - bit - 1);
181 
182  consumed++;
183  }
184 
185  frame->sb_sample[blk][ch][sb] = (int32_t)
186  (((((uint64_t) audio_sample << 1) | 1) << shift) /
187  levels[ch][sb]) - (1 << shift);
188  }
189  }
190  }
191 
192  if (frame->mode == JOINT_STEREO) {
193  for (blk = 0; blk < frame->blocks; blk++) {
194  for (sb = 0; sb < frame->subbands; sb++) {
195  if (frame->joint & (0x01 << sb)) {
196  temp = frame->sb_sample[blk][0][sb] +
197  frame->sb_sample[blk][1][sb];
198  frame->sb_sample[blk][1][sb] =
199  frame->sb_sample[blk][0][sb] -
200  frame->sb_sample[blk][1][sb];
201  frame->sb_sample[blk][0][sb] = temp;
202  }
203  }
204  }
205  }
206 
207  if ((consumed & 0x7) != 0)
208  consumed += 8 - (consumed & 0x7);
209 
210  return consumed >> 3;
211 }
212 
213 static inline void sbc_synthesize_four(struct sbc_decoder_state *state,
214  struct sbc_frame *frame,
215  int ch, int blk, AVFrame *output_frame)
216 {
217  int i, k, idx;
218  int32_t *v = state->V[ch];
219  int *offset = state->offset[ch];
220 
221  for (i = 0; i < 8; i++) {
222  /* Shifting */
223  offset[i]--;
224  if (offset[i] < 0) {
225  offset[i] = 79;
226  memcpy(v + 80, v, 9 * sizeof(*v));
227  }
228 
229  /* Distribute the new matrix value to the shifted position */
230  v[offset[i]] =
231  (int)( (unsigned)ff_synmatrix4[i][0] * frame->sb_sample[blk][ch][0] +
232  (unsigned)ff_synmatrix4[i][1] * frame->sb_sample[blk][ch][1] +
233  (unsigned)ff_synmatrix4[i][2] * frame->sb_sample[blk][ch][2] +
234  (unsigned)ff_synmatrix4[i][3] * frame->sb_sample[blk][ch][3] ) >> 15;
235  }
236 
237  /* Compute the samples */
238  for (idx = 0, i = 0; i < 4; i++, idx += 5) {
239  k = (i + 4) & 0xf;
240 
241  /* Store in output, Q0 */
242  AV_WN16A(&output_frame->data[ch][blk * 8 + i * 2], av_clip_int16(
243  (int)( (unsigned)v[offset[i] + 0] * ff_sbc_proto_4_40m0[idx + 0] +
244  (unsigned)v[offset[k] + 1] * ff_sbc_proto_4_40m1[idx + 0] +
245  (unsigned)v[offset[i] + 2] * ff_sbc_proto_4_40m0[idx + 1] +
246  (unsigned)v[offset[k] + 3] * ff_sbc_proto_4_40m1[idx + 1] +
247  (unsigned)v[offset[i] + 4] * ff_sbc_proto_4_40m0[idx + 2] +
248  (unsigned)v[offset[k] + 5] * ff_sbc_proto_4_40m1[idx + 2] +
249  (unsigned)v[offset[i] + 6] * ff_sbc_proto_4_40m0[idx + 3] +
250  (unsigned)v[offset[k] + 7] * ff_sbc_proto_4_40m1[idx + 3] +
251  (unsigned)v[offset[i] + 8] * ff_sbc_proto_4_40m0[idx + 4] +
252  (unsigned)v[offset[k] + 9] * ff_sbc_proto_4_40m1[idx + 4] ) >> 15));
253  }
254 }
255 
256 static inline void sbc_synthesize_eight(struct sbc_decoder_state *state,
257  struct sbc_frame *frame,
258  int ch, int blk, AVFrame *output_frame)
259 {
260  int i, k, idx;
261  int32_t *v = state->V[ch];
262  int *offset = state->offset[ch];
263 
264  for (i = 0; i < 16; i++) {
265  /* Shifting */
266  offset[i]--;
267  if (offset[i] < 0) {
268  offset[i] = 159;
269  memcpy(v + 160, v, 9 * sizeof(*v));
270  }
271 
272  /* Distribute the new matrix value to the shifted position */
273  v[offset[i]] =
274  (int)( (unsigned)ff_synmatrix8[i][0] * frame->sb_sample[blk][ch][0] +
275  (unsigned)ff_synmatrix8[i][1] * frame->sb_sample[blk][ch][1] +
276  (unsigned)ff_synmatrix8[i][2] * frame->sb_sample[blk][ch][2] +
277  (unsigned)ff_synmatrix8[i][3] * frame->sb_sample[blk][ch][3] +
278  (unsigned)ff_synmatrix8[i][4] * frame->sb_sample[blk][ch][4] +
279  (unsigned)ff_synmatrix8[i][5] * frame->sb_sample[blk][ch][5] +
280  (unsigned)ff_synmatrix8[i][6] * frame->sb_sample[blk][ch][6] +
281  (unsigned)ff_synmatrix8[i][7] * frame->sb_sample[blk][ch][7] ) >> 15;
282  }
283 
284  /* Compute the samples */
285  for (idx = 0, i = 0; i < 8; i++, idx += 5) {
286  k = (i + 8) & 0xf;
287 
288  /* Store in output, Q0 */
289  AV_WN16A(&output_frame->data[ch][blk * 16 + i * 2], av_clip_int16(
290  (int)( (unsigned)v[offset[i] + 0] * ff_sbc_proto_8_80m0[idx + 0] +
291  (unsigned)v[offset[k] + 1] * ff_sbc_proto_8_80m1[idx + 0] +
292  (unsigned)v[offset[i] + 2] * ff_sbc_proto_8_80m0[idx + 1] +
293  (unsigned)v[offset[k] + 3] * ff_sbc_proto_8_80m1[idx + 1] +
294  (unsigned)v[offset[i] + 4] * ff_sbc_proto_8_80m0[idx + 2] +
295  (unsigned)v[offset[k] + 5] * ff_sbc_proto_8_80m1[idx + 2] +
296  (unsigned)v[offset[i] + 6] * ff_sbc_proto_8_80m0[idx + 3] +
297  (unsigned)v[offset[k] + 7] * ff_sbc_proto_8_80m1[idx + 3] +
298  (unsigned)v[offset[i] + 8] * ff_sbc_proto_8_80m0[idx + 4] +
299  (unsigned)v[offset[k] + 9] * ff_sbc_proto_8_80m1[idx + 4] ) >> 15));
300  }
301 }
302 
305 {
306  int ch, blk;
307 
308  switch (frame->subbands) {
309  case 4:
310  for (ch = 0; ch < frame->channels; ch++)
311  for (blk = 0; blk < frame->blocks; blk++)
313  break;
314 
315  case 8:
316  for (ch = 0; ch < frame->channels; ch++)
317  for (blk = 0; blk < frame->blocks; blk++)
319  break;
320  }
321 }
322 
323 static int sbc_decode_init(AVCodecContext *avctx)
324 {
325  SBCDecContext *sbc = avctx->priv_data;
326  int i, ch;
327 
329 
331 
332  memset(sbc->dsp.V, 0, sizeof(sbc->dsp.V));
333  for (ch = 0; ch < 2; ch++)
334  for (i = 0; i < FF_ARRAY_ELEMS(sbc->dsp.offset[0]); i++)
335  sbc->dsp.offset[ch][i] = (10 * i + 10);
336  return 0;
337 }
338 
340  void *data, int *got_frame_ptr,
341  AVPacket *avpkt)
342 {
343  SBCDecContext *sbc = avctx->priv_data;
344  AVFrame *frame = data;
345  int ret, frame_length;
346 
347  if (!sbc)
348  return AVERROR(EIO);
349 
350  frame_length = sbc_unpack_frame(avpkt->data, &sbc->frame, avpkt->size);
351  if (frame_length <= 0)
352  return frame_length;
353 
354  avctx->channels = sbc->frame.channels;
355 
356  frame->nb_samples = sbc->frame.blocks * sbc->frame.subbands;
357  if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
358  return ret;
359 
360  sbc_synthesize_audio(&sbc->dsp, &sbc->frame, frame);
361 
362  *got_frame_ptr = 1;
363 
364  return frame_length;
365 }
366 
368  .name = "sbc",
369  .long_name = NULL_IF_CONFIG_SMALL("SBC (low-complexity subband codec)"),
370  .type = AVMEDIA_TYPE_AUDIO,
371  .id = AV_CODEC_ID_SBC,
372  .priv_data_size = sizeof(SBCDecContext),
376  .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
377  .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
379  .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
381  .supported_samplerates = (const int[]) { 16000, 32000, 44100, 48000, 0 },
382 };
AVCodec
AVCodec.
Definition: codec.h:202
FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:42
SBCDecContext::frame
struct sbc_frame frame
Definition: sbcdec.c:48
init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
AV_CRC_8_EBU
@ AV_CRC_8_EBU
Definition: crc.h:56
MSBC_SYNCWORD
#define MSBC_SYNCWORD
Definition: sbc.h:71
JOINT_STEREO
#define JOINT_STEREO
Definition: atrac3.c:58
mem_internal.h
AV_CH_LAYOUT_MONO
#define AV_CH_LAYOUT_MONO
Definition: channel_layout.h:90
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:303
internal.h
AVPacket::data
uint8_t * data
Definition: packet.h:373
sbc_decode_init
static int sbc_decode_init(AVCodecContext *avctx)
Definition: sbcdec.c:323
data
const char data[16]
Definition: mxf.c:143
sbc_frame::subbands
uint8_t subbands
Definition: sbc.h:98
SBCDEC_FIXED_EXTRA_BITS
#define SBCDEC_FIXED_EXTRA_BITS
Definition: sbc.h:74
STEREO
#define STEREO
Definition: cook.c:63
sbc_synthesize_eight
static void sbc_synthesize_eight(struct sbc_decoder_state *state, struct sbc_frame *frame, int ch, int blk, AVFrame *output_frame)
Definition: sbcdec.c:256
MSBC_BLOCKS
#define MSBC_BLOCKS
Definition: sbc.h:41
bit
#define bit(string, value)
Definition: cbs_mpeg2.c:58
sbc_decoder_state::offset
int offset[2][16]
Definition: sbcdec.c:43
AV_CH_LAYOUT_STEREO
#define AV_CH_LAYOUT_STEREO
Definition: channel_layout.h:91
ff_sbc_proto_4_40m1
const int32_t ff_sbc_proto_4_40m1[]
Definition: sbcdec_data.c:49
AV_CODEC_ID_SBC
@ AV_CODEC_ID_SBC
Definition: codec_id.h:509
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
sbc_decoder_state::V
int32_t V[2][170]
Definition: sbcdec.c:42
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
intreadwrite.h
sbc_unpack_frame
static int sbc_unpack_frame(const uint8_t *data, struct sbc_frame *frame, size_t len)
Definition: sbcdec.c:63
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
bits
uint8_t bits
Definition: vp3data.h:141
ff_synmatrix8
const int32_t ff_synmatrix8[16][8]
Definition: sbcdec_data.c:94
ff_synmatrix4
const int32_t ff_synmatrix4[8][4]
Definition: sbcdec_data.c:83
AV_WN16A
#define AV_WN16A(p, v)
Definition: intreadwrite.h:534
SBC_SYNCWORD
#define SBC_SYNCWORD
Definition: sbc.h:70
blk
#define blk(i)
Definition: sha.c:185
SBCDecContext
Definition: sbcdec.c:46
SBCDecContext::dsp
struct sbc_decoder_state dsp
Definition: sbcdec.c:49
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:66
av_clip_int16
#define av_clip_int16
Definition: common.h:111
sbc_decode_frame
static int sbc_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: sbcdec.c:339
state
static struct @317 state
ff_sbc_proto_8_80m1
const int32_t ff_sbc_proto_8_80m1[]
Definition: sbcdec_data.c:70
AV_CODEC_CAP_CHANNEL_CONF
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
Definition: codec.h:109
SBC_ALIGN
#define SBC_ALIGN
Definition: sbc.h:80
ff_get_buffer
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
Definition: decode.c:1652
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
AVPacket::size
int size
Definition: packet.h:374
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
ff_sbc_decoder
const AVCodec ff_sbc_decoder
Definition: sbcdec.c:367
AVCodecContext::sample_fmt
enum AVSampleFormat sample_fmt
audio sample format
Definition: avcodec.h:1000
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:59
sbc_frame::channels
uint8_t channels
Definition: sbc.h:93
sbc_synthesize_audio
static void sbc_synthesize_audio(struct sbc_decoder_state *state, struct sbc_frame *frame, AVFrame *output_frame)
Definition: sbcdec.c:303
ff_sbc_proto_4_40m0
const int32_t ff_sbc_proto_4_40m0[]
Definition: sbcdec_data.c:41
sbcdec_data.h
av_crc_get_table
const AVCRC * av_crc_get_table(AVCRCId crc_id)
Get an initialized standard CRC table.
Definition: crc.c:374
output_frame
static int output_frame(H264Context *h, AVFrame *dst, H264Picture *srcp)
Definition: h264dec.c:850
offset
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
Definition: writing_filters.txt:86
sbc.h
AV_SAMPLE_FMT_S16P
@ AV_SAMPLE_FMT_S16P
signed 16 bits, planar
Definition: samplefmt.h:67
AVCodecContext::channels
int channels
number of audio channels
Definition: avcodec.h:993
DECLARE_ALIGNED
#define DECLARE_ALIGNED(n, t, v)
Definition: mem.h:116
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:271
sbc_frame
Definition: sbc.h:84
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
xf
#define xf(width, name, var, range_min, range_max, subs,...)
Definition: cbs_av1.c:664
AVCodec::name
const char * name
Name of the codec implementation.
Definition: codec.h:209
len
int len
Definition: vorbis_enc_data.h:426
ff_sbc_crc8
uint8_t ff_sbc_crc8(const AVCRC *ctx, const uint8_t *data, size_t len)
Definition: sbc.c:54
avcodec.h
sbc_frame::crc_ctx
const AVCRC * crc_ctx
Definition: sbc.h:114
MONO
#define MONO
Definition: cook.c:62
SBC_FREQ_16000
#define SBC_FREQ_16000
Definition: sbc.h:44
ret
ret
Definition: filter_design.txt:187
frame
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
Definition: filter_design.txt:264
AVCodecContext
main external API structure.
Definition: avcodec.h:383
channel_layout.h
LOUDNESS
#define LOUDNESS(energy)
Definition: f_ebur128.c:499
sbc_synthesize_four
static void sbc_synthesize_four(struct sbc_decoder_state *state, struct sbc_frame *frame, int ch, int blk, AVFrame *output_frame)
Definition: sbcdec.c:213
sbc_frame::blocks
uint8_t blocks
Definition: sbc.h:86
temp
else temp
Definition: vf_mcdeint.c:256
ff_sbc_calculate_bits
void ff_sbc_calculate_bits(const struct sbc_frame *frame, int(*bits)[8])
Definition: sbc.c:78
shift
static int shift(int a, int b)
Definition: sonic.c:83
AVPacket
This structure stores compressed data.
Definition: packet.h:350
AVCodecContext::priv_data
void * priv_data
Definition: avcodec.h:410
channel_layouts
static const uint16_t channel_layouts[7]
Definition: dca_lbr.c:114
ff_sbc_proto_8_80m0
const int32_t ff_sbc_proto_8_80m0[]
Definition: sbcdec_data.c:57
int32_t
int32_t
Definition: audioconvert.c:56
sbc_decoder_state
Definition: sbcdec.c:41
int
int
Definition: ffmpeg_filter.c:156