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.

105 lines
4.1KB

  1. /*
  2. * Float MPEG Audio decoder
  3. * Copyright (c) 2010 Michael Niedermayer
  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. #define CONFIG_FLOAT 1
  22. #include "mpegaudiodec.c"
  23. #if CONFIG_MP1FLOAT_DECODER
  24. AVCodec ff_mp1float_decoder = {
  25. .name = "mp1float",
  26. .long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
  27. .type = AVMEDIA_TYPE_AUDIO,
  28. .id = AV_CODEC_ID_MP1,
  29. .priv_data_size = sizeof(MPADecodeContext),
  30. .init = decode_init,
  31. .decode = decode_frame,
  32. .capabilities = CODEC_CAP_DR1,
  33. .flush = flush,
  34. .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
  35. AV_SAMPLE_FMT_FLT,
  36. AV_SAMPLE_FMT_NONE },
  37. };
  38. #endif
  39. #if CONFIG_MP2FLOAT_DECODER
  40. AVCodec ff_mp2float_decoder = {
  41. .name = "mp2float",
  42. .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
  43. .type = AVMEDIA_TYPE_AUDIO,
  44. .id = AV_CODEC_ID_MP2,
  45. .priv_data_size = sizeof(MPADecodeContext),
  46. .init = decode_init,
  47. .decode = decode_frame,
  48. .capabilities = CODEC_CAP_DR1,
  49. .flush = flush,
  50. .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
  51. AV_SAMPLE_FMT_FLT,
  52. AV_SAMPLE_FMT_NONE },
  53. };
  54. #endif
  55. #if CONFIG_MP3FLOAT_DECODER
  56. AVCodec ff_mp3float_decoder = {
  57. .name = "mp3float",
  58. .long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
  59. .type = AVMEDIA_TYPE_AUDIO,
  60. .id = AV_CODEC_ID_MP3,
  61. .priv_data_size = sizeof(MPADecodeContext),
  62. .init = decode_init,
  63. .decode = decode_frame,
  64. .capabilities = CODEC_CAP_DR1,
  65. .flush = flush,
  66. .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
  67. AV_SAMPLE_FMT_FLT,
  68. AV_SAMPLE_FMT_NONE },
  69. };
  70. #endif
  71. #if CONFIG_MP3ADUFLOAT_DECODER
  72. AVCodec ff_mp3adufloat_decoder = {
  73. .name = "mp3adufloat",
  74. .long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
  75. .type = AVMEDIA_TYPE_AUDIO,
  76. .id = AV_CODEC_ID_MP3ADU,
  77. .priv_data_size = sizeof(MPADecodeContext),
  78. .init = decode_init,
  79. .decode = decode_frame_adu,
  80. .capabilities = CODEC_CAP_DR1,
  81. .flush = flush,
  82. .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
  83. AV_SAMPLE_FMT_FLT,
  84. AV_SAMPLE_FMT_NONE },
  85. };
  86. #endif
  87. #if CONFIG_MP3ON4FLOAT_DECODER
  88. AVCodec ff_mp3on4float_decoder = {
  89. .name = "mp3on4float",
  90. .long_name = NULL_IF_CONFIG_SMALL("MP3onMP4"),
  91. .type = AVMEDIA_TYPE_AUDIO,
  92. .id = AV_CODEC_ID_MP3ON4,
  93. .priv_data_size = sizeof(MP3On4DecodeContext),
  94. .init = decode_init_mp3on4,
  95. .close = decode_close_mp3on4,
  96. .decode = decode_frame_mp3on4,
  97. .capabilities = CODEC_CAP_DR1,
  98. .flush = flush_mp3on4,
  99. .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
  100. AV_SAMPLE_FMT_NONE },
  101. };
  102. #endif