CD-XA ADPCM encoder (mono or stereo). A packet holds 224 samples per channel in ch 128 byte blocks. Each block: 8 header bytes at offset 4 (filter in the high nibble and shift = 12 - low nibble, for each of four groups and each channel), then 112 data bytes at offset 16 (group i, sample j at 16 + i + 4j). Stereo: low nibble left, high nibble right. Mono: each group holds two 28 sample segments, the first in the low nibbles (header 4 + 2i) and the second in the high nibbles (header 5 + 2i). The sample history carries across blocks, and every 28 sample segment searches all filters and shifts.
More...
|
| int | adpcm_encode_init_impl () |
| |
| int | adpcm_encode_frame_impl (AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) |
| |
|
int | encodeSegment (int ch, const int *x, uint8_t *nib) |
| |
| void | encodeDSPSubframe (ADPCMChannelStatus *cs, const int16_t *in, int n, const int16_t *coef1, const int16_t *coef2, int npairs, uint8_t *nibbles_out, int &best_index, int &best_exp) |
| |
| virtual int | packetSize (const AVFrame *frame) |
| |
|
virtual int | adpcm_encode_init () |
| |
|
int | adpcm_encode_close () |
| |
|
uint8_t | adpcm_ima_compress_sample (ADPCMChannelStatus *c, int16_t sample) |
| |
| uint8_t | adpcm_ima_quantize (ADPCMChannelStatus *cs, int target, int shift) |
| |
|
uint8_t | adpcm_ima_qt_compress_sample (ADPCMChannelStatus *c, int16_t sample) |
| |
|
uint8_t | adpcm_yamaha_compress_sample (ADPCMChannelStatus *c, int16_t sample) |
| |
|
virtual int | adpcm_encode_frame (AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) |
| |
|
int | av_get_bits_per_sample () |
| |
|
int | ff_get_encode_buffer (AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int flags) |
| |
|
int | ff_get_buffer (AVCodecContext *avctx, AVFrame *frame, int flags) |
| |
|
void | avpriv_request_sample (void *avc, const char *msg,...) |
| |
CD-XA ADPCM encoder (mono or stereo). A packet holds 224 samples per channel in ch 128 byte blocks. Each block: 8 header bytes at offset 4 (filter in the high nibble and shift = 12 - low nibble, for each of four groups and each channel), then 112 data bytes at offset 16 (group i, sample j at 16 + i + 4j). Stereo: low nibble left, high nibble right. Mono: each group holds two 28 sample segments, the first in the low nibbles (header 4 + 2i) and the second in the high nibbles (header 5 + 2i). The sample history carries across blocks, and every 28 sample segment searches all filters and shifts.