#include "libavutil/opt.h"
#include "avcodec.h"
#include "put_bits.h"
#include "internal.h"
#include "lpc.h"
#include "mathops.h"
#include "alac_data.h"
Go to the source code of this file.
|
static void | init_sample_buffers (AlacEncodeContext *s, int channels, uint8_t const *samples[2]) |
|
static void | encode_scalar (AlacEncodeContext *s, int x, int k, int write_sample_size) |
|
static void | write_element_header (AlacEncodeContext *s, enum AlacRawDataBlockType element, int instance) |
|
static void | calc_predictor_params (AlacEncodeContext *s, int ch) |
|
static int | estimate_stereo_mode (int32_t *left_ch, int32_t *right_ch, int n) |
|
static void | alac_stereo_decorrelation (AlacEncodeContext *s) |
|
static void | alac_linear_predictor (AlacEncodeContext *s, int ch) |
|
static void | alac_entropy_coder (AlacEncodeContext *s, int ch) |
|
static void | write_element (AlacEncodeContext *s, enum AlacRawDataBlockType element, int instance, const uint8_t *samples0, const uint8_t *samples1) |
|
static int | write_frame (AlacEncodeContext *s, AVPacket *avpkt, uint8_t *const *samples) |
|
static av_always_inline int | get_max_frame_size (int frame_size, int ch, int bps) |
|
static av_cold int | alac_encode_close (AVCodecContext *avctx) |
|
static av_cold int | alac_encode_init (AVCodecContext *avctx) |
|
static int | alac_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) |
|
#define DEFAULT_FRAME_SIZE 4096 |
#define ALAC_EXTRADATA_SIZE 36 |
#define ALAC_FRAME_HEADER_SIZE 55 |
#define ALAC_FRAME_FOOTER_SIZE 3 |
#define ALAC_ESCAPE_CODE 0x1FF |
#define ALAC_MAX_LPC_ORDER 30 |
#define DEFAULT_MAX_PRED_ORDER 6 |
#define DEFAULT_MIN_PRED_ORDER 4 |
#define ALAC_MAX_LPC_PRECISION 9 |
#define ALAC_MAX_LPC_SHIFT 9 |
#define ALAC_CHMODE_LEFT_RIGHT 0 |
#define ALAC_CHMODE_LEFT_SIDE 1 |
#define ALAC_CHMODE_RIGHT_SIDE 2 |
#define ALAC_CHMODE_MID_SIDE 3 |
#define COPY_SAMPLES |
( |
|
type | ) |
|
Value:
for (ch = 0; ch < channels; ch++) {
\
const
type *sptr = (
const type *)samples[ch];
\
for (i = 0; i <
s->frame_size; i++) \
bptr[i] = sptr[i] >>
shift; \
} \
} while (0)
static int shift(int a, int b)
Referenced by init_sample_buffers().
static int estimate_stereo_mode |
( |
int32_t * |
left_ch, |
|
|
int32_t * |
right_ch, |
|
|
int |
n |
|
) |
| |
|
static |
static av_always_inline int get_max_frame_size |
( |
int |
frame_size, |
|
|
int |
ch, |
|
|
int |
bps |
|
) |
| |
|
static |
Initial value:= {
}
#define DEFAULT_MIN_PRED_ORDER
#define DEFAULT_MAX_PRED_ORDER
#define ALAC_MAX_LPC_ORDER
Definition at line 654 of file alacenc.c.
Initial value:= {
.class_name = "alacenc",
}
#define LIBAVUTIL_VERSION_INT
static const AVOption options[]
Definition at line 661 of file alacenc.c.
Initial value:= {
.name = "alac",
}
static av_cold int init(AVCodecContext *avctx)
static av_cold int alac_encode_init(AVCodecContext *avctx)
static const AVClass alacenc_class
static int alac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
#define AV_CODEC_CAP_SMALL_LAST_FRAME
Codec can be fed a final frame with a smaller size.
const uint64_t ff_alac_channel_layouts[ALAC_MAX_CHANNELS+1]
AVSampleFormat
Audio sample formats.
static av_cold int alac_encode_close(AVCodecContext *avctx)
static enum AVSampleFormat sample_fmts[]
Definition at line 668 of file alacenc.c.