]>
Commit | Line | Data |
---|---|---|
a7e6bfef JB |
1 | --- opal-3.10.9/opal.m4.orig 2012-11-26 11:49:22.000000000 +0100 |
2 | +++ opal-3.10.9/opal.m4 2013-01-24 14:11:21.415599845 +0100 | |
3 | @@ -969,11 +969,11 @@ | |
4 | ||
5 | saved_LIBS="$LIBS" | |
6 | LIBS="$LIBS -lilbc" | |
7 | - AC_CHECK_LIB(ilbc, iLBC_encode, [has_ilbc=yes], [has_ilbc=no]) | |
8 | + AC_CHECK_LIB(ilbc, iLBC_encode, [has_ilbc=yes], [AC_CHECK_LIB(ilbc, WebRtcIlbcfix_EncodeImpl, [has_ilbc=yes], [has_ilbc=no])]) | |
9 | LIBS=$saved_LIBS | |
10 | ||
11 | if test "x${has_ilbc}" = "xyes"; then | |
12 | - AC_CHECK_HEADERS([ilbc/iLBC_decode.h ilbc/iLBC_define.h ilbc/iLBC_encode.h], [has_ilbc=yes], [has_ilbc=no]) | |
13 | + AC_CHECK_HEADERS([ilbc.h], [has_ilbc=yes], [AC_CHECK_HEADERS([ilbc/iLBC_decode.h ilbc/iLBC_define.h ilbc/iLBC_encode.h], [has_ilbc=yes], [has_ilbc=no])]) | |
14 | fi | |
15 | ||
16 | if test "x${has_ilbc}" = "xyes"; then | |
17 | --- opal-3.10.9/plugins/audio/iLBC/ilbccodec.c.orig 2012-11-26 11:48:21.000000000 +0100 | |
18 | +++ opal-3.10.9/plugins/audio/iLBC/ilbccodec.c 2013-01-24 16:11:10.948783326 +0100 | |
19 | @@ -37,9 +37,24 @@ | |
20 | ||
21 | #include <codec/opalplugin.h> | |
22 | ||
23 | +#if defined(HAVE_ILBC_ILBC_DECODE_H) && defined(HAVE_ILBC_ILBC_ENCODE_H) && defined(HAVE_ILBC_ILBC_DEFINE_H) | |
24 | +#include <ilbc/iLBC_encode.h> | |
25 | +#include <ilbc/iLBC_decode.h> | |
26 | +#include <ilbc/iLBC_define.h> | |
27 | +#define ILBC_SAMPLE_TYPE float | |
28 | +#elif defined(HAVE_ILBC_H) | |
29 | +#include <ilbc.h> | |
30 | +#define ILBC_SAMPLE_TYPE WebRtc_Word16 | |
31 | +#define NO_OF_BYTES_20MS 38 | |
32 | +#define NO_OF_BYTES_30MS 50 | |
33 | +#define MIN_SAMPLE -32768 | |
34 | +#define MAX_SAMPLE 32767 | |
35 | +#else | |
36 | +#define ILBC_SAMPLE_TYPE float | |
37 | #include "iLBC/iLBC_encode.h" | |
38 | #include "iLBC/iLBC_decode.h" | |
39 | #include "iLBC/iLBC_define.h" | |
40 | +#endif | |
41 | ||
42 | #define BITRATE_30MS NO_OF_BYTES_30MS*8*8000/BLOCKL_30MS | |
43 | #define BITRATE_20MS NO_OF_BYTES_20MS*8*8000/BLOCKL_20MS | |
44 | @@ -91,7 +91,7 @@ | |
45 | unsigned * toLen, | |
46 | unsigned int * flag) | |
47 | { | |
48 | - float block[BLOCKL_MAX]; | |
49 | + ILBC_SAMPLE_TYPE block[BLOCKL_MAX]; | |
50 | int i; | |
51 | ||
52 | struct iLBC_Enc_Inst_t_ * encoder = (struct iLBC_Enc_Inst_t_ *)context; | |
53 | @@ -102,7 +102,7 @@ | |
54 | ||
55 | /* convert signal to float */ | |
56 | for (i = 0; i < encoder->blockl; i++) | |
57 | - block[i] = (float)sampleBuffer[i]; | |
58 | + block[i] = (ILBC_SAMPLE_TYPE)sampleBuffer[i]; | |
59 | ||
60 | /* do the actual encoding */ | |
61 | iLBC_encode(to, block, encoder); | |
62 | @@ -124,7 +124,7 @@ | |
63 | unsigned int * flag) | |
64 | { | |
65 | int i; | |
66 | - float block[BLOCKL_MAX]; | |
67 | + ILBC_SAMPLE_TYPE block[BLOCKL_MAX]; | |
68 | ||
69 | struct iLBC_Dec_Inst_t_ * decoder = (struct iLBC_Dec_Inst_t_ *)context; | |
70 | short * sampleBuffer = (short *)to; |