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 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. #define CONFIG_FLOAT 1
  22. #include "mpegaudiodec.c"
  23. #if CONFIG_MP1FLOAT_DECODER
  24. AVCodec ff_mp1float_decoder = {
  25. .name = "mp1float",
  26. .type = AVMEDIA_TYPE_AUDIO,
  27. .id = AV_CODEC_ID_MP1,
  28. .priv_data_size = sizeof(MPADecodeContext),
  29. .init = decode_init,
  30. .decode = decode_frame,
  31. .capabilities = CODEC_CAP_DR1,
  32. .flush = flush,
  33. .long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"),
  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. .type = AVMEDIA_TYPE_AUDIO,
  43. .id = AV_CODEC_ID_MP2,
  44. .priv_data_size = sizeof(MPADecodeContext),
  45. .init = decode_init,
  46. .decode = decode_frame,
  47. .capabilities = CODEC_CAP_DR1,
  48. .flush = flush,
  49. .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
  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. .type = AVMEDIA_TYPE_AUDIO,
  59. .id = AV_CODEC_ID_MP3,
  60. .priv_data_size = sizeof(MPADecodeContext),
  61. .init = decode_init,
  62. .decode = decode_frame,
  63. .capabilities = CODEC_CAP_DR1,
  64. .flush = flush,
  65. .long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
  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. .type = AVMEDIA_TYPE_AUDIO,
  75. .id = AV_CODEC_ID_MP3ADU,
  76. .priv_data_size = sizeof(MPADecodeContext),
  77. .init = decode_init,
  78. .decode = decode_frame_adu,
  79. .capabilities = CODEC_CAP_DR1,
  80. .flush = flush,
  81. .long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"),
  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. .type = AVMEDIA_TYPE_AUDIO,
  91. .id = AV_CODEC_ID_MP3ON4,
  92. .priv_data_size = sizeof(MP3On4DecodeContext),
  93. .init = decode_init_mp3on4,
  94. .close = decode_close_mp3on4,
  95. .decode = decode_frame_mp3on4,
  96. .capabilities = CODEC_CAP_DR1,
  97. .flush = flush_mp3on4,
  98. .long_name = NULL_IF_CONFIG_SMALL("MP3onMP4"),
  99. .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
  100. AV_SAMPLE_FMT_NONE },
  101. };
  102. #endif