FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
atrac3plus.c File Reference

Bitstream parser for ATRAC3+ decoder. More...

#include "libavutil/avassert.h"
#include "avcodec.h"
#include "get_bits.h"
#include "atrac3plus.h"
#include "atrac3plus_data.h"

Go to the source code of this file.

Macros

#define GET_DELTA(gb, delta_bits)   ((delta_bits) ? get_bits((gb), (delta_bits)) : 0)
 
#define UNPACK_SF_VQ_SHAPE(gb, dst, num_vals)
 
#define DEC_CT_IDX_COMMON(OP)
 
#define CODING_DIRECT   get_bits(gb, num_bits)
 
#define CODING_VLC   get_vlc2(gb, vlc_tab->table, vlc_tab->bits, 1)
 
#define CODING_VLC_DELTA
 
#define CODING_VLC_DIFF
 

Functions

static av_cold void build_canonical_huff (const uint8_t *cb, const uint8_t *xlat, int *tab_offset, VLC *out_vlc)
 Generate canonical VLC table from given descriptor.
 
av_cold void ff_atrac3p_init_vlcs (void)
 Initialize VLC tables for bitstream parsing.
 
static int num_coded_units (GetBitContext *gb, Atrac3pChanParams *chan, Atrac3pChanUnitCtx *ctx, AVCodecContext *avctx)
 Decode number of coded quantization units.
 
static int add_wordlen_weights (Atrac3pChanUnitCtx *ctx, Atrac3pChanParams *chan, int wtab_idx, AVCodecContext *avctx)
 Add weighting coefficients to the decoded word-length information.
 
static int subtract_sf_weights (Atrac3pChanUnitCtx *ctx, Atrac3pChanParams *chan, int wtab_idx, AVCodecContext *avctx)
 Subtract weighting coefficients from decoded scalefactors.
 
static void unpack_vq_shape (int start_val, const int8_t *shape_vec, int *dst, int num_values)
 Unpack vector quantization tables.
 
static int decode_channel_wordlen (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, AVCodecContext *avctx)
 Decode word length for each quantization unit of a channel.
 
static int decode_channel_sf_idx (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, AVCodecContext *avctx)
 Decode scale factor indexes for each quant unit of a channel.
 
static int decode_quant_wordlen (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int num_channels, AVCodecContext *avctx)
 Decode word length information for each channel.
 
static int decode_scale_factors (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int num_channels, AVCodecContext *avctx)
 Decode scale factor indexes for each channel.
 
static int get_num_ct_values (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, AVCodecContext *avctx)
 Decode number of code table values.
 
static int decode_channel_code_tab (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, AVCodecContext *avctx)
 Decode code table indexes for each quant unit of a channel.
 
static int decode_code_table_indexes (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int num_channels, AVCodecContext *avctx)
 Decode code table indexes for each channel.
 
static void decode_qu_spectra (GetBitContext *gb, const Atrac3pSpecCodeTab *tab, VLC *vlc_tab, int16_t *out, const int num_specs)
 Decode huffman-coded spectral lines for a given quant unit.
 
static void decode_spectrum (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int num_channels, AVCodecContext *avctx)
 Decode huffman-coded IMDCT spectrum for all channels.
 
static int get_subband_flags (GetBitContext *gb, uint8_t *out, int num_flags)
 Retrieve specified amount of flag bits from the input bitstream.
 
static void decode_window_shape (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int num_channels)
 Decode mdct window shape flags for all channels.
 
static int decode_gainc_npoints (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int coded_subbands)
 Decode number of gain control points.
 
static void gainc_level_mode3s (AtracGainInfo *dst, AtracGainInfo *ref)
 Implements coding mode 3 (slave) for gain compensation levels.
 
static void gainc_level_mode1m (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, AtracGainInfo *dst)
 Implements coding mode 1 (master) for gain compensation levels.
 
static int decode_gainc_levels (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int coded_subbands)
 Decode level code for each gain control point.
 
static void gainc_loc_mode0 (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, AtracGainInfo *dst, int pos)
 Implements coding mode 0 for gain compensation locations.
 
static void gainc_loc_mode1 (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, AtracGainInfo *dst)
 Implements coding mode 1 for gain compensation locations.
 
static int decode_gainc_loc_codes (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int coded_subbands, AVCodecContext *avctx)
 Decode location code for each gain control point.
 
static int decode_gainc_data (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int num_channels, AVCodecContext *avctx)
 Decode gain control data for all channels.
 
