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.

519 lines
20KB

  1. /*
  2. * PCM codecs
  3. * Copyright (c) 2001 Fabrice Bellard
  4. *
  5. * This file is part of Libav.
  6. *
  7. * Libav 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. * Libav 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 Libav; 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/attributes.h"
  26. #include "avcodec.h"
  27. #include "bytestream.h"
  28. #include "internal.h"
  29. #include "mathops.h"
  30. #include "pcm_tablegen.h"
  31. static av_cold int pcm_encode_init(AVCodecContext *avctx)
  32. {
  33. avctx->frame_size = 0;
  34. switch (avctx->codec->id) {
  35. case AV_CODEC_ID_PCM_ALAW:
  36. pcm_alaw_tableinit();
  37. break;
  38. case AV_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->bit_rate = avctx->block_align * avctx->sample_rate * 8;
  47. return 0;
  48. }
  49. /**
  50. * Write PCM samples macro
  51. * @param type Datatype of native machine format
  52. * @param endian bytestream_put_xxx() suffix
  53. * @param src Source pointer (variable name)
  54. * @param dst Destination pointer (variable name)
  55. * @param n Total number of samples (variable name)
  56. * @param shift Bitshift (bits)
  57. * @param offset Sample value offset
  58. */
  59. #define ENCODE(type, endian, src, dst, n, shift, offset) \
  60. samples_ ## type = (const type *) src; \
  61. for (; n > 0; n--) { \
  62. register type v = (*samples_ ## type++ >> shift) + offset; \
  63. bytestream_put_ ## endian(&dst, v); \
  64. }
  65. static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
  66. const AVFrame *frame, int *got_packet_ptr)
  67. {
  68. int n, sample_size, v, ret;
  69. const short *samples;
  70. unsigned char *dst;
  71. const uint8_t *srcu8;
  72. const int16_t *samples_int16_t;
  73. const int32_t *samples_int32_t;
  74. const int64_t *samples_int64_t;
  75. const uint16_t *samples_uint16_t;
  76. const uint32_t *samples_uint32_t;
  77. sample_size = av_get_bits_per_sample(avctx->codec->id) / 8;
  78. n = frame->nb_samples * avctx->channels;
  79. samples = (const short *)frame->data[0];
  80. if ((ret = ff_alloc_packet(avpkt, n * sample_size))) {
  81. av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");
  82. return ret;
  83. }
  84. dst = avpkt->data;
  85. switch (avctx->codec->id) {
  86. case AV_CODEC_ID_PCM_U32LE:
  87. ENCODE(uint32_t, le32, samples, dst, n, 0, 0x80000000)
  88. break;
  89. case AV_CODEC_ID_PCM_U32BE:
  90. ENCODE(uint32_t, be32, samples, dst, n, 0, 0x80000000)
  91. break;
  92. case AV_CODEC_ID_PCM_S24LE:
  93. ENCODE(int32_t, le24, samples, dst, n, 8, 0)
  94. break;
  95. case AV_CODEC_ID_PCM_S24BE:
  96. ENCODE(int32_t, be24, samples, dst, n, 8, 0)
  97. break;
  98. case AV_CODEC_ID_PCM_U24LE:
  99. ENCODE(uint32_t, le24, samples, dst, n, 8, 0x800000)
  100. break;
  101. case AV_CODEC_ID_PCM_U24BE:
  102. ENCODE(uint32_t, be24, samples, dst, n, 8, 0x800000)
  103. break;
  104. case AV_CODEC_ID_PCM_S24DAUD:
  105. for (; n > 0; n--) {
  106. uint32_t tmp = ff_reverse[(*samples >> 8) & 0xff] +
  107. (ff_reverse[*samples & 0xff] << 8);
  108. tmp <<= 4; // sync flags would go here
  109. bytestream_put_be24(&dst, tmp);
  110. samples++;
  111. }
  112. break;
  113. case AV_CODEC_ID_PCM_U16LE:
  114. ENCODE(uint16_t, le16, samples, dst, n, 0, 0x8000)
  115. break;
  116. case AV_CODEC_ID_PCM_U16BE:
  117. ENCODE(uint16_t, be16, samples, dst, n, 0, 0x8000)
  118. break;
  119. case AV_CODEC_ID_PCM_S8:
  120. srcu8 = frame->data[0];
  121. for (; n > 0; n--) {
  122. v = *srcu8++;
  123. *dst++ = v - 128;
  124. }
  125. break;
  126. #if HAVE_BIGENDIAN
  127. case AV_CODEC_ID_PCM_F64LE:
  128. ENCODE(int64_t, le64, samples, dst, n, 0, 0)
  129. break;
  130. case AV_CODEC_ID_PCM_S32LE:
  131. case AV_CODEC_ID_PCM_F32LE:
  132. ENCODE(int32_t, le32, samples, dst, n, 0, 0)
  133. break;
  134. case AV_CODEC_ID_PCM_S16LE:
  135. ENCODE(int16_t, le16, samples, dst, n, 0, 0)
  136. break;
  137. case AV_CODEC_ID_PCM_F64BE:
  138. case AV_CODEC_ID_PCM_F32BE:
  139. case AV_CODEC_ID_PCM_S32BE:
  140. case AV_CODEC_ID_PCM_S16BE:
  141. #else
  142. case AV_CODEC_ID_PCM_F64BE:
  143. ENCODE(int64_t, be64, samples, dst, n, 0, 0)
  144. break;
  145. case AV_CODEC_ID_PCM_F32BE:
  146. case AV_CODEC_ID_PCM_S32BE:
  147. ENCODE(int32_t, be32, samples, dst, n, 0, 0)
  148. break;
  149. case AV_CODEC_ID_PCM_S16BE:
  150. ENCODE(int16_t, be16, samples, dst, n, 0, 0)
  151. break;
  152. case AV_CODEC_ID_PCM_F64LE:
  153. case AV_CODEC_ID_PCM_F32LE:
  154. case AV_CODEC_ID_PCM_S32LE:
  155. case AV_CODEC_ID_PCM_S16LE:
  156. #endif /* HAVE_BIGENDIAN */
  157. case AV_CODEC_ID_PCM_U8:
  158. memcpy(dst, samples, n * sample_size);
  159. dst += n * sample_size;
  160. break;
  161. case AV_CODEC_ID_PCM_ALAW:
  162. for (; n > 0; n--) {
  163. v = *samples++;
  164. *dst++ = linear_to_alaw[(v + 32768) >> 2];
  165. }
  166. break;
  167. case AV_CODEC_ID_PCM_MULAW:
  168. for (; n > 0; n--) {
  169. v = *samples++;
  170. *dst++ = linear_to_ulaw[(v + 32768) >> 2];
  171. }
  172. break;
  173. default:
  174. return -1;
  175. }
  176. *got_packet_ptr = 1;
  177. return 0;
  178. }
  179. typedef struct PCMDecode {
  180. short table[256];
  181. } PCMDecode;
  182. static av_cold int pcm_decode_init(AVCodecContext *avctx)
  183. {
  184. PCMDecode *s = avctx->priv_data;
  185. int i;
  186. if (avctx->channels <= 0) {
  187. av_log(avctx, AV_LOG_ERROR, "PCM channels out of bounds\n");
  188. return AVERROR(EINVAL);
  189. }
  190. switch (avctx->codec->id) {
  191. case AV_CODEC_ID_PCM_ALAW:
  192. for (i = 0; i < 256; i++)
  193. s->table[i] = alaw2linear(i);
  194. break;
  195. case AV_CODEC_ID_PCM_MULAW:
  196. for (i = 0; i < 256; i++)
  197. s->table[i] = ulaw2linear(i);
  198. break;
  199. default:
  200. break;
  201. }
  202. avctx->sample_fmt = avctx->codec->sample_fmts[0];
  203. if (avctx->sample_fmt == AV_SAMPLE_FMT_S32)
  204. avctx->bits_per_raw_sample = av_get_bits_per_sample(avctx->codec->id);
  205. return 0;
  206. }
  207. /**
  208. * Read PCM samples macro
  209. * @param size Data size of native machine format
  210. * @param endian bytestream_get_xxx() endian suffix
  211. * @param src Source pointer (variable name)
  212. * @param dst Destination pointer (variable name)
  213. * @param n Total number of samples (variable name)
  214. * @param shift Bitshift (bits)
  215. * @param offset Sample value offset
  216. */
  217. #define DECODE(size, endian, src, dst, n, shift, offset) \
  218. for (; n > 0; n--) { \
  219. uint ## size ## _t v = bytestream_get_ ## endian(&src); \
  220. AV_WN ## size ## A(dst, (v - offset) << shift); \
  221. dst += size / 8; \
  222. }
  223. #if HAVE_BIGENDIAN
  224. #define DECODE_PLANAR(size, endian, src, dst, n, shift, offset) \
  225. { \
  226. int n2; \
  227. n /= avctx->channels; \
  228. for (c = 0; c < avctx->channels; c++) { \
  229. samples = frame->extended_data[c]; \
  230. n2 = n; \
  231. DECODE(size, endian, src, samples, n2, 0, 0) \
  232. } \
  233. }
  234. #else
  235. #define DECODE_PLANAR(size, endian, src, dst, n, shift, offset) \
  236. { \
  237. n /= avctx->channels; \
  238. for (c = 0; c < avctx->channels; c++) { \
  239. samples = frame->extended_data[c]; \
  240. memcpy(samples, src, n * size / 8); \
  241. src += n * size / 8; \
  242. } \
  243. }
  244. #endif /* HAVE_BIGENDIAN */
  245. static int pcm_decode_frame(AVCodecContext *avctx, void *data,
  246. int *got_frame_ptr, AVPacket *avpkt)
  247. {
  248. const uint8_t *src = avpkt->data;
  249. int buf_size = avpkt->size;
  250. PCMDecode *s = avctx->priv_data;
  251. AVFrame *frame = data;
  252. int sample_size, c, n, ret, samples_per_block;
  253. uint8_t *samples;
  254. int32_t *dst_int32_t;
  255. sample_size = av_get_bits_per_sample(avctx->codec_id) / 8;
  256. /* av_get_bits_per_sample returns 0 for AV_CODEC_ID_PCM_DVD */
  257. samples_per_block = 1;
  258. if (avctx->codec_id == AV_CODEC_ID_PCM_LXF) {
  259. /* we process 40-bit blocks per channel for LXF */
  260. samples_per_block = 2;
  261. sample_size = 5;
  262. }
  263. if (sample_size == 0) {
  264. av_log(avctx, AV_LOG_ERROR, "Invalid sample_size\n");
  265. return AVERROR(EINVAL);
  266. }
  267. n = avctx->channels * sample_size;
  268. if (n && buf_size % n) {
  269. if (buf_size < n) {
  270. av_log(avctx, AV_LOG_ERROR, "invalid PCM packet\n");
  271. return -1;
  272. } else
  273. buf_size -= buf_size % n;
  274. }
  275. n = buf_size / sample_size;
  276. /* get output buffer */
  277. frame->nb_samples = n * samples_per_block / avctx->channels;
  278. if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) {
  279. av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
  280. return ret;
  281. }
  282. samples = frame->data[0];
  283. switch (avctx->codec->id) {
  284. case AV_CODEC_ID_PCM_U32LE:
  285. DECODE(32, le32, src, samples, n, 0, 0x80000000)
  286. break;
  287. case AV_CODEC_ID_PCM_U32BE:
  288. DECODE(32, be32, src, samples, n, 0, 0x80000000)
  289. break;
  290. case AV_CODEC_ID_PCM_S24LE:
  291. DECODE(32, le24, src, samples, n, 8, 0)
  292. break;
  293. case AV_CODEC_ID_PCM_S24BE:
  294. DECODE(32, be24, src, samples, n, 8, 0)
  295. break;
  296. case AV_CODEC_ID_PCM_U24LE:
  297. DECODE(32, le24, src, samples, n, 8, 0x800000)
  298. break;
  299. case AV_CODEC_ID_PCM_U24BE:
  300. DECODE(32, be24, src, samples, n, 8, 0x800000)
  301. break;
  302. case AV_CODEC_ID_PCM_S24DAUD:
  303. for (; n > 0; n--) {
  304. uint32_t v = bytestream_get_be24(&src);
  305. v >>= 4; // sync flags are here
  306. AV_WN16A(samples, ff_reverse[(v >> 8) & 0xff] +
  307. (ff_reverse[v & 0xff] << 8));
  308. samples += 2;
  309. }
  310. break;
  311. case AV_CODEC_ID_PCM_S16BE_PLANAR:
  312. DECODE_PLANAR(16, be16, src, samples, n, 0, 0);
  313. break;
  314. case AV_CODEC_ID_PCM_S16LE_PLANAR:
  315. DECODE_PLANAR(16, le16, src, samples, n, 0, 0);
  316. break;
  317. case AV_CODEC_ID_PCM_S24LE_PLANAR:
  318. DECODE_PLANAR(32, le24, src, samples, n, 8, 0);
  319. break;
  320. case AV_CODEC_ID_PCM_S32LE_PLANAR:
  321. DECODE_PLANAR(32, le32, src, samples, n, 0, 0);
  322. break;
  323. case AV_CODEC_ID_PCM_U16LE:
  324. DECODE(16, le16, src, samples, n, 0, 0x8000)
  325. break;
  326. case AV_CODEC_ID_PCM_U16BE:
  327. DECODE(16, be16, src, samples, n, 0, 0x8000)
  328. break;
  329. case AV_CODEC_ID_PCM_S8:
  330. for (; n > 0; n--)
  331. *samples++ = *src++ + 128;
  332. break;
  333. #if HAVE_BIGENDIAN
  334. case AV_CODEC_ID_PCM_F64LE:
  335. DECODE(64, le64, src, samples, n, 0, 0)
  336. break;
  337. case AV_CODEC_ID_PCM_S32LE:
  338. case AV_CODEC_ID_PCM_F32LE:
  339. DECODE(32, le32, src, samples, n, 0, 0)
  340. break;
  341. case AV_CODEC_ID_PCM_S16LE:
  342. DECODE(16, le16, src, samples, n, 0, 0)
  343. break;
  344. case AV_CODEC_ID_PCM_F64BE:
  345. case AV_CODEC_ID_PCM_F32BE:
  346. case AV_CODEC_ID_PCM_S32BE:
  347. case AV_CODEC_ID_PCM_S16BE:
  348. #else
  349. case AV_CODEC_ID_PCM_F64BE:
  350. DECODE(64, be64, src, samples, n, 0, 0)
  351. break;
  352. case AV_CODEC_ID_PCM_F32BE:
  353. case AV_CODEC_ID_PCM_S32BE:
  354. DECODE(32, be32, src, samples, n, 0, 0)
  355. break;
  356. case AV_CODEC_ID_PCM_S16BE:
  357. DECODE(16, be16, src, samples, n, 0, 0)
  358. break;
  359. case AV_CODEC_ID_PCM_F64LE:
  360. case AV_CODEC_ID_PCM_F32LE:
  361. case AV_CODEC_ID_PCM_S32LE:
  362. case AV_CODEC_ID_PCM_S16LE:
  363. #endif /* HAVE_BIGENDIAN */
  364. case AV_CODEC_ID_PCM_U8:
  365. memcpy(samples, src, n * sample_size);
  366. break;
  367. case AV_CODEC_ID_PCM_ZORK:
  368. for (; n > 0; n--) {
  369. int v = *src++;
  370. if (v < 128)
  371. v = 128 - v;
  372. *samples++ = v;
  373. }
  374. break;
  375. case AV_CODEC_ID_PCM_ALAW:
  376. case AV_CODEC_ID_PCM_MULAW:
  377. for (; n > 0; n--) {
  378. AV_WN16A(samples, s->table[*src++]);
  379. samples += 2;
  380. }
  381. break;
  382. case AV_CODEC_ID_PCM_LXF:
  383. {
  384. int i;
  385. n /= avctx->channels;
  386. for (c = 0; c < avctx->channels; c++) {
  387. dst_int32_t = (int32_t *)frame->extended_data[c];
  388. for (i = 0; i < n; i++) {
  389. // extract low 20 bits and expand to 32 bits
  390. *dst_int32_t++ = (src[2] << 28) |
  391. (src[1] << 20) |
  392. (src[0] << 12) |
  393. ((src[2] & 0x0F) << 8) |
  394. src[1];
  395. // extract high 20 bits and expand to 32 bits
  396. *dst_int32_t++ = (src[4] << 24) |
  397. (src[3] << 16) |
  398. ((src[2] & 0xF0) << 8) |
  399. (src[4] << 4) |
  400. (src[3] >> 4);
  401. src += 5;
  402. }
  403. }
  404. break;
  405. }
  406. default:
  407. return -1;
  408. }
  409. *got_frame_ptr = 1;
  410. return buf_size;
  411. }
  412. #define PCM_ENCODER_0(id_, sample_fmt_, name_, long_name_)
  413. #define PCM_ENCODER_1(id_, sample_fmt_, name_, long_name_) \
  414. AVCodec ff_ ## name_ ## _encoder = { \
  415. .name = #name_, \
  416. .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
  417. .type = AVMEDIA_TYPE_AUDIO, \
  418. .id = AV_CODEC_ID_ ## id_, \
  419. .init = pcm_encode_init, \
  420. .encode2 = pcm_encode_frame, \
  421. .capabilities = AV_CODEC_CAP_VARIABLE_FRAME_SIZE, \
  422. .sample_fmts = (const enum AVSampleFormat[]){ sample_fmt_, \
  423. AV_SAMPLE_FMT_NONE }, \
  424. }
  425. #define PCM_ENCODER_2(cf, id, sample_fmt, name, long_name) \
  426. PCM_ENCODER_ ## cf(id, sample_fmt, name, long_name)
  427. #define PCM_ENCODER_3(cf, id, sample_fmt, name, long_name) \
  428. PCM_ENCODER_2(cf, id, sample_fmt, name, long_name)
  429. #define PCM_ENCODER(id, sample_fmt, name, long_name) \
  430. PCM_ENCODER_3(CONFIG_ ## id ## _ENCODER, id, sample_fmt, name, long_name)
  431. #define PCM_DECODER_0(id, sample_fmt, name, long_name)
  432. #define PCM_DECODER_1(id_, sample_fmt_, name_, long_name_) \
  433. AVCodec ff_ ## name_ ## _decoder = { \
  434. .name = #name_, \
  435. .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
  436. .type = AVMEDIA_TYPE_AUDIO, \
  437. .id = AV_CODEC_ID_ ## id_, \
  438. .priv_data_size = sizeof(PCMDecode), \
  439. .init = pcm_decode_init, \
  440. .decode = pcm_decode_frame, \
  441. .capabilities = AV_CODEC_CAP_DR1, \
  442. .sample_fmts = (const enum AVSampleFormat[]){ sample_fmt_, \
  443. AV_SAMPLE_FMT_NONE }, \
  444. }
  445. #define PCM_DECODER_2(cf, id, sample_fmt, name, long_name) \
  446. PCM_DECODER_ ## cf(id, sample_fmt, name, long_name)
  447. #define PCM_DECODER_3(cf, id, sample_fmt, name, long_name) \
  448. PCM_DECODER_2(cf, id, sample_fmt, name, long_name)
  449. #define PCM_DECODER(id, sample_fmt, name, long_name) \
  450. PCM_DECODER_3(CONFIG_ ## id ## _DECODER, id, sample_fmt, name, long_name)
  451. #define PCM_CODEC(id, sample_fmt_, name, long_name_) \
  452. PCM_ENCODER(id, sample_fmt_, name, long_name_); \
  453. PCM_DECODER(id, sample_fmt_, name, long_name_)
  454. /* Note: Do not forget to add new entries to the Makefile as well. */
  455. PCM_CODEC (PCM_ALAW, AV_SAMPLE_FMT_S16, pcm_alaw, "PCM A-law");
  456. PCM_CODEC (PCM_F32BE, AV_SAMPLE_FMT_FLT, pcm_f32be, "PCM 32-bit floating point big-endian");
  457. PCM_CODEC (PCM_F32LE, AV_SAMPLE_FMT_FLT, pcm_f32le, "PCM 32-bit floating point little-endian");
  458. PCM_CODEC (PCM_F64BE, AV_SAMPLE_FMT_DBL, pcm_f64be, "PCM 64-bit floating point big-endian");
  459. PCM_CODEC (PCM_F64LE, AV_SAMPLE_FMT_DBL, pcm_f64le, "PCM 64-bit floating point little-endian");
  460. PCM_DECODER(PCM_LXF, AV_SAMPLE_FMT_S32P, pcm_lxf, "PCM signed 20-bit little-endian planar");
  461. PCM_CODEC (PCM_MULAW, AV_SAMPLE_FMT_S16, pcm_mulaw, "PCM mu-law");
  462. PCM_CODEC (PCM_S8, AV_SAMPLE_FMT_U8, pcm_s8, "PCM signed 8-bit");
  463. PCM_CODEC (PCM_S16BE, AV_SAMPLE_FMT_S16, pcm_s16be, "PCM signed 16-bit big-endian");
  464. PCM_DECODER(PCM_S16BE_PLANAR, AV_SAMPLE_FMT_S16P,pcm_s16be_planar, "PCM signed 16-bit big-endian planar");
  465. PCM_CODEC (PCM_S16LE, AV_SAMPLE_FMT_S16, pcm_s16le, "PCM signed 16-bit little-endian");
  466. PCM_DECODER(PCM_S16LE_PLANAR, AV_SAMPLE_FMT_S16P, pcm_s16le_planar, "PCM 16-bit little-endian planar");
  467. PCM_CODEC (PCM_S24BE, AV_SAMPLE_FMT_S32, pcm_s24be, "PCM signed 24-bit big-endian");
  468. PCM_CODEC (PCM_S24DAUD, AV_SAMPLE_FMT_S16, pcm_s24daud, "PCM D-Cinema audio signed 24-bit");
  469. PCM_CODEC (PCM_S24LE, AV_SAMPLE_FMT_S32, pcm_s24le, "PCM signed 24-bit little-endian");
  470. PCM_DECODER(PCM_S24LE_PLANAR, AV_SAMPLE_FMT_S32P,pcm_s24le_planar, "PCM signed 24-bit little-endian planar");
  471. PCM_CODEC (PCM_S32BE, AV_SAMPLE_FMT_S32, pcm_s32be, "PCM signed 32-bit big-endian");
  472. PCM_CODEC (PCM_S32LE, AV_SAMPLE_FMT_S32, pcm_s32le, "PCM signed 32-bit little-endian");
  473. PCM_DECODER(PCM_S32LE_PLANAR, AV_SAMPLE_FMT_S32P,pcm_s32le_planar, "PCM signed 32-bit little-endian planar");
  474. PCM_CODEC (PCM_U8, AV_SAMPLE_FMT_U8, pcm_u8, "PCM unsigned 8-bit");
  475. PCM_CODEC (PCM_U16BE, AV_SAMPLE_FMT_S16, pcm_u16be, "PCM unsigned 16-bit big-endian");
  476. PCM_CODEC (PCM_U16LE, AV_SAMPLE_FMT_S16, pcm_u16le, "PCM unsigned 16-bit little-endian");
  477. PCM_CODEC (PCM_U24BE, AV_SAMPLE_FMT_S32, pcm_u24be, "PCM unsigned 24-bit big-endian");
  478. PCM_CODEC (PCM_U24LE, AV_SAMPLE_FMT_S32, pcm_u24le, "PCM unsigned 24-bit little-endian");
  479. PCM_CODEC (PCM_U32BE, AV_SAMPLE_FMT_S32, pcm_u32be, "PCM unsigned 32-bit big-endian");
  480. PCM_CODEC (PCM_U32LE, AV_SAMPLE_FMT_S32, pcm_u32le, "PCM unsigned 32-bit little-endian");
  481. PCM_DECODER(PCM_ZORK, AV_SAMPLE_FMT_U8, pcm_zork, "PCM Zork");