3 * Copyright (c) 2001 Fabrice Bellard
5 * This file is part of FFmpeg.
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27 #include "libavutil/attributes.h"
28 #include "libavutil/float_dsp.h"
30 #include "bytestream.h"
33 #include "pcm_tablegen.h"
35 static av_cold int pcm_encode_init(AVCodecContext *avctx)
37 avctx->frame_size = 0;
38 switch (avctx->codec->id) {
39 case AV_CODEC_ID_PCM_ALAW:
42 case AV_CODEC_ID_PCM_MULAW:
45 case AV_CODEC_ID_PCM_VIDC:
52 avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id);
53 avctx->block_align = avctx->channels * avctx->bits_per_coded_sample / 8;
54 avctx->bit_rate = avctx->block_align * 8LL * avctx->sample_rate;
60 * Write PCM samples macro
61 * @param type Datatype of native machine format
62 * @param endian bytestream_put_xxx() suffix
63 * @param src Source pointer (variable name)
64 * @param dst Destination pointer (variable name)
65 * @param n Total number of samples (variable name)
66 * @param shift Bitshift (bits)
67 * @param offset Sample value offset
69 #define ENCODE(type, endian, src, dst, n, shift, offset) \
70 samples_ ## type = (const type *) src; \
71 for (; n > 0; n--) { \
72 register type v = (*samples_ ## type++ >> shift) + offset; \
73 bytestream_put_ ## endian(&dst, v); \
76 #define ENCODE_PLANAR(type, endian, dst, n, shift, offset) \
77 n /= avctx->channels; \
78 for (c = 0; c < avctx->channels; c++) { \
80 samples_ ## type = (const type *) frame->extended_data[c]; \
81 for (i = n; i > 0; i--) { \
82 register type v = (*samples_ ## type++ >> shift) + offset; \
83 bytestream_put_ ## endian(&dst, v); \
87 static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
88 const AVFrame *frame, int *got_packet_ptr)
90 int n, c, sample_size, v, ret;
93 const uint8_t *samples_uint8_t;
94 const int16_t *samples_int16_t;
95 const int32_t *samples_int32_t;
96 const int64_t *samples_int64_t;
97 const uint16_t *samples_uint16_t;
98 const uint32_t *samples_uint32_t;
100 sample_size = av_get_bits_per_sample(avctx->codec->id) / 8;
101 n = frame->nb_samples * avctx->channels;
102 samples = (const short *)frame->data[0];
104 if ((ret = ff_alloc_packet2(avctx, avpkt, n * sample_size, n * sample_size)) < 0)
108 switch (avctx->codec->id) {
109 case AV_CODEC_ID_PCM_U32LE:
110 ENCODE(uint32_t, le32, samples, dst, n, 0, 0x80000000)
112 case AV_CODEC_ID_PCM_U32BE:
113 ENCODE(uint32_t, be32, samples, dst, n, 0, 0x80000000)
115 case AV_CODEC_ID_PCM_S24LE:
116 ENCODE(int32_t, le24, samples, dst, n, 8, 0)
118 case AV_CODEC_ID_PCM_S24LE_PLANAR:
119 ENCODE_PLANAR(int32_t, le24, dst, n, 8, 0)
121 case AV_CODEC_ID_PCM_S24BE:
122 ENCODE(int32_t, be24, samples, dst, n, 8, 0)
124 case AV_CODEC_ID_PCM_U24LE:
125 ENCODE(uint32_t, le24, samples, dst, n, 8, 0x800000)
127 case AV_CODEC_ID_PCM_U24BE:
128 ENCODE(uint32_t, be24, samples, dst, n, 8, 0x800000)
130 case AV_CODEC_ID_PCM_S24DAUD:
132 uint32_t tmp = ff_reverse[(*samples >> 8) & 0xff] +
133 (ff_reverse[*samples & 0xff] << 8);
134 tmp <<= 4; // sync flags would go here
135 bytestream_put_be24(&dst, tmp);
139 case AV_CODEC_ID_PCM_U16LE:
140 ENCODE(uint16_t, le16, samples, dst, n, 0, 0x8000)
142 case AV_CODEC_ID_PCM_U16BE:
143 ENCODE(uint16_t, be16, samples, dst, n, 0, 0x8000)
145 case AV_CODEC_ID_PCM_S8:
146 ENCODE(uint8_t, byte, samples, dst, n, 0, -128)
148 case AV_CODEC_ID_PCM_S8_PLANAR:
149 ENCODE_PLANAR(uint8_t, byte, dst, n, 0, -128)
152 case AV_CODEC_ID_PCM_S64LE:
153 case AV_CODEC_ID_PCM_F64LE:
154 ENCODE(int64_t, le64, samples, dst, n, 0, 0)
156 case AV_CODEC_ID_PCM_S32LE:
157 case AV_CODEC_ID_PCM_F32LE:
158 ENCODE(int32_t, le32, samples, dst, n, 0, 0)
160 case AV_CODEC_ID_PCM_S32LE_PLANAR:
161 ENCODE_PLANAR(int32_t, le32, dst, n, 0, 0)
163 case AV_CODEC_ID_PCM_S16LE:
164 ENCODE(int16_t, le16, samples, dst, n, 0, 0)
166 case AV_CODEC_ID_PCM_S16LE_PLANAR:
167 ENCODE_PLANAR(int16_t, le16, dst, n, 0, 0)
169 case AV_CODEC_ID_PCM_F64BE:
170 case AV_CODEC_ID_PCM_F32BE:
171 case AV_CODEC_ID_PCM_S64BE:
172 case AV_CODEC_ID_PCM_S32BE:
173 case AV_CODEC_ID_PCM_S16BE:
175 case AV_CODEC_ID_PCM_S64BE:
176 case AV_CODEC_ID_PCM_F64BE:
177 ENCODE(int64_t, be64, samples, dst, n, 0, 0)
179 case AV_CODEC_ID_PCM_F32BE:
180 case AV_CODEC_ID_PCM_S32BE:
181 ENCODE(int32_t, be32, samples, dst, n, 0, 0)
183 case AV_CODEC_ID_PCM_S16BE:
184 ENCODE(int16_t, be16, samples, dst, n, 0, 0)
186 case AV_CODEC_ID_PCM_S16BE_PLANAR:
187 ENCODE_PLANAR(int16_t, be16, dst, n, 0, 0)
189 case AV_CODEC_ID_PCM_F64LE:
190 case AV_CODEC_ID_PCM_F32LE:
191 case AV_CODEC_ID_PCM_S64LE:
192 case AV_CODEC_ID_PCM_S32LE:
193 case AV_CODEC_ID_PCM_S16LE:
194 #endif /* HAVE_BIGENDIAN */
195 case AV_CODEC_ID_PCM_U8:
196 memcpy(dst, samples, n * sample_size);
199 case AV_CODEC_ID_PCM_S16BE_PLANAR:
201 case AV_CODEC_ID_PCM_S16LE_PLANAR:
202 case AV_CODEC_ID_PCM_S32LE_PLANAR:
203 #endif /* HAVE_BIGENDIAN */
204 n /= avctx->channels;
205 for (c = 0; c < avctx->channels; c++) {
206 const uint8_t *src = frame->extended_data[c];
207 bytestream_put_buffer(&dst, src, n * sample_size);
210 case AV_CODEC_ID_PCM_ALAW:
213 *dst++ = linear_to_alaw[(v + 32768) >> 2];
216 case AV_CODEC_ID_PCM_MULAW:
219 *dst++ = linear_to_ulaw[(v + 32768) >> 2];
222 case AV_CODEC_ID_PCM_VIDC:
225 *dst++ = linear_to_vidc[(v + 32768) >> 2];
236 typedef struct PCMDecode {
238 AVFloatDSPContext *fdsp;
242 static av_cold int pcm_decode_init(AVCodecContext *avctx)
244 PCMDecode *s = avctx->priv_data;
247 if (avctx->channels <= 0) {
248 av_log(avctx, AV_LOG_ERROR, "PCM channels out of bounds\n");
249 return AVERROR(EINVAL);
252 switch (avctx->codec_id) {
253 case AV_CODEC_ID_PCM_ALAW:
254 for (i = 0; i < 256; i++)
255 s->table[i] = alaw2linear(i);
257 case AV_CODEC_ID_PCM_MULAW:
258 for (i = 0; i < 256; i++)
259 s->table[i] = ulaw2linear(i);
261 case AV_CODEC_ID_PCM_VIDC:
262 for (i = 0; i < 256; i++)
263 s->table[i] = vidc2linear(i);
265 case AV_CODEC_ID_PCM_F16LE:
266 case AV_CODEC_ID_PCM_F24LE:
267 s->scale = 1. / (1 << (avctx->bits_per_coded_sample - 1));
268 s->fdsp = avpriv_float_dsp_alloc(0);
270 return AVERROR(ENOMEM);
276 avctx->sample_fmt = avctx->codec->sample_fmts[0];
278 if (avctx->sample_fmt == AV_SAMPLE_FMT_S32)
279 avctx->bits_per_raw_sample = av_get_bits_per_sample(avctx->codec_id);
284 static av_cold int pcm_decode_close(AVCodecContext *avctx)
286 PCMDecode *s = avctx->priv_data;
294 * Read PCM samples macro
295 * @param size Data size of native machine format
296 * @param endian bytestream_get_xxx() endian suffix
297 * @param src Source pointer (variable name)
298 * @param dst Destination pointer (variable name)
299 * @param n Total number of samples (variable name)
300 * @param shift Bitshift (bits)
301 * @param offset Sample value offset
303 #define DECODE(size, endian, src, dst, n, shift, offset) \
304 for (; n > 0; n--) { \
305 uint ## size ## _t v = bytestream_get_ ## endian(&src); \
306 AV_WN ## size ## A(dst, (v - offset) << shift); \
310 #define DECODE_PLANAR(size, endian, src, dst, n, shift, offset) \
311 n /= avctx->channels; \
312 for (c = 0; c < avctx->channels; c++) { \
314 dst = frame->extended_data[c]; \
315 for (i = n; i > 0; i--) { \
316 uint ## size ## _t v = bytestream_get_ ## endian(&src); \
317 AV_WN ## size ## A(dst, (v - offset) << shift); \
322 static int pcm_decode_frame(AVCodecContext *avctx, void *data,
323 int *got_frame_ptr, AVPacket *avpkt)
325 const uint8_t *src = avpkt->data;
326 int buf_size = avpkt->size;
327 PCMDecode *s = avctx->priv_data;
328 AVFrame *frame = data;
329 int sample_size, c, n, ret, samples_per_block;
331 int32_t *dst_int32_t;
333 sample_size = av_get_bits_per_sample(avctx->codec_id) / 8;
335 /* av_get_bits_per_sample returns 0 for AV_CODEC_ID_PCM_DVD */
336 samples_per_block = 1;
337 if (avctx->codec_id == AV_CODEC_ID_PCM_LXF) {
338 /* we process 40-bit blocks per channel for LXF */
339 samples_per_block = 2;
343 if (sample_size == 0) {
344 av_log(avctx, AV_LOG_ERROR, "Invalid sample_size\n");
345 return AVERROR(EINVAL);
348 if (avctx->channels == 0) {
349 av_log(avctx, AV_LOG_ERROR, "Invalid number of channels\n");
350 return AVERROR(EINVAL);
353 if (avctx->codec_id != avctx->codec->id) {
354 av_log(avctx, AV_LOG_ERROR, "codec ids mismatch\n");
355 return AVERROR(EINVAL);
358 n = avctx->channels * sample_size;
360 if (n && buf_size % n) {
362 av_log(avctx, AV_LOG_ERROR,
363 "Invalid PCM packet, data has size %d but at least a size of %d was expected\n",
365 return AVERROR_INVALIDDATA;
367 buf_size -= buf_size % n;
370 n = buf_size / sample_size;
372 /* get output buffer */
373 frame->nb_samples = n * samples_per_block / avctx->channels;
374 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
376 samples = frame->data[0];
378 switch (avctx->codec_id) {
379 case AV_CODEC_ID_PCM_U32LE:
380 DECODE(32, le32, src, samples, n, 0, 0x80000000)
382 case AV_CODEC_ID_PCM_U32BE:
383 DECODE(32, be32, src, samples, n, 0, 0x80000000)
385 case AV_CODEC_ID_PCM_S24LE:
386 DECODE(32, le24, src, samples, n, 8, 0)
388 case AV_CODEC_ID_PCM_S24LE_PLANAR:
389 DECODE_PLANAR(32, le24, src, samples, n, 8, 0);
391 case AV_CODEC_ID_PCM_S24BE:
392 DECODE(32, be24, src, samples, n, 8, 0)
394 case AV_CODEC_ID_PCM_U24LE:
395 DECODE(32, le24, src, samples, n, 8, 0x800000)
397 case AV_CODEC_ID_PCM_U24BE:
398 DECODE(32, be24, src, samples, n, 8, 0x800000)
400 case AV_CODEC_ID_PCM_S24DAUD:
402 uint32_t v = bytestream_get_be24(&src);
403 v >>= 4; // sync flags are here
404 AV_WN16A(samples, ff_reverse[(v >> 8) & 0xff] +
405 (ff_reverse[v & 0xff] << 8));
409 case AV_CODEC_ID_PCM_U16LE:
410 DECODE(16, le16, src, samples, n, 0, 0x8000)
412 case AV_CODEC_ID_PCM_U16BE:
413 DECODE(16, be16, src, samples, n, 0, 0x8000)
415 case AV_CODEC_ID_PCM_S8:
417 *samples++ = *src++ + 128;
419 case AV_CODEC_ID_PCM_S8_PLANAR:
420 n /= avctx->channels;
421 for (c = 0; c < avctx->channels; c++) {
423 samples = frame->extended_data[c];
424 for (i = n; i > 0; i--)
425 *samples++ = *src++ + 128;
429 case AV_CODEC_ID_PCM_S64LE:
430 case AV_CODEC_ID_PCM_F64LE:
431 DECODE(64, le64, src, samples, n, 0, 0)
433 case AV_CODEC_ID_PCM_S32LE:
434 case AV_CODEC_ID_PCM_F32LE:
435 case AV_CODEC_ID_PCM_F24LE:
436 case AV_CODEC_ID_PCM_F16LE:
437 DECODE(32, le32, src, samples, n, 0, 0)
439 case AV_CODEC_ID_PCM_S32LE_PLANAR:
440 DECODE_PLANAR(32, le32, src, samples, n, 0, 0);
442 case AV_CODEC_ID_PCM_S16LE:
443 DECODE(16, le16, src, samples, n, 0, 0)
445 case AV_CODEC_ID_PCM_S16LE_PLANAR:
446 DECODE_PLANAR(16, le16, src, samples, n, 0, 0);
448 case AV_CODEC_ID_PCM_F64BE:
449 case AV_CODEC_ID_PCM_F32BE:
450 case AV_CODEC_ID_PCM_S64BE:
451 case AV_CODEC_ID_PCM_S32BE:
452 case AV_CODEC_ID_PCM_S16BE:
454 case AV_CODEC_ID_PCM_S64BE:
455 case AV_CODEC_ID_PCM_F64BE:
456 DECODE(64, be64, src, samples, n, 0, 0)
458 case AV_CODEC_ID_PCM_F32BE:
459 case AV_CODEC_ID_PCM_S32BE:
460 DECODE(32, be32, src, samples, n, 0, 0)
462 case AV_CODEC_ID_PCM_S16BE:
463 DECODE(16, be16, src, samples, n, 0, 0)
465 case AV_CODEC_ID_PCM_S16BE_PLANAR:
466 DECODE_PLANAR(16, be16, src, samples, n, 0, 0);
468 case AV_CODEC_ID_PCM_F64LE:
469 case AV_CODEC_ID_PCM_F32LE:
470 case AV_CODEC_ID_PCM_F24LE:
471 case AV_CODEC_ID_PCM_F16LE:
472 case AV_CODEC_ID_PCM_S64LE:
473 case AV_CODEC_ID_PCM_S32LE:
474 case AV_CODEC_ID_PCM_S16LE:
475 #endif /* HAVE_BIGENDIAN */
476 case AV_CODEC_ID_PCM_U8:
477 memcpy(samples, src, n * sample_size);
480 case AV_CODEC_ID_PCM_S16BE_PLANAR:
482 case AV_CODEC_ID_PCM_S16LE_PLANAR:
483 case AV_CODEC_ID_PCM_S32LE_PLANAR:
484 #endif /* HAVE_BIGENDIAN */
485 n /= avctx->channels;
486 for (c = 0; c < avctx->channels; c++) {
487 samples = frame->extended_data[c];
488 bytestream_get_buffer(&src, samples, n * sample_size);
491 case AV_CODEC_ID_PCM_ZORK:
499 case AV_CODEC_ID_PCM_ALAW:
500 case AV_CODEC_ID_PCM_MULAW:
501 case AV_CODEC_ID_PCM_VIDC:
503 AV_WN16A(samples, s->table[*src++]);
507 case AV_CODEC_ID_PCM_LXF:
510 n /= avctx->channels;
511 for (c = 0; c < avctx->channels; c++) {
512 dst_int32_t = (int32_t *)frame->extended_data[c];
513 for (i = 0; i < n; i++) {
514 // extract low 20 bits and expand to 32 bits
515 *dst_int32_t++ = (src[2] << 28) |
518 ((src[2] & 0x0F) << 8) |
520 // extract high 20 bits and expand to 32 bits
521 *dst_int32_t++ = (src[4] << 24) |
523 ((src[2] & 0xF0) << 8) |
535 if (avctx->codec_id == AV_CODEC_ID_PCM_F16LE ||
536 avctx->codec_id == AV_CODEC_ID_PCM_F24LE) {
537 s->fdsp->vector_fmul_scalar((float *)frame->extended_data[0],
538 (const float *)frame->extended_data[0],
539 s->scale, FFALIGN(frame->nb_samples * avctx->channels, 4));
548 #define PCM_ENCODER_0(id_, sample_fmt_, name_, long_name_)
549 #define PCM_ENCODER_1(id_, sample_fmt_, name_, long_name_) \
550 AVCodec ff_ ## name_ ## _encoder = { \
552 .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
553 .type = AVMEDIA_TYPE_AUDIO, \
554 .id = AV_CODEC_ID_ ## id_, \
555 .init = pcm_encode_init, \
556 .encode2 = pcm_encode_frame, \
557 .capabilities = AV_CODEC_CAP_VARIABLE_FRAME_SIZE, \
558 .sample_fmts = (const enum AVSampleFormat[]){ sample_fmt_, \
559 AV_SAMPLE_FMT_NONE }, \
562 #define PCM_ENCODER_2(cf, id, sample_fmt, name, long_name) \
563 PCM_ENCODER_ ## cf(id, sample_fmt, name, long_name)
564 #define PCM_ENCODER_3(cf, id, sample_fmt, name, long_name) \
565 PCM_ENCODER_2(cf, id, sample_fmt, name, long_name)
566 #define PCM_ENCODER(id, sample_fmt, name, long_name) \
567 PCM_ENCODER_3(CONFIG_ ## id ## _ENCODER, id, sample_fmt, name, long_name)
569 #define PCM_DECODER_0(id, sample_fmt, name, long_name)
570 #define PCM_DECODER_1(id_, sample_fmt_, name_, long_name_) \
571 AVCodec ff_ ## name_ ## _decoder = { \
573 .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
574 .type = AVMEDIA_TYPE_AUDIO, \
575 .id = AV_CODEC_ID_ ## id_, \
576 .priv_data_size = sizeof(PCMDecode), \
577 .init = pcm_decode_init, \
578 .close = pcm_decode_close, \
579 .decode = pcm_decode_frame, \
580 .capabilities = AV_CODEC_CAP_DR1, \
581 .sample_fmts = (const enum AVSampleFormat[]){ sample_fmt_, \
582 AV_SAMPLE_FMT_NONE }, \
585 #define PCM_DECODER_2(cf, id, sample_fmt, name, long_name) \
586 PCM_DECODER_ ## cf(id, sample_fmt, name, long_name)
587 #define PCM_DECODER_3(cf, id, sample_fmt, name, long_name) \
588 PCM_DECODER_2(cf, id, sample_fmt, name, long_name)
589 #define PCM_DECODER(id, sample_fmt, name, long_name) \
590 PCM_DECODER_3(CONFIG_ ## id ## _DECODER, id, sample_fmt, name, long_name)
592 #define PCM_CODEC(id, sample_fmt_, name, long_name_) \
593 PCM_ENCODER(id, sample_fmt_, name, long_name_); \
594 PCM_DECODER(id, sample_fmt_, name, long_name_)
596 /* Note: Do not forget to add new entries to the Makefile as well. */
597 PCM_CODEC (PCM_ALAW, AV_SAMPLE_FMT_S16, pcm_alaw, "PCM A-law / G.711 A-law");
598 PCM_DECODER(PCM_F16LE, AV_SAMPLE_FMT_FLT, pcm_f16le, "PCM 16.8 floating point little-endian");
599 PCM_DECODER(PCM_F24LE, AV_SAMPLE_FMT_FLT, pcm_f24le, "PCM 24.0 floating point little-endian");
600 PCM_CODEC (PCM_F32BE, AV_SAMPLE_FMT_FLT, pcm_f32be, "PCM 32-bit floating point big-endian");
601 PCM_CODEC (PCM_F32LE, AV_SAMPLE_FMT_FLT, pcm_f32le, "PCM 32-bit floating point little-endian");
602 PCM_CODEC (PCM_F64BE, AV_SAMPLE_FMT_DBL, pcm_f64be, "PCM 64-bit floating point big-endian");
603 PCM_CODEC (PCM_F64LE, AV_SAMPLE_FMT_DBL, pcm_f64le, "PCM 64-bit floating point little-endian");
604 PCM_DECODER(PCM_LXF, AV_SAMPLE_FMT_S32P,pcm_lxf, "PCM signed 20-bit little-endian planar");
605 PCM_CODEC (PCM_MULAW, AV_SAMPLE_FMT_S16, pcm_mulaw, "PCM mu-law / G.711 mu-law");
606 PCM_CODEC (PCM_S8, AV_SAMPLE_FMT_U8, pcm_s8, "PCM signed 8-bit");
607 PCM_CODEC (PCM_S8_PLANAR, AV_SAMPLE_FMT_U8P, pcm_s8_planar, "PCM signed 8-bit planar");
608 PCM_CODEC (PCM_S16BE, AV_SAMPLE_FMT_S16, pcm_s16be, "PCM signed 16-bit big-endian");
609 PCM_CODEC (PCM_S16BE_PLANAR, AV_SAMPLE_FMT_S16P,pcm_s16be_planar, "PCM signed 16-bit big-endian planar");
610 PCM_CODEC (PCM_S16LE, AV_SAMPLE_FMT_S16, pcm_s16le, "PCM signed 16-bit little-endian");
611 PCM_CODEC (PCM_S16LE_PLANAR, AV_SAMPLE_FMT_S16P,pcm_s16le_planar, "PCM signed 16-bit little-endian planar");
612 PCM_CODEC (PCM_S24BE, AV_SAMPLE_FMT_S32, pcm_s24be, "PCM signed 24-bit big-endian");
613 PCM_CODEC (PCM_S24DAUD, AV_SAMPLE_FMT_S16, pcm_s24daud, "PCM D-Cinema audio signed 24-bit");
614 PCM_CODEC (PCM_S24LE, AV_SAMPLE_FMT_S32, pcm_s24le, "PCM signed 24-bit little-endian");
615 PCM_CODEC (PCM_S24LE_PLANAR, AV_SAMPLE_FMT_S32P,pcm_s24le_planar, "PCM signed 24-bit little-endian planar");
616 PCM_CODEC (PCM_S32BE, AV_SAMPLE_FMT_S32, pcm_s32be, "PCM signed 32-bit big-endian");
617 PCM_CODEC (PCM_S32LE, AV_SAMPLE_FMT_S32, pcm_s32le, "PCM signed 32-bit little-endian");
618 PCM_CODEC (PCM_S32LE_PLANAR, AV_SAMPLE_FMT_S32P,pcm_s32le_planar, "PCM signed 32-bit little-endian planar");
619 PCM_CODEC (PCM_U8, AV_SAMPLE_FMT_U8, pcm_u8, "PCM unsigned 8-bit");
620 PCM_CODEC (PCM_U16BE, AV_SAMPLE_FMT_S16, pcm_u16be, "PCM unsigned 16-bit big-endian");
621 PCM_CODEC (PCM_U16LE, AV_SAMPLE_FMT_S16, pcm_u16le, "PCM unsigned 16-bit little-endian");
622 PCM_CODEC (PCM_U24BE, AV_SAMPLE_FMT_S32, pcm_u24be, "PCM unsigned 24-bit big-endian");
623 PCM_CODEC (PCM_U24LE, AV_SAMPLE_FMT_S32, pcm_u24le, "PCM unsigned 24-bit little-endian");
624 PCM_CODEC (PCM_U32BE, AV_SAMPLE_FMT_S32, pcm_u32be, "PCM unsigned 32-bit big-endian");
625 PCM_CODEC (PCM_U32LE, AV_SAMPLE_FMT_S32, pcm_u32le, "PCM unsigned 32-bit little-endian");
626 PCM_DECODER(PCM_ZORK, AV_SAMPLE_FMT_U8, pcm_zork, "PCM Zork");
627 PCM_CODEC (PCM_S64BE, AV_SAMPLE_FMT_S64, pcm_s64be, "PCM signed 64-bit big-endian");
628 PCM_CODEC (PCM_S64LE, AV_SAMPLE_FMT_S64, pcm_s64le, "PCM signed 64-bit little-endian");
629 PCM_CODEC (PCM_VIDC, AV_SAMPLE_FMT_S16, pcm_vidc, "PCM Archimedes VIDC");