00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00027 #include "libavutil/attributes.h"
00028 #include "avcodec.h"
00029 #include "bytestream.h"
00030 #include "internal.h"
00031 #include "mathops.h"
00032 #include "pcm_tablegen.h"
00033
00034 static av_cold int pcm_encode_init(AVCodecContext *avctx)
00035 {
00036 avctx->frame_size = 0;
00037 switch (avctx->codec->id) {
00038 case AV_CODEC_ID_PCM_ALAW:
00039 pcm_alaw_tableinit();
00040 break;
00041 case AV_CODEC_ID_PCM_MULAW:
00042 pcm_ulaw_tableinit();
00043 break;
00044 default:
00045 break;
00046 }
00047
00048 avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id);
00049 avctx->block_align = avctx->channels * avctx->bits_per_coded_sample / 8;
00050 avctx->bit_rate = avctx->block_align * avctx->sample_rate * 8;
00051 avctx->coded_frame = avcodec_alloc_frame();
00052 if (!avctx->coded_frame)
00053 return AVERROR(ENOMEM);
00054
00055 return 0;
00056 }
00057
00058 static av_cold int pcm_encode_close(AVCodecContext *avctx)
00059 {
00060 av_freep(&avctx->coded_frame);
00061
00062 return 0;
00063 }
00064
00075 #define ENCODE(type, endian, src, dst, n, shift, offset) \
00076 samples_ ## type = (const type *) src; \
00077 for (; n > 0; n--) { \
00078 register type v = (*samples_ ## type++ >> shift) + offset; \
00079 bytestream_put_ ## endian(&dst, v); \
00080 }
00081
00082 #define ENCODE_PLANAR(type, endian, dst, n, shift, offset) \
00083 n /= avctx->channels; \
00084 for (c = 0; c < avctx->channels; c++) { \
00085 int i; \
00086 samples_ ## type = (const type *) frame->extended_data[c]; \
00087 for (i = n; i > 0; i--) { \
00088 register type v = (*samples_ ## type++ >> shift) + offset; \
00089 bytestream_put_ ## endian(&dst, v); \
00090 } \
00091 }
00092
00093 static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
00094 const AVFrame *frame, int *got_packet_ptr)
00095 {
00096 int n, c, sample_size, v, ret;
00097 const short *samples;
00098 unsigned char *dst;
00099 const uint8_t *samples_uint8_t;
00100 const int16_t *samples_int16_t;
00101 const int32_t *samples_int32_t;
00102 const int64_t *samples_int64_t;
00103 const uint16_t *samples_uint16_t;
00104 const uint32_t *samples_uint32_t;
00105
00106 sample_size = av_get_bits_per_sample(avctx->codec->id) / 8;
00107 n = frame->nb_samples * avctx->channels;
00108 samples = (const short *)frame->data[0];
00109
00110 if ((ret = ff_alloc_packet2(avctx, avpkt, n * sample_size)))
00111 return ret;
00112 dst = avpkt->data;
00113
00114 switch (avctx->codec->id) {
00115 case AV_CODEC_ID_PCM_U32LE:
00116 ENCODE(uint32_t, le32, samples, dst, n, 0, 0x80000000)
00117 break;
00118 case AV_CODEC_ID_PCM_U32BE:
00119 ENCODE(uint32_t, be32, samples, dst, n, 0, 0x80000000)
00120 break;
00121 case AV_CODEC_ID_PCM_S24LE:
00122 ENCODE(int32_t, le24, samples, dst, n, 8, 0)
00123 break;
00124 case AV_CODEC_ID_PCM_S24LE_PLANAR:
00125 ENCODE_PLANAR(int32_t, le24, dst, n, 8, 0)
00126 break;
00127 case AV_CODEC_ID_PCM_S24BE:
00128 ENCODE(int32_t, be24, samples, dst, n, 8, 0)
00129 break;
00130 case AV_CODEC_ID_PCM_U24LE:
00131 ENCODE(uint32_t, le24, samples, dst, n, 8, 0x800000)
00132 break;
00133 case AV_CODEC_ID_PCM_U24BE:
00134 ENCODE(uint32_t, be24, samples, dst, n, 8, 0x800000)
00135 break;
00136 case AV_CODEC_ID_PCM_S24DAUD:
00137 for (; n > 0; n--) {
00138 uint32_t tmp = ff_reverse[(*samples >> 8) & 0xff] +
00139 (ff_reverse[*samples & 0xff] << 8);
00140 tmp <<= 4;
00141 bytestream_put_be24(&dst, tmp);
00142 samples++;
00143 }
00144 break;
00145 case AV_CODEC_ID_PCM_U16LE:
00146 ENCODE(uint16_t, le16, samples, dst, n, 0, 0x8000)
00147 break;
00148 case AV_CODEC_ID_PCM_U16BE:
00149 ENCODE(uint16_t, be16, samples, dst, n, 0, 0x8000)
00150 break;
00151 case AV_CODEC_ID_PCM_S8:
00152 ENCODE(uint8_t, byte, samples, dst, n, 0, -128)
00153 break;
00154 case AV_CODEC_ID_PCM_S8_PLANAR:
00155 ENCODE_PLANAR(uint8_t, byte, dst, n, 0, -128)
00156 break;
00157 #if HAVE_BIGENDIAN
00158 case AV_CODEC_ID_PCM_F64LE:
00159 ENCODE(int64_t, le64, samples, dst, n, 0, 0)
00160 break;
00161 case AV_CODEC_ID_PCM_S32LE:
00162 case AV_CODEC_ID_PCM_F32LE:
00163 ENCODE(int32_t, le32, samples, dst, n, 0, 0)
00164 break;
00165 case AV_CODEC_ID_PCM_S32LE_PLANAR:
00166 ENCODE_PLANAR(int32_t, le32, dst, n, 0, 0)
00167 break;
00168 case AV_CODEC_ID_PCM_S16LE:
00169 ENCODE(int16_t, le16, samples, dst, n, 0, 0)
00170 break;
00171 case AV_CODEC_ID_PCM_S16LE_PLANAR:
00172 ENCODE_PLANAR(int16_t, le16, dst, n, 0, 0)
00173 break;
00174 case AV_CODEC_ID_PCM_F64BE:
00175 case AV_CODEC_ID_PCM_F32BE:
00176 case AV_CODEC_ID_PCM_S32BE:
00177 case AV_CODEC_ID_PCM_S16BE:
00178 #else
00179 case AV_CODEC_ID_PCM_F64BE:
00180 ENCODE(int64_t, be64, samples, dst, n, 0, 0)
00181 break;
00182 case AV_CODEC_ID_PCM_F32BE:
00183 case AV_CODEC_ID_PCM_S32BE:
00184 ENCODE(int32_t, be32, samples, dst, n, 0, 0)
00185 break;
00186 case AV_CODEC_ID_PCM_S16BE:
00187 ENCODE(int16_t, be16, samples, dst, n, 0, 0)
00188 break;
00189 case AV_CODEC_ID_PCM_S16BE_PLANAR:
00190 ENCODE_PLANAR(int16_t, be16, dst, n, 0, 0)
00191 break;
00192 case AV_CODEC_ID_PCM_F64LE:
00193 case AV_CODEC_ID_PCM_F32LE:
00194 case AV_CODEC_ID_PCM_S32LE:
00195 case AV_CODEC_ID_PCM_S16LE:
00196 #endif
00197 case AV_CODEC_ID_PCM_U8:
00198 memcpy(dst, samples, n * sample_size);
00199 break;
00200 #if HAVE_BIGENDIAN
00201 case AV_CODEC_ID_PCM_S16BE_PLANAR:
00202 #else
00203 case AV_CODEC_ID_PCM_S16LE_PLANAR:
00204 case AV_CODEC_ID_PCM_S32LE_PLANAR:
00205 #endif
00206 n /= avctx->channels;
00207 for (c = 0; c < avctx->channels; c++) {
00208 const uint8_t *src = frame->extended_data[c];
00209 bytestream_put_buffer(&dst, src, n * sample_size);
00210 }
00211 break;
00212 case AV_CODEC_ID_PCM_ALAW:
00213 for (; n > 0; n--) {
00214 v = *samples++;
00215 *dst++ = linear_to_alaw[(v + 32768) >> 2];
00216 }
00217 break;
00218 case AV_CODEC_ID_PCM_MULAW:
00219 for (; n > 0; n--) {
00220 v = *samples++;
00221 *dst++ = linear_to_ulaw[(v + 32768) >> 2];
00222 }
00223 break;
00224 default:
00225 return -1;
00226 }
00227
00228 *got_packet_ptr = 1;
00229 return 0;
00230 }
00231
00232 typedef struct PCMDecode {
00233 AVFrame frame;
00234 short table[256];
00235 } PCMDecode;
00236
00237 static av_cold int pcm_decode_init(AVCodecContext *avctx)
00238 {
00239 PCMDecode *s = avctx->priv_data;
00240 int i;
00241
00242 if (avctx->channels <= 0) {
00243 av_log(avctx, AV_LOG_ERROR, "PCM channels out of bounds\n");
00244 return AVERROR(EINVAL);
00245 }
00246
00247 switch (avctx->codec_id) {
00248 case AV_CODEC_ID_PCM_ALAW:
00249 for (i = 0; i < 256; i++)
00250 s->table[i] = alaw2linear(i);
00251 break;
00252 case AV_CODEC_ID_PCM_MULAW:
00253 for (i = 0; i < 256; i++)
00254 s->table[i] = ulaw2linear(i);
00255 break;
00256 default:
00257 break;
00258 }
00259
00260 avctx->sample_fmt = avctx->codec->sample_fmts[0];
00261
00262 if (avctx->sample_fmt == AV_SAMPLE_FMT_S32)
00263 avctx->bits_per_raw_sample = av_get_bits_per_sample(avctx->codec_id);
00264
00265 avcodec_get_frame_defaults(&s->frame);
00266 avctx->coded_frame = &s->frame;
00267
00268 return 0;
00269 }
00270
00281 #define DECODE(size, endian, src, dst, n, shift, offset) \
00282 for (; n > 0; n--) { \
00283 uint ## size ## _t v = bytestream_get_ ## endian(&src); \
00284 AV_WN ## size ## A(dst, (v - offset) << shift); \
00285 dst += size / 8; \
00286 }
00287
00288 #define DECODE_PLANAR(size, endian, src, dst, n, shift, offset) \
00289 n /= avctx->channels; \
00290 for (c = 0; c < avctx->channels; c++) { \
00291 int i; \
00292 dst = s->frame.extended_data[c]; \
00293 for (i = n; i > 0; i--) { \
00294 uint ## size ## _t v = bytestream_get_ ## endian(&src); \
00295 AV_WN ## size ## A(dst, (v - offset) << shift); \
00296 dst += size / 8; \
00297 } \
00298 }
00299
00300 static int pcm_decode_frame(AVCodecContext *avctx, void *data,
00301 int *got_frame_ptr, AVPacket *avpkt)
00302 {
00303 const uint8_t *src = avpkt->data;
00304 int buf_size = avpkt->size;
00305 PCMDecode *s = avctx->priv_data;
00306 int sample_size, c, n, ret, samples_per_block;
00307 uint8_t *samples;
00308 int32_t *dst_int32_t;
00309
00310 sample_size = av_get_bits_per_sample(avctx->codec_id) / 8;
00311
00312
00313 samples_per_block = 1;
00314 if (AV_CODEC_ID_PCM_DVD == avctx->codec_id) {
00315 if (avctx->bits_per_coded_sample != 20 &&
00316 avctx->bits_per_coded_sample != 24) {
00317 av_log(avctx, AV_LOG_ERROR,
00318 "PCM DVD unsupported sample depth %i\n",
00319 avctx->bits_per_coded_sample);
00320 return AVERROR(EINVAL);
00321 }
00322
00323 samples_per_block = 2;
00324 sample_size = avctx->bits_per_coded_sample * 2 / 8;
00325 } else if (avctx->codec_id == AV_CODEC_ID_PCM_LXF) {
00326
00327 samples_per_block = 2;
00328 sample_size = 5;
00329 }
00330
00331 if (sample_size == 0) {
00332 av_log(avctx, AV_LOG_ERROR, "Invalid sample_size\n");
00333 return AVERROR(EINVAL);
00334 }
00335
00336 if (avctx->channels == 0) {
00337 av_log(avctx, AV_LOG_ERROR, "Invalid number of channels\n");
00338 return AVERROR(EINVAL);
00339 }
00340
00341 if (avctx->codec_id != avctx->codec->id) {
00342 av_log(avctx, AV_LOG_ERROR, "codec ids mismatch\n");
00343 return AVERROR(EINVAL);
00344 }
00345
00346 n = avctx->channels * sample_size;
00347
00348 if (n && buf_size % n) {
00349 if (buf_size < n) {
00350 av_log(avctx, AV_LOG_ERROR,
00351 "Invalid PCM packet, data has size %d but at least a size of %d was expected\n",
00352 buf_size, n);
00353 return AVERROR_INVALIDDATA;
00354 } else
00355 buf_size -= buf_size % n;
00356 }
00357
00358 n = buf_size / sample_size;
00359
00360
00361 s->frame.nb_samples = n * samples_per_block / avctx->channels;
00362 if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
00363 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
00364 return ret;
00365 }
00366 samples = s->frame.data[0];
00367
00368 switch (avctx->codec_id) {
00369 case AV_CODEC_ID_PCM_U32LE:
00370 DECODE(32, le32, src, samples, n, 0, 0x80000000)
00371 break;
00372 case AV_CODEC_ID_PCM_U32BE:
00373 DECODE(32, be32, src, samples, n, 0, 0x80000000)
00374 break;
00375 case AV_CODEC_ID_PCM_S24LE:
00376 DECODE(32, le24, src, samples, n, 8, 0)
00377 break;
00378 case AV_CODEC_ID_PCM_S24LE_PLANAR:
00379 DECODE_PLANAR(32, le24, src, samples, n, 8, 0);
00380 break;
00381 case AV_CODEC_ID_PCM_S24BE:
00382 DECODE(32, be24, src, samples, n, 8, 0)
00383 break;
00384 case AV_CODEC_ID_PCM_U24LE:
00385 DECODE(32, le24, src, samples, n, 8, 0x800000)
00386 break;
00387 case AV_CODEC_ID_PCM_U24BE:
00388 DECODE(32, be24, src, samples, n, 8, 0x800000)
00389 break;
00390 case AV_CODEC_ID_PCM_S24DAUD:
00391 for (; n > 0; n--) {
00392 uint32_t v = bytestream_get_be24(&src);
00393 v >>= 4;
00394 AV_WN16A(samples, ff_reverse[(v >> 8) & 0xff] +
00395 (ff_reverse[v & 0xff] << 8));
00396 samples += 2;
00397 }
00398 break;
00399 case AV_CODEC_ID_PCM_U16LE:
00400 DECODE(16, le16, src, samples, n, 0, 0x8000)
00401 break;
00402 case AV_CODEC_ID_PCM_U16BE:
00403 DECODE(16, be16, src, samples, n, 0, 0x8000)
00404 break;
00405 case AV_CODEC_ID_PCM_S8:
00406 for (; n > 0; n--)
00407 *samples++ = *src++ + 128;
00408 break;
00409 case AV_CODEC_ID_PCM_S8_PLANAR:
00410 n /= avctx->channels;
00411 for (c = 0; c < avctx->channels; c++) {
00412 int i;
00413 samples = s->frame.extended_data[c];
00414 for (i = n; i > 0; i--)
00415 *samples++ = *src++ + 128;
00416 }
00417 break;
00418 #if HAVE_BIGENDIAN
00419 case AV_CODEC_ID_PCM_F64LE:
00420 DECODE(64, le64, src, samples, n, 0, 0)
00421 break;
00422 case AV_CODEC_ID_PCM_S32LE:
00423 case AV_CODEC_ID_PCM_F32LE:
00424 DECODE(32, le32, src, samples, n, 0, 0)
00425 break;
00426 case AV_CODEC_ID_PCM_S32LE_PLANAR:
00427 DECODE_PLANAR(32, le32, src, samples, n, 0, 0);
00428 break;
00429 case AV_CODEC_ID_PCM_S16LE:
00430 DECODE(16, le16, src, samples, n, 0, 0)
00431 break;
00432 case AV_CODEC_ID_PCM_S16LE_PLANAR:
00433 DECODE_PLANAR(16, le16, src, samples, n, 0, 0);
00434 break;
00435 case AV_CODEC_ID_PCM_F64BE:
00436 case AV_CODEC_ID_PCM_F32BE:
00437 case AV_CODEC_ID_PCM_S32BE:
00438 case AV_CODEC_ID_PCM_S16BE:
00439 #else
00440 case AV_CODEC_ID_PCM_F64BE:
00441 DECODE(64, be64, src, samples, n, 0, 0)
00442 break;
00443 case AV_CODEC_ID_PCM_F32BE:
00444 case AV_CODEC_ID_PCM_S32BE:
00445 DECODE(32, be32, src, samples, n, 0, 0)
00446 break;
00447 case AV_CODEC_ID_PCM_S16BE:
00448 DECODE(16, be16, src, samples, n, 0, 0)
00449 break;
00450 case AV_CODEC_ID_PCM_S16BE_PLANAR:
00451 DECODE_PLANAR(16, be16, src, samples, n, 0, 0);
00452 break;
00453 case AV_CODEC_ID_PCM_F64LE:
00454 case AV_CODEC_ID_PCM_F32LE:
00455 case AV_CODEC_ID_PCM_S32LE:
00456 case AV_CODEC_ID_PCM_S16LE:
00457 #endif
00458 case AV_CODEC_ID_PCM_U8:
00459 memcpy(samples, src, n * sample_size);
00460 break;
00461 #if HAVE_BIGENDIAN
00462 case AV_CODEC_ID_PCM_S16BE_PLANAR:
00463 #else
00464 case AV_CODEC_ID_PCM_S16LE_PLANAR:
00465 case AV_CODEC_ID_PCM_S32LE_PLANAR:
00466 #endif
00467 n /= avctx->channels;
00468 for (c = 0; c < avctx->channels; c++) {
00469 samples = s->frame.extended_data[c];
00470 bytestream_get_buffer(&src, samples, n * sample_size);
00471 }
00472 break;
00473 case AV_CODEC_ID_PCM_ZORK:
00474 for (; n > 0; n--) {
00475 int v = *src++;
00476 if (v < 128)
00477 v = 128 - v;
00478 *samples++ = v;
00479 }
00480 break;
00481 case AV_CODEC_ID_PCM_ALAW:
00482 case AV_CODEC_ID_PCM_MULAW:
00483 for (; n > 0; n--) {
00484 AV_WN16A(samples, s->table[*src++]);
00485 samples += 2;
00486 }
00487 break;
00488 case AV_CODEC_ID_PCM_DVD:
00489 {
00490 const uint8_t *src8;
00491 dst_int32_t = (int32_t *)s->frame.data[0];
00492 n /= avctx->channels;
00493 switch (avctx->bits_per_coded_sample) {
00494 case 20:
00495 while (n--) {
00496 c = avctx->channels;
00497 src8 = src + 4 * c;
00498 while (c--) {
00499 *dst_int32_t++ = (bytestream_get_be16(&src) << 16) + ((*src8 & 0xf0) << 8);
00500 *dst_int32_t++ = (bytestream_get_be16(&src) << 16) + ((*src8++ & 0x0f) << 12);
00501 }
00502 src = src8;
00503 }
00504 break;
00505 case 24:
00506 while (n--) {
00507 c = avctx->channels;
00508 src8 = src + 4 * c;
00509 while (c--) {
00510 *dst_int32_t++ = (bytestream_get_be16(&src) << 16) + ((*src8++) << 8);
00511 *dst_int32_t++ = (bytestream_get_be16(&src) << 16) + ((*src8++) << 8);
00512 }
00513 src = src8;
00514 }
00515 break;
00516 }
00517 break;
00518 }
00519 case AV_CODEC_ID_PCM_LXF:
00520 {
00521 int i;
00522 n /= avctx->channels;
00523 for (c = 0; c < avctx->channels; c++) {
00524 dst_int32_t = (int32_t *)s->frame.extended_data[c];
00525 for (i = 0; i < n; i++) {
00526
00527 *dst_int32_t++ = (src[2] << 28) |
00528 (src[1] << 20) |
00529 (src[0] << 12) |
00530 ((src[2] & 0x0F) << 8) |
00531 src[1];
00532
00533 *dst_int32_t++ = (src[4] << 24) |
00534 (src[3] << 16) |
00535 ((src[2] & 0xF0) << 8) |
00536 (src[4] << 4) |
00537 (src[3] >> 4);
00538 src += 5;
00539 }
00540 }
00541 break;
00542 }
00543 default:
00544 return -1;
00545 }
00546
00547 *got_frame_ptr = 1;
00548 *(AVFrame *)data = s->frame;
00549
00550 return buf_size;
00551 }
00552
00553 #define PCM_ENCODER_0(id_, sample_fmt_, name_, long_name_)
00554 #define PCM_ENCODER_1(id_, sample_fmt_, name_, long_name_) \
00555 AVCodec ff_ ## name_ ## _encoder = { \
00556 .name = #name_, \
00557 .type = AVMEDIA_TYPE_AUDIO, \
00558 .id = AV_CODEC_ID_ ## id_, \
00559 .init = pcm_encode_init, \
00560 .encode2 = pcm_encode_frame, \
00561 .close = pcm_encode_close, \
00562 .capabilities = CODEC_CAP_VARIABLE_FRAME_SIZE, \
00563 .sample_fmts = (const enum AVSampleFormat[]){ sample_fmt_, \
00564 AV_SAMPLE_FMT_NONE }, \
00565 .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
00566 }
00567
00568 #define PCM_ENCODER_2(cf, id, sample_fmt, name, long_name) \
00569 PCM_ENCODER_ ## cf(id, sample_fmt, name, long_name)
00570 #define PCM_ENCODER_3(cf, id, sample_fmt, name, long_name) \
00571 PCM_ENCODER_2(cf, id, sample_fmt, name, long_name)
00572 #define PCM_ENCODER(id, sample_fmt, name, long_name) \
00573 PCM_ENCODER_3(CONFIG_ ## id ## _ENCODER, id, sample_fmt, name, long_name)
00574
00575 #define PCM_DECODER_0(id, sample_fmt, name, long_name)
00576 #define PCM_DECODER_1(id_, sample_fmt_, name_, long_name_) \
00577 AVCodec ff_ ## name_ ## _decoder = { \
00578 .name = #name_, \
00579 .type = AVMEDIA_TYPE_AUDIO, \
00580 .id = AV_CODEC_ID_ ## id_, \
00581 .priv_data_size = sizeof(PCMDecode), \
00582 .init = pcm_decode_init, \
00583 .decode = pcm_decode_frame, \
00584 .capabilities = CODEC_CAP_DR1, \
00585 .sample_fmts = (const enum AVSampleFormat[]){ sample_fmt_, \
00586 AV_SAMPLE_FMT_NONE }, \
00587 .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
00588 }
00589
00590 #define PCM_DECODER_2(cf, id, sample_fmt, name, long_name) \
00591 PCM_DECODER_ ## cf(id, sample_fmt, name, long_name)
00592 #define PCM_DECODER_3(cf, id, sample_fmt, name, long_name) \
00593 PCM_DECODER_2(cf, id, sample_fmt, name, long_name)
00594 #define PCM_DECODER(id, sample_fmt, name, long_name) \
00595 PCM_DECODER_3(CONFIG_ ## id ## _DECODER, id, sample_fmt, name, long_name)
00596
00597 #define PCM_CODEC(id, sample_fmt_, name, long_name_) \
00598 PCM_ENCODER(id, sample_fmt_, name, long_name_); \
00599 PCM_DECODER(id, sample_fmt_, name, long_name_)
00600
00601
00602 PCM_CODEC (PCM_ALAW, AV_SAMPLE_FMT_S16, pcm_alaw, "PCM A-law / G.711 A-law");
00603 PCM_DECODER(PCM_DVD, AV_SAMPLE_FMT_S32, pcm_dvd, "PCM signed 20|24-bit big-endian");
00604 PCM_CODEC (PCM_F32BE, AV_SAMPLE_FMT_FLT, pcm_f32be, "PCM 32-bit floating point big-endian");
00605 PCM_CODEC (PCM_F32LE, AV_SAMPLE_FMT_FLT, pcm_f32le, "PCM 32-bit floating point little-endian");
00606 PCM_CODEC (PCM_F64BE, AV_SAMPLE_FMT_DBL, pcm_f64be, "PCM 64-bit floating point big-endian");
00607 PCM_CODEC (PCM_F64LE, AV_SAMPLE_FMT_DBL, pcm_f64le, "PCM 64-bit floating point little-endian");
00608 PCM_DECODER(PCM_LXF, AV_SAMPLE_FMT_S32P,pcm_lxf, "PCM signed 20-bit little-endian planar");
00609 PCM_CODEC (PCM_MULAW, AV_SAMPLE_FMT_S16, pcm_mulaw, "PCM mu-law / G.711 mu-law");
00610 PCM_CODEC (PCM_S8, AV_SAMPLE_FMT_U8, pcm_s8, "PCM signed 8-bit");
00611 PCM_CODEC (PCM_S8_PLANAR, AV_SAMPLE_FMT_U8P, pcm_s8_planar, "PCM signed 8-bit planar");
00612 PCM_CODEC (PCM_S16BE, AV_SAMPLE_FMT_S16, pcm_s16be, "PCM signed 16-bit big-endian");
00613 PCM_CODEC (PCM_S16BE_PLANAR, AV_SAMPLE_FMT_S16P,pcm_s16be_planar, "PCM signed 16-bit big-endian planar");
00614 PCM_CODEC (PCM_S16LE, AV_SAMPLE_FMT_S16, pcm_s16le, "PCM signed 16-bit little-endian");
00615 PCM_CODEC (PCM_S16LE_PLANAR, AV_SAMPLE_FMT_S16P,pcm_s16le_planar, "PCM signed 16-bit little-endian planar");
00616 PCM_CODEC (PCM_S24BE, AV_SAMPLE_FMT_S32, pcm_s24be, "PCM signed 24-bit big-endian");
00617 PCM_CODEC (PCM_S24DAUD, AV_SAMPLE_FMT_S16, pcm_s24daud, "PCM D-Cinema audio signed 24-bit");
00618 PCM_CODEC (PCM_S24LE, AV_SAMPLE_FMT_S32, pcm_s24le, "PCM signed 24-bit little-endian");
00619 PCM_CODEC (PCM_S24LE_PLANAR, AV_SAMPLE_FMT_S32P,pcm_s24le_planar, "PCM signed 24-bit little-endian planar");
00620 PCM_CODEC (PCM_S32BE, AV_SAMPLE_FMT_S32, pcm_s32be, "PCM signed 32-bit big-endian");
00621 PCM_CODEC (PCM_S32LE, AV_SAMPLE_FMT_S32, pcm_s32le, "PCM signed 32-bit little-endian");
00622 PCM_CODEC (PCM_S32LE_PLANAR, AV_SAMPLE_FMT_S32P,pcm_s32le_planar, "PCM signed 32-bit little-endian planar");
00623 PCM_CODEC (PCM_U8, AV_SAMPLE_FMT_U8, pcm_u8, "PCM unsigned 8-bit");
00624 PCM_CODEC (PCM_U16BE, AV_SAMPLE_FMT_S16, pcm_u16be, "PCM unsigned 16-bit big-endian");
00625 PCM_CODEC (PCM_U16LE, AV_SAMPLE_FMT_S16, pcm_u16le, "PCM unsigned 16-bit little-endian");
00626 PCM_CODEC (PCM_U24BE, AV_SAMPLE_FMT_S32, pcm_u24be, "PCM unsigned 24-bit big-endian");
00627 PCM_CODEC (PCM_U24LE, AV_SAMPLE_FMT_S32, pcm_u24le, "PCM unsigned 24-bit little-endian");
00628 PCM_CODEC (PCM_U32BE, AV_SAMPLE_FMT_S32, pcm_u32be, "PCM unsigned 32-bit big-endian");
00629 PCM_CODEC (PCM_U32LE, AV_SAMPLE_FMT_S32, pcm_u32le, "PCM unsigned 32-bit little-endian");
00630 PCM_DECODER(PCM_ZORK, AV_SAMPLE_FMT_U8, pcm_zork, "PCM Zork");
00631