#include "avcodec.h"#include "put_bits.h"#include "dsputil.h"#include "lpc.h"#include "mathops.h"Go to the source code of this file.
| #define ALAC_CHMODE_LEFT_RIGHT 0 |
Definition at line 42 of file alacenc.c.
Referenced by alac_stereo_decorrelation().
| #define ALAC_CHMODE_LEFT_SIDE 1 |
Definition at line 43 of file alacenc.c.
Referenced by alac_stereo_decorrelation().
| #define ALAC_CHMODE_RIGHT_SIDE 2 |
Definition at line 44 of file alacenc.c.
Referenced by alac_stereo_decorrelation().
| #define ALAC_ESCAPE_CODE 0x1FF |
Definition at line 35 of file alacenc.c.
Referenced by encode_scalar().
| #define ALAC_EXTRADATA_SIZE 36 |
Definition at line 31 of file alacenc.c.
Referenced by alac_encode_init().
| #define ALAC_MAX_LPC_ORDER 30 |
Definition at line 36 of file alacenc.c.
Referenced by alac_encode_init().
| #define ALAC_MAX_LPC_PRECISION 9 |
Definition at line 39 of file alacenc.c.
Referenced by calc_predictor_params().
| #define ALAC_MAX_LPC_SHIFT 9 |
Definition at line 40 of file alacenc.c.
Referenced by calc_predictor_params().
| #define DEFAULT_FRAME_SIZE 4096 |
ALAC audio encoder Copyright (c) 2008 Jaikrishnan Menon <realityman@gmx.net>
This file is part of Libav.
Libav is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
Libav is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with Libav; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Definition at line 28 of file alacenc.c.
Referenced by alac_encode_frame().
| typedef struct AlacEncodeContext AlacEncodeContext |
| typedef struct AlacLPCContext AlacLPCContext |
| typedef struct RiceContext RiceContext |
| static av_cold int alac_encode_close | ( | AVCodecContext * | avctx | ) | [static] |
| static int alac_encode_frame | ( | AVCodecContext * | avctx, | |
| uint8_t * | frame, | |||
| int | buf_size, | |||
| void * | data | |||
| ) | [static] |
| static av_cold int alac_encode_init | ( | AVCodecContext * | avctx | ) | [static] |
| static void alac_entropy_coder | ( | AlacEncodeContext * | s | ) | [static] |
Definition at line 302 of file alacenc.c.
Referenced by write_compressed_frame().
| static void alac_linear_predictor | ( | AlacEncodeContext * | s, | |
| int | ch | |||
| ) | [static] |
Definition at line 239 of file alacenc.c.
Referenced by write_compressed_frame().
| static void alac_stereo_decorrelation | ( | AlacEncodeContext * | s | ) | [static] |
Definition at line 194 of file alacenc.c.
Referenced by write_compressed_frame().
| static void calc_predictor_params | ( | AlacEncodeContext * | s, | |
| int | ch | |||
| ) | [static] |
Definition at line 130 of file alacenc.c.
Referenced by write_compressed_frame().
| static void encode_scalar | ( | AlacEncodeContext * | s, | |
| int | x, | |||
| int | k, | |||
| int | write_sample_size | |||
| ) | [static] |
Definition at line 92 of file alacenc.c.
Referenced by alac_entropy_coder().
| static int estimate_stereo_mode | ( | int32_t * | left_ch, | |
| int32_t * | right_ch, | |||
| int | n | |||
| ) | [static] |
Definition at line 160 of file alacenc.c.
Referenced by alac_stereo_decorrelation().
| static void init_sample_buffers | ( | AlacEncodeContext * | s, | |
| const int16_t * | input_samples | |||
| ) | [static] |
Definition at line 78 of file alacenc.c.
Referenced by alac_encode_frame().
| static void write_compressed_frame | ( | AlacEncodeContext * | s | ) | [static] |
Definition at line 348 of file alacenc.c.
Referenced by alac_encode_frame().
| static void write_frame_header | ( | AlacEncodeContext * | s, | |
| int | is_verbatim | |||
| ) | [static] |
Definition at line 120 of file alacenc.c.
Referenced by alac_encode_frame().
{
.name = "alac",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_ALAC,
.priv_data_size = sizeof(AlacEncodeContext),
.init = alac_encode_init,
.encode = alac_encode_frame,
.close = alac_encode_close,
.capabilities = CODEC_CAP_SMALL_LAST_FRAME,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE },
.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
}