Go to the documentation of this file.
42 uint8_t *outbuf,
const uint8_t *inbuf)
45 for (
int i = 0;
i <
len;
i++) {
48 for (
int j = 0; j < 8; j++) {
49 int nq, lq, st,
ns, ov;
51 int t = ((
d&1) ? 127 : -128);
56 if(nq ==
state->q && nq != t)
57 nq += (t == 127 ? 1 : -1);
62 st = (t !=
state->lt ? 0 : 1023);
65 ns += (st != 0 ? 1 : -1);
70 ov = (t !=
state->lt ? (nq+lq+1)>>1 : nq);
77 *(outbuf++) = ov + 128;
94 ctx->bits_per_raw_sample = 8;
105 if (
packet->size * 8LL %
ctx->ch_layout.nb_channels)
This structure describes decoded (raw) audio or video data.
const FFCodec ff_dfpwm_decoder
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
AVCodec p
The public AVCodec.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define FF_CODEC_DECODE_CB(func)
static void au_decompress(DFPWMState *state, int fs, int len, uint8_t *outbuf, const uint8_t *inbuf)
int(* init)(AVBSFContext *ctx)
#define CODEC_LONG_NAME(str)
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
#define fs(width, name, subs,...)
static int dfpwm_dec_frame(struct AVCodecContext *ctx, AVFrame *frame, int *got_frame, struct AVPacket *packet)
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define ns(max_value, name, subs,...)
int nb_samples
number of audio samples (per channel) described by this frame
#define i(width, name, range_min, range_max)
@ AV_SAMPLE_FMT_U8
unsigned 8 bits
enum AVPacketSideDataType packet
const char * name
Name of the codec implementation.
static av_cold int dfpwm_dec_init(struct AVCodecContext *ctx)
main external API structure.
This structure stores compressed data.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
void * priv_data
Format private data.