FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
atrac3plus.h File Reference

Global structures, constants and data for ATRAC3+ decoder. More...

#include <stdint.h>
#include "libavutil/float_dsp.h"
#include "atrac.h"
#include "avcodec.h"
#include "fft.h"
#include "get_bits.h"

Go to the source code of this file.

Data Structures

  Per-channel IPQF history. More...
 
  Amplitude envelope of a group of sine waves. More...
 
struct   Atrac3pWavesData
  Parameters of a group of sine waves. More...
 
struct   Atrac3pWaveParam
  Parameters of a single sine wave. More...
 
struct   Atrac3pChanParams
  Sound channel parameters. More...
 
 
struct   Atrac3pChanUnitCtx
  Channel unit parameters. More...
 

Macros

#define  ATRAC3P_SUBBANDS   16
  Global unit sizes.
 
#define  ATRAC3P_SUBBAND_SAMPLES   128
  number of samples per subband
 
 
#define  ATRAC3P_PQF_FIR_LEN   12
  length of the prototype FIR of the PQF
 
#define  ATRAC3P_POWER_COMP_OFF   15
  Global constants.
 

Enumerations

  ATRAC3+ channel unit types. More...
 

Functions

  Initialize VLC tables for bitstream parsing.
 
  Decode bitstream data of a channel unit.
 
  Initialize IMDCT transform.
 
  Initialize sine waves synthesizer.
 
void  ff_atrac3p_generate_tones (Atrac3pChanUnitCtx *ch_unit, AVFloatDSPContext *fdsp, int ch_num, int sb, float *out)
  Synthesize sine waves for a particular subband.
 
void  ff_atrac3p_power_compensation (Atrac3pChanUnitCtx *ctx, int ch_index, float *sp, int rng_index, int sb_num)
  Perform power compensation aka noise dithering.
 
void  ff_atrac3p_imdct (AVFloatDSPContext *fdsp, FFTContext *mdct_ctx, float *pIn, float *pOut, int wind_id, int sb)
  Regular IMDCT and windowing without overlapping, with spectrum reversal in the odd subbands.
 
void  ff_atrac3p_ipqf (FFTContext *dct_ctx, Atrac3pIPQFChannelCtx *hist, const float *in, float *out)
  Subband synthesis filter based on the polyphase quadrature (pseudo-QMF) filter bank.
 

Variables

const uint16_t  ff_atrac3p_qu_to_spec_pos [33]
  Map quant unit number to its position in the spectrum.
 
const float  ff_atrac3p_sf_tab [64]
 
const float  ff_atrac3p_mant_tab [8]
 

Detailed Description

Global structures, constants and data for ATRAC3+ decoder.

Definition in file atrac3plus.h.

Macro Definition Documentation

#define ATRAC3P_SUBBANDS   16

Global unit sizes.

number of PQF subbands

Definition at line 40 of file atrac3plus.h.

Referenced by decode_gainc_data(), decode_residual_spectrum(), decode_tones_info(), ff_atrac3p_ipqf(), and reconstruct_frame().

#define ATRAC3P_SUBBAND_SAMPLES   128

number of samples per subband

Definition at line 41 of file atrac3plus.h.

Referenced by decode_residual_spectrum(), ff_atrac3p_imdct(), ff_atrac3p_ipqf(), ff_atrac3p_power_compensation(), and reconstruct_frame().

#define ATRAC3P_FRAME_SAMPLES   (ATRAC3P_SUBBAND_SAMPLES * ATRAC3P_SUBBANDS)

Definition at line 42 of file atrac3plus.h.

Referenced by atrac3p_decode_frame(), and ff_atrac3p_ipqf().

#define ATRAC3P_PQF_FIR_LEN   12

length of the prototype FIR of the PQF

Definition at line 44 of file atrac3plus.h.

Referenced by ff_atrac3p_ipqf().

#define ATRAC3P_POWER_COMP_OFF   15

Global constants.

disable power compensation

Definition at line 47 of file atrac3plus.h.

Referenced by decode_spectrum(), and ff_atrac3p_power_compensation().

Enumeration Type Documentation

ATRAC3+ channel unit types.

Enumerator:
CH_UNIT_MONO

unit containing one coded channel

CH_UNIT_STEREO

unit containing two jointly-coded channels

CH_UNIT_EXTENSION

