You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

544 lines
19KB

  1. /*
  2. * PCM codecs
  3. * Copyright (c) 2001 Fabrice Bellard
  4. *
  5. * This file is part of FFmpeg.
  6. *
  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.
  11. *
  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.
  16. *
  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
  20. */
  21. /**
  22. * @file
  23. * PCM codecs
  24. */
  25. #include "libavutil/common.h" /* for av_reverse */
  26. #include "avcodec.h"
  27. #include "bytestream.h"
  28. #include "internal.h"
  29. #include "pcm_tablegen.h"
  30. #define MAX_CHANNELS 64
  31. static av_cold int pcm_encode_init(AVCodecContext *avctx)
  32. {
  33. avctx->frame_size = 0;
  34. switch (avctx->codec->id) {
  35. case CODEC_ID_PCM_ALAW:
  36. pcm_alaw_tableinit();
  37. break;
  38. case CODEC_ID_PCM_MULAW:
  39. pcm_ulaw_tableinit();
  40. break;
  41. default:
  42. break;
  43. }
  44. avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id);
  45. avctx->block_align = avctx->channels * avctx->bits_per_coded_sample / 8;
  46. avctx->coded_frame = avcodec_alloc_frame();
  47. if (!avctx->coded_frame)
  48. return AVERROR(ENOMEM);
  49. return 0;
  50. }
  51. static av_cold int pcm_encode_close(AVCodecContext *avctx)
  52. {
  53. av_freep(&avctx->coded_frame);
  54. return 0;
  55. }
  56. /**
  57. * Write PCM samples macro
  58. * @param type Datatype of native machine format
  59. * @param endian bytestream_put_xxx() suffix
  60. * @param src Source pointer (variable name)
  61. * @param dst Destination pointer (variable name)
  62. * @param n Total number of samples (variable name)
  63. * @param shift Bitshift (bits)
  64. * @param offset Sample value offset
  65. */
  66. #define ENCODE(type, endian, src, dst, n, shift, offset) \
  67. samples_ ## type = (const type *) src; \
  68. for (; n > 0; n--) { \
  69. register type v = (*samples_ ## type++ >> shift) + offset; \
  70. bytestream_put_ ## endian(&dst, v); \
  71. }
  72. static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
  73. const AVFrame *frame, int *got_packet_ptr)
  74. {
  75. int n, sample_size, v, ret;
  76. const short *samples;
  77. unsigned char *dst;
  78. const uint8_t *srcu8;
  79. const int16_t *samples_int16_t;
  80. const int32_t *samples_int32_t;
  81. const int64_t *samples_int64_t;
  82. const uint16_t *samples_uint16_t;
  83. const uint32_t *samples_uint32_t;
  84. sample_size = av_get_bits_per_sample(avctx->codec->id) / 8;
  85. n = frame->nb_samples * avctx->channels;
  86. samples = (const short *)frame->data[0];
  87. if ((ret = ff_alloc_packet2(avctx, avpkt, n * sample_size)))
  88. return ret;
  89. dst = avpkt->data;
  90. switch (avctx->codec->id) {
  91. case CODEC_ID_PCM_U32LE:
  92. ENCODE(uint32_t, le32, samples, dst, n, 0, 0x80000000)
  93. break;
  94. case CODEC_ID_PCM_U32BE:
  95. ENCODE(uint32_t, be32, samples, dst, n, 0, 0x80000000)
  96. break;
  97. case CODEC_ID_PCM_S24LE:
  98. ENCODE(int32_t, le24, samples, dst, n, 8, 0)
  99. break;
  100. case CODEC_ID_PCM_S24BE:
  101. ENCODE(int32_t, be24, samples, dst, n, 8, 0)
  102. break;
  103. case CODEC_ID_PCM_U24LE:
  104. ENCODE(uint32_t, le24, samples, dst, n, 8, 0x800000)
  105. break;
  106. case CODEC_ID_PCM_U24BE:
  107. ENCODE(uint32_t, be24, samples, dst, n, 8, 0x800000)
  108. break;
  109. case CODEC_ID_PCM_S24DAUD:
  110. for (; n > 0; n--) {
  111. uint32_t tmp = av_reverse[(*samples >> 8) & 0xff] +
  112. (av_reverse[*samples & 0xff] << 8);
  113. tmp <<= 4; // sync flags would go here
  114. bytestream_put_be24(&dst, tmp);
  115. samples++;
  116. }
  117. break;
  118. case CODEC_ID_PCM_U16LE:
  119. ENCODE(uint16_t, le16, samples, dst, n, 0, 0x8000)
  120. break;
  121. case CODEC_ID_PCM_U16BE:
  122. ENCODE(uint16_t, be16, samples, dst, n, 0, 0x8000)
  123. break;
  124. case CODEC_ID_PCM_S8:
  125. srcu8 = frame->data[0];
  126. for (; n > 0; n--) {
  127. v = *srcu8++;
  128. *dst++ = v - 128;
  129. }
  130. break;
  131. #if HAVE_BIGENDIAN
  132. case CODEC_ID_PCM_F64LE:
  133. ENCODE(int64_t, le64, samples, dst, n, 0, 0)
  134. break;
  135. case CODEC_ID_PCM_S32LE:
  136. case CODEC_ID_PCM_F32LE:
  137. ENCODE(int32_t, le32, samples, dst, n, 0, 0)
  138. break;
  139. case CODEC_ID_PCM_S16LE:
  140. ENCODE(int16_t, le16, samples, dst, n, 0, 0)
  141. break;
  142. case CODEC_ID_PCM_F64BE:
  143. case CODEC_ID_PCM_F32BE:
  144. case CODEC_ID_PCM_S32BE:
  145. case CODEC_ID_PCM_S16BE:
  146. #else
  147. case CODEC_ID_PCM_F64BE:
  148. ENCODE(int64_t, be64, samples, dst, n, 0, 0)
  149. break;
  150. case CODEC_ID_PCM_F32BE:
  151. case CODEC_ID_PCM_S32BE:
  152. ENCODE(int32_t, be32, samples, dst, n, 0, 0)
  153. break;
  154. case CODEC_ID_PCM_S16BE:
  155. ENCODE(int16_t, be16, samples, dst, n, 0, 0)
  156. break;
  157. case CODEC_ID_PCM_F64LE:
  158. case CODEC_ID_PCM_F32LE:
  159. case CODEC_ID_PCM_S32LE:
  160. case CODEC_ID_PCM_S16LE:
  161. #endif /* HAVE_BIGENDIAN */
  162. case CODEC_ID_PCM_U8:
  163. memcpy(dst, samples, n * sample_size);
  164. dst += n * sample_size;
  165. break;
  166. case CODEC_ID_PCM_ALAW:
  167. for (; n > 0; n--) {
  168. v = *samples++;
  169. *dst++ = linear_to_alaw[(v + 32768) >> 2];
  170. }
  171. break;
  172. case CODEC_ID_PCM_MULAW:
  173. for (; n > 0; n--) {
  174. v = *samples++;
  175. *dst++ = linear_to_ulaw[(v + 32768) >> 2];
  176. }
  177. break;
  178. default:
  179. return -1;
  180. }
  181. *got_packet_ptr = 1;
  182. return 0;
  183. }
  184. typedef struct PCMDecode {
  185. AVFrame frame;
  186. short table[256];
  187. } PCMDecode;
  188. static av_cold int pcm_decode_init(AVCodecContext *avctx)
  189. {
  190. PCMDecode *s = avctx->priv_data;
  191. int i;
  192. if (avctx->channels <= 0 || avctx->channels > MAX_CHANNELS) {
  193. av_log(avctx, AV_LOG_ERROR, "PCM channels out of bounds\n");
  194. return AVERROR(EINVAL);
  195. }
  196. switch (avctx->codec->id) {
  197. case CODEC_ID_PCM_ALAW:
  198. for (i = 0; i < 256; i++)
  199. s->table[i] = alaw2linear(i);
  200. break;
  201. case CODEC_ID_PCM_MULAW:
  202. for (i = 0; i < 256; i++)
  203. s->table[i] = ulaw2linear(i);
  204. break;
  205. default:
  206. break;
  207. }
  208. avctx->sample_fmt = avctx->codec->sample_fmts[0];
  209. if (avctx->sample_fmt == AV_SAMPLE_FMT_S32)
  210. avctx->bits_per_raw_sample = av_get_bits_per_sample(avctx->codec->id);
  211. avcodec_get_frame_defaults(&s->frame);
  212. avctx->coded_frame = &s->frame;
  213. return 0;
  214. }
  215. /**
  216. * Read PCM samples macro
  217. * @param size Data size of native machine format
  218. * @param endian bytestream_get_xxx() endian suffix
  219. * @param src Source pointer (variable name)
  220. * @param dst Destination pointer (variable name)
  221. * @param n Total number of samples (variable name)
  222. * @param shift Bitshift (bits)
  223. * @param offset Sample value offset
  224. */
  225. #define DECODE(size, endian, src, dst, n, shift, offset) \
  226. for (; n > 0; n--) { \
  227. uint ## size ## _t v = bytestream_get_ ## endian(&src); \
  228. AV_WN ## size ## A(dst, (v - offset) << shift); \
  229. dst += size / 8; \
  230. }
  231. static int pcm_decode_frame(AVCodecContext *avctx, void *data,
  232. int *got_frame_ptr, AVPacket *avpkt)
  233. {
  234. const uint8_t *src = avpkt->data;
  235. int buf_size = avpkt->size;
  236. PCMDecode *s = avctx->priv_data;
  237. int sample_size, c, n, ret, samples_per_block;
  238. uint8_t *samples;
  239. int32_t *dst_int32_t;
  240. sample_size = av_get_bits_per_sample(avctx->codec_id) / 8;
  241. /* av_get_bits_per_sample returns 0 for CODEC_ID_PCM_DVD */
  242. samples_per_block = 1;
  243. if (CODEC_ID_PCM_DVD == avctx->codec_id) {
  244. if (avctx->bits_per_coded_sample != 20 &&
  245. avctx->bits_per_coded_sample != 24) {
  246. av_log(avctx, AV_LOG_ERROR,
  247. "PCM DVD unsupported sample depth %i\n",
  248. avctx->bits_per_coded_sample);
  249. return AVERROR(EINVAL);
  250. }
  251. /* 2 samples are interleaved per block in PCM_DVD */
  252. samples_per_block = 2;
  253. sample_size = avctx->bits_per_coded_sample * 2 / 8;
  254. } else if (avctx->codec_id == CODEC_ID_PCM_LXF) {
  255. /* we process 40-bit blocks per channel for LXF */
  256. samples_per_block = 2;
  257. sample_size = 5;
  258. }
  259. if (sample_size == 0) {
  260. av_log(avctx, AV_LOG_ERROR, "Invalid sample_size\n");
  261. return AVERROR(EINVAL);
  262. }
  263. n = avctx->channels * sample_size;
  264. if (n && buf_size % n) {
  265. if (buf_size < n) {
  266. av_log(avctx, AV_LOG_ERROR, "invalid PCM packet\n");
  267. return -1;
  268. } else
  269. buf_size -= buf_size % n;
  270. }
  271. n = buf_size / sample_size;
  272. /* get output buffer */
  273. s->frame.nb_samples = n * samples_per_block / avctx->channels;
  274. if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
  275. av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
  276. return ret;
  277. }
  278. samples = s->frame.data[0];
  279. switch (avctx->codec->id) {
  280. case CODEC_ID_PCM_U32LE:
  281. DECODE(32, le32, src, samples, n, 0, 0x80000000)
  282. break;
  283. case CODEC_ID_PCM_U32BE:
  284. DECODE(32, be32, src, samples, n, 0, 0x80000000)
  285. break;
  286. case CODEC_ID_PCM_S24LE:
  287. DECODE(32, le24, src, samples, n, 8, 0)
  288. break;
  289. case CODEC_ID_PCM_S24BE:
  290. DECODE(32, be24, src, samples, n, 8, 0)
  291. break;
  292. case CODEC_ID_PCM_U24LE:
  293. DECODE(32, le24, src, samples, n, 8, 0x800000)
  294. break;
  295. case CODEC_ID_PCM_U24BE:
  296. DECODE(32, be24, src, samples, n, 8, 0x800000)
  297. break;
  298. case CODEC_ID_PCM_S24DAUD:
  299. for (; n > 0; n--) {
  300. uint32_t v = bytestream_get_be24(&src);
  301. v >>= 4; // sync flags are here
  302. AV_WN16A(samples, av_reverse[(v >> 8) & 0xff] +
  303. (av_reverse[v & 0xff] << 8));
  304. samples += 2;
  305. }
  306. break;
  307. case CODEC_ID_PCM_S16LE_PLANAR:
  308. {
  309. int i;
  310. n /= avctx->channels;
  311. for (c = 0; c < avctx->channels; c++) {
  312. samples = s->frame.data[c];
  313. for (i = n; i > 0; i--) {
  314. AV_WN16A(samples, bytestream_get_le16(&src));
  315. samples += 2;
  316. }
  317. }
  318. break;
  319. }
  320. case CODEC_ID_PCM_U16LE:
  321. DECODE(16, le16, src, samples, n, 0, 0x8000)
  322. break;
  323. case CODEC_ID_PCM_U16BE:
  324. DECODE(16, be16, src, samples, n, 0, 0x8000)
  325. break;
  326. case CODEC_ID_PCM_S8:
  327. for (; n > 0; n--)
  328. *samples++ = *src++ + 128;
  329. break;
  330. #if HAVE_BIGENDIAN
  331. case CODEC_ID_PCM_F64LE:
  332. DECODE(64, le64, src, samples, n, 0, 0)
  333. break;
  334. case CODEC_ID_PCM_S32LE:
  335. case CODEC_ID_PCM_F32LE:
  336. DECODE(32, le32, src, samples, n, 0, 0)
  337. break;
  338. case CODEC_ID_PCM_S16LE:
  339. DECODE(16, le16, src, samples, n, 0, 0)
  340. break;
  341. case CODEC_ID_PCM_F64BE:
  342. case CODEC_ID_PCM_F32BE:
  343. case CODEC_ID_PCM_S32BE:
  344. case CODEC_ID_PCM_S16BE:
  345. #else
  346. case CODEC_ID_PCM_F64BE:
  347. DECODE(64, be64, src, samples, n, 0, 0)
  348. break;
  349. case CODEC_ID_PCM_F32BE:
  350. case CODEC_ID_PCM_S32BE:
  351. DECODE(32, be32, src, samples, n, 0, 0)
  352. break;
  353. case CODEC_ID_PCM_S16BE:
  354. DECODE(16, be16, src, samples, n, 0, 0)
  355. break;
  356. case CODEC_ID_PCM_F64LE:
  357. case CODEC_ID_PCM_F32LE:
  358. case CODEC_ID_PCM_S32LE:
  359. case CODEC_ID_PCM_S16LE:
  360. #endif /* HAVE_BIGENDIAN */
  361. case CODEC_ID_PCM_U8:
  362. memcpy(samples, src, n * sample_size);
  363. break;
  364. case CODEC_ID_PCM_ZORK:
  365. for (; n > 0; n--) {
  366. int v = *src++;
  367. if (v < 128)
  368. v = 128 - v;
  369. *samples++ = v;
  370. }
  371. break;
  372. case CODEC_ID_PCM_ALAW:
  373. case CODEC_ID_PCM_MULAW:
  374. for (; n > 0; n--) {
  375. AV_WN16A(samples, s->table[*src++]);
  376. samples += 2;
  377. }
  378. break;
  379. case CODEC_ID_PCM_DVD:
  380. {
  381. const uint8_t *src8;
  382. dst_int32_t = (int32_t *)s->frame.data[0];
  383. n /= avctx->channels;
  384. switch (avctx->bits_per_coded_sample) {
  385. case 20:
  386. while (n--) {
  387. c = avctx->channels;
  388. src8 = src + 4 * c;
  389. while (c--) {
  390. *dst_int32_t++ = (bytestream_get_be16(&src) << 16) + ((*src8 & 0xf0) << 8);
  391. *dst_int32_t++ = (bytestream_get_be16(&src) << 16) + ((*src8++ & 0x0f) << 12);
  392. }
  393. src = src8;
  394. }
  395. break;
  396. case 24:
  397. while (n--) {
  398. c = avctx->channels;
  399. src8 = src + 4 * c;
  400. while (c--) {
  401. *dst_int32_t++ = (bytestream_get_be16(&src) << 16) + ((*src8++) << 8);
  402. *dst_int32_t++ = (bytestream_get_be16(&src) << 16) + ((*src8++) << 8);
  403. }
  404. src = src8;
  405. }
  406. break;
  407. }
  408. break;
  409. }
  410. case CODEC_ID_PCM_LXF:
  411. {
  412. int i;
  413. n /= avctx->channels;
  414. //unpack
  415. for (c = 0; c < avctx->channels; c++) {
  416. dst_int32_t = (int32_t *)s->frame.data[c];
  417. for (i = 0; i < n; i++) {
  418. //extract low 20 bits and expand to 32 bits
  419. *dst_int32_t++ = (src[2] << 28) |
  420. (src[1] << 20) |
  421. (src[0] << 12) |
  422. ((src[2] & 0xF) << 8) |
  423. src[1];
  424. //extract high 20 bits and expand to 32 bits
  425. *dst_int32_t++ = (src[4] << 24) |
  426. (src[3] << 16) |
  427. ((src[2] & 0xF0) << 8) |
  428. (src[4] << 4) |
  429. (src[3] >> 4);
  430. src += 5;
  431. }
  432. }
  433. break;
  434. }
  435. default:
  436. return -1;
  437. }
  438. *got_frame_ptr = 1;
  439. *(AVFrame *)data = s->frame;
  440. return buf_size;
  441. }
  442. #if CONFIG_ENCODERS
  443. #define PCM_ENCODER(id_, sample_fmt_, name_, long_name_) \
  444. AVCodec ff_ ## name_ ## _encoder = { \
  445. .name = #name_, \
  446. .type = AVMEDIA_TYPE_AUDIO, \
  447. .id = id_, \
  448. .init = pcm_encode_init, \
  449. .encode2 = pcm_encode_frame, \
  450. .close = pcm_encode_close, \
  451. .capabilities = CODEC_CAP_VARIABLE_FRAME_SIZE, \
  452. .sample_fmts = (const enum AVSampleFormat[]){ sample_fmt_, \
  453. AV_SAMPLE_FMT_NONE }, \
  454. .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
  455. }
  456. #else
  457. #define PCM_ENCODER(id, sample_fmt_, name, long_name_)
  458. #endif
  459. #if CONFIG_DECODERS
  460. #define PCM_DECODER(id_, sample_fmt_, name_, long_name_) \
  461. AVCodec ff_ ## name_ ## _decoder = { \
  462. .name = #name_, \
  463. .type = AVMEDIA_TYPE_AUDIO, \
  464. .id = id_, \
  465. .priv_data_size = sizeof(PCMDecode), \
  466. .init = pcm_decode_init, \
  467. .decode = pcm_decode_frame, \
  468. .capabilities = CODEC_CAP_DR1, \
  469. .sample_fmts = (const enum AVSampleFormat[]){ sample_fmt_, \
  470. AV_SAMPLE_FMT_NONE }, \
  471. .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
  472. }
  473. #else
  474. #define PCM_DECODER(id, sample_fmt_, name, long_name_)
  475. #endif
  476. #define PCM_CODEC(id, sample_fmt_, name, long_name_) \
  477. PCM_ENCODER(id, sample_fmt_, name, long_name_); \
  478. PCM_DECODER(id, sample_fmt_, name, long_name_)
  479. /* Note: Do not forget to add new entries to the Makefile as well. */
  480. PCM_CODEC (CODEC_ID_PCM_ALAW, AV_SAMPLE_FMT_S16, pcm_alaw, "PCM A-law / G.711 A-law");
  481. PCM_DECODER(CODEC_ID_PCM_DVD, AV_SAMPLE_FMT_S32, pcm_dvd, "PCM signed 20|24-bit big-endian");
  482. PCM_CODEC (CODEC_ID_PCM_F32BE, AV_SAMPLE_FMT_FLT, pcm_f32be, "PCM 32-bit floating point big-endian");
  483. PCM_CODEC (CODEC_ID_PCM_F32LE, AV_SAMPLE_FMT_FLT, pcm_f32le, "PCM 32-bit floating point little-endian");
  484. PCM_CODEC (CODEC_ID_PCM_F64BE, AV_SAMPLE_FMT_DBL, pcm_f64be, "PCM 64-bit floating point big-endian");
  485. PCM_CODEC (CODEC_ID_PCM_F64LE, AV_SAMPLE_FMT_DBL, pcm_f64le, "PCM 64-bit floating point little-endian");
  486. PCM_DECODER(CODEC_ID_PCM_LXF, AV_SAMPLE_FMT_S32P,pcm_lxf, "PCM signed 20-bit little-endian planar");
  487. PCM_CODEC (CODEC_ID_PCM_MULAW, AV_SAMPLE_FMT_S16, pcm_mulaw, "PCM mu-law / G.711 mu-law");
  488. PCM_CODEC (CODEC_ID_PCM_S8, AV_SAMPLE_FMT_U8, pcm_s8, "PCM signed 8-bit");
  489. PCM_CODEC (CODEC_ID_PCM_S16BE, AV_SAMPLE_FMT_S16, pcm_s16be, "PCM signed 16-bit big-endian");
  490. PCM_CODEC (CODEC_ID_PCM_S16LE, AV_SAMPLE_FMT_S16, pcm_s16le, "PCM signed 16-bit little-endian");
  491. PCM_DECODER(CODEC_ID_PCM_S16LE_PLANAR, AV_SAMPLE_FMT_S16P,pcm_s16le_planar, "PCM 16-bit little-endian planar");
  492. PCM_CODEC (CODEC_ID_PCM_S24BE, AV_SAMPLE_FMT_S32, pcm_s24be, "PCM signed 24-bit big-endian");
  493. PCM_CODEC (CODEC_ID_PCM_S24DAUD, AV_SAMPLE_FMT_S16, pcm_s24daud, "PCM D-Cinema audio signed 24-bit");
  494. PCM_CODEC (CODEC_ID_PCM_S24LE, AV_SAMPLE_FMT_S32, pcm_s24le, "PCM signed 24-bit little-endian");
  495. PCM_CODEC (CODEC_ID_PCM_S32BE, AV_SAMPLE_FMT_S32, pcm_s32be, "PCM signed 32-bit big-endian");
  496. PCM_CODEC (CODEC_ID_PCM_S32LE, AV_SAMPLE_FMT_S32, pcm_s32le, "PCM signed 32-bit little-endian");
  497. PCM_CODEC (CODEC_ID_PCM_U8, AV_SAMPLE_FMT_U8, pcm_u8, "PCM unsigned 8-bit");
  498. PCM_CODEC (CODEC_ID_PCM_U16BE, AV_SAMPLE_FMT_S16, pcm_u16be, "PCM unsigned 16-bit big-endian");
  499. PCM_CODEC (CODEC_ID_PCM_U16LE, AV_SAMPLE_FMT_S16, pcm_u16le, "PCM unsigned 16-bit little-endian");
  500. PCM_CODEC (CODEC_ID_PCM_U24BE, AV_SAMPLE_FMT_S32, pcm_u24be, "PCM unsigned 24-bit big-endian");
  501. PCM_CODEC (CODEC_ID_PCM_U24LE, AV_SAMPLE_FMT_S32, pcm_u24le, "PCM unsigned 24-bit little-endian");
  502. PCM_CODEC (CODEC_ID_PCM_U32BE, AV_SAMPLE_FMT_S32, pcm_u32be, "PCM unsigned 32-bit big-endian");
  503. PCM_CODEC (CODEC_ID_PCM_U32LE, AV_SAMPLE_FMT_S32, pcm_u32le, "PCM unsigned 32-bit little-endian");
  504. PCM_DECODER(CODEC_ID_PCM_ZORK, AV_SAMPLE_FMT_U8, pcm_zork, "PCM Zork");