static void decode_tones_envelope (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int band_has_tones[])
 Decode envelope for all tones of a channel.
 
static int decode_band_numwavs (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int band_has_tones[], AVCodecContext *avctx)
 Decode number of tones for each subband of a channel.
 
static void decode_tones_frequency (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int band_has_tones[])
 Decode frequency information for each subband of a channel.
 
static void decode_tones_amplitude (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int band_has_tones[])
 Decode amplitude information for each subband of a channel.
 
static void decode_tones_phase (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int band_has_tones[])
 Decode phase information for each subband of a channel.
 
static int decode_tones_info (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int num_channels, AVCodecContext *avctx)
 Decode tones info for all channels.
 
int ff_atrac3p_decode_channel_unit (GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int num_channels, AVCodecContext *avctx)
 Decode bitstream data of a channel unit.
 

Variables

static VLC_TYPE tables_data [154276][2]
 
static VLC wl_vlc_tabs [4]
 
static VLC sf_vlc_tabs [8]
 
static VLC ct_vlc_tabs [4]
 
static VLC spec_vlc_tabs [112]
 
static VLC gain_vlc_tabs [11]
 
static VLC tone_vlc_tabs [7]
 

Detailed Description

Bitstream parser for ATRAC3+ decoder.

Definition in file atrac3plus.c.

Macro Definition Documentation

#define GET_DELTA (   gb,
  delta_bits 
)    ((delta_bits) ? get_bits((gb), (delta_bits)) : 0)
#define UNPACK_SF_VQ_SHAPE (   gb,
  dst,
  num_vals 
)
Value:
start_val = get_bits((gb), 6); \
unpack_vq_shape(start_val, &atrac3p_sf_shapes[get_bits((gb), 6)][0], \
(dst), (num_vals))

Definition at line 324 of file atrac3plus.c.

Referenced by decode_channel_sf_idx().

#define DEC_CT_IDX_COMMON (   OP)
Value:
num_vals = get_num_ct_values(gb, ctx, avctx); \
if (num_vals < 0) \
return num_vals; \
for (i = 0; i < num_vals; i++) { \
if (chan->qu_wordlen[i]) { \
chan->qu_tab_idx[i] = OP; \
} else if (ch_num && ref_chan->qu_wordlen[i]) \
/* get clone master flag */ \
chan->qu_tab_idx[i] = get_bits1(gb); \
}

Definition at line 693 of file atrac3plus.c.

Referenced by decode_channel_code_tab().

#define CODING_DIRECT   get_bits(gb, num_bits)

Definition at line 706 of file atrac3plus.c.

Referenced by decode_channel_code_tab().

#define CODING_VLC   get_vlc2(gb, vlc_tab->table, vlc_tab->bits, 1)

Definition at line 708 of file atrac3plus.c.

Referenced by decode_channel_code_tab().

#define CODING_VLC_DELTA
Value:
(!i) ? CODING_VLC \
: (pred + get_vlc2(gb, delta_vlc->table, \
delta_vlc->bits, 1)) & mask; \
pred = chan->qu_tab_idx[i]

Definition at line 710 of file atrac3plus.c.

Referenced by decode_channel_code_tab().

#define CODING_VLC_DIFF
Value:
(ref_chan->qu_tab_idx[i] + \
get_vlc2(gb, vlc_tab->table, vlc_tab->bits, 1)) & mask

Definition at line 716 of file atrac3plus.c.

Referenced by decode_channel_code_tab().

Function Documentation

static av_cold void build_canonical_huff ( const uint8_t cb,
const uint8_t xlat,
int *  tab_offset,
VLC out_vlc 
)
static

Generate canonical VLC table from given descriptor.

Parameters
[in]cbptr to codebook descriptor
[in]xlatptr to translation table or NULL
[in,out]tab_offsetstarting offset to the generated vlc table
[out]out_vlcptr to vlc table to be generated

Definition at line 53 of file atrac3plus.c.

Referenced by ff_atrac3p_init_vlcs().

av_cold void ff_atrac3p_init_vlcs ( void  )

Initialize VLC tables for bitstream parsing.

Definition at line 83 of file atrac3plus.c.

Referenced by atrac3p_decode_init().

static int num_coded_units ( GetBitContext gb,
Atrac3pChanParams chan,
Atrac3pChanUnitCtx ctx,
AVCodecContext avctx 
)
static

