46 int16_t *output_samples;
59 output_samples = (int16_t *)
frame->
data[0];
62 for (
i = 0;
i < 256;
i++)
67 *output_samples++ =
cb[*
src++];
Libavcodec external API header.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
#define AV_CH_LAYOUT_STEREO
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#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
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static av_const int sign_extend(int val, unsigned bits)
#define PAF_SOUND_FRAME_SIZE
#define PAF_SOUND_SAMPLES
AVCodec ff_paf_audio_decoder
static int paf_audio_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt)
static av_cold int paf_audio_init(AVCodecContext *avctx)
main external API structure.
enum AVSampleFormat sample_fmt
audio sample format
int channels
number of audio channels
uint64_t channel_layout
Audio channel layout.
const char * name
Name of the codec implementation.
This structure describes decoded (raw) audio or video data.
int nb_samples
number of audio samples (per channel) described by this frame
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
This structure stores compressed data.
static double cb(void *priv, double x, double y)