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.

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