Decode number of coded quantization units.

Parameters
[in]gbthe GetBit context
[in,out]chanptr to the channel parameters
[in,out]ctxptr to the channel unit context
[in]avctxptr to the AVCodecContext
Returns
result code: 0 = OK, otherwise - error code

Definition at line 224 of file atrac3plus.c.

Referenced by decode_channel_wordlen().

static int add_wordlen_weights ( Atrac3pChanUnitCtx ctx,
Atrac3pChanParams chan,
int  wtab_idx,
AVCodecContext avctx 
)
static

Add weighting coefficients to the decoded word-length information.

Parameters
[in,out]ctxptr to the channel unit context
[in,out]chanptr to the channel parameters
[in]wtab_idxindex of the table of weights
[in]avctxptr to the AVCodecContext
Returns
result code: 0 = OK, otherwise - error code

Definition at line 254 of file atrac3plus.c.

Referenced by decode_channel_wordlen().

static int subtract_sf_weights ( Atrac3pChanUnitCtx ctx,
Atrac3pChanParams chan,
int  wtab_idx,
AVCodecContext avctx 
)
static

Subtract weighting coefficients from decoded scalefactors.

Parameters
[in,out]ctxptr to the channel unit context
[in,out]chanptr to the channel parameters
[in]wtab_idxindex of table of weights
[in]avctxptr to the AVCodecContext
Returns
result code: 0 = OK, otherwise - error code

Definition at line 284 of file atrac3plus.c.

Referenced by decode_channel_sf_idx().

static void unpack_vq_shape ( int  start_val,
const int8_t *  shape_vec,
int *  dst,
int  num_values 
)
inlinestatic

Unpack vector quantization tables.

Parameters
[in]start_valstart value for the unpacked table
[in]shape_vecptr to table to unpack
[out]dstptr to output array
[in]num_valuesnumber of values to unpack

Definition at line 312 of file atrac3plus.c.

Referenced by decode_channel_wordlen().

static int decode_channel_wordlen ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  ch_num,
AVCodecContext avctx 
)
static

Decode word length for each quantization unit of a channel.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]ch_numchannel to process
[in]avctxptr to the AVCodecContext
Returns
result code: 0 = OK, otherwise - error code

Definition at line 338 of file atrac3plus.c.

Referenced by decode_quant_wordlen().

static int decode_channel_sf_idx ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  ch_num,
AVCodecContext avctx 
)
static

Decode scale factor indexes for each quant unit of a channel.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]ch_numchannel to process
[in]avctxptr to the AVCodecContext
Returns
result code: 0 = OK, otherwise - error code

Definition at line 481 of file atrac3plus.c.

Referenced by decode_scale_factors().

static int decode_quant_wordlen ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  num_channels,
AVCodecContext avctx 
)
static

Decode word length information for each channel.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]num_channelsnumber of channels to process
[in]avctxptr to the AVCodecContext
Returns
result code: 0 = OK, otherwise - error code

Definition at line 616 of file atrac3plus.c.

Referenced by ff_atrac3p_decode_channel_unit().

static int decode_scale_factors ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  num_channels,
AVCodecContext avctx 
)
static

Decode scale factor indexes for each channel.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]num_channelsnumber of channels to process
[in]avctxptr to the AVCodecContext
Returns
result code: 0 = OK, otherwise - error code

Definition at line 649 of file atrac3plus.c.

Referenced by ff_atrac3p_decode_channel_unit().

static int get_num_ct_values ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
AVCodecContext avctx 
)
static

Decode number of code table values.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]avctxptr to the AVCodecContext
Returns
result code: 0 = OK, otherwise - error code

Definition at line 676 of file atrac3plus.c.

static int decode_channel_code_tab ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  ch_num,
AVCodecContext avctx 
)
static

Decode code table indexes for each quant unit of a channel.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]ch_numchannel to process
[in]avctxptr to the AVCodecContext
Returns
result code: 0 = OK, otherwise - error code

Definition at line 729 of file atrac3plus.c.

Referenced by decode_code_table_indexes().

static int decode_code_table_indexes ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  num_channels,
AVCodecContext avctx 
)
static

Decode code table indexes for each channel.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]num_channelsnumber of channels to process
[in]avctxptr to the AVCodecContext
Returns
result code: 0 = OK, otherwise - error code

Definition at line 782 of file atrac3plus.c.

Referenced by ff_atrac3p_decode_channel_unit().

