#include "libavutil/audioconvert.h"
#include "avcodec.h"
#include "get_bits.h"
#include "bytestream.h"
#include "unary.h"
#include "mathops.h"
Go to the source code of this file.
Data Structures | |
struct | ALACContext |
Defines | |
#define | ALAC_EXTRADATA_SIZE 36 |
#define | MAX_CHANNELS 8 |
Enumerations | |
enum | RawDataBlockType { TYPE_SCE, TYPE_CPE, TYPE_CCE, TYPE_LFE, TYPE_DSE, TYPE_PCE, TYPE_FIL, TYPE_END, TYPE_SCE, TYPE_CPE, TYPE_CCE, TYPE_LFE, TYPE_DSE, TYPE_PCE, TYPE_FIL, TYPE_END } |
Functions | |
static unsigned int | decode_scalar (GetBitContext *gb, int k, int bps) |
static int | rice_decompress (ALACContext *alac, int32_t *output_buffer, int nb_samples, int bps, int rice_history_mult) |
static int | sign_only (int v) |
static void | lpc_prediction (int32_t *error_buffer, int32_t *buffer_out, int nb_samples, int bps, int16_t *lpc_coefs, int lpc_order, int lpc_quant) |
static void | decorrelate_stereo (int32_t *buffer[2], int nb_samples, int decorr_shift, int decorr_left_weight) |
static void | append_extra_bits (int32_t *buffer[2], int32_t *extra_bits_buffer[2], int extra_bits, int channels, int nb_samples) |
static int | decode_element (AVCodecContext *avctx, void *data, int ch_index, int channels) |
static int | alac_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) |
static av_cold int | alac_decode_close (AVCodecContext *avctx) |
static int | allocate_buffers (ALACContext *alac) |
static int | alac_set_info (ALACContext *alac) |
static av_cold int | alac_decode_init (AVCodecContext *avctx) |
Variables | |
static const uint8_t | alac_channel_layout_offsets [8][8] |
static const uint16_t | alac_channel_layouts [8] |
AVCodec | ff_alac_decoder |
Note: This decoder expects a 36-byte QuickTime atom to be passed through the extradata[_size] fields. This atom is tacked onto the end of an 'alac' stsd atom and has the following format:
32bit atom size 32bit tag ("alac") 32bit tag version (0) 32bit samples per frame (used when not set explicitly in the frames) 8bit compatible version (0) 8bit sample size 8bit history mult (40) 8bit initial history (14) 8bit rice param limit (10) 8bit channels 16bit maxRun (255) 32bit max coded frame size (0 means unknown) 32bit average bitrate (0 means unknown) 32bit samplerate
Definition in file alac.c.
#define ALAC_EXTRADATA_SIZE 36 |
enum RawDataBlockType |
static av_cold int alac_decode_close | ( | AVCodecContext * | avctx | ) | [static] |
static int alac_decode_frame | ( | AVCodecContext * | avctx, | |
void * | data, | |||
int * | got_frame_ptr, | |||
AVPacket * | avpkt | |||
) | [static] |
static av_cold int alac_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
static int alac_set_info | ( | ALACContext * | alac | ) | [static] |
static int allocate_buffers | ( | ALACContext * | alac | ) | [static] |
static int decode_element | ( | AVCodecContext * | avctx, | |
void * | data, | |||
int | ch_index, | |||
int | channels | |||
) | [static] |
static unsigned int decode_scalar | ( | GetBitContext * | gb, | |
int | k, | |||
int | bps | |||
) | [inline, static] |
static int rice_decompress | ( | ALACContext * | alac, | |
int32_t * | output_buffer, | |||
int | nb_samples, | |||
int | bps, | |||
int | rice_history_mult | |||
) | [static] |
const uint8_t alac_channel_layout_offsets[8][8] [static] |
Initial value:
{ { 0 }, { 0, 1 }, { 2, 0, 1 }, { 2, 0, 1, 3 }, { 2, 0, 1, 3, 4 }, { 2, 0, 1, 4, 5, 3 }, { 2, 0, 1, 4, 5, 6, 3 }, { 2, 6, 7, 0, 1, 4, 5, 3 } }
Definition at line 92 of file alac.c.
Referenced by alac_decode_frame().
const uint16_t alac_channel_layouts[8] [static] |
Initial value:
{ AV_CH_LAYOUT_MONO, AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_SURROUND, AV_CH_LAYOUT_4POINT0, AV_CH_LAYOUT_5POINT0_BACK, AV_CH_LAYOUT_5POINT1_BACK, AV_CH_LAYOUT_6POINT1_BACK, AV_CH_LAYOUT_7POINT1_WIDE_BACK }
Definition at line 103 of file alac.c.
Referenced by alac_decode_init().
Initial value:
{ .name = "alac", .type = AVMEDIA_TYPE_AUDIO, .id = AV_CODEC_ID_ALAC, .priv_data_size = sizeof(ALACContext), .init = alac_decode_init, .close = alac_decode_close, .decode = alac_decode_frame, .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"), }