FFmpeg
|
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "encode.h"
#include "put_bits.h"
#include "bytestream.h"
#include "wavpackenc.h"
#include "wavpack.h"
Go to the source code of this file.
Data Structures | |
struct | WavPackExtraInfo |
struct | WavPackWords |
struct | WavPackEncodeContext |
Functions | |
static av_cold int | wavpack_encode_init (AVCodecContext *avctx) |
static void | shift_mono (int32_t *samples, int nb_samples, int shift) |
static void | shift_stereo (int32_t *left, int32_t *right, int nb_samples, int shift) |
static void | process_float (WavPackEncodeContext *s, int32_t *sample) |
static int | scan_float (WavPackEncodeContext *s, int32_t *samples_l, int32_t *samples_r, int nb_samples) |
static void | scan_int23 (WavPackEncodeContext *s, int32_t *samples_l, int32_t *samples_r, int nb_samples) |
static int | scan_int32 (WavPackEncodeContext *s, int32_t *samples_l, int32_t *samples_r, int nb_samples) |
static int8_t | store_weight (int weight) |
static int | restore_weight (int8_t weight) |
static int | log2s (int32_t value) |
static void | decorr_mono (int32_t *in_samples, int32_t *out_samples, int nb_samples, struct Decorr *dpp, int dir) |
static void | reverse_mono_decorr (struct Decorr *dpp) |
static uint32_t | log2sample (uint32_t v, int limit, uint32_t *result) |
static uint32_t | log2mono (int32_t *samples, int nb_samples, int limit) |
static uint32_t | log2stereo (int32_t *samples_l, int32_t *samples_r, int nb_samples, int limit) |
static void | decorr_mono_buffer (int32_t *samples, int32_t *outsamples, int nb_samples, struct Decorr *dpp, int tindex) |
static void | recurse_mono (WavPackEncodeContext *s, WavPackExtraInfo *info, int depth, int delta, uint32_t input_bits) |
static void | sort_mono (WavPackEncodeContext *s, WavPackExtraInfo *info) |
static void | delta_mono (WavPackEncodeContext *s, WavPackExtraInfo *info) |
static int | allocate_buffers2 (WavPackEncodeContext *s, int nterms) |
static int | allocate_buffers (WavPackEncodeContext *s) |
static void | analyze_mono (WavPackEncodeContext *s, int32_t *samples, int do_samples) |
static void | scan_word (WavPackEncodeContext *s, WvChannel *c, int32_t *samples, int nb_samples, int dir) |
static int | wv_mono (WavPackEncodeContext *s, int32_t *samples, int no_history, int do_samples) |
static void | decorr_stereo (int32_t *in_left, int32_t *in_right, int32_t *out_left, int32_t *out_right, int nb_samples, struct Decorr *dpp, int dir) |
static void | reverse_decorr (struct Decorr *dpp) |
static void | decorr_stereo_quick (int32_t *in_left, int32_t *in_right, int32_t *out_left, int32_t *out_right, int nb_samples, struct Decorr *dpp) |
static void | decorr_stereo_buffer (WavPackExtraInfo *info, int32_t *in_left, int32_t *in_right, int32_t *out_left, int32_t *out_right, int nb_samples, int tindex) |
static void | sort_stereo (WavPackEncodeContext *s, WavPackExtraInfo *info) |
static void | delta_stereo (WavPackEncodeContext *s, WavPackExtraInfo *info) |
static void | recurse_stereo (WavPackEncodeContext *s, WavPackExtraInfo *info, int depth, int delta, uint32_t input_bits) |
static void | analyze_stereo (WavPackEncodeContext *s, int32_t *in_left, int32_t *in_right, int do_samples) |
static int | wv_stereo (WavPackEncodeContext *s, int32_t *samples_l, int32_t *samples_r, int no_history, int do_samples) |
static void | encode_flush (WavPackEncodeContext *s) |
static void | wavpack_encode_sample (WavPackEncodeContext *s, WvChannel *c, int32_t sample) |
static void | pack_int32 (WavPackEncodeContext *s, int32_t *samples_l, int32_t *samples_r, int nb_samples) |
static void | pack_float_sample (WavPackEncodeContext *s, int32_t *sample) |
static void | pack_float (WavPackEncodeContext *s, int32_t *samples_l, int32_t *samples_r, int nb_samples) |
static void | decorr_stereo_pass2 (struct Decorr *dpp, int32_t *samples_l, int32_t *samples_r, int nb_samples) |
static void | decorr_stereo_pass_id2 (struct Decorr *dpp, int32_t *samples_l, int32_t *samples_r, int nb_samples) |
static void | put_metadata_block (PutByteContext *pb, int flags, int size) |
static int | wavpack_encode_block (WavPackEncodeContext *s, int32_t *samples_l, int32_t *samples_r, uint8_t *out, int out_size) |
static void | fill_buffer (WavPackEncodeContext *s, const int8_t *src, int32_t *dst, int nb_samples) |
static void | set_samplerate (WavPackEncodeContext *s) |
static int | wavpack_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) |
static av_cold int | wavpack_encode_close (AVCodecContext *avctx) |
Variables | |
static const AVOption | options [] |
static const AVClass | wavpack_encoder_class |
const FFCodec | ff_wavpack_encoder |
#define BITSTREAM_WRITER_LE |
Definition at line 21 of file wavpackenc.c.
Definition at line 44 of file wavpackenc.c.
Definition at line 46 of file wavpackenc.c.
#define CLEAR | ( | destin | ) | memset(&destin, 0, sizeof(destin)); |
Definition at line 49 of file wavpackenc.c.
#define SHIFT_LSB 13 |
Definition at line 51 of file wavpackenc.c.
#define SHIFT_MASK (0x1FU << SHIFT_LSB) |
Definition at line 52 of file wavpackenc.c.
#define MAG_LSB 18 |
Definition at line 54 of file wavpackenc.c.
#define MAG_MASK (0x1FU << MAG_LSB) |
Definition at line 55 of file wavpackenc.c.
#define SRATE_LSB 23 |
Definition at line 57 of file wavpackenc.c.
#define SRATE_MASK (0xFU << SRATE_LSB) |
Definition at line 58 of file wavpackenc.c.
#define EXTRA_TRY_DELTAS 1 |
Definition at line 60 of file wavpackenc.c.
#define EXTRA_ADJUST_DELTAS 2 |
Definition at line 61 of file wavpackenc.c.
#define EXTRA_SORT_FIRST 4 |
Definition at line 62 of file wavpackenc.c.
#define EXTRA_BRANCHES 8 |
Definition at line 63 of file wavpackenc.c.
#define EXTRA_SORT_LAST 16 |
Definition at line 64 of file wavpackenc.c.
#define FLOAT_SHIFT_ONES 1 |
Definition at line 215 of file wavpackenc.c.
#define FLOAT_SHIFT_SAME 2 |
Definition at line 216 of file wavpackenc.c.
#define FLOAT_SHIFT_SENT 4 |
Definition at line 217 of file wavpackenc.c.
#define FLOAT_ZEROS_SENT 8 |
Definition at line 218 of file wavpackenc.c.
#define FLOAT_NEG_ZEROS 0x10 |
Definition at line 219 of file wavpackenc.c.
#define FLOAT_EXCEPTIONS 0x20 |
Definition at line 220 of file wavpackenc.c.
Definition at line 222 of file wavpackenc.c.
Definition at line 223 of file wavpackenc.c.
Definition at line 224 of file wavpackenc.c.
#define count_bits | ( | av | ) | ((av) ? 32 - ff_clz(av) : 0) |
Definition at line 643 of file wavpackenc.c.
#define WRITE_DECWEIGHT | ( | type | ) |
#define WRITE_DECSAMPLE | ( | type | ) |
#define WRITE_CHAN_ENTROPY | ( | chan | ) |
#define OFFSET | ( | x | ) | offsetof(WavPackEncodeContext, x) |
Definition at line 2956 of file wavpackenc.c.
#define FLAGS AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM |
Definition at line 2957 of file wavpackenc.c.
|
static |
Definition at line 128 of file wavpackenc.c.
|
static |
Definition at line 198 of file wavpackenc.c.
Referenced by scan_float(), scan_int23(), scan_int32(), and wavpack_encode_block().
Definition at line 205 of file wavpackenc.c.
Referenced by scan_float(), scan_int23(), scan_int32(), and wavpack_encode_block().
|
static |
Definition at line 226 of file wavpackenc.c.
Referenced by scan_float().
|
static |
Definition at line 267 of file wavpackenc.c.
Referenced by wavpack_encode_block().
|
static |
Definition at line 353 of file wavpackenc.c.
Referenced by wavpack_encode_block().
|
static |
Definition at line 434 of file wavpackenc.c.
Referenced by wavpack_encode_block().
|
static |
Definition at line 524 of file wavpackenc.c.
Referenced by decorr_mono(), decorr_stereo(), decorr_stereo_quick(), and wavpack_encode_block().
|
static |
Definition at line 533 of file wavpackenc.c.
Referenced by decorr_mono(), decorr_stereo(), and decorr_stereo_quick().
|
static |
Definition at line 543 of file wavpackenc.c.
Referenced by decorr_mono(), decorr_stereo(), and decorr_stereo_quick().
|
static |
Definition at line 548 of file wavpackenc.c.
Referenced by analyze_mono(), decorr_mono_buffer(), and wv_mono().
|
static |
Definition at line 611 of file wavpackenc.c.
Referenced by decorr_mono_buffer(), and wv_mono().
|
static |
Definition at line 645 of file wavpackenc.c.
Referenced by log2mono(), and log2stereo().
|
static |
Definition at line 661 of file wavpackenc.c.
Referenced by analyze_mono(), delta_mono(), recurse_mono(), sort_mono(), and wv_mono().
|
static |
Definition at line 671 of file wavpackenc.c.
Referenced by analyze_stereo(), delta_stereo(), recurse_stereo(), sort_stereo(), and wv_stereo().
|
static |
Definition at line 683 of file wavpackenc.c.
Referenced by delta_mono(), recurse_mono(), and sort_mono().
|
static |
Definition at line 722 of file wavpackenc.c.
Referenced by analyze_mono().
|
static |
Definition at line 785 of file wavpackenc.c.
Referenced by analyze_mono().
|
static |
Definition at line 832 of file wavpackenc.c.
Referenced by analyze_mono().
|
static |
Definition at line 885 of file wavpackenc.c.
Referenced by analyze_mono(), and analyze_stereo().
|
static |
Definition at line 905 of file wavpackenc.c.
Referenced by wv_mono(), and wv_stereo().
|
static |
Definition at line 935 of file wavpackenc.c.
Referenced by wv_mono().
|
static |
Definition at line 987 of file wavpackenc.c.
Referenced by wv_mono(), and wv_stereo().
|
static |
Definition at line 1019 of file wavpackenc.c.
Referenced by wavpack_encode_block().
|
static |
Definition at line 1125 of file wavpackenc.c.
Referenced by analyze_stereo(), decorr_stereo_buffer(), and wv_stereo().
|
static |
Definition at line 1318 of file wavpackenc.c.
Referenced by decorr_stereo_buffer(), and wv_stereo().
|
static |
Definition at line 1362 of file wavpackenc.c.
Referenced by analyze_stereo(), decorr_stereo_buffer(), and wv_stereo().
|
static |
Definition at line 1498 of file wavpackenc.c.
Referenced by delta_stereo(), recurse_stereo(), and sort_stereo().
|
static |
Definition at line 1550 of file wavpackenc.c.
Referenced by analyze_stereo().
|
static |
Definition at line 1607 of file wavpackenc.c.
Referenced by analyze_stereo().
|
static |
Definition at line 1667 of file wavpackenc.c.
Referenced by analyze_stereo().
|
static |
Definition at line 1740 of file wavpackenc.c.
Referenced by wv_stereo().
|
static |
Definition at line 1809 of file wavpackenc.c.
Referenced by wavpack_encode_block().
|
static |
Definition at line 1969 of file wavpackenc.c.
Referenced by wavpack_encode_block(), and wavpack_encode_sample().
|
static |
Definition at line 2042 of file wavpackenc.c.
Referenced by wavpack_encode_block().
|
static |
Definition at line 2135 of file wavpackenc.c.
Referenced by wavpack_encode_block().
|
static |
Definition at line 2160 of file wavpackenc.c.
Referenced by pack_float().
|
static |
Definition at line 2215 of file wavpackenc.c.
Referenced by wavpack_encode_block().
|
static |
Definition at line 2232 of file wavpackenc.c.
Referenced by wavpack_encode_block().
|
static |
Definition at line 2351 of file wavpackenc.c.
Referenced by wavpack_encode_block().
|
static |
Definition at line 2460 of file wavpackenc.c.
Referenced by wavpack_encode_block().
|
static |
Definition at line 2469 of file wavpackenc.c.
Referenced by wavpack_encode_frame().
|
static |
Definition at line 2823 of file wavpackenc.c.
Referenced by wavpack_encode_frame().
|
static |
Definition at line 2852 of file wavpackenc.c.
Referenced by wavpack_encode_frame().
|
static |
Definition at line 2864 of file wavpackenc.c.
|
static |
Definition at line 2922 of file wavpackenc.c.
Definition at line 2958 of file wavpackenc.c.
|
static |
Definition at line 2964 of file wavpackenc.c.
const FFCodec ff_wavpack_encoder |
Definition at line 2971 of file wavpackenc.c.