static void decode_qu_spectra ( GetBitContext gb,
const Atrac3pSpecCodeTab tab,
VLC vlc_tab,
int16_t *  out,
const int  num_specs 
)
static

Decode huffman-coded spectral lines for a given quant unit.

This is a generalized version for all known coding modes. Its speed can be improved by creating separate functions for each mode.

Parameters
[in]gbthe GetBit context
[in]tabcode table telling how to decode spectral lines
[in]vlc_tabptr to the huffman table associated with the code table
[out]outpointer to buffer where decoded data should be stored
[in]num_specsnumber of spectral lines to decode

Definition at line 815 of file atrac3plus.c.

Referenced by decode_spectrum().

static void decode_spectrum ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  num_channels,
AVCodecContext avctx 
)
static

Decode huffman-coded IMDCT spectrum for all channels.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]num_channelsnumber of channels to process
[in]avctxptr to the AVCodecContext

Definition at line 854 of file atrac3plus.c.

Referenced by ff_atrac3p_decode_channel_unit().

static int get_subband_flags ( GetBitContext gb,
uint8_t out,
int  num_flags 
)
static

Retrieve specified amount of flag bits from the input bitstream.

The data can be shortened in the case of the following two common conditions: if all bits are zero then only one signal bit = 0 will be stored, if all bits are ones then two signal bits = 1,0 will be stored. Otherwise, all necessary bits will be directly stored prefixed by two signal bits = 1,1.

Parameters
[in]gbptr to the GetBitContext
[out]outwhere to place decoded flags
[in]num_flagsnumber of flags to process
Returns
: 0 = all flag bits are zero, 1 = there is at least one non-zero flag bit

Definition at line 924 of file atrac3plus.c.

Referenced by decode_tones_info(), decode_window_shape(), and ff_atrac3p_decode_channel_unit().

static void decode_window_shape ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  num_channels 
)
static

Decode mdct window shape flags for all channels.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]num_channelsnumber of channels to process

Definition at line 949 of file atrac3plus.c.

Referenced by ff_atrac3p_decode_channel_unit().

static int decode_gainc_npoints ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  ch_num,
int  coded_subbands 
)
static

Decode number of gain control points.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]ch_numchannel to process
[in]coded_subbandsnumber of subbands to process
Returns
result code: 0 = OK, otherwise - error code

Definition at line 968 of file atrac3plus.c.

Referenced by decode_gainc_data().

static void gainc_level_mode3s ( AtracGainInfo dst,
AtracGainInfo ref 
)
inlinestatic

Implements coding mode 3 (slave) for gain compensation levels.

Parameters
[out]dstptr to the output array
[in]refptr to the reference channel

Definition at line 1033 of file atrac3plus.c.

Referenced by decode_gainc_levels().

static void gainc_level_mode1m ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
AtracGainInfo dst 
)
inlinestatic

Implements coding mode 1 (master) for gain compensation levels.

Parameters
[in]gbthe GetBit context
[in]ctxptr to the channel unit context
[out]dstptr to the output array

Definition at line 1048 of file atrac3plus.c.

Referenced by decode_gainc_levels().

static int decode_gainc_levels ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  ch_num,
int  coded_subbands 
)
static

Decode level code for each gain control point.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]ch_numchannel to process
[in]coded_subbandsnumber of subbands to process
Returns
result code: 0 = OK, otherwise - error code

Definition at line 1074 of file atrac3plus.c.

Referenced by decode_gainc_data().

static void gainc_loc_mode0 ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
AtracGainInfo dst,
int  pos 
)
inlinestatic

Implements coding mode 0 for gain compensation locations.

Parameters
[in]gbthe GetBit context
[in]ctxptr to the channel unit context
[out]dstptr to the output array
[in]posposition of the value to be processed

Definition at line 1156 of file atrac3plus.c.

Referenced by decode_gainc_loc_codes().

static void gainc_loc_mode1 ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
AtracGainInfo dst 
)
inlinestatic

Implements coding mode 1 for gain compensation locations.

Parameters
[in]gbthe GetBit context
[in]ctxptr to the channel unit context
[out]dstptr to the output array

Definition at line 1179 of file atrac3plus.c.

Referenced by decode_gainc_loc_codes().

static int decode_gainc_loc_codes ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  ch_num,
int  coded_subbands,
AVCodecContext avctx 
)
static