unit containing extension information

CH_UNIT_TERMINATOR

unit sequence terminator

Definition at line 50 of file atrac3plus.h.

Function Documentation

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().

int ff_atrac3p_decode_channel_unit ( GetBitContextgb,
int  num_channels,
AVCodecContextavctx 
)

Decode bitstream data of a channel unit.

Parameters
[in] gb the GetBit context
[in,out] ctx ptr to the channel unit context
[in] num_channels number of channels to process
[in] avctx ptr to the AVCodecContext
Returns
result code: 0 = OK, otherwise - error code

Definition at line 1764 of file atrac3plus.c.

Referenced by atrac3p_decode_frame().

void ff_atrac3p_init_imdct ( AVCodecContextavctx,
FFTContextmdct_ctx 
)

Initialize IMDCT transform.

Parameters
[in] avctx ptr to the AVCodecContext
[in] mdct_ctx pointer to MDCT transform context

Definition at line 79 of file atrac3plusdsp.c.

Referenced by atrac3p_decode_init().

void ff_atrac3p_init_wave_synth ( void  )

Initialize sine waves synthesizer.

Definition at line 96 of file atrac3plusdsp.c.

Referenced by atrac3p_decode_init().

void ff_atrac3p_generate_tones ( Atrac3pChanUnitCtxch_unit,
AVFloatDSPContextfdsp,
int  ch_num,
int  sb,
float *  out 
)

Synthesize sine waves for a particular subband.

Parameters
[in] ch_unit pointer to the channel unit context
[in] fdsp pointer to float DSP context
[in] ch_num which channel to process
[in] sb which subband to process
[out] out receives processed data

Definition at line 177 of file atrac3plusdsp.c.

Referenced by reconstruct_frame().

void ff_atrac3p_power_compensation ( Atrac3pChanUnitCtxctx,
int  ch_index,
float *  sp,
int  rng_index,
int  sb_num 
)

Perform power compensation aka noise dithering.

Parameters
[in] ctx ptr to the channel context
[in] ch_index which channel to process
[in,out] sp ptr to channel spectrum to process
[in] rng_index indicates which RNG table to use
[in] sb_num which subband to process

Definition at line 411 of file atrac3plusdsp.c.

Referenced by decode_residual_spectrum().

void ff_atrac3p_imdct ( AVFloatDSPContextfdsp,
FFTContextmdct_ctx,
float *  pIn,
float *  pOut,
int  wind_id,
int  sb 
)

Regular IMDCT and windowing without overlapping, with spectrum reversal in the odd subbands.

Parameters
[in] fdsp pointer to float DSP context
[in] mdct_ctx pointer to MDCT transform context
[in] pIn float input
[out] pOut float output
[in] wind_id which MDCT window to apply
[in] sb subband number

Definition at line 457 of file atrac3plusdsp.c.

Referenced by reconstruct_frame().

void ff_atrac3p_ipqf ( FFTContextdct_ctx,
const float *  in,
float *  out 
)

Subband synthesis filter based on the polyphase quadrature (pseudo-QMF) filter bank.

Parameters
[in] dct_ctx ptr to the pre-initialized IDCT context
[in,out] hist ptr to the filter history
[in] in input data to process
[out] out receives processed data

Definition at line 598 of file atrac3plusdsp.c.

Referenced by reconstruct_frame().

Variable Documentation

const uint16_t ff_atrac3p_qu_to_spec_pos[33]

Map quant unit number to its position in the spectrum.

To get the number of spectral lines in each quant unit do the following: num_specs = qu_to_spec_pos[i+1] - qu_to_spec_pos[i]

Definition at line 41 of file atrac3plusdsp.c.

Referenced by decode_residual_spectrum(), decode_spectrum(), and ff_atrac3p_power_compensation().

const float ff_atrac3p_sf_tab[64]

Definition at line 51 of file atrac3plusdsp.c.

Referenced by decode_residual_spectrum(), and ff_atrac3p_power_compensation().

const float ff_atrac3p_mant_tab[8]

Definition at line 66 of file atrac3plusdsp.c.

Referenced by decode_residual_spectrum(), and ff_atrac3p_power_compensation().


Generated on Sun Mar 8 2015 02:35:18 for FFmpeg by   doxygen 1.8.2

AltStyle によって変換されたページ (->オリジナル) /