002-fix-name-collision-with-ffmpeg.patch (2263B)
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 --- 7 src/lib/l3bitstream.c | 4 ++-- 8 src/lib/l3loop.c | 4 ++-- 9 src/lib/tables.c | 4 ++-- 10 src/lib/tables.h | 4 ++-- 11 4 files changed, 8 insertions(+), 8 deletions(-) 12 13 --- a/src/lib/l3bitstream.c 14 +++ b/src/lib/l3bitstream.c 15 @@ -127,8 +127,8 @@ static void encodeMainData(shine_global_ 16 { 17 BF_PartHolder **pph = &config->l3stream.scaleFactorsPH[gr][ch]; 18 gr_info *gi = &(si.gr[gr].ch[ch].tt); 19 - unsigned slen1 = slen1_tab[ gi->scalefac_compress ]; 20 - unsigned slen2 = slen2_tab[ gi->scalefac_compress ]; 21 + unsigned slen1 = shine_slen1_tab[ gi->scalefac_compress ]; 22 + unsigned slen2 = shine_slen2_tab[ gi->scalefac_compress ]; 23 int *ix = &config->l3_enc[ch][gr][0]; 24 25 if ( (gr == 0) || (si.scfsi[ch][0] == 0) ) 26 --- a/src/lib/l3loop.c 27 +++ b/src/lib/l3loop.c 28 @@ -287,8 +287,8 @@ int part2_length(int gr, int ch, shine_g 29 bits = 0; 30 31 { 32 - slen1 = slen1_tab[ gi->scalefac_compress ]; 33 - slen2 = slen2_tab[ gi->scalefac_compress ]; 34 + slen1 = shine_slen1_tab[ gi->scalefac_compress ]; 35 + slen2 = shine_slen2_tab[ gi->scalefac_compress ]; 36 37 if ( !gr || !(config->side_info.scfsi[ch][0]) ) 38 bits += (6 * slen1); 39 --- a/src/lib/tables.c 40 +++ b/src/lib/tables.c 41 @@ -7,8 +7,8 @@ 42 43 #include "tables.h" 44 45 -const int slen1_tab[16] = { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 }; 46 -const int slen2_tab[16] = { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 }; 47 +const int shine_slen1_tab[16] = { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 }; 48 +const int shine_slen2_tab[16] = { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 }; 49 50 /* Valid samplerates and bitrates. */ 51 const int samplerates[9] = { 52 --- a/src/lib/tables.h 53 +++ b/src/lib/tables.h 54 @@ -3,8 +3,8 @@ 55 56 #include "types.h" 57 58 -extern const int slen1_tab[16]; 59 -extern const int slen2_tab[16]; 60 +extern const int shine_slen1_tab[16]; 61 +extern const int shine_slen2_tab[16]; 62 63 extern const int samplerates[9]; 64 extern const int bitrates[16][4];