Decode location code for each gain control point.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]ch_numchannel to process
[in]coded_subbandsnumber of subbands to process
[in]avctxptr to the AVCodecContext
Returns
result code: 0 = OK, otherwise - error code

Definition at line 1211 of file atrac3plus.c.

Referenced by decode_gainc_data().

static int decode_gainc_data ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  num_channels,
AVCodecContext avctx 
)
static

Decode gain control data for all channels.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]num_channelsnumber of channels to process
[in]avctxptr to the AVCodecContext
Returns
result code: 0 = OK, otherwise - error code

Definition at line 1365 of file atrac3plus.c.

Referenced by ff_atrac3p_decode_channel_unit().

static void decode_tones_envelope ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  ch_num,
int  band_has_tones[] 
)
static

Decode envelope for all tones of a channel.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]ch_numchannel to process
[in]band_has_tonesptr to an array of per-band-flags: 1 - tone data present

Definition at line 1408 of file atrac3plus.c.

Referenced by decode_tones_info().

static int decode_band_numwavs ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  ch_num,
int  band_has_tones[],
AVCodecContext avctx 
)
static

Decode number of tones for each subband of a channel.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]ch_numchannel to process
[in]band_has_tonesptr to an array of per-band-flags: 1 - tone data present
[in]avctxptr to the AVCodecContext
Returns
result code: 0 = OK, otherwise - error code

fixed-length coding

variable-length coding

VLC modulo delta to master (slave only)

copy master (slave only)

initialize start tone index for each subband

Definition at line 1449 of file atrac3plus.c.

Referenced by decode_tones_info().

static void decode_tones_frequency ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  ch_num,
int  band_has_tones[] 
)
static

Decode frequency information for each subband of a channel.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]ch_numchannel to process
[in]band_has_tonesptr to an array of per-band-flags: 1 - tone data present

packed numbers in descending order

packed numbers in ascending order

Definition at line 1513 of file atrac3plus.c.

Referenced by decode_tones_info().

static void decode_tones_amplitude ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  ch_num,
int  band_has_tones[] 
)
static

Decode amplitude information for each subband of a channel.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]ch_numchannel to process
[in]band_has_tonesptr to an array of per-band-flags: 1 - tone data present

fixed-length coding

min + VLC delta

VLC modulo delta to master (slave only)

clone master (slave only)

Definition at line 1573 of file atrac3plus.c.

Referenced by decode_tones_info().

static void decode_tones_phase ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  ch_num,
int  band_has_tones[] 
)
static

Decode phase information for each subband of a channel.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]ch_numchannel to process
[in]band_has_tonesptr to an array of per-band-flags: 1 - tone data present

Definition at line 1673 of file atrac3plus.c.

Referenced by decode_tones_info().

static int decode_tones_info ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  num_channels,
AVCodecContext avctx 
)
static

Decode tones info for all channels.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]num_channelsnumber of channels to process
[in]avctxptr to the AVCodecContext
Returns
result code: 0 = OK, otherwise - error code

Definition at line 1698 of file atrac3plus.c.

Referenced by ff_atrac3p_decode_channel_unit().

int ff_atrac3p_decode_channel_unit ( GetBitContext gb,
Atrac3pChanUnitCtx ctx,
int  num_channels,
AVCodecContext avctx 
)

Decode bitstream data of a channel unit.

Parameters
[in]gbthe GetBit context
[in,out]ctxptr to the channel unit context
[in]num_channelsnumber of channels to process
[in]avctxptr to the AVCodecContext
Returns
result code: 0 = OK, otherwise - error code

Definition at line 1764 of file atrac3plus.c.

Referenced by atrac3p_decode_frame().

Variable Documentation

VLC_TYPE tables_data[154276][2]
static

Definition at line 34 of file atrac3plus.c.

Referenced by build_canonical_huff(), and ff_atrac3p_init_vlcs().

VLC wl_vlc_tabs[4]
static

Definition at line 35 of file atrac3plus.c.

VLC sf_vlc_tabs[8]
static

Definition at line 36 of file atrac3plus.c.

VLC ct_vlc_tabs[4]
static

Definition at line 37 of file atrac3plus.c.

Referenced by decode_channel_code_tab().

VLC spec_vlc_tabs[112]
static

Definition at line 38 of file atrac3plus.c.

VLC gain_vlc_tabs[11]
static

Definition at line 39 of file atrac3plus.c.

VLC tone_vlc_tabs[7]
static

Definition at line 40 of file atrac3plus.c.