1
0

002-fix-name-collision-with-ffmpeg.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. From 3695118267be9b7a9412c86c7c5424ab47efe7ec Mon Sep 17 00:00:00 2001
  2. From: Romain Beauxis <toots@rastageeks.org>
  3. Date: Thu, 7 Apr 2016 13:20:46 -0500
  4. Subject: [PATCH] Rename slen{1,2}_table to avoid name collision with ffmpeg.
  5. ---
  6. src/lib/l3bitstream.c | 4 ++--
  7. src/lib/l3loop.c | 4 ++--
  8. src/lib/tables.c | 4 ++--
  9. src/lib/tables.h | 4 ++--
  10. 4 files changed, 8 insertions(+), 8 deletions(-)
  11. --- a/src/lib/l3bitstream.c
  12. +++ b/src/lib/l3bitstream.c
  13. @@ -127,8 +127,8 @@ static void encodeMainData(shine_global_
  14. {
  15. BF_PartHolder **pph = &config->l3stream.scaleFactorsPH[gr][ch];
  16. gr_info *gi = &(si.gr[gr].ch[ch].tt);
  17. - unsigned slen1 = slen1_tab[ gi->scalefac_compress ];
  18. - unsigned slen2 = slen2_tab[ gi->scalefac_compress ];
  19. + unsigned slen1 = shine_slen1_tab[ gi->scalefac_compress ];
  20. + unsigned slen2 = shine_slen2_tab[ gi->scalefac_compress ];
  21. int *ix = &config->l3_enc[ch][gr][0];
  22. if ( (gr == 0) || (si.scfsi[ch][0] == 0) )
  23. --- a/src/lib/l3loop.c
  24. +++ b/src/lib/l3loop.c
  25. @@ -287,8 +287,8 @@ int part2_length(int gr, int ch, shine_g
  26. bits = 0;
  27. {
  28. - slen1 = slen1_tab[ gi->scalefac_compress ];
  29. - slen2 = slen2_tab[ gi->scalefac_compress ];
  30. + slen1 = shine_slen1_tab[ gi->scalefac_compress ];
  31. + slen2 = shine_slen2_tab[ gi->scalefac_compress ];
  32. if ( !gr || !(config->side_info.scfsi[ch][0]) )
  33. bits += (6 * slen1);
  34. --- a/src/lib/tables.c
  35. +++ b/src/lib/tables.c
  36. @@ -7,8 +7,8 @@
  37. #include "tables.h"
  38. -const int slen1_tab[16] = { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 };
  39. -const int slen2_tab[16] = { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 };
  40. +const int shine_slen1_tab[16] = { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 };
  41. +const int shine_slen2_tab[16] = { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 };
  42. /* Valid samplerates and bitrates. */
  43. const int samplerates[9] = {
  44. --- a/src/lib/tables.h
  45. +++ b/src/lib/tables.h
  46. @@ -3,8 +3,8 @@
  47. #include "types.h"
  48. -extern const int slen1_tab[16];
  49. -extern const int slen2_tab[16];
  50. +extern const int shine_slen1_tab[16];
  51. +extern const int shine_slen2_tab[16];
  52. extern const int samplerates[9];
  53. extern const int bitrates[16][4];