aacenctab.c 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /*
  2. * AAC encoder data
  3. * Copyright (c) 2015 Rostislav Pehlivanov ( atomnuker gmail com )
  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. #include "aacenctab.h"
  22. static const uint8_t swb_size_128_96[] = {
  23. 4, 4, 4, 4, 4, 4, 8, 8, 8, 16, 28, 36
  24. };
  25. static const uint8_t swb_size_128_64[] = {
  26. 4, 4, 4, 4, 4, 4, 8, 8, 8, 16, 28, 36
  27. };
  28. static const uint8_t swb_size_128_48[] = {
  29. 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 16
  30. };
  31. static const uint8_t swb_size_128_24[] = {
  32. 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 16, 16, 20
  33. };
  34. static const uint8_t swb_size_128_16[] = {
  35. 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 12, 12, 16, 20, 20
  36. };
  37. static const uint8_t swb_size_128_8[] = {
  38. 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 12, 16, 20, 20
  39. };
  40. static const uint8_t swb_size_1024_96[] = {
  41. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8,
  42. 12, 12, 12, 12, 12, 16, 16, 24, 28, 36, 44,
  43. 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
  44. };
  45. static const uint8_t swb_size_1024_64[] = {
  46. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8,
  47. 12, 12, 12, 16, 16, 16, 20, 24, 24, 28, 36,
  48. 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40
  49. };
  50. static const uint8_t swb_size_1024_48[] = {
  51. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8,
  52. 12, 12, 12, 12, 16, 16, 20, 20, 24, 24, 28, 28,
  53. 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
  54. 96
  55. };
  56. static const uint8_t swb_size_1024_32[] = {
  57. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8,
  58. 12, 12, 12, 12, 16, 16, 20, 20, 24, 24, 28, 28,
  59. 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32
  60. };
  61. static const uint8_t swb_size_1024_24[] = {
  62. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  63. 12, 12, 12, 12, 16, 16, 16, 20, 20, 24, 24, 28, 28,
  64. 32, 36, 36, 40, 44, 48, 52, 52, 64, 64, 64, 64, 64
  65. };
  66. static const uint8_t swb_size_1024_16[] = {
  67. 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  68. 12, 12, 12, 12, 12, 12, 12, 12, 12, 16, 16, 16, 16, 20, 20, 20, 24, 24, 28, 28,
  69. 32, 36, 40, 40, 44, 48, 52, 56, 60, 64, 64, 64
  70. };
  71. static const uint8_t swb_size_1024_8[] = {
  72. 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
  73. 16, 16, 16, 16, 16, 16, 16, 20, 20, 20, 20, 24, 24, 24, 28, 28,
  74. 32, 36, 36, 40, 44, 48, 52, 56, 60, 64, 80
  75. };
  76. const uint8_t *ff_aac_swb_size_128[] = {
  77. swb_size_128_96, swb_size_128_96, swb_size_128_64,
  78. swb_size_128_48, swb_size_128_48, swb_size_128_48,
  79. swb_size_128_24, swb_size_128_24, swb_size_128_16,
  80. swb_size_128_16, swb_size_128_16, swb_size_128_8,
  81. swb_size_128_8
  82. };
  83. const uint8_t *ff_aac_swb_size_1024[] = {
  84. swb_size_1024_96, swb_size_1024_96, swb_size_1024_64,
  85. swb_size_1024_48, swb_size_1024_48, swb_size_1024_32,
  86. swb_size_1024_24, swb_size_1024_24, swb_size_1024_16,
  87. swb_size_1024_16, swb_size_1024_16, swb_size_1024_8,
  88. swb_size_1024_8
  89. };
  90. const int ff_aac_swb_size_128_len = FF_ARRAY_ELEMS(ff_aac_swb_size_128);
  91. const int ff_aac_swb_size_1024_len = FF_ARRAY_ELEMS(ff_aac_swb_size_1024);