#include "avcodec.h"
#include "libavutil/common.h"
#include "bytestream.h"
#include "pcm_tablegen.h"
Go to the source code of this file.
Data Structures | |
struct | PCMDecode |
Defines | |
#define | MAX_CHANNELS 64 |
#define | ENCODE(type, endian, src, dst, n, shift, offset) |
Write PCM samples macro. | |
#define | DECODE(type, endian, src, dst, n, shift, offset) |
Read PCM samples macro. | |
#define | PCM_ENCODER(id, sample_fmt_, name, long_name_) |
#define | PCM_DECODER(id, sample_fmt_, name, long_name_) |
#define | PCM_CODEC(id, sample_fmt_, name, long_name_) PCM_ENCODER(id,sample_fmt_,name,long_name_); PCM_DECODER(id,sample_fmt_,name,long_name_) |
Functions | |
static av_cold int | pcm_encode_init (AVCodecContext *avctx) |
static av_cold int | pcm_encode_close (AVCodecContext *avctx) |
static int | pcm_encode_frame (AVCodecContext *avctx, unsigned char *frame, int buf_size, void *data) |
static av_cold int | pcm_decode_init (AVCodecContext *avctx) |
static int | pcm_decode_frame (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) |
PCM_CODEC (CODEC_ID_PCM_ALAW, AV_SAMPLE_FMT_S16, pcm_alaw,"PCM A-law") | |
PCM_DECODER (CODEC_ID_PCM_DVD, AV_SAMPLE_FMT_S32, pcm_dvd,"PCM signed 20|24-bit big-endian") | |
PCM_CODEC (CODEC_ID_PCM_F32BE, AV_SAMPLE_FMT_FLT, pcm_f32be,"PCM 32-bit floating point big-endian") | |
PCM_CODEC (CODEC_ID_PCM_F32LE, AV_SAMPLE_FMT_FLT, pcm_f32le,"PCM 32-bit floating point little-endian") | |
PCM_CODEC (CODEC_ID_PCM_F64BE, AV_SAMPLE_FMT_DBL, pcm_f64be,"PCM 64-bit floating point big-endian") | |
PCM_CODEC (CODEC_ID_PCM_F64LE, AV_SAMPLE_FMT_DBL, pcm_f64le,"PCM 64-bit floating point little-endian") | |
PCM_DECODER (CODEC_ID_PCM_LXF, AV_SAMPLE_FMT_S32, pcm_lxf,"PCM signed 20-bit little-endian planar") | |
PCM_CODEC (CODEC_ID_PCM_MULAW, AV_SAMPLE_FMT_S16, pcm_mulaw,"PCM mu-law") | |
PCM_CODEC (CODEC_ID_PCM_S8, AV_SAMPLE_FMT_U8, pcm_s8,"PCM signed 8-bit") | |
PCM_CODEC (CODEC_ID_PCM_S16BE, AV_SAMPLE_FMT_S16, pcm_s16be,"PCM signed 16-bit big-endian") | |
PCM_CODEC (CODEC_ID_PCM_S16LE, AV_SAMPLE_FMT_S16, pcm_s16le,"PCM signed 16-bit little-endian") | |
PCM_DECODER (CODEC_ID_PCM_S16LE_PLANAR, AV_SAMPLE_FMT_S16, pcm_s16le_planar,"PCM 16-bit little-endian planar") | |
PCM_CODEC (CODEC_ID_PCM_S24BE, AV_SAMPLE_FMT_S32, pcm_s24be,"PCM signed 24-bit big-endian") | |
PCM_CODEC (CODEC_ID_PCM_S24DAUD, AV_SAMPLE_FMT_S16, pcm_s24daud,"PCM D-Cinema audio signed 24-bit") | |
PCM_CODEC (CODEC_ID_PCM_S24LE, AV_SAMPLE_FMT_S32, pcm_s24le,"PCM signed 24-bit little-endian") | |
PCM_CODEC (CODEC_ID_PCM_S32BE, AV_SAMPLE_FMT_S32, pcm_s32be,"PCM signed 32-bit big-endian") | |
PCM_CODEC (CODEC_ID_PCM_S32LE, AV_SAMPLE_FMT_S32, pcm_s32le,"PCM signed 32-bit little-endian") | |
PCM_CODEC (CODEC_ID_PCM_U8, AV_SAMPLE_FMT_U8, pcm_u8,"PCM unsigned 8-bit") | |
PCM_CODEC (CODEC_ID_PCM_U16BE, AV_SAMPLE_FMT_S16, pcm_u16be,"PCM unsigned 16-bit big-endian") | |
PCM_CODEC (CODEC_ID_PCM_U16LE, AV_SAMPLE_FMT_S16, pcm_u16le,"PCM unsigned 16-bit little-endian") | |
PCM_CODEC (CODEC_ID_PCM_U24BE, AV_SAMPLE_FMT_S32, pcm_u24be,"PCM unsigned 24-bit big-endian") | |
PCM_CODEC (CODEC_ID_PCM_U24LE, AV_SAMPLE_FMT_S32, pcm_u24le,"PCM unsigned 24-bit little-endian") | |
PCM_CODEC (CODEC_ID_PCM_U32BE, AV_SAMPLE_FMT_S32, pcm_u32be,"PCM unsigned 32-bit big-endian") | |
PCM_CODEC (CODEC_ID_PCM_U32LE, AV_SAMPLE_FMT_S32, pcm_u32le,"PCM unsigned 32-bit little-endian") | |
PCM_CODEC (CODEC_ID_PCM_ZORK, AV_SAMPLE_FMT_S16, pcm_zork,"PCM Zork") |
Definition in file pcm.c.
Value:
dst_##type = (type*)dst; \ for(;n>0;n--) { \ register type v = bytestream_get_##endian(&src); \ *dst_##type++ = (v - offset) << shift; \ } \ dst = (short*)dst_##type;
type | Datatype of native machine format | |
endian | bytestream_get_xxx() endian suffix | |
src | Source pointer (variable name) | |
dst | Destination pointer (variable name) | |
n | Total number of samples (variable name) | |
shift | Bitshift (bits) | |
offset | Sample value offset |
Definition at line 247 of file pcm.c.
Referenced by pcm_decode_frame().
Value:
samples_##type = (const type*) src; \ for(;n>0;n--) { \ register type v = (*samples_##type++ >> shift) + offset; \ bytestream_put_##endian(&dst, v); \ }
type | Datatype of native machine format | |
endian | bytestream_put_xxx() suffix | |
src | Source pointer (variable name) | |
dst | Destination pointer (variable name) | |
n | Total number of samples (variable name) | |
shift | Bitshift (bits) | |
offset | Sample value offset |
Definition at line 73 of file pcm.c.
Referenced by pcm_encode_frame().
PCM_CODEC | ( | CODEC_ID_PCM_ZORK | , | |
AV_SAMPLE_FMT_S16 | , | |||
pcm_zork | , | |||
"PCM Zork" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_U32LE | , | |
AV_SAMPLE_FMT_S32 | , | |||
pcm_u32le | , | |||
"PCM unsigned 32-bit little-endian" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_U32BE | , | |
AV_SAMPLE_FMT_S32 | , | |||
pcm_u32be | , | |||
"PCM unsigned 32-bit big-endian" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_U24LE | , | |
AV_SAMPLE_FMT_S32 | , | |||
pcm_u24le | , | |||
"PCM unsigned 24-bit little-endian" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_U24BE | , | |
AV_SAMPLE_FMT_S32 | , | |||
pcm_u24be | , | |||
"PCM unsigned 24-bit big-endian" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_U16LE | , | |
AV_SAMPLE_FMT_S16 | , | |||
pcm_u16le | , | |||
"PCM unsigned 16-bit little-endian" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_U16BE | , | |
AV_SAMPLE_FMT_S16 | , | |||
pcm_u16be | , | |||
"PCM unsigned 16-bit big-endian" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_U8 | , | |
AV_SAMPLE_FMT_U8 | , | |||
pcm_u8 | , | |||
"PCM unsigned 8-bit" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_S32LE | , | |
AV_SAMPLE_FMT_S32 | , | |||
pcm_s32le | , | |||
"PCM signed 32-bit little-endian" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_S32BE | , | |
AV_SAMPLE_FMT_S32 | , | |||
pcm_s32be | , | |||
"PCM signed 32-bit big-endian" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_S24LE | , | |
AV_SAMPLE_FMT_S32 | , | |||
pcm_s24le | , | |||
"PCM signed 24-bit little-endian" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_S24DAUD | , | |
AV_SAMPLE_FMT_S16 | , | |||
pcm_s24daud | , | |||
"PCM D-Cinema audio signed 24-bit" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_S24BE | , | |
AV_SAMPLE_FMT_S32 | , | |||
pcm_s24be | , | |||
"PCM signed 24-bit big-endian" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_S16LE | , | |
AV_SAMPLE_FMT_S16 | , | |||
pcm_s16le | , | |||
"PCM signed 16-bit little-endian" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_S16BE | , | |
AV_SAMPLE_FMT_S16 | , | |||
pcm_s16be | , | |||
"PCM signed 16-bit big-endian" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_S8 | , | |
AV_SAMPLE_FMT_U8 | , | |||
pcm_s8 | , | |||
"PCM signed 8-bit" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_MULAW | , | |
AV_SAMPLE_FMT_S16 | , | |||
pcm_mulaw | , | |||
"PCM mu-law" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_F64LE | , | |
AV_SAMPLE_FMT_DBL | , | |||
pcm_f64le | , | |||
"PCM 64-bit floating point little-endian" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_F64BE | , | |
AV_SAMPLE_FMT_DBL | , | |||
pcm_f64be | , | |||
"PCM 64-bit floating point big-endian" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_F32LE | , | |
AV_SAMPLE_FMT_FLT | , | |||
pcm_f32le | , | |||
"PCM 32-bit floating point little-endian" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_F32BE | , | |
AV_SAMPLE_FMT_FLT | , | |||
pcm_f32be | , | |||
"PCM 32-bit floating point big-endian" | ||||
) |
PCM_CODEC | ( | CODEC_ID_PCM_ALAW | , | |
AV_SAMPLE_FMT_S16 | , | |||
pcm_alaw | , | |||
"PCM A-law" | ||||
) |
static int pcm_decode_frame | ( | AVCodecContext * | avctx, | |
void * | data, | |||
int * | data_size, | |||
AVPacket * | avpkt | |||
) | [static] |
static av_cold int pcm_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
PCM_DECODER | ( | CODEC_ID_PCM_S16LE_PLANAR | , | |
AV_SAMPLE_FMT_S16 | , | |||
pcm_s16le_planar | , | |||
"PCM 16-bit little-endian planar" | ||||
) |
PCM_DECODER | ( | CODEC_ID_PCM_LXF | , | |
AV_SAMPLE_FMT_S32 | , | |||
pcm_lxf | , | |||
"PCM signed 20-bit little-endian planar" | ||||
) |
PCM_DECODER | ( | CODEC_ID_PCM_DVD | , | |
AV_SAMPLE_FMT_S32 | , | |||
pcm_dvd | , | |||
"PCM signed 20|24-bit big-endian" | ||||
) |
static av_cold int pcm_encode_close | ( | AVCodecContext * | avctx | ) | [static] |
static int pcm_encode_frame | ( | AVCodecContext * | avctx, | |
unsigned char * | frame, | |||
int | buf_size, | |||
void * | data | |||
) | [static] |
static av_cold int pcm_encode_init | ( | AVCodecContext * | avctx | ) | [static] |