FFmpeg
|
MPEG-4 ALS decoder. More...
#include "avcodec.h"
#include "get_bits.h"
#include "unary.h"
#include "mpeg4audio.h"
#include "bytestream.h"
#include "bgmc.h"
#include "dsputil.h"
#include "internal.h"
#include "libavutil/samplefmt.h"
#include "libavutil/crc.h"
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | ALSSpecificConfig |
struct | ALSChannelData |
struct | ALSDecContext |
struct | ALSBlockData |
Macros | |
#define | MISSING_ERR(cond, str, errval) |
#define | INTERLEAVE_OUTPUT(bps) |
Enumerations | |
enum | RA_Flag { RA_FLAG_NONE, RA_FLAG_FRAMES, RA_FLAG_HEADER } |
Functions | |
static av_cold void | dprint_specific_config (ALSDecContext *ctx) |
static av_cold int | read_specific_config (ALSDecContext *ctx) |
Read an ALSSpecificConfig from a buffer into the output struct. More... | |
static int | check_specific_config (ALSDecContext *ctx) |
Check the ALSSpecificConfig for unsupported features. More... | |
static void | parse_bs_info (const uint32_t bs_info, unsigned int n, unsigned int div, unsigned int **div_blocks, unsigned int *num_blocks) |
Parse the bs_info field to extract the block partitioning used in block switching mode, refer to ISO/IEC 14496-3, section 11.6.2. More... | |
static int32_t | decode_rice (GetBitContext *gb, unsigned int k) |
Read and decode a Rice codeword. More... | |
static void | parcor_to_lpc (unsigned int k, const int32_t *par, int32_t *cof) |
Convert PARCOR coefficient k to direct filter coefficient. More... | |
static void | get_block_sizes (ALSDecContext *ctx, unsigned int *div_blocks, uint32_t *bs_info) |
Read block switching field if necessary and set actual block sizes. More... | |
static int | read_const_block_data (ALSDecContext *ctx, ALSBlockData *bd) |
Read the block data for a constant block. More... | |
static void | decode_const_block_data (ALSDecContext *ctx, ALSBlockData *bd) |
Decode the block data for a constant block. More... | |
static int | read_var_block_data (ALSDecContext *ctx, ALSBlockData *bd) |
Read the block data for a non-constant block. More... | |
static int | decode_var_block_data (ALSDecContext *ctx, ALSBlockData *bd) |
Decode the block data for a non-constant block. More... | |
static int | read_block (ALSDecContext *ctx, ALSBlockData *bd) |
Read the block data. More... | |
static int | decode_block (ALSDecContext *ctx, ALSBlockData *bd) |
Decode the block data. More... | |
static int | read_decode_block (ALSDecContext *ctx, ALSBlockData *bd) |
Read and decode block data successively. More... | |
static void | zero_remaining (unsigned int b, unsigned int b_max, const unsigned int *div_blocks, int32_t *buf) |
Compute the number of samples left to decode for the current frame and sets these samples to zero. More... | |
static int | decode_blocks_ind (ALSDecContext *ctx, unsigned int ra_frame, unsigned int c, const unsigned int *div_blocks, unsigned int *js_blocks) |
Decode blocks independently. More... | |
static int | decode_blocks (ALSDecContext *ctx, unsigned int ra_frame, unsigned int c, const unsigned int *div_blocks, unsigned int *js_blocks) |
Decode blocks dependently. More... | |
static int | read_channel_data (ALSDecContext *ctx, ALSChannelData *cd, int c) |
Read the channel data. More... | |
static int | revert_channel_correlation (ALSDecContext *ctx, ALSBlockData *bd, ALSChannelData **cd, int *reverted, unsigned int offset, int c) |
Recursively reverts the inter-channel correlation for a block. More... | |
static int | read_frame_data (ALSDecContext *ctx, unsigned int ra_frame) |
Read the frame data. More... | |
static int | decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) |
Decode an ALS frame. More... | |
static av_cold int | decode_end (AVCodecContext *avctx) |
Uninitialize the ALS decoder. More... | |
static av_cold int | decode_init (AVCodecContext *avctx) |
Initialize the ALS decoder. More... | |
static av_cold void | flush (AVCodecContext *avctx) |
Flush (reset) the frame ID after seeking. More... | |
Variables | |
static const int8_t | parcor_rice_table [3][20][2] |
Rice parameters and corresponding index offsets for decoding the indices of scaled PARCOR values. More... | |
static const int16_t | parcor_scaled_values [] |
Scaled PARCOR values used for the first two PARCOR coefficients. More... | |
static const uint8_t | ltp_gain_values [4][4] |
Gain values of p(0) for long-term prediction. More... | |
static const int16_t | mcc_weightings [] |
Inter-channel weighting factors for multi-channel correlation. More... | |
static const uint8_t | tail_code [16][6] |
Tail codes used in arithmetic coding using block Gilbert-Moore codes. More... | |
AVCodec | ff_als_decoder |
Detailed Description
MPEG-4 ALS decoder.
Definition in file alsdec.c.
Macro Definition Documentation
#define INTERLEAVE_OUTPUT | ( | bps | ) |
Referenced by decode_frame().
#define MISSING_ERR | ( | cond, | |
str, | |||
errval | |||
) |
Referenced by check_specific_config().
Enumeration Type Documentation
enum RA_Flag |
Function Documentation
|
static |
Check the ALSSpecificConfig for unsupported features.
Definition at line 427 of file alsdec.c.
Referenced by decode_init().
|
static |
Decode the block data.
Definition at line 1001 of file alsdec.c.
Referenced by read_decode_block(), and read_frame_data().
|
static |
Decode blocks dependently.
Definition at line 1095 of file alsdec.c.
Referenced by read_frame_data().
|
static |
Decode blocks independently.
Definition at line 1056 of file alsdec.c.
Referenced by read_frame_data().
|
static |
Decode the block data for a constant block.
Definition at line 596 of file alsdec.c.
Referenced by decode_block().
|
static |
Uninitialize the ALS decoder.
Definition at line 1575 of file alsdec.c.
Referenced by decode_init().
|
static |
|
static |
|
static |
Read and decode a Rice codeword.
Definition at line 475 of file alsdec.c.
Referenced by read_channel_data(), and read_var_block_data().
|
static |
Decode the block data for a non-constant block.
Definition at line 871 of file alsdec.c.
Referenced by decode_block().
|
static |
Definition at line 252 of file alsdec.c.
Referenced by read_specific_config().
|
static |
|
static |
Read block switching field if necessary and set actual block sizes.
Also assure that the block sizes of the last frame correspond to the actual number of samples.
Definition at line 513 of file alsdec.c.
Referenced by read_frame_data().
Convert PARCOR coefficient k to direct filter coefficient.
Definition at line 493 of file alsdec.c.
Referenced by decode_var_block_data().
|
static |
Parse the bs_info field to extract the block partitioning used in block switching mode, refer to ISO/IEC 14496-3, section 11.6.2.
Definition at line 452 of file alsdec.c.
Referenced by get_block_sizes().
|
static |
Read the block data.
Definition at line 980 of file alsdec.c.
Referenced by read_decode_block(), and read_frame_data().
|
static |
|
static |
Read the block data for a constant block.
Definition at line 566 of file alsdec.c.
Referenced by read_block().
|
static |
Read and decode block data successively.
Definition at line 1023 of file alsdec.c.
Referenced by decode_blocks(), and decode_blocks_ind().
|
static |
Read the frame data.
< block sizes.
Definition at line 1311 of file alsdec.c.
Referenced by decode_frame().
|
static |
Read an ALSSpecificConfig from a buffer into the output struct.
Definition at line 282 of file alsdec.c.
Referenced by decode_init().
|
static |
Read the block data for a non-constant block.
Definition at line 610 of file alsdec.c.
Referenced by read_block().
|
static |
Recursively reverts the inter-channel correlation for a block.
Definition at line 1226 of file alsdec.c.
Referenced by read_frame_data().
|
static |
Compute the number of samples left to decode for the current frame and sets these samples to zero.
Definition at line 1041 of file alsdec.c.
Referenced by decode_blocks(), and decode_blocks_ind().
Variable Documentation
AVCodec ff_als_decoder |
|
static |
Gain values of p(0) for long-term prediction.
To be indexed by the Rice coded indices.
Definition at line 109 of file alsdec.c.
Referenced by read_var_block_data().
|
static |
Inter-channel weighting factors for multi-channel correlation.
To be indexed by the Rice coded indices.
Definition at line 120 of file alsdec.c.
Referenced by read_channel_data().
|
static |
Rice parameters and corresponding index offsets for decoding the indices of scaled PARCOR values.
The table chosen is set globally by the encoder and stored in ALSSpecificConfig.
Definition at line 49 of file alsdec.c.
Referenced by read_var_block_data().
|
static |
Scaled PARCOR values used for the first two PARCOR coefficients.
To be indexed by the Rice coded indices. Generated by: parcor_scaled_values[i] = 32 + ((i * (i+1)) << 7) - (1 << 20) Actual values are divided by 32 in order to be stored in 16 bits.
Definition at line 70 of file alsdec.c.
Referenced by read_var_block_data().
|
static |
Tail codes used in arithmetic coding using block Gilbert-Moore codes.
Definition at line 130 of file alsdec.c.
Referenced by read_var_block_data().
Generated on Fri Dec 20 2024 06:56:10 for FFmpeg by 1.8.11