28 #define PAF_SOUND_SAMPLES 2205
29 #define PAF_SOUND_FRAME_SIZE ((256 + PAF_SOUND_SAMPLES) * 2)
48 int16_t *output_samples;
50 int frames, ret, i, j;
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++];
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
This structure describes decoded (raw) audio or video data.
#define AV_CH_LAYOUT_STEREO
enum AVSampleFormat sample_fmt
audio sample format
static int paf_audio_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt)
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define PAF_SOUND_FRAME_SIZE
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
uint64_t channel_layout
Audio channel layout.
Libavcodec external API header.
main external API structure.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
static av_const int sign_extend(int val, unsigned bits)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
AVCodec ff_paf_audio_decoder
static av_cold int paf_audio_init(AVCodecContext *avctx)
common internal api header.
int channels
number of audio channels
#define PAF_SOUND_SAMPLES
This structure stores compressed data.
int nb_samples
number of audio samples (per channel) described by this frame