48 int16_t *output_samples;
49 const uint8_t *
src =
pkt->data;
61 output_samples = (int16_t *)
frame->data[0];
63 for (j = 0; j <
frames; j++) {
64 for (
i = 0;
i < 256;
i++)
69 *output_samples++ =
cb[*
src++];
77 .p.name =
"paf_audio",
const FFCodec ff_paf_audio_decoder
Libavcodec external API header.
#define i(width, name, range_min, range_max)
Public libavutil channel layout APIs header.
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
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 AV_CHANNEL_LAYOUT_STEREO
void av_channel_layout_uninit(AVChannelLayout *channel_layout)
Free any allocated data in the channel layout and reset the channel count to 0.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
@ AV_SAMPLE_FMT_S16
signed 16 bits
static av_const int sign_extend(int val, unsigned bits)
#define PAF_SOUND_FRAME_SIZE
#define PAF_SOUND_SAMPLES
static int paf_audio_decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
static av_cold int paf_audio_init(AVCodecContext *avctx)
An AVChannelLayout holds information about the channel layout of audio data.
int nb_channels
Number of channels in this layout.
main external API structure.
AVChannelLayout ch_layout
Audio channel layout.
enum AVSampleFormat sample_fmt
audio sample format
This structure describes decoded (raw) audio or video data.
This structure stores compressed data.
static double cb(void *priv, double x, double y)