author | Kuibao Zhang <kuibao.zhang@amlogic.com> | 2017-11-06 06:27:43 (GMT) |
---|---|---|
committer | Kuibao Zhang <kuibao.zhang@amlogic.com> | 2017-11-06 06:27:43 (GMT) |
commit | f314d56972dea7eb542a203f42aeaba3669b96bf (patch) | |
tree | b5e05b506132b2e96b505b9e217d943f3c31ebeb | |
parent | c448cd48f3b12e647f6147d88ad18df2ccbc4914 (diff) | |
download | audio-f314d56972dea7eb542a203f42aeaba3669b96bf.zip audio-f314d56972dea7eb542a203f42aeaba3669b96bf.tar.gz audio-f314d56972dea7eb542a203f42aeaba3669b96bf.tar.bz2 |
BT: android o add remote audio[2/3]
PD#150889
1.huitong lib
2.remote audio
Change-Id: I9724d9b0614a633c793ffd2ad1e19f0cb74a6c0f
-rw-r--r-- | Android.mk | 6 | ||||
-rw-r--r-- | audio_hw.c | 135 | ||||
-rwxr-xr-x | rcaudio/audio.bt.remote-arm.a | 6832 | ||||
-rwxr-xr-x | rcaudio/audio.bt.remote-arm64.a | 4622 | ||||
-rw-r--r-- | rcaudio/bitpack.h | 35 | ||||
-rw-r--r-- | rcaudio/bv32.h | 47 | ||||
-rw-r--r-- | rcaudio/bv32cnst.h | 152 | ||||
-rw-r--r-- | rcaudio/bv32strct.h | 93 | ||||
-rw-r--r-- | rcaudio/bvcommon.h | 102 | ||||
-rw-r--r-- | rcaudio/def.h | 30 | ||||
-rw-r--r-- | rcaudio/dvi_adpcm.h | 17 | ||||
-rw-r--r-- | rcaudio/huitong_audio.h | 152 | ||||
-rw-r--r-- | rcaudio/huitong_log.h | 4 | ||||
-rw-r--r-- | rcaudio/mainSBC.h | 3 | ||||
-rw-r--r-- | rcaudio/opus.h | 986 | ||||
-rw-r--r-- | rcaudio/opus_defines.h | 766 | ||||
-rw-r--r-- | rcaudio/opus_types.h | 159 | ||||
-rw-r--r-- | rcaudio/ti_audio.h | 15 | ||||
-rw-r--r-- | rcaudio/typedef.h | 33 |
19 files changed, 14154 insertions, 35 deletions
@@ -47,14 +47,16 @@ ifeq ($(strip $(BOARD_ALSA_AUDIO)),tiny) frameworks/av/media/libeffects/lvm/lib/Common/lib \ frameworks/av/media/libeffects/lvm/lib/Common/src \ libTVaudio/audio + LOCAL_STATIC_LIBRARIES += libmusicbundle - LOCAL_STATIC_LIBRARIES += libmusicbundle + LOCAL_LDFLAGS_arm += $(LOCAL_PATH)/rcaudio/audio.bt.remote-arm.a + LOCAL_LDFLAGS_arm64 += $(LOCAL_PATH)/rcaudio/audio.bt.remote-arm64.a LOCAL_SHARED_LIBRARIES := \ liblog libcutils libtinyalsa \ libaudioutils libdl libaudioroute libutils \ libaudiospdif - LOCAL_MODULE_TAGS := optional + LOCAL_MODULE_TAGS := optional include $(BUILD_SHARED_LIBRARY) @@ -58,7 +58,11 @@ #include "audio_hw_profile.h" #include "spdifenc_wrap.h" #include "audio_virtual_effect.h" - +// for invoke huitong functions +#include "rcaudio/huitong_audio.h" +#include <cutils/properties.h> +//set proprety +#define RC_HIDRAW_FD "rc_hidraw_fd" /* ALSA cards for AML */ #define CARD_AMLOGIC_BOARD 0 /* ALSA ports for AML */ @@ -3703,28 +3707,65 @@ static int adev_open_input_stream(struct audio_hw_device *dev, if (!in) { return -ENOMEM; } - - in->stream.common.get_sample_rate = in_get_sample_rate; - in->stream.common.set_sample_rate = in_set_sample_rate; - in->stream.common.get_buffer_size = in_get_buffer_size; - in->stream.common.get_channels = in_get_channels; - in->stream.common.get_format = in_get_format; - in->stream.common.set_format = in_set_format; - in->stream.common.standby = in_standby; - in->stream.common.dump = in_dump; - in->stream.common.set_parameters = in_set_parameters; - in->stream.common.get_parameters = in_get_parameters; - in->stream.common.add_audio_effect = in_add_audio_effect; - in->stream.common.remove_audio_effect = in_remove_audio_effect; - in->stream.set_gain = in_set_gain; - in->stream.read = in_read; - in->stream.get_input_frames_lost = in_get_input_frames_lost; - in->requested_rate = config->sample_rate; in->device = devices & ~AUDIO_DEVICE_BIT_IN; + + if ((in->device & AUDIO_DEVICE_IN_WIRED_HEADSET) && ENABLE_HUITONG) { + // usecase for huitong + in->stream.common.get_sample_rate = huitong_in_get_sample_rate; + in->stream.common.set_sample_rate = huitong_in_set_sample_rate; + in->stream.common.get_buffer_size = huitong_in_get_buffer_size; + in->stream.common.get_channels = huitong_in_get_channels; + in->stream.common.get_format = huitong_in_get_format; + in->stream.common.set_format = huitong_in_set_format; + in->stream.common.standby = huitong_in_standby; + in->stream.common.dump = huitong_in_dump; + in->stream.common.set_parameters = huitong_in_set_parameters; + in->stream.common.get_parameters = huitong_in_get_parameters; + in->stream.set_gain = huitong_in_set_gain; + in->stream.read = huitong_in_read; + in->stream.get_input_frames_lost = huitong_in_get_input_frames_lost; + } else { + // usecase for amlogic audio hal + in->stream.common.get_sample_rate = in_get_sample_rate; + in->stream.common.set_sample_rate = in_set_sample_rate; + in->stream.common.get_buffer_size = in_get_buffer_size; + in->stream.common.get_channels = in_get_channels; + in->stream.common.get_format = in_get_format; + in->stream.common.set_format = in_set_format; + in->stream.common.standby = in_standby; + in->stream.common.dump = in_dump; + in->stream.common.set_parameters = in_set_parameters; + in->stream.common.get_parameters = in_get_parameters; + in->stream.common.add_audio_effect = in_add_audio_effect; + in->stream.common.remove_audio_effect = in_remove_audio_effect; + in->stream.set_gain = in_set_gain; + in->stream.read = in_read; + in->stream.get_input_frames_lost = in_get_input_frames_lost; + } + if (in->device & AUDIO_DEVICE_IN_ALL_SCO) { memcpy(&in->config, &pcm_config_bt, sizeof(pcm_config_bt)); +#if ENABLE_HUITONG +// usecase for huitong + } else if (in->device & AUDIO_DEVICE_IN_WIRED_HEADSET) { + property_set(RC_HIDRAW_FD,"true"); + if (hidraw_fd > 0) { + ALOGE("%s hidraw_fd has not been closed ago!", __FUNCTION__); + close(hidraw_fd); + hidraw_fd = -1; + } + hidraw_fd = get_hidraw_device_fd(); + if (hidraw_fd <= 0) { + ALOGE("%s there is no hidraw device", __FUNCTION__); + return -EAGAIN; + } + part_index = 0; + memset(ADPCM_Data_Frame, 0, sizeof(ADPCM_Data_Frame)); //for ti rc + + memcpy(&in->config, &pcm_config_vg, sizeof(pcm_config_vg)); +#endif } else { memcpy(&in->config, &pcm_config_in, sizeof(pcm_config_in)); } @@ -3736,6 +3777,13 @@ static int adev_open_input_stream(struct audio_hw_device *dev, } else { ALOGE("Bad value of channel count : %d", in->config.channels); } +#if ENABLE_HUITONG + // usecase for huitong + if (in->device & AUDIO_DEVICE_IN_WIRED_HEADSET) { + config->sample_rate = in->config.rate; + config->channel_mask = AUDIO_CHANNEL_IN_MONO; + } +#endif in->buffer = malloc(in->config.period_size * audio_stream_in_frame_size(&in->stream)); if (!in->buffer) { @@ -3743,28 +3791,49 @@ static int adev_open_input_stream(struct audio_hw_device *dev, goto err_open; } - if (in->requested_rate != in->config.rate) { - LOGFUNC("%s(in->requested_rate=%d, in->config.rate=%d)", - __FUNCTION__, in->requested_rate, in->config.rate); - in->buf_provider.get_next_buffer = get_next_buffer; - in->buf_provider.release_buffer = release_buffer; - ret = create_resampler(in->config.rate, - in->requested_rate, - in->config.channels, - RESAMPLER_QUALITY_DEFAULT, - &in->buf_provider, - &in->resampler); + if (!ENABLE_HUITONG) { + // initiate resampler only if amlogic audio hal is used + if (in->requested_rate != in->config.rate) { + LOGFUNC("%s(in->requested_rate=%d, in->config.rate=%d)", + __FUNCTION__, in->requested_rate, in->config.rate); + in->buf_provider.get_next_buffer = get_next_buffer; + in->buf_provider.release_buffer = release_buffer; + ret = create_resampler(in->config.rate, + in->requested_rate, + in->config.channels, + RESAMPLER_QUALITY_DEFAULT, + &in->buf_provider, + &in->resampler); - if (ret != 0) { - ALOGE("Amlogic_HAL - create resampler failed. (%dHz --> %dHz)", in->config.rate, in->requested_rate); - ret = -EINVAL; - goto err_open; + if (ret != 0) { + ALOGE("Amlogic_HAL - create resampler failed. (%dHz --> %dHz)", in->config.rate, in->requested_rate); + ret = -EINVAL; + goto err_open; + } } } in->dev = ladev; in->standby = 1; *stream_in = &in->stream; + +#if ENABLE_HUITONG + ALOGE("[Abner]%s huitong_rc_platform=%d",__FUNCTION__,huitong_rc_platform); + if (huitong_rc_platform == RC_PLATFORM_TI) { + //no action here,log capture in ti decode file.it is not good!you must catpure log as below. + } else if (huitong_rc_platform == RC_PLATFORM_BCM) { + sbc_decoder_reset(); + log_begin(); + } else if (huitong_rc_platform == RC_PLATFORM_DIALOG) { + log_begin(); + } else if (huitong_rc_platform == RC_PLATFORM_NORDIC) { + int error; + st = opus_decoder_create(16000, 1, &error); + Reset_BV32_Decoder(&bv32_st); + log_begin(); + } else { + } +#endif return 0; err_open: diff --git a/rcaudio/audio.bt.remote-arm.a b/rcaudio/audio.bt.remote-arm.a new file mode 100755 index 0000000..2183fba --- a/dev/null +++ b/rcaudio/audio.bt.remote-arm.a @@ -0,0 +1,6832 @@ +!<arch> +/ 0 0 0 0 7008 ` + + + + +, +: +: +t + + + + +get_hidraw_device_fd +decode_indices.o/ +decode_parameters.o/ +decoder_set_fs.o/ +LPC_analysis_filter.o/ +LPC_inv_pred_gain.o/ +NLSF_stabilize.o/ +NLSF_VQ_weights_laroia.o/ +pitch_est_tables.o/ +resampler_private_AR2.o/ +resampler_private_down_FIR.o/ +resampler_private_IIR_FIR.o/ +resampler_private_up2_HQ.o/ +stereo_decode_pred.o/ +stereo_MS_to_LR.o/ +tables_NLSF_CB_NB_MB.o/ +tables_NLSF_CB_WB.o/ +tables_pitch_lag.o/ +tables_pulses_per_block.o/ +huitong_audio.o/0 0 0 644 77916 ` +ELF +E"aK1BJDAB +A + +O +8F(Fd!:Fh +zD +`TxDFh0`XFL`
+yDHxD +O +8F(Fd!:Fh +xD +zD +` +xD +P!xDF +A + +P!xDF +A + +xD`l +xDd!O +d!xD +xD`h + + +yD +FA +! +zD +2`<xDFh0`0 yDj(xD +A + +#xD~D)hB +3 +`d!wTL1F"|D< + + + + + + + + + + + + + + + + + + + + + + + + + + + +2I2J yD + + + + + + + + + + + + + + + + + + + + + + + + + + + +! +L +L + +L +L +L +L +L +L + + + +A +)
+@ +(
+=q +&
+;E +%
6 + +>e +' +L +L +C +. + +L +:D +$ +L +L +L +D@ +/ +L +L +L +L +L +L +L +" +L +L +L +L + +L +L + +L +L +L += + + + +C) + + + + + +2 +L + + + + + + + + + + + + + + + + + + + +2 +A + + + + +g MN, +j Ff'J6.KJ.!hK0 +. + +H + / + + + + + + + +!<} wJ yJ+J~f ~JeJHq.,kJ +f
~f +
+Jk .. yJ$3
O$u ~aJ3 +. +K.+J4 +"P}J&.}J"J}ff}JgW9JJ.}Jf./-52F+ +f + + + + +, +/ + + +6Lg> +P + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +p +p + +m +u +p +j +p +k +k +{ +l +p +k +{ +l +k +{ +l +k +{ +l + +k +p +p +p +p +j +p +j +p +k +p +k +k +j +p +p +p +k +k +{ +u + + + +p +| +u +p +i +u +p +~ + +h +u +p +p +l +j +p +k +r +u + +f + +g + + + +l + +p + +v + +k + +e + + + +l + +p + +k + +{ +l +p +k +{ +k +l +p +k +} + +k + + +l +x +s +: +p +z +q + +p +t + +q + +p +q + +p +| +p + +p +p +p +p +v +y +v + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +ELF +"NDKxD~DxxD! +\F{ +D{D + +LLT!%(,[1K6;ADH~OqW/`ibt +4 + + + + + + +A + +mzJ1+1+1 + +0,f +~.<J +~J.%g. +.- +Jf +~J +J~.K
/0
J +2#+J
M#+.
1+
H +L.+$ +.
1vf +f1
h + + + + +c +N +N + + + + + + +ELF +BVۑHxDh(h(hH + + + + + + + + +hhh92H + + +,xD + + +xD +xD + + +*xD + + + + +xD + + +BT +`~D + hzD}D hIyD` +I +HxD +hhhKBJBOFzDؿ 1Dh?hh?hDI`7DJyD + hzD +x1F` CF:p +9 + + + + + + + + + + +m + + +A + +J5J#.J5JJuJ!L +.IK +zfRx.6x.RxJ6KMN*G6w.Rz.5x.I2H6/y.6,/+2y.EML+2+/M-1/+2/*K4t.LK/1//1%[J.%..%....J5J#.J5JJuJ!L .KJa.!J,0,a.!J_.f0. + +K. +LI +/f +K.Q.
z.4f
J/l)L.N7+.9K;/-KK +.. +K..fhtiJ..ff +.. +.. +.. +.mJ..f
f........K..tJ
..
fhM........K..fK.. + +.xJ.
,0.6
v. +.xJ6 +iJKga.6L,0,0,0LK
K0Kg5..f
J/
-g0 +. +fK.KI/)JN7+.9K;/-KK +..KJ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF +F +'0F@{ +7 3B +%s !s1 + + +gFfDA}<|FM@G~O9Lk{UO<@E$huC$0 +$h + PFH9j$hU +UUO<C$NDI l|$hUO< +C ++ +zxjPC +h4ii6j + + + + + + +z + + +! + +p +30P(3W3 33OC(;01dFyDBF%x +`%xB+F +hDhQE! %²E
x|O +hy{I}yByy +PQ@4C +, +0D +FX +Fh8$ `yBF, +`0Rh +b@1XEFO + + +FpF +0DD}6ಆB{ F + +hyI}By!y +O + +F + + +9`)%H5`E|37Bې + + +FsE6 4.@I +{DB + + ѐ +O +
+ +
+ +
BF +&;ROhu麧̟9$wjMPITsn= lqVK"?5(A\{fߌ
*7dy^CZG`}.3 bEX1, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +:; + + +F + + + + +% +% +% +% +% +% +% +% +% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +A + + +v. Jv. .v. f +K +%! +xfJ +t.CxJJMf.0%JJ/X1N
#J]J +JuJtfJ +v +J.2Jf0K. +f +
/P/,H--0/I J.&JJ +3
/QK,1zfIe/IJ N +*1+ +JNI/J, +
<!?0g
h KJ5K./.fGK.#/./.!/./.J/./f/f{.zff/.J*J.Jf2.5 +KJK +KJ +D*b . +K J +. + + + + + + +LJ J +2 N. +. RJ +.. J +q f + +HJh. +o +oJ +JL +rJ +JvJ +f +uf + +rJ.0 +* +KJ + +.KI + .O +h&. +.L .(J +.". +Jh +.. +q.L$.. + +Jh +
/O-HI./IQJfI.l.'f +iO.t. +4 + +?,#0 +0 +_i1/.1#/I +* +/I +J+ +JgP ++ +K +M1/.M#KI +* +J +KI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF +I yD h h + +PI + + +( Fo" + +Y*a + + +F2*FJ +AO +vHO +xD + + + +P + + + JHH +p p@ 0 + +Jl6`zDD.D) + + + + + + + + + + + + + + +< + +Z + + +A + +tFNF2*.N*28 + + +;J!J% +1 +0<
,0HmyJL +.. +zJ PJI Ke +3M f +H
LK +HL +I
NK +F
LMFJK +ILK +HM +q.KKOh +i + + + + + + + + + + + + + + + + + + + + + + + +ELF + +( +66 +(۰H + +D +0 + + + +hE +DE + +2 + +۞BDF5B,F + FFwFFBFF + + + +Q0A0(HCyC + + FE + + + + +Q0A2 +/h + +ȿBBC +& + + + +Q0A0,0 + A +HO +,'S"H( +# + (# + + ,T + + + +Oa +{Dih + +##{jFG<lG<kGG<GGymmh9kGG cj +>KBW<DW<`0BWl;j +<6 +>0 +rD1C,BE2FWLWLW\(Fk +W, +1 +
+ +2<0B +~. +W\WQWx,N$, +! +@倧~ +FĿFJFWO +~: +""1@ + +H!^,~N0*F<sS,(CW,H +KF@WW +[<DFFW< + +FFG܌qN,,W`aM + +TtZFWT,t@HD)(ȿT O+FWl +lF^+FWXFWĜWIFZF~WN0H +(Du!(ȿU +۰K +FK1FZF +1..*12 +0̚^0A + + +OF1FW<W +W< +W +W< +W +FYF +lF!FU"{[ +! + + + +! + +W0WWWLLW +. + + +. + +W< +) + +) + + +1 + + +1@ + + +1 + +WWWL
ۧqQ$@XF +8@ + + +;jV, +"]TO +HWXxD +T +t )!ہ + \6a\A + +B +J + Ohv +E +E +!F2F +E +B + + + +H$!F + + + FE +O +O + + +,
* + ! +Fo2 +۳?? +ѱ + +2 + +Ѽ:FF ":F +H +FdF#H + + + +PF"I@@$OsFF$ ;O"U +$ +>Fz(0qF:FHxD +{D)
X*0FKC + +E*O +OO +( +8@ + +1F +O` +J`+иELH +g + +E`EFؿFjIlb +az%E +O7!F8F +8F +KFO0!FF@1hO +*ONOY@ +FhD + + +0 + + + +.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +4 + +% + + + + + + + + + + + + +61 +10 +2 +30 +40 +5 + + + +. +% + +. +% + + + + + + + + + + + + +A + + +hJ +JJJJJ +["IO +f!J +"zJ
$O E + + +
K
KK +F/!. + +Z~fJ +..J.fM+1~J.~.DJ
.IKeK#.(RJJ)3)y.KKIKIK + +JvJ%f.%N*J(J.} + +#JJ .JmJfhqJ2v.J.KQ1wJ f + + +1 .EE + +t 1i.MqJfMggK +K
Iof +J +L,: + + + + + +."iG"M)L)h +$* +
4Qz.IJnJFIQRjF_$+1G
PH/Ih(
K"I.J.f'J
K- J.J
* +JxJ
J +J# +xX Lp Qf1 +K.J +JKK J +JFg'J-J +KJMI I +g&.5J +J,.;J +J i\i +g$.3J +J +1
J +Je + +.1. + +5.yJQ.yJm + + + + +$
uJJ
1y.J
%yJ=JJGi+ +
i,/fJ1HhzJPO*IKzJ/,nI +JtJ2,d)fdJ +5,yJQ,yJm + + + +<.( +ivJ +.JJz. +J#L/ + +/HKIKKIK + + + + + + + + + + + + + + +i +l +d + +i +i +i +i +i +i + + + + + + + +i + + +l + + + + + +e +e +m +g + + + + + + + +d + + +m +m +m +m + + + + + + + + +f + + + + + + + + +f + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +% +' ++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF + +& + +A + +4 + +ELF + +& +C +A + +NK + +ELF +_ pGBaB pG + +"*!o +FBFCL +ZJF +fz\FF +_"zS* +7"z j0z6j + + + + + + + + + +o$ +A + + . + + w +gk.#} +zJMR +u4 +GKHKO +FNL +sJ vJH +yJ K +yJ +uJdKK +s. +FOLFMHMILG +EQEP +KE +G0I +I +0 +J/&I8/<.>.@..I +- + + + + + + + + +ELF + + +CE EO04W ,yD h hFO0@BEW, +GG(GO + +ؿ2DBS" @+"FihiDO G,-WpL.<(F!GiW<#XFAFRF%F +F ha FG +WpL ijiD G\ + FWtWBFW +B0FFi#FqiC@WDWLK 8E;qFO + +WHB1L%0EFEO +0)FO0$B +lG G +W\,ZWL@WWWO + hiiW, 2BF@W +Wx +P%,k@ `PFWpLQF + +H0 `W<1WW< + + +2 +W*0 + +(!A +WB` +J + +nLF +krd +J + + + +qgF@F + + +nO~Rpoj +pln0coxD + + + + + + +0( +*!*!0 + +D +-۰K +!K +1۴@*HA* + + +pmiXFLjpo(+( +0nLqo +! + + + +> +0k +,۰L +0n!F +
BݴE0 +> + + + +l(;@0nlm +@ + + + -m h + +0 + +۴np,40mBW + +HWxD +@G0\ +@ +(F +@ + + + + + + + + + + + + + + + + + +D +ӣ + +Ӯ + + + + + + + + + + + + + + + + + + + +A + +K3zJ
Kx. +3Z,J
UK + +" +JJ +"h,x +~f<*. zJ).z.D.z..J.'!~X40f1J0zJ..J ++v)f#g)I=J0 +y". +yJ
+# +. +H +JJ . +J
+y<J +yJ +yJ$%$JIJ%gI + 4yrJJK L>JK.
+ + + +i+ +1 +} +. +}J + + + + +|. +. +|J + +! +H0 +H + + +
r L%. dJ +@J +n.Jm. + +%m.LN+MGF
r.!*J!. +~. +~. + + +f% +.#<7 + + +/ +/th.KyL#..JlJhmJ$ +L3wJ +J
wf +J +x + + + +O +O +2 +N +T +8 +J +G + + +G +K +H +H +I +G +G +W +G +G +I +M +L +G +L +I +L +E +Y +5 +R +H +X +< +X + + +D + +D + +4 +4 +4 + +1 +B +S +5 + +8 +P +Q +: +; +@ +U +5 +A +U +3 +D +1 +8 +F +4 +C +C +F +C +F +F +C +8 +1 +2 +8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF + +Z=/ +/ + + +W<0 +iE + +
0 + + +0 + + +0 + +O +@+۰@FF5F +0 ++' +c$za$jdJ5J7j6Z4z +c$j`$zdJ5J6Z7j4z +OB + QB + +F +: + +*F +` +iN + +FXD @ + + + +3B*2A1@ +@ +hEO +iE(ڰi +F*F[F + +i0 + + + +E- +< + + + + + +HWxD + + + + + +.@:;'? + + + +A + + + +yfJ~JJv$f + + + + +&/ +3 +L +yX!KIKIg +gJ +x &uff + + +g +i +Y +l +h +Y +l +i +r +l + + + + + + +ELF +` + + + + + + + + + + + + +> + + + + + + + + + + + + + + + + + + + + + +A + +M +J!J hJ!JhJ +fwJO*5FMH4zf/LcxJOaObMNc+KLILe kHEIHGFN*MLI+N+,KK" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF +! + + +/ +A + +^N +. +^N +P +M +O +M + + + +ELF +FW" B
FaFP% +{p!FpWF\DWKDD"F{D +=F=VlV'`BU$`<Be +` +` +?2/ +0 + + + + + + + + + + + +A< )9J\)0o i )| 9ATMp AV) +wNyr )iA +8 ;cA{ N0) $] )RR ^ADa ]BA> ) x- +Ԁ +, + -)lA@
e
A*
4 +
|) McLS )NSP cA~ k +A<)t O_ " )$_fA ϊUHAI !a"*0#)$ ;$Q% + +Cu/p62g!O)A<U$"$E')h~,p/-2)5+79]%<c@IDɲHenMÚQ_V{\[-`fkíqw"]~# +IW]j1'MѲ&Hu($ٜm)R/m59=aA\E`NYX\ci~o| +aX?%e4&/:;b"IqY?mX + +4 + +A + +x +JJf +0 + + + + + + + +0 ,J+ 1 +f. +M 0L +j , +L
fHLJLGMG +lI
/.0zKOEO +X + + + + +ELF +`D +A +A DF0o +!"; ++Ѓ!"!"X) + + + xYtY|Yp9X) + +LDE +ADa(raB +(Aѻ +Ѽi0 FT A!A +O9FD3`a +ixj FjDbT + +0T $A +i( +FPFIF4 +@ +0 +F*@iD + +FB4F)(1Ѱh + +):"XQC +#Ap)D2 +:; + + + + + + + + + + + + + + + + + + + + + + + +A + + +h +OJ~J!~9J0 +w rz.4 +,xJHM,HJ0HJ&< + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF +G! +GEWP\oFk<H5NlxDj> +GTG|o + #HD + +܃BFFBܓBFFLFFG\WhWP` +A +G\$7H7F7D,On7BLS̛ + + +AC"@!H +FFBF + +| + +7 + + + +0 + " +" +" +" + + + + + + +A + +
&Yu/ +.v. J+ +J!dzfK
K-J
K!/M
ei
KeO+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF +i(FQF8j[F +hPHI +@ FOJJ + + + + + + + +I + + + + + + + +V + +` +. + + +I + + +A + +x* "l.
L*O8 fE + + + + + + + + + + + + + + + +ELF +ўH"xDh(FH "xD +(FyD" hD + (یH@'xDh(F1F"U 7B + +
*CiFXF +)+uI' +B (_H"xDh(F + +(|ѹ\ (VH"xDh(F"IHC +(FLDIH"xDh(F)۴`DOqD +"` (FP>I" +(FyD h +)%8I + (1H( +"V (F + + I@\ (FyD" h +HxD +I +y +} + + + + +) +) +y +J +) +) +y +y +" +" +y +) +A + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF +$)YFPFH ( + +($)*( +OP(Xh$@FOR$PFOR +(79 +) +62BHxD + + + +# + + + + + +0 +: + +4 +A + +/KII.+KIE"JJiBJJF N*K J + + + + + + + + + + + + + + + + + + + + + +ELF +ܝBFFBܥB%F.FqDBkp +A + +6 .wf .w. .wf Jw. sJ
fsJN sf + + + + + + + +ELF +-0 + *9F +%5NF8F!F" +>%FQ" + + + + +< +[ + + +A + + Q/.I / +txf5y.Q + + +S +S +S +Y +S +U +Q + + + + + +ELF +F(P)I-H +# +-$HxD!HxD-!HxD + AD +$P@ +P@ +P@ +Y@F + + + + + + +< + + + + +A + +K!J+ + + + + + + +ELF +$ + +A + + +N+gIK / +/FN +J
K.$ + + + +ELF + +O"a x + + + +P +P +P + + +Q + +A + +i +JbJ
.L
JI; + +0 +q., +h)
k/.K
. +L../.K...f. +0
/K
-g +3M-K +4hj +lgLJ +2LE!~JJ +~KJ.JJ6f/
- + + + +i +i +i +Y +Y +i +i +p +l +i +i +p + + + + + + + + +ELF + +O1b +Щ +,EbܬC`aAiDAa +(A9`'FW,h + + + + + + +\ + + +A + +// +Jf
Q +dJ//& +PKIK-JH +N,Le-K/.K-/-i. +R*0Kd +hg-K/.JJ.g. +lKKLI.0.d1+.1..J. +1 +MJ
F*X
J..K +...1.0
- +3-K
/-/-+i=.$.1.8J.
.u.JL'f".. .yJ#.4)'/J-@J.3 +hD>J/ + I,K. +KJ + +...1. 0- +JL7MJ.Kg-fJ1".2.5.6 +.vJ
+M*dJ
J.J +KB +K.J
f + + + + +s +s +s +s + + +s +s + + + + + + +ELF +@{O + +FFF(8 +Е +)p @ +B + + + + + + +A + +#4'J| +4f|fVn GT1K1vJ;J
.|f +O2G +@ +@ +A +A + + + + +ELF + + + + + + + +A + +.$~giih + + + + + + + +ELF +< +02 +OA +! +Z3j5C:j* +: + +DFF +:= +#":gJ3D`:% ZT +'j3:t:vJ5Z4z3j3E:4Z'J":"Z0Jf +J +(@w.+ +sZZ3G:t *4`Ju!J5aZs +3jsD:r*5zu2E*3: +*:jz*: + +( +HCFFF
+j>]D + + +wNZ* b*dJc:yj1pz1jr*0zs:vJ6 +d$c +y!e":"b$J6%zc"*6% +#jy%Zd~'z2zt*}LJ!s +x:6JjzZvjy'z2NJ17"ztp*v%J +z5j +j(D$ F7B9F . + + +( +8 + * +"Z +6jrZr:3b:5B*1ztJ4FJH:1j +2*Ij +: + +1@ + +0"hB F1F h(p0 +1@ + +0"hBp + + + + + + + + + + + +& + + + + + + +A + +
<01!/ + + + + + + + + + + + + + + + + + + + + + +xJ}.. + + + + + + +JCvJI&JM6J'P6MJ'HDJ#tJ4OAG4NAG6 +JBH4MBHsJK + + + + + +. + +j + + +i +l + + + + + + + + + + + +ELF +FbDaF#C +DO + + +4 + + + +I +\ +o + +5 +H + +A + +L/wf K/I
/'. +j/J K/I
/+9f +G +F + + + + + +ELF +в?ASB 2 + + + + + +A + + + +ELF + +A + +LJw.M L~N~Q HLP + +ELF +0d8\8lA8 + + + + + + + +> +Q + +p +A + + +.EELNFOHKLGNFLKHMHKK + + +7 + + +ELF + +F + +OAp Ov + +$ + + + +A + +h. +J0J + + +D +F + + + +ELF +A + + JJgiJK + +ELF +"F=Ob + +9 +U)82`T+r`W, WW(1FFPE<FiW$\ + + +5D*0 + +DWHWxD +/FTF? Od +s + +"@ + +1FH@(M + + +* + + +!#Z0A +5** +*,po + +#5D*0 + + + + + + + + +4 + + + + + + + + + +A + + + +wJ5 JzJ +O +f;c +l/ +10/1L +w. +f@bAM< +M+ +L!cKL +KJm + +a +a +] +a + + + + +ELF +O0` + + + +|qke_XRLF@93-'!{uoib\VPJC=71+$yslf`ZTMGA;5.}vpjd^WQKE?8-h +?P?+?AE?%j?s?Ώ#?'?t|+??Z/?&3?6?:?3>?ŌA?wD?:H?'mK?ΆN?Q?lT?8W?iY?E\?^?sYa?c?e?g?i?Ҡk?n_m?Po?p?r?]s?t?u?Wv?w?x?y?srz?''{?{?^|?5|?Y}?}?~?p~?~?~?&)?U?z??̲????????????? +w?nv?%v?/\v?!v?<u?@u?mu?B0u?At?t?;tt?74t?s?,s?&ps?v-s?r?r?dar? +r?q?Wq? +:?3:?9?9?Gw8?Q7?L7?6?k 6?t5?4?Z4?3?(3?02?B1?Z1?0?$0?/?U.?O.?2-?i-?'v,?k+?78+?*?g)?W)?(?2(?3s'?&?-&?y%?$?aB$?#?}"?R"?Ϭ!?M!?[_ ??%?g?0??l???Cm? +? +?V?ߢ +?c ?9 ?I???Tb???=?=???[?a +XlerȆw\'c֚&3:½ɽ=нTֽJݽ;]r3RGe 2YJG N#7' + +7
$P82evc&
3Ȏ<HHABc@h%:# /!_!R|"!##k$%\%V&h&'=(()} **`+'+ĝ,;--v.y//sK00122N3345?5F6n6Er78q8099W::|;<<0==P>>n??@@SAA/B`BSFCCZDDlEE|FGGH%H IIo#JJ)KKc-LzL/MMb.N9N~+O3OU&PPQPQ(RmR S;SSrTT`UULVV'6W +}\\U]>],^W^^h_h_39`b`ala:a6bbbYacc,%d%d~d7FeNefaf;f^gMwggD-hKhho9iii?j jj{@kkYkO;llKlO0mmemunmnno.Uooo6pgppqYqqqq-rrr&rr2>ssstIDt"tPtu?u|uPu!uE0vjvvvwMwwWww&xzZx*x+x}x!%yVy\yyyz@zsmzzzz{aC{l{"{z{ {|\-|Q|u|||U|s|}>}]}{}}}}b}? ~i#~<~U~m~~ɛ~ı~
~~~2&8vH'X$gnu_t]=j?9??K??#?Y??[?(?'p?ZR?1?X?%~?&~?\~?d~?i3~?A}?O}?}?R}?}?|?|?MD|?{?ͬ{?\{?C +{?ݴz?\z?z?.y?Cy?x?zx?Lx?w?9w?Ov?Tv?u?eu?ut?Dlt?es?gs?r?Xr?9q? ?q?4p?p?o?n?Pn?m?m?nl?k? k?uj?Ii?9i?eh?og?f?|>f?e?od? +I?RH?eG?GF?E?D?C? B?:oA?4U@?9??>?<?&;?:?69?d8?":7?
6?4?|3?{2?G1?0?.?-?Vb,?H$+?Z)?(?^'?q&?%$? #?#>"?u ??R? +l2
lf-,HvqVbQU D! "|#$$%j&'0(4*s+,?-'/^0Д123*5X6789: <B=b>O?@hABCDFGV!H+I3J9K=L ?MD>N=;O5PZ.Qy$RJS TTUMVpW7XYbZ>A[u\A\]^v_"F`aabmcT1d~d&eImf&ggh{DiiàjKkkޗld:mPmwnSofo?ppbq[q:{rqsstt ukuu +<*;<xֺ-DqWL']JZm"hٽNQ/!/A<djIMV͠cPpE}
Sȋ
8f^زi+D*ľʾѾEu-ݾ3v0"ヘ +\ +?k?.>>>>>b>N>*T>Q>Ώ>m>k>bQ>0P7>>U>bh=| +') + +1>HP{ + +j +qּy? /?:^Vs?5?*~?3e~?ֽ9~?sU}?Y}?%|?\0 gM|?i-{?:{?Ggz?T y?a<x?Mox?|Fw?wcv?>6uu?uj0|t?Lԗqxs?z7jr?Pq?誾O-p?A6!n?|vm?^l?þ5k?ʾi??о|h?Z־g?kܾte?sd?qq辍b?e(`?'N[_?,׳]? +I?| +F?$!D?F#B?:B&x@?(>>?%L+;?-"9?80_7?e25?5e2?_780?"9-?;%L+?>>(?x@:B&?BF#?D$!? +F|? +I?4K+?My?Oʿ?lQ +q<uV<c +qּ y:^V/s*53e~ֽ~s9~U}Y}\0 %|i-gM|:{G{Tgza yMo<x|xFw>wcvuj6uuLԗ0|tz7qxsjr誾PqA6O-p|!nvmþ^lʾ5k?оiZ־|hkܾgsteqqdeb'N(`,[_ +I$! +FF#D:B&B(x@%L+>>-;80"9e2_755_7e2"980;->>%L+x@(B:B&DF# +F$! +I|4KM+OylQʿR +qּcuV +q<y =/:^V=s=5*=~3e=~=9~s=U}>Y}>%|\0 >gM|i->{:>{G>gzT> ya><xMo>x|>Fw>wcv>>6uuuj>0|tLԗ>qxsz7>jr>Pq>O-pA6>!n|>vm>^l>5k>i?>|hZ>gk>tes>dqq>be>(`'N>[_,>׳] +I|? +F$!?DF#?B:B&?x@(?>>%L+?;-?"980?_7e2?55?e2_7?80"9?-;?%L+>>?(x@?:B&B?F#D?$! +F?| +I?4K?+M?yO?ʿlQ? +qּ?uVc? +q<? =y?:^V=/?=s?*=5?3e=~?=~?s=9~?>U}?>Y}?\0 >%|?i->gM|?:>{?G>{?T>gz?a> y?Mo><x?|>x?>Fw?>>wcv?uj>6uu?Lԗ>0|t?z7>qxs?>jr?>Pq?A6>O-p?|>!n?>vm?>^l?>5k??>i?Z>|h?k>g?s>te?qq>d?e>b?'N>(`?,>[_? +I?$!? +F?F#?D?:B&?B?(?x@?%L+?>>?-?;?80?"9?e2?_7?5?5?_7?e2?"9?80?;?-?>>?%L+?x@?(?B?:B&?D?F#? +F?$!? +I?|?4K??M?+?O?y?lQ?ʿ?R? +q<c?uV< + + + +$ + + + + + + +A + +f,J/ + + + + +ELF + +.:;'I + + +A + + +X,J + + + +^ +[ +W +] +Y + + +ELF +@ + +ABD +ܐBFFBܨB(FF^ +6+ + + + + + +1XY +k +k +k +r +r + + +A + +$ + + +2 + + + + +ELF +& + +J + +C +A + +3 + +ELF +yF)ؿQFO + + O +1UXY +C +C +C +r + +A + +
.|.
J|J|J-K-
.|f<. + + +, +, +, +, +, + + + +ELF +O1]
l
&O2FX& X'0>F^6PGDGD4G +WkeD + +- +-"ѻ0H + + + +I + + + + +$ +$ + +A + + +;.DJ + + +H +O +L +O +J + + + +ELF + + + + +4FZF@F%F- + +j4FJ +ȿ@ + +@ +zHA +H`zȿ`z; + + +pҲHp pG +DQb +F + +@.x>(F!(D +@ @ABBL!C.ۛ + + + + +4 + + +A + + + + +Ld +G + + + + + +0m*J/.$..M +. + + i +/ +- + +NhkLK/ + + + + + + + + +\ +_ +\ +a + +ELF + +O + + +DED2 +FkGTH +( +BFGOk EX +FO +F)тWd,IFCFJEF + + +FWT<Wx(9ѠhWdEh + +FWT<jP +` + +^ + +Q0hWT< *A0 +DWD 9OB +OGXO +qa_ +XF"JF1F#FF.; +I + +ȿ@J +HA +0 + + +4 + +( +0A +@qhHQ chPp dI@pB:@pBA + +h*k@3B2@q +HxD +)o +,O +JFdFAF + + E + + + + + + + + + + + + + +I + + + +a +V +W +X +\ +] +^, +_0 +`4 + +I +F +G +H +T +Q +R +S + + + + + +d + + + + +A + +pJ7J + + +.rf'."M%/ + +.
L0 + +
~J +_@ +f
0+IM:/).
JBf5.
J#k*2//9.J&Of +~fJ~.f~J.
K,s.
JxJR + + + +f$ + + +o",!> +K + + +,! + + +,$;J +JM! +. +. +x.8J~K +Z +. + + +M0'}z zJJ^#.!K/I/J.e<JeJJ.J +KOgJ"t"T<. +x +L/
b.K +qJL/
n..zf0.J/ + + + + + + + + +# + + + + + +$ +( +) + + + + +* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +' + + + + + ++ + + +( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF +r%:: +* +1 + + +(!! + +B +1) +5 +)0 +$z*#j&" +1aZ4 J3:2*ajaza +a * +H
xD +G*H5D4N BAO)D
JʰHD@
@IHjB)@
LJz +gO + +>~ +!jn +OojgBڙ + +p +>qvjBڙ +!" +&:$J6> +0*1:NNB.B$B'NB'Ex, +@+۰@F)FF +vH%6xD& +OFOG,, W(,\FFR[<F[Ѽ W$,FR[F[тORF[F +R + +: + +! +ȿO1@ +HWxD + ++ + +3> +;9 +1O +0 + + + + +j + +6= +<}Wh + +`+. +0 + + += +WpN* +۰h*
Wx$:h* +W +*2@:#Z1@J#:J
2A* +" +ȿO0ʊi +PF + + + + + + + + + + + + + +.:;' + + + + + + + + + + + + + + +A + + +' ++ J +f
+# +-HKK~. +MnXJK/IK, +X
fwJ-Q. +K-J +KJ +--K
+ty LO EN *2zJ +FN xJMzJ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF + + +
"Android clang version 4.0.285906 (based on LLVM 4.0.285906) +A + + + + + + + + + + + + + + + +ELF + + + +>oF + +@`AP + +!02*C@BD + +@ + F<+Gd< +BWh<W`Dq`C8 + +WT +3 +ܐBFFBܘBFF$)Oi +o@I IEFaE(WToo +WFCDWPO)FD3K1aE @BPGA| + sCW\LFk6f#A^ +fB8GGl< GWQ@"G +$O +WLPFP=4+a#FWTW\<1FxOS, + + +FFBF +FGr +F +в?ASB 2 + +HCFHWxD + + + + + +.@1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +% + + + +G +G +I +I +I +8
+9 +: +; +> + + + + + +O% + +>% + +A% + + + + + + +A + + +/#Jg#J/JKJK + + +f
+tJJJMbN .wJLQ"yJJKJ.J +&]3K"~f Jnfu`JJ;fJuJ2 rJWt.*WL1Dxf*sJiJ + JsJ
.#L <) +, +v( +.wJMI +J"
qJH".m. +wJg1K,FiHgHHIO}EKNMzQLeK +^ f%0:J%J:. .)[
'J'..&K$L!2Q!y.J }J!J3&/$./
+ }J 7J +#Jf.i#zJ32!.,J'. + }. +}J MJ +} M. +:,
5s. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +ELF +J + + +G" +O +EBF,FF + +! + + + +hA + +*0jiaWYF +G-@(G1@FG +WL +&F` + W\@ +1hG,R` +@ + +D + +l +FTHT!xD$ +W +NѸjW@DBDݸjFW` +W, +`Wa + + `W7W,hWLW +k + +9 + + + +pO8 + + + +?ܻ +
+0i + + +D +XF*
XFȿ * ܰ?O0 * + +h8* + + + +E +0 ++ + + +O0*F +JTE +Y& +h0 + + +0 + +1 + +E6B + +XI +X* + +
+h + +1 + +F + +EIE6. + +Dhii +x(F(1I(F"yD + +a + + +h +a + +E + +):0 +1*1 +2C +6B
HxD + +U& +h0 + + +0 + +1 + +6B +0F! + +X) +h0 + + + +E + +1 + +F + EکB3+ + +Q0A0h + + + +0665877=rF`JXKXWJYB[Cd;l2x(z%a+N2SNTQXKVJWGZI]J]Jm(r$u"u" + 6s?fBbEcJYG[I[NYVP\B]@f;g<h<u4{,#a&M-=Z]<i*k)n-t&q&p&|
+ +;nGVKUTS[BXIWH\KbHi:k6s4r7p83(!b#M**y`Bl+o(u,{ x$w!!"
+
?rJRTS\Rg>`H`CeIkHq7v4}4v4u71' a!M( +4 + + + + + + + + + + + + + + + + + +a +V +W +X +\ +] +^, +_0 +`4 +I( +F +G +H +T +Q +R +S + +A + + +L: +~f +J~J +f~. +J~Jf~ff~..~J&6 +.N.K_-K-/IKI +f#J +F1JK1IJ./J+ JJ +wJ9N!FR)/I +H%JKxJJ +$1
f@ +3JkJK7 +J(zJ"fJ16JJ +Nz.L,L +, +hjJ.$J#JJJ, +L.H +L%J3H@J%L. +H!J +8 + + +$-/e/I +?J@3JvJJ Jj$#JJJ,L +L%J3H@J%L +8XF + + +z +I +/KK$H +. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +ELF +G +F9 +WHW i8GL@ G0DG$EWBO + +BW$ؿ)FW0ȿ(FW(,kO +<>W4FG@B?[uFW<\@W@FFJFW,W`D)۸ltFF8jF +ݸluFFPxj"hxl yj +WW<" +FK 00Ek!$ + + + +! + + +FDF+ + + + + + + + + + + + + + + + + + + + + + + + + +.:;'I + + + + + + + + + + + + + + +A + + +(q.fN
+N*LJ*f.KN/g"g + +J +JJ+}./I
+JwJ +7 +.me79J.f..j> +.. +."5J4JoJ}f.}. +Jv.7 +. +
tj + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF + +D~C6'fDB + + + + + + + + + + + +A + +f !g_y&++. +.JAA. A.+fJ x G!Q N
0#h +"JMcq..nfJJL
JjOJ8JeJ
JF
JdIJ2J_J
JE}
JcHJ1J^J
J^J
".^.
#f] 'JY'.YJ)J + +Z +Y +[ +g +g +f +f +e +e +[ +[ +[ + + +ELF +& +r +A + +jQzJ + + + + + + +ELF + +@FWD(1 E QB%F0FJF +qC &B@0D0% +>B +0^C +P +qC &B@mDm% + + +$ + + + + + +A + +
&sJ
wfzGK
tJKR7xJG +JtJJwJ6wJgIEKINF/-/LGK/IKK-/-dMbMK)IQK-/-xf Jvf JKw.K JK-/-xf JxfQKy.KQK-/-zfQzfOK)KOK-/-bObMK+NGMK&N+&M +xJmzJEiHgIdLGNa\PIz.\QI0!-K!IxJ J0H2rJJ0tJ +JwJ JxJ Jx.RyJRyJQ//xJRy.PgEP)OK)OFMK/-/FKMHK&N+&M + + + +N +O +S +N +Q + + + +ELF +AFA
+GQWHG$\xD +AH +W4aG(<BFW83FG0,pG,l(i + +P +W<@ + HWxD + + +$ + + + +A + +? + + +Q +M + + +ELF +yA+FHh@a2{,6!fC,$`Dh.D5 ,DF`h!DIteC-$UD$)D.D`a!NNE1FIF + +ѽ +:; + +A + +J PdJ/FMKFJ1*2/.1*jg/.$1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF +%>=@ +W +A + + + + + + + +ELF + F9F/qH#qIxDyD + F1F.kH#kIxDyD +h)h]D F(eI#eJyDzD hh\hD F (_I#_JyDzD hh\1FD F.YH#YIxDyD +h)i]D F +(SI#SJyDzD hh\iD F
MH#MIxDyD + F1F.FH#FIxDyD + F9F/AH#AIxDyD +h)j]D F(;I#;JyDzD hh\jD F
(4I#4JyDzD hh\1FD F./H#/IxDyD +h)k]D F()I#)JyDzD hh\kD F$HxD + + +)uHuI"xDyD + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +A + +Zt" .. +H@K.3.@.3.@.3.fg?>. @.1?=f@A.3..@.3.@.3.fg/??. .? + +Q +Q +Q +Q +Q +Q +Q +Q +Q +Q +Q +Q +Q +Q +Q +N +P +P +P +P +P +P +P +P +P +P +P +P +P +P +P + +ELF +Di^FV]? +& + +A + + +Jg +65z1 + + + + +ELF +fa +6.H`#I +Z0hBDJ B10jhpRI"B,DD2H +HxD +! +" +" +A + +Yt/0eK +L/ +H +H +H +F +H + + +ELF +,zb +$ + + + + + + +/ +J + +A + +JJ +rK + + +? + + + + + + +ELF +A + +4 + + + +ELF +b"B:r +*:<.~Nntd
@ + + +J >x"Z + +A + + +ELF + +A + + +ELF +7+J57L]'; +X +4 + + + +A + + + + + + + + + +ELF + + + +I + + + + + + +A + + + + + + +ELF +$2?O_n~%3;NYk{ + 3CQ`p%3AObq~"7?NWlv $8O[lv+:JYix!.<K\k{,9JYiy.9GXdx#.8M\j{-5?KYks (8GXgw$09LWiv6GQ^h~/>Oas->N^o1>O\kw$-=L[ly-<L[k{
+5FSgr#*:N]n}"2CScs
)BIV_o%4?K\fw1ASdu4DXgu~/=LZjw#2=IVanwɸwsqnmcb_OD420-+ + + +I + + + + + + +A + + + + + + + + + + +ELF + + +gV +guRYuRF1 +bF1 +ƭ"R +"RF.+Kf, +aH0㐥 +kAndroid clang version 4.0.285906 (based on LLVM 4.0.285906) +4 + + +A + + + + + + + +ELF + + + +A + + + +ELF +}3 + + + + + + + + + + + + +C +A + + + + + + +ELF + + + + +K!13DBpHEG<GD\gڟ + +۟ +ݟ +O~QPF@1F.ؿ!o + + +W@! + + +4 + + ++ +89 +K) +M +48zt +'ze f**¿`jGZF0B + +! + + + +B[ IBK 0BiXF1F 0FAFF +Q + + + ( + +Q0 + + + +Q0FF +ݰH +0FK +YF"ױI +0FJ +YF:FGI +0FH +YF:F0FYF"H +I +< + + + + + + +0B +IW ,yD h hF +(F!F +џ0 + + + +,۷ + + +@ +#+۟1 +F +џ***0 + +ɚ + + + + + + +Q0S1+A1a + + + + + +& + + +; + +j + + + + + + + + + +N + +A + +XghLJ.JiIK
L +`.
0
HOG
HLIKv.8 +
> +! + +X +~~.K +~~J +m +nJXmJ1X6J+J*+J*JJ +3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +& + +ELF +FzIFyD 0 + +-#(' +?0 + +3 +>0 + +XHxD +TH@ + +@4. + +:HF%/8F?J +) +9A +) +8 + + +I +H +BF/F8F@6Hڊ +HxD +3A1 + + + + + + +A + +t +. +JK +- + +RwJRxfJ
b +pRJ +( +k + +6 +6 +6 +E +6 +B +B + + + + + + + +ELF +۬
F^%`=DkЂ& + +) + F.F + + +Ѹ +$ + +A + += +.Kj + + ++ + + + + + + + + +ELF +۬lF
F^%`=DkЂ4 + +)۰@^F'F +$ + +A + += + + ++ + + +ELF +< + +Ѽ + +FHxD +$ + +A + + +u + + +* + + + +ELF +0BrBBBC2pp@BCrBBB2qBqJBrBBqq0 +$yCd L$Oʁyy0CE"$ J? +
+ + + + + + +A + +4IL2I
JK(M./1.3/K.H
.KK(M/1+13/K0H
.KK(M/1+13/1-
.K(M2(.X.(.[.NKIL6IJK+M.21.3/K6H.KK+M21+13/7-.K+M21+1 +3'4#E'JuJ!-K'2:GJ/1#/--!/.K.7/J7/J'1/J,/-I91,I.'3F/J/1#/9.--!/-K.@.J3/JoJ0&I/.$-*O?GJ21//0-?12I.//.*12J&/ + + + + + +ELF +` `P` + + +qL̺ + + ++F
\b +(# + + + +0AN +O + + +ܴ +@Hi +0(*!+ + +
+ + + + +HxD +ף< +! + + + + + + + + + +A + +<fA(JJ'\JuJ/ + + +E +M +I +K +J +E +L +G + + + + + +ELF +A + +ELF +FeF +O +х + + +54 + + + 6 + 7 23 +.! +B1x) +џ* + +:#Z#CJȿEJ +:JEB: +0 + +HB::#Z#CJ +ȿEJHB + +"+ѝ* +: + +! +w*)d4 +[D +7Fj +` + + +3D.0| + +Ŀc:F +|u +F764BO:ʄH + + +O +p +*9[* *4 +1: +!JJ$Z +$J +1) F:!! +*ȿ[* +hhQ
m + + + + + +) +A + +zX! +f +J# + + +JvJ JwJ[GdKN/ +6 +Q%y.
JJKELd +NJL + +f%KI + +Gi]Jf'KJ&JJJ +X)JJ2Jf2J1JJ + + +-J tb + + + +N +N +Q + +ELF +F`!1 ) + + +` + +fkgUh +0BF +
HD +2FA + + + %Or(F9F
D +SF + +3FxD + +a +*0 +1ܵA +H +P + + +H<xD + +A + +' + + +A + +2 +J +J +gJ +gJ +gJO
wfHK
KN +GM +%Jig +iKJ8e.fr. +f$xJJ +J,IEOI JJ .w.M +J.#KfK +J/ +fMfzJcM +KJJ"JJM!GMcJ'MJ'.JZ +J +JJJK"#JJJJJ"* + +X +X +X +X +X +X +f +e +g +d +b +W +c +_ +W +W +` +_ +V +W +W +\ + + + + + +ELF +r + + :5J + +A +A + + + + + + + + + + +ELF + +O + + pә +.FFTFj4\E +!jZ z*"Z7j6Z +|FQFwF + +` +7 zѴz +HAZ) +Ѵz5FHG +zBDZ`dFajHdF ѴZ + +E +)ѮԚ + + +$ + + + +A + +( + + +< + + +<.J + + + +PG +MzJ +PPt. +.
w.MM J.J +.. +J" + + +@ + + +ELF +ȿOq +) +! +O + +!j +#ze +z: +@ + + +A + + +w +gLI}/I + +ELF +]M}D-h +VL)|D$h +ȿ +& + + +Hȿ2! + + +G + + +
F0 + + + +HIxDyD +0 +9B.?<^ +.@:;'? + +A + + +O>ff + +Pz +JK-K>IKKJ. +K.JGR./.1JJ" +2 +d +hJJJJ2*j*2*jf +B + +ELF + +aH2@*`M +,ȿ + -ȿ!.-0MD}D-h +IyD hQ&PX`8h` + + +8`(F +A + + +kh +,h +,0 +,hf +1 +k + + ++ + + +ELF + +nِA + +* +1 + +Y+M0$FA*F + + E +A + +PgJ JJKKJJJK + + + +ELF + + +$J0 + + + + + +pG +A + +M J'J JJ +JNJJJKJJJJJ +J%KJJJ
JM + +ELF + +^' + + + + + +O~P +o + + + + + +F + 9 + + + +* 1:*B1)11B! +! + +A + +z + + +, +, +* + +ELF + +hBF +0 2( +zD`*FhC +C*0CWK +hC + + + * +EI + +* +1 + + +XF!ȱ7I yD h + +* +1 + + ++I + + + +0A + + + +{DhhFh + + + + HxD +4 + + + + + +A + +,g.J +3- +1F0J + +"g.J +1 + + + + +F +G += += + + + + + +ELF +@G + :.: + +&0A + + + + + +YH!"xD +) + ( +LH +S + + +@I ""yDJF hSF +xD +1 + ( +" +* +1 + + +XF!H>xD + +4tEѼ +1D + + +A* +۴*A + E4OsB! +Q+@+ +O +$F۰A*gFFFMF + + +EѼ۱ + +:;I +I + +A + + /f +0 +3- +J%f.%JJ + +& +0HJJ +L + + + + + + +U +W +V +T +L + + + +ELF +J + + +A + +" + + + + +ELF +{Dhh + +p7z5j0Z2Jzjz9Z#:J3jj +c0Z1J5B*,H': +:A* +F1 )I + +I yD h h + +! + +A + +< G"$J& +J# + + +3 + + + + +ELF + +D + +A +H +A + +J + +ELF + + +DO + + +0 + +@:ݰC + +A + +.y. +G +M + +ELF +> +@0@o@ +@D@ +@ P@@ +@0@@o@@@@T@>@ߡ@0@ a@o@@@@ P@ @ +@ +@?=@> +_@J@4W +< + + + + + + ռ?<ߨ<ջ + + + + +ͻ + + + +@;0</߸鿃;G8<;W@º:T< + +ֻ2; +< +; x,㳼w-0;<i +`;9 +a==`f> +hpE`&/_aDР3~*$P>_S??p0@| +<x>??%@?U@_??@@@@A.A +?S,ad=~ +=SjܼוG.G??&L̾<8'<i#n<xྶ(:O2:JDu}?:?P=Kc%j3 +>>>&> +L?N? +x? + +<x>??%@?U@/_aD$P>_??@@_S??p0@@@A.AAndroid clang version 4.0.285906 (based on LLVM 4.0.285906) +4 + + + + + + + + + + + + + + + + + + + + +A + + + + +ELF +* +JZJ:O + +A + +/ +/ +.xJMGNyJM
G1L + + + + + +2 + + + +ELF + + + +
+ + +A + +z./5 +J
EOzJ +M
v.8.NJ +2xf +Jy..Jb. +w1g +f +JqJ +Jgp +/F +e +$.\J + + + + + + + + +ELF +`I + +}D + +0 + ulDataSize = %d, ulFileSize = %d + + + +A + +/K-/-/
f /
- j: +K} fL +f
nfL o.&.K l+) +J E0*- +J )*0K/-K+M-O*+K/-KL..&Ks..}.K.J + +] +V +_ +\ +c +^ +W +\ +[ +Z +c +[ +Z +Z +e + +Z +d +e +e +e +X + + + diff --git a/rcaudio/audio.bt.remote-arm64.a b/rcaudio/audio.bt.remote-arm64.a new file mode 100755 index 0000000..38a07d3 --- a/dev/null +++ b/rcaudio/audio.bt.remote-arm64.a @@ -0,0 +1,4622 @@ +!<arch> +/ 0 0 0 0 7008 ` + +* +b + + + + + + +decode_indices.o/ +decode_parameters.o/ +decoder_set_fs.o/ +LPC_analysis_filter.o/ +LPC_inv_pred_gain.o/ +NLSF_stabilize.o/ +NLSF_VQ_weights_laroia.o/ +pitch_est_tables.o/ +resampler_private_AR2.o/ +resampler_private_down_FIR.o/ +resampler_private_IIR_FIR.o/ +resampler_private_up2_HQ.o/ +stereo_decode_pred.o/ +stereo_MS_to_LR.o/ +tables_NLSF_CB_NB_MB.o/ +tables_NLSF_CB_WB.o/ +tables_pitch_lag.o/ +tables_pulses_per_block.o/ +huitong_audio.o/0 0 0 644 97552 ` +ELF + +R* + +H +R* +R* +@RQ +R* + + + + +@y@ +9 +ka + + + + + + +! +d +d + +d +d +d +d +d +d + + + +A +)
+@ +(
+= +&
d +;] +%
+ +> +' +d +d +C" ++
} + +d + +: +$ +d +d +DY +, 5 +d +d +d +d +d +d +d +d +d +d +d +d +d +d + +d +d +d +3 +F* +d +( + + + + + + + 0 +@b@ ('6JKJL!J +J + +`Jb4$ G:L-hJ'J6JKJ!L + K + + + + + + + +0}tw L~ ~J gJP K
JJ gJ$I/ +
~ + ==uJ y4~ T$.L~J
J vR~JJ
E v$I < FaJ3 + + + + +( + +J + + +J +uK + +< +6 +40 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +$ + + + + + + + + + + + + + + +
+ELF + += ++ +}SkS +n +JJ
H +H= + +kL + + +k + +LLT!%(,[1K6;ADH~OqW/`ibt +4 + + + + + + + +Lz + +,L +~JK" +~JIO +J~J(KJ
JKL
J +J
MG +M
JK +LM$ +J
tJ +
+LwJ
QL + + +ELF +˩룟) +%ҩtij}I G H_fmt +Hr!@-%@ҫt +
ͱ kj +*}KKGjJ +Ir? + +}S}SR* +k +J +-룟hjJ
)7)~HGM + +@)K +}S}SR*W + + + + + + + + + + + + + + + +%uJJ"}zJ#JuJ!5 JJK +z<xRzJwJKILILIMHMILILMMLKM[J%JJ%JJ.JK"zzJ#JuJ!L)JaJ!J5^JK!J^JLH + +KJ +L +KJ +KJQ
zPJ
JKPJ)L +NF7K9K;KKKKKK +JJ0JJJJ
J
JJMJJ( +$oJwKKQmJ +JKKvJNJJJNJK(KvJJKMNKxJ wJ JwJJ%<J%uJJ +xR K +JKKaJ6wLHKJ
KLKJKQJ
JKL +JJKIK +y)FJ7K9K;KKKKKKJ + + + + + + + + + +ELF + + +@#8x_ +S}SR(% + +@9[ +@98 +JS) +)yS +Jk +W@9kB +c +!K +.W@9 + + +)@9%@9-@922_ +)yS@ _ + @*I@ + + +? + +'sO + + +@
@@1~@QF + +@QD +*"@qD +*"@D +*%@D +ΆRqF +QF +rRF +j:A +}SCxh*WR @@ +@
@@1~ +JA@QF +V@QD +_@qD +J}"@D +*%@D +j +QF + +6RF +A}Scx +@
@@1~@QF@QD@qD"@D%@DqF +}SxR @@
@@@@ +@b +@@1~ +QF@QD@qD +@@ +6R1~QF +@QD +@j +@*"@D +J}%@QF +_QD +VqD +JAF +*A +}Sxs@0j:O@ @
@ @ @ +rRRH +@rH +@ΆRH +*RH +@*rH +@!@%@*"RH + +rH +DI +*= +}Sx@9URTBA)@9 +)v@ + +!+ +*
* +@H@ +$@9,@922 +$@922 +}
JuSJ + +(@92_ + +} yS^ +$@922 +}
JuSJ +^@9ki +h + +P +/R 9Psz\RyPPc|ZRP~NRBhRCP^x Rk
+PPPQPRp@5QgR/ +9QN RO1QcLIPRCEPӀR)- +APj9Rb + +P*R +P2kA +PgRb + +PJR +P꫁R. +PjOb + + Q> +Q. +Qjb + +P*QP +ЀIQ. +PxREQs~ +R3L +j +UjAQ1 +CxPPB, +QORYN +Vx]PjgO +PJ9kM +Pj
R]~ +2 +QR +` +SbxYPR + + RPc| +!acPЀRQ)}ԂR)}Rū + +P +@ 3 + +@ +@B +@
+~Cjm8}C +}Clij82 K!ii*8Y8 +}@ +)ySJJ + +Y@91*@ + 9_
+@ + +\ +_8$@8 c + + + + +_8%@8 +Y@9 kly*J +@ + +ˊ + *_8%@8 +y@9m +J + + +) +?k*T
+ +H@9 +k +H@9 +k + + +D@9 +kkT +H@9 +k +H@9 +k +D@9) +kKTH;@_ +&;ROhu麧̟9$wjMPITsn= lqVK"?5(A\{fߌ
*7dy^CZG`}.3 bEX1, + + + +:; + + +F + + + + + + + + + + + + + + + + + + +v JvJ JvJ JvJ JaJFNJ + +D +xJ?JMJL%JKJ1N +xJ + NF&JN +FMJ
# +{tJJ2J0J +
KKKzKKILIQJJ&J +
KKKKxLI + NJF&J +JMJ
# +L
L J5KJKGKJ#KJK!KJK)JJJKJ!J
KKKzKKHKILIKQ&J~!<J
KKKKxLI + NJF&J +JMJ
# +uJJJ{.K*JJJJ +|Jh +.J yQJ ~J + + +jJH @J + +fJ J + + + +1JOOO XJ +JOOJPxJ +JtJJrJ +EOLNL +zLJLLHNLLF +N* +|J~ DJ<< +JXJJ +JvJbJEgJ(JqJ}Jq, JJ +J JfJ$J\JJJJ JQyJQyJQ;J EJ<t DJyJ5JJ KJy$JKbJ%JK ZJmJ +J JKHM ELMI JIIM GMJKtJ* + 0JO + JuJL&J +JL J +J +J +J +qJL$J=J +}J +H +
KK~KIKPJ<J'JK +?Jt FN +wH#L +01/JM +H* +
+L +; +KI* +L +K ++ +JP +1 +(1/JM +H* +
+$1/JM +H* +
+L +L +Ls +I* +L +L +L +L* +L +J +K +K + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF +4} + + +
;m3m+m#mog_WO{ CC +H;@{2 +}S
+@9 +h + +y-_e + + + + +yy%yy'y|`yRH!yyH#yyH%yyHRHHHR~Sri;x{ +{IOHWG_FgEoD#Cm+Bm3Am;l_ + + + + + + + + + + + + + + + + + + +HIJK L"M$N&O( +JJNJ
Jy
Js
J> + + +;J!J% +> + +(lJJ/ +Jv> +OM JLJ +JKK" +LAjJ +H
LK +H
LK +H
LK +H
LK +H
LK
JK
J +GKKKNKL + + + + + + + + + + + + + + + + +ELF +! *) +)'!E@ +@@|@|@*M@ + +k? + + + +mog_
WO{*' + +,.}@3 +}~ijaij'@}@_ + +kT +P{y9 +00 + +J} +! B #("!8"# +˿ + + +* +B@#@ +"D8#B(##$"CE +i +K* +? +k) +~
+* + +k + +*3 +C + +K_ + +* +! +0@( !(! (! !. +!@!*g +N ! +_ +h5_ + + + + + +* ~~A@j`1 + + + +*{GOFWE_DgCoB@_O{ + +O{I;)@* +)@@l +*** + +) +K + + +S +sSkKJ) + +HK +*>@* +- D@s +{3 +K KJ5) +k)?q2I? + + + + +` K + + +ˉ + + +j +B@#E@ + +K'@@" + + +**G2 +*; +R1>},
$
=}}yS}!@} + +˩ +4 *~A) +j +B@#E@ + +˩ + +j +A@"@ + +1XY +k +k +k +k + +630 +12 +2 +32 +42 +5( + +S +S + + +H +HD +HIJK L"M$N&O( + +HIJK L"M$N( +H +HI +HIJ +L +JJJ +,"Po +"$P F + + + + + + +$
K
KK +LH sJ +~KM +Jc< +J +I +I + +D?$L +JMGJpJGJJM~JDJ
J=K#.tRK#.Jd)yJKHL + +JvJJ%JJ%NFJ%NJ*JJ(}< + +JJ JJLHLH +kJvJ#JuJJuJC'JJ<JJ#J2J#JGJ8JKKXJ + + + + + + +EO + +81nJqJ1lJJqJ +JKMDKKK +KK +txKIKIKIKIK +Jx +J +H: + + +J + + + +$". +JzJEyJKPyKP + +p) <J-KJIv Jv +<0wJ{,,sJ
K
}$,|, LMJ)J&K!K&
4 +w +( <~J}QL
KI
txJxJ +J +J +|K +J +J +|K +J +J +{IK +J +J +{IK +&J5J +J,J;J +J , +$J3J +J +J{J +J +{IK +J +J +{K + +JM( +; +K.yQ + + + + + + + + + + + +@K.O
1y%JJK=MJpJ+ +ILJ
KJ<yJLOKIKN +0)JgJ +; +K,yQ + + + + + + + + + + + +0
GQxOMJ +@|JKItH0 +$ +JJ +zJJ?LLL|(
t|JItH$ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +- +. +5 +@ +B +J + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +B +! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF + +& + + + +ELF + +} +hI} )P h(_Android clang version 4.0.285906 (based on LLVM 4.0.285906) +& +G + + +ELF + 1 + ` + .
~4r2 +6(%X+8z6*9R*4y:6 +:6R +: +9z:; +99889hbw7V669+:7+7*8*7*6R*5 +mykyh8Kk!k}h}}(x*J +1UXY + +o$ +4D + + +kJ +WKK# +JE KKK +xJKK +s +J +sKKJ +GK +IMHNIHPHLGNENK}KLLKKKKK +E< +JKK + +IKI&J8K<J>J@JJ +@IJJ + + +ELF +R{AH } + +R*H } q}@ +*3@|@}@# +@1 +@ + ˭Cnq/}p) + + +# +* +k*L +k, +@? + +_ k뇟 +(()*it8)it8P k! +? + +P@l }@ +@ +j + + + + +? + + + +k `?k +i )q +<R*E + +kj +NLqjq<C<k +] + +''?''/ + + +l +}ӫ~ +! +~k~L~MJ
JJ k
m +ljqqq
<R.~) + Qnopklqrkqqq'q'c +'_P''_' +
+ +
~ +! +kqkqq
<R~ + +'
'?'' +K + +~ +}ӌO? +! + +lK qlk
kqq
<R.~) + + +/knj +m +pqlqqKqjqQq'
'N +'?
''?' + +J +}ӌ ? +! + +lK qlk
kqq
<R~ +@R +@!@?D +RK~l +
oq1}Ӳ) +}~~~ J p= +j@
K?k| +ky +yx(!I K:!x}@_ +K +.v + +@? +Ft +"n!#n!#n + +'_k볜JKK!k +!E +@2eB@h@i +E@) + +_b + +COJ +) + + j +E@#@J +)! + !@ +@~L}~@kkklBklkk + +VZCCXXX** +J +I +˪T +**{h**** +*** TH;@Z + A + H;@ +@j@)
+ +)}@J}@)~J~, +)
) +ji )qJq<R~+i,Ki,l@ + + +L +ӳ + +Ӿ + + + + + + + + + + +H< +HIJK L"M$ + + + +3zJJJ
KxJ +<3Z<,J +9JG
UK*J +9J
IJKMFON
HNeJHL +3<oJwJ +~ <*J)KDKzJJJIzJJJJJ'!~<0u4J1J0JzJJJJ ++,)#)I=J0 +yJ +yJ
+K, +J +J8 +J
+y +yJ< +yJ,$%J$J + +J6K +I6J +I6T I +v 6 6KJ +I6J +I6X I +@4y4QkK G > 4 *u4K H
+ + + + + + + + + +M +M +} +J +}J +x"Ju.#J +(J +8J + + + + +|J + +|J + +! +H + +stJ +J +KJ + +,<%nLG{~ HL
<nJ$!J +~J + +u + + + +K + +LI=I +N +xJ3J +J3wJ +3wJ +J
wJK +J +x + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF +E@czkk + + + */.A<A<! + +K + + + +-kk + +*.A<A<! + +E@E@ +#$*$(%*&G +kB010G('b0 + $*$E(%*&G +"$*$%(%*&G +!%*%*&G + + */.A<A<! + +Kl +J +-kk + + +*o.A<A<! + 2 +E@E@k +~Ӡjj!kj~ +' +.@:;'? + + + +H + + + +wJ~JewJ + + +,, +L +J +,0 +J
K +x&pJO + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF +? *Ky(x$ +Th +k8) + (}@+}~ +jNThZP +KK +7! +**}?kTjRP +n.Jk +=`j<Rh= +h&IcGiFi}8}W}B@XB@WcEia}} + + + + + + + + + +> + + + + + + + + + + + + + + + + + + + + + +8!J h +JwKKKKKK NKKcJ + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF + + +! += + + + +$p + +$p + + + +ELF + + + +!7 +K + +J)= + + + + + + + + +A< )9J\)0o i )| 9ATMp AV) +wNyr )iA +8 ;cA{ N0) $] )RR ^ADa ]BA> ) x- +Ԁ +, + -)lA@
e
A*
4 +
|) McLS )NSP cA~ k +A<)t O_ " )$_fA ϊUHAI !a"*0#)$ ;$Q% + +Cu/p62g!O)A<U$"$E')h~,p/-2)5+79]%<c@IDɲHenMÚQ_V{\[-`fkíqw"]~# +IW]j1'MѲ&Hu($ٜm)R/m59=aA\E`NYX\ci~o| +aX?%e4&/:;b"IqY?mX +4 + + +sKLLH +HJ +L + + +F NF KIK + +N +L +K + +jJJ + 0KK I L +LH
L +K
JEOGIK +JvO + + + +ELF += +iE +@ +@ R ki + +R{ +`&@fI +R9 +n + +)@I +|} + + +@y}R(}I}
+_ +)x) +KT@ + +kT* +)x) +KT
+kT`V@h_P + +R+m +k!$LRl +?TH;@ivA ! +:; + + + + + + + + + + + + + + + + + + + + + + + +J9~L +@P $ +(JJXJ,xJ,KHLHLHJ&z< +t
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF +J= +_ +FS/y( +K2){ + + + +H + +kL +*/.A<A< +yakiby}0~my|PPK|1P~kPӌkr}kPk`k
+ + + + + +7 + + + +; + " +" +" +" + + + + + + + + + +
4$@ +
+ + + + + + + + + + + + + + + + + + + +ELF +I +_ u + + + + + + + +M + + + + + + +Z + +d +- + + + + + +x
t*O8 + + + +ELF + + @y)}A!) + + +I +} + + + + + +- +- +} +N +- +- +} +} +& +& +} +- + + 8F<1N6K$IK P7*<8+8K*< + + + +ELF +R +R + + + + + + + + + +) +3 + + +- + +$IJI/J+KIE"JJBJJJN J* J + + + + + + + + +ELF + +* + +G +: + w w sJ + + +ELF + + + + + + + + + 0Q/JAI)K J + + + + +ELF + + + + + + + + + + + +{KG!+ +
%K
M%~
N#F
N"NL + + + + + +ELF +K +$ + + KI +MGKJ K +KGLG +N
KKJ + +ELF +) +*,3!SiY3-R2) +, + ( +( + +k(5(K( + +R* +k +k! +,D) +* +kcT +K +$)_`q + +R(Z2* +k +k" + +*
+k +k! +,A) Kq, +k + +$) + + +MR
vJKKR; +qJ; +qJ; + +qJ; + +EPK
HL +LHKKJHL +
+ +qJ, + +K +qJ, + +N +qJ, + +6 +qJ, + +~<JJ + +qJ, + +K}!~<J +~JJ + + + + + + + + + + + +ELF +$@k +}$) + + +$D)@)YSJ]Sk! +$) +L + +$@J +$ +K(} +)i& ++ +Jq *@4A)k +K@* H*)$)h +@)!K) + + +(*H +,@ +( (*, + @2k%_k +$@] +(*$ +A)* +A3 @ + +, +*k +@6P +" +@7k@l&A))?kB + +* +KI*8 + +km + + +4 + + + + + + + + + + + +O
LxJJvJO
LO +PEKJKIJKINIJHM + +$ +J
J +JL)HKKHL +LKKJJKIJMIJHM +LK +MHIKKJJJJMIJHM +K=JJ7JJKNJEKJJJPEKJJJKGM<J+x1JJ +JJ
~yt
JJJJ +JJ~JJ1J
KK + +LJ
~JJJ +JJ~JJ1J
KK +N
LIIKJK+L=J$J1J8JJ
JuJJL'J"JJ JyJ#JE'KJI@JJO +D>JK +|KIKKJ +KJJ
~JKHL +$ +J
J +$ + +JJ~JJ1JK K +J7MJJKL"J2J5J6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF +kj +Ki ) +yS+! +8) +1UXY + + + + +,4' +,4 +O + +ELF + + + + + + +$~KM$FKMM +ELF + + +* +(Oy + B=-b &:00*0C:"B(2G- +yi_ +$c00 +%1 +&F +&2_d:$:&c('(&!P:0 +!:2 +T + +~@*}}S + +0 +1 +1 +7W2Z4t4M
X-R +;;1-*6:4]@-R*:3555s +9y6{77 +<s*87;7*;-U;58*7*61:7:6w*2r:2*4:4z02|1z+:4*8;;\88*9(3(<(8X990r2(5(8(96P:07V6W71t41:4?-3+<R*8*'*&{ + +" +## +#B1Q +$R +%e +%B(0%:%p-3 +& +' +'5:#(2g:'(4:%3:$(0(1p('Q(&e?-8081?-d-c8'B8&*$%*% +@!- +@"JixJ +A + +T +KT +KT{AO¨_Android clang version 4.0.285906 (based on LLVM 4.0.285906) + + +$ + + + + + +
4~N + + + + +J + + + + +J#J}JJJ}JJ + + + + + + + + + +< + + + + + + + + + + + + + + + + + +
+ + +ELF +kM +K + +*B + + +K +4 + + + + + + + + + + +/y K/I K
JJ'tJ
+@/J< K/I K
J'J+9J, + + +ELF + $ +* +)} + + + + + +ELF + +Kk} +k}|S +,}H!J}} +OwMpNFNMGMG HP + + + + + + + +ELF +b + + + + + + + + +< +ELF +WO{
CH; +@?RRrr+ +
%x + +K}(`2(K}@}^ +$ + + +ht$bJ + + + +ELF + + JJMJK + +ELF +%*@@ +@@ + X}I}A +˿ + K + +"" +"_ +,~jlbil@,yx%#F$!$B#8&A(!) +@*,,
0%x@@" +}_ +n + +8 +A*˭ +4 + + + + + + + + +r,yQJK +L +RzJ JK JIK +;J7uJ +BK +1 J8/J + F#GK#IK +K!FK + +JEGKIKIKMNGKLK + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF + + +|qke_XRLF@93-'!{uoib\VPJC=71+$yslf`ZTMGA;5.}vpjd^WQKE?8-h +?P?+?AE?%j?s?Ώ#?'?t|+??Z/?&3?6?:?3>?ŌA?wD?:H?'mK?ΆN?Q?lT?8W?iY?E\?^?sYa?c?e?g?i?Ҡk?n_m?Po?p?r?]s?t?u?Wv?w?x?y?srz?''{?{?^|?5|?Y}?}?~?p~?~?~?&)?U?z??̲????????????? +w?nv?%v?/\v?!v?<u?@u?mu?B0u?At?t?;tt?74t?s?,s?&ps?v-s?r?r?dar? +r?q?Wq? +:?3:?9?9?Gw8?Q7?L7?6?k 6?t5?4?Z4?3?(3?02?B1?Z1?0?$0?/?U.?O.?2-?i-?'v,?k+?78+?*?g)?W)?(?2(?3s'?&?-&?y%?$?aB$?#?}"?R"?Ϭ!?M!?[_ ??%?g?0??l???Cm? +? +?V?ߢ +?c ?9 ?I???Tb???=?=???[?a +XlerȆw\'c֚&3:½ɽ=нTֽJݽ;]r3RGe 2YJG N#7' + +7
$P82evc&
3Ȏ<HHABc@h%:# /!_!R|"!##k$%\%V&h&'=(()} **`+'+ĝ,;--v.y//sK00122N3345?5F6n6Er78q8099W::|;<<0==P>>n??@@SAA/B`BSFCCZDDlEE|FGGH%H IIo#JJ)KKc-LzL/MMb.N9N~+O3OU&PPQPQ(RmR S;SSrTT`UULVV'6W +}\\U]>],^W^^h_h_39`b`ala:a6bbbYacc,%d%d~d7FeNefaf;f^gMwggD-hKhho9iii?j jj{@kkYkO;llKlO0mmemunmnno.Uooo6pgppqYqqqq-rrr&rr2>ssstIDt"tPtu?u|uPu!uE0vjvvvwMwwWww&xzZx*x+x}x!%yVy\yyyz@zsmzzzz{aC{l{"{z{ {|\-|Q|u|||U|s|}>}]}{}}}}b}? ~i#~<~U~m~~ɛ~ı~
~~~2&8vH'X$gnu_t]=j?9??K??#?Y??[?(?'p?ZR?1?X?%~?&~?\~?d~?i3~?A}?O}?}?R}?}?|?|?MD|?{?ͬ{?\{?C +{?ݴz?\z?z?.y?Cy?x?zx?Lx?w?9w?Ov?Tv?u?eu?ut?Dlt?es?gs?r?Xr?9q? ?q?4p?p?o?n?Pn?m?m?nl?k? k?uj?Ii?9i?eh?og?f?|>f?e?od? +I?RH?eG?GF?E?D?C? B?:oA?4U@?9??>?<?&;?:?69?d8?":7?
6?4?|3?{2?G1?0?.?-?Vb,?H$+?Z)?(?^'?q&?%$? #?#>"?u ??R? +l2
lf-,HvqVbQU D! "|#$$%j&'0(4*s+,?-'/^0Д123*5X6789: <B=b>O?@hABCDFGV!H+I3J9K=L ?MD>N=;O5PZ.Qy$RJS TTUMVpW7XYbZ>A[u\A\]^v_"F`aabmcT1d~d&eImf&ggh{DiiàjKkkޗld:mPmwnSofo?ppbq[q:{rqsstt ukuu +<*;<xֺ-DqWL']JZm"hٽNQ/!/A<djIMV͠cPpE}
Sȋ
8f^زi+D*ľʾѾEu-ݾ3v0"ヘ +\ +?k?.>>>>>b>N>*T>Q>Ώ>m>k>bQ>0P7>>U>bh=| +') + +1>HP{ + +j +qּy? /?:^Vs?5?*~?3e~?ֽ9~?sU}?Y}?%|?\0 gM|?i-{?:{?Ggz?T y?a<x?Mox?|Fw?wcv?>6uu?uj0|t?Lԗqxs?z7jr?Pq?誾O-p?A6!n?|vm?^l?þ5k?ʾi??о|h?Z־g?kܾte?sd?qq辍b?e(`?'N[_?,׳]? +I?| +F?$!D?F#B?:B&x@?(>>?%L+;?-"9?80_7?e25?5e2?_780?"9-?;%L+?>>(?x@:B&?BF#?D$!? +F|? +I?4K+?My?Oʿ?lQ +q<uV<c +qּ y:^V/s*53e~ֽ~s9~U}Y}\0 %|i-gM|:{G{Tgza yMo<x|xFw>wcvuj6uuLԗ0|tz7qxsjr誾PqA6O-p|!nvmþ^lʾ5k?оiZ־|hkܾgsteqqdeb'N(`,[_ +I$! +FF#D:B&B(x@%L+>>-;80"9e2_755_7e2"980;->>%L+x@(B:B&DF# +F$! +I|4KM+OylQʿR +qּcuV +q<y =/:^V=s=5*=~3e=~=9~s=U}>Y}>%|\0 >gM|i->{:>{G>gzT> ya><xMo>x|>Fw>wcv>>6uuuj>0|tLԗ>qxsz7>jr>Pq>O-pA6>!n|>vm>^l>5k>i?>|hZ>gk>tes>dqq>be>(`'N>[_,>׳] +I|? +F$!?DF#?B:B&?x@(?>>%L+?;-?"980?_7e2?55?e2_7?80"9?-;?%L+>>?(x@?:B&B?F#D?$! +F?| +I?4K?+M?yO?ʿlQ? +qּ?uVc? +q<? =y?:^V=/?=s?*=5?3e=~?=~?s=9~?>U}?>Y}?\0 >%|?i->gM|?:>{?G>{?T>gz?a> y?Mo><x?|>x?>Fw?>>wcv?uj>6uu?Lԗ>0|t?z7>qxs?>jr?>Pq?A6>O-p?|>!n?>vm?>^l?>5k??>i?Z>|h?k>g?s>te?qq>d?e>b?'N>(`?,>[_? +I?$!? +F?F#?D?:B&?B?(?x@?%L+?>>?-?;?80?"9?e2?_7?5?5?_7?e2?"9?80?;?-?>>?%L+?x@?(?B?:B&?D?F#? +F?$!? +I?|?4K??M?+?O?y?lQ?ʿ?R? +q<c?uV< + + + +$ + + + + + +,J u,J , wJ~t + + + + +ELF +H;@ +i)*ih8JaSjz(xy +KT@9 +y* +.:;'I + + + +, + + +ELF + + + + + + + + +izxjx2 K kij*x7 +}kxjx)= +4 +o +o +o + + +$4R +%2J
J + + + +ELF +l8N}S- +Kk + + + +J ++T_Android clang version 4.0.285906 (based on LLVM 4.0.285906) +& + +N + +G + + +ELF ++TJ+hx2K +1UXY +G +G +G +v + +LIJ
J-|J
JJ|L<K + +ELF + + + + + + + +) + +E@J + +4 + + + + +0 +;DJKI + + + + + +ELF + + + +T@**?k +T_k`
+T* + +pRL +pRH!j=R꣐r}g + + + +pRH!j=R꣐r}eH@9q + + +2xr +2Kx(x?kl + +U + + +$ + + + +Gw + JH +L + + + + +FJK$JM + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF + +WO{
CH;@**** +@K}(** +@B{xK}(* +@K}(** +@c2* +@$K}(** +@3y}( +} KJdV~km +@ +@} + +kT] +I}@} q~= + + +VmqS + +Ch + +I@} ~= +@} + +kTh>@Sq! + +aTQ +@? +)}~kiJ +kj)i +@!T +aTCQ + +@T k + +}_ +kh) +@ +}?*+T +aTh*@H +@} +~ӡjj +J} +TS +hF + +kl +~@} ~= +@} + + +TH;@[ +kw2 {AO¨_֟ + g hB + + +kw2 {AO¨_
+I + + + +a +V +W +X +\ +] +^0 +_8 +`@ + +I +F +G +H +T +Q +R +S + + +h + + + + + + + + + + + + + +p7J + + +8Jr'J"MwJ% +J + +J$
LL + +>
~< +LB +-,tJ
K's
J + + + +$ + + +o(!> +0 + + +|J +J +|K + + +J|J +|K + +J +$t8JbJ
(JJ~ +(, +`8JbJ
(JJLJJK +> + +<'vHL'7 +< +x +K
JK +qK
(JJLJJK + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF + +
+ +- +J˫ + + + +. +@N2 +&c(%B(0JA-1(% 1( 1c( @-!0(!0(%2%(%! + B(!0c(!2(!
@ +'B(02Q +!A + +* +&(1(2c(3B(0 + ('(1c(2B(0 +T_g_WO{C +'.'%Nzh +080 +T +' +080 + -"@ +Kh +@? +ˤ +<}AM + + +kH +kH( + + + +.:;' + + + + + +HIJK L"M$N&O( + + +$ +w NJ
JJ
JJJ
JJ
JJJ
JJ
J +# +J +,
$LoJK + + +KJJw +0(q JIIK KR xJKQ xJKKMMzJLIKNzP xRK + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF + + +
"Android clang version 4.0.285906 (based on LLVM 4.0.285906) + + + + + +ELF + +A@= +k, +Sj yjy= +SJ} J} +Sj yh yhy} } +Sh yhy} } +Sh y + +@hV@h@h{BOAWè_əR kKTiyjR + +)}Si yiy= +)}Si yh yhy} +}Sh yhy} +}Sh yog_WO{CѢH;@ +k꧟ZP +KJ}
JQ^P_ +K`yK KJy +K += +2 +P}2bP"I&IP}i +2PHKqS}+2PJ KA_ + +k +*, +kKj!&I"Ii?k + + +PE +.LisiZG~ +&IulGigXFi}{}}C[CUxlEi}BV}}BG@VuXDi~@XxCi6~@VU~@U|5|@Cu@U- +kh`c^#ick + k +K_ + +KJ +P +mS +KJ
JuSJ}@~@mjx} ) +}Smj,x?A@ + +.@1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +N#GMJF#KKHNK + + _J!&FZJ&#t2$R" [J +40wK"J~Ln`uJ;JJ *JW H*J(JD
sJFO\J J
Jn }G N
}J1FNJ +~ , +J +, J%L:J%J:J J)[
?'JJ&$J!yJJ +}JHL
+7 #J. +r5yQ t + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF +@ZS +kT
Bc +# +RH!) +@*@=BKH< + +R= h%(P '! + + + +mog_
WO{ + + +R貈} +_ +<z{_ +@@ +@' .<Rzz +T#@_kj +@' . +T{JOIWH_GgFoE#Dm+Cm@_ + + +@
+R +P4C +@~Y}~jh +@aki +<zy? +0665877=rF`JXKXWJYB[Cd;l2x(z%a+N2SNTQXKVJWGZI]J]Jm(r$u"u" + 6s?fBbEcJYG[I[NYVP\B]@f;g<h<u4{,#a&M-=Z]<i*k)n-t&q&p&|
+ +;nGVKUTS[BXIWH\KbHi:k6s4r7p83(!b#M**y`Bl+o(u,{ x$w!!"
+
?rJRTS\Rg>`H`CeIkHq7v4}4v4u71' a!M( +4 + + + + +& +a +V +W +X +\ +] +^0 +_8 +`@ +I' +F +G +H +T +Q +R +S + +HIJK +HIJK L"M$N&O( +HIJK +HIJK L$4 +HIJ +HIJ +HI +H +? +~J +~ +J~J~JJ~J~JU +\~N,KIKI +#J +@3 +JkJK7 +>(zJ"JJ1J6JJL +$L#HJ#JJL +JH%LH3J@J%LJ +J!J +D + + +DtKIIK +<3 +JH%L3H@J +8 + + +(IK +H +J + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF +k + +!} +ji? + + +k+ + + + +3 + +,x-yx)yxrS|@
K-
K +E +k/ + +lykyJ +AT3pR* + + +sXg|"@
zx~s + +tkj + + + +'_''_' +L + + + + + + + + + + + + + +.:;'I + + + + + + + + + + + + +(
tIx +*JJK8 +}J +J +7 +K$J +JQKI7J9JJJJ +J +J +J + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF +R k~Sן +k Kן) }@(( + +ЇRR +k~S~S +Kן))) +kh&i
+A + +kA + + ++ + 2"J
KuS~@"j +A
+ + + + + + + + + + + +t <!4(yL+$$+JJA<<AJ+JAJ t!!MFGQ NL
J# +|MMnnJJJLv
J8jJOJ
J8JeJ
JF
J2dJIJ
J2J_J
JE}
J1cJHJ
J1J^J
J^J
"^J
#J]t'JYJ'JY)J + + + + + +ELF +)D +)P) + +& +} + + + +ELF + + * +My}Xy1~Y#yJPӌP~G'y +,PM|
B+yJP!|X/yJP|Y3yJ,Pӥ|G7yJP~V;yJPӔ~X?yJLP}YCyJP}GGyJPӄ|VKyJPc|XOyJPR~JlP +YPӸ},X}=@iyyEAiBi~yo~y Ci~yq~ym
K~y`~ + +My}Dy1~F#yJPӌP~E'y +,PM|
B+yJP!|D/yJP}F3yJ,P}E7yJP +K + +$ + + + + + + +
&s
J(wM& +JwJKQzJKRyJKOFKPEKMHKNGLpJJrJJrJJrJGNGNGNENzJKLNzJKLNzJKLNzJKLNzJKLNzJKLNzJKLNzJKLNzJKLNzJKLNzJKLHKLHKLHKLIILIK&M + + + +ELF +K2
m
y
yJ*oyP
yL21
my2O ynyPykyJy1
2)J1J}J +$ + + + + + + +&tJ + + +ELF +Pӡ +:; + + + + + + + +ELF +%>=@ +W + + +ELF +FiGi9| ++ + +@2i|8)@" + + + + +4 + + + + + + + + + + +f(JJJJJJJ.+JKMKOKMKpJNPpJ + B : - I:- J- -J JI:- J- -J JI:-+J UJ-J -J JI:-,J TJ-J -J JI:- J- -J JI:-/J QJ-J -J J:-0J PJ-J -J J: - :- J- -J JI:-5J KJ-J -J J:6 JJ- : - I:-9J GJ-J -J J:: FJ- -t J; +H$@3J3K?>JCJ G? + + + + + +ELF +N? +T +xmk +7 +xnkJ +$ + + + + + + + + + +ELF +)} +k +
+ + + + + + + + + + + + + +=GMGK;=IKHLHx +K + + + + +ELF +} +k}J}k + +C2 +1"(} +}@P} !P} +) + + + +J +N + + +JP +ELF +6}S2 k + + + + + +ELF +b"B:r +*:<.~Nntd
@ + + +J >x"Z + + +ELF + +ELF +7+J57L]'; +X +4 + + + + + + + + + + + +ELF + + + +I + + + + + + + + + + +ELF +$2?O_n~%3;NYk{ + 3CQ`p%3AObq~"7?NWlv $8O[lv+:JYix!.<K\k{,9JYiy.9GXdx#.8M\j{-5?KYks (8GXgw$09LWiv6GQ^h~/>Oas->N^o1>O\kw$-=L[ly-<L[k{
+5FSgr#*:N]n}"2CScs
)BIV_o%4?K\fw1ASdu4DXgu~/=LZjw#2=IVanwɸwsqnmcb_OD420-+ + + +I + + + + + + + + + + + + + +ELF + + +gV +guRYuRF1 +bF1 +ƭ"R +"RF.+Kf, +aH0㐥 +kAndroid clang version 4.0.285906 (based on LLVM 4.0.285906) +4 + + + + + + + +ELF + + + + +ELF +}3 + + + + + + + + + + + + +G + + + +ELF +R + + +Kjj) + +)}@**? +
@! +!TH;@Z ! +!@ ) +!J%_kT +M + + + +S7_ +"00'Q*1*'Ŀ,T + + +#1*2(0j'F +#1*2(0j6 +"1*2(0 +*@- + +)}@**? +
@! +!TH;@[ ! + + NB + +4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +HIJ +H +kJ( @
Cz<LGJKIK
+,J
>MG>J +7JJK +7J +2JSJ +5JLJK +5J +0JUJ + +!v +J +(~wGMGM$~JII +~ + +vnJmJ16J+J*M*GJ
M + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ELF +H;@ + - , +)*!2*1S +#s*"T +3(483R +4r*2842 +2*22" +)!! +)*!*0G'ƌ22 +#R*"4 +2(4821 +4Q*184 +1Q*11H" !p*!''ƌ1*02 +#R*"k +)3 +2(3821 +3Q*183 +1q*11H" !p)!''ƌ1*0# +#b("# +"(#8"$ +#B($ +"("" @'"!aN@ +$ + +HIJKL + +GJAJ*VJ*JJ
~J J~J
JJ~JJ
~JK
J$J J +~+J$J
~K%LK +J + + +ELF +H;@) + +b +E@xm +_) +{AB_֏ +˭
1 +$ + + + + +z + + +ELF +H;@) + + +E@xm +_) +{AB_֏ +˭
1 +$ + + + + +z +JMJJJJ + + +ELF +) +TH;@^ +$ + + +z + +ELF +* }S}S +*I *5* }S}S +* }S}S +Sq +*A * }S}S +* }S}S +*I *1* }S}S ( +Sq*A * }S}S 0 +* }S}S 8 +*I *1* }S}S @ +Sq*A * }S}S H +@9 *K3 +
3(S( +@9 +,@9+ +D@9+ +
+ + + + + + +IL2I
JK(M/MGMOKK.H
JKK(M/MGMOKK0H
JKK(M/MGMOK1I
JK(M2(JXJ(J`JIL6IJK+M2MGMOKK6HJKK+M2MGMOK7IJK+M2MGM`JIL6IJK+M2MGMOKK6HJKK+M2MGMOK7IJK+M2MGMN +I!K:KIK#N/I!K-7NJ.H7KIK/N#K9L-GN,HKKH#P/I3J!gJ-IL:KJhJK&QI$K?KIK2M&K?L0GNJ2HKI&P2I3N$G0I2L@KKHK&qJI$K?KIK2M&K?L0GNJ2HKI&P2I3N$G0I2L@KIKKN + +ELF +ף;m3m+m#mog_WO{ CH;@ +< + +O- +{!X%')e*}SA#!()j(!! + + + Kk~ӟ +}~''cEbEaFQ +''' 'Q + + + +2R + +! + + + + + + + + + + + +HIJK L"M$N&O( +@JyJ(J #.8 +wJ( J<KI%KJ'JJJK$ +ELF +ELF +R*8 +7^'uA-p@rA-t@ +7@R +9y@s +8: + ^68 + wA- +&@: A^ +0w@-^
@A^ +38 %eA-^ +2vIA-f@^^@^ + +5'@ + +38 R +9 +% : +7 +2 +% +3 +*)! +3 +$ +41 +$R:'"5
+%z*0T +46 +6*6(4 +4: +4eA-";mA-U +57 +7*7X +8R +96 +61 +;(5Q*1r*: +5&P0+6 +52(6ן"7(1q*2 +6&P0 +61@"4s*1'&00 +'3' "2&g0G7 +%T +46 +6:6(4z*0 +4: +4eA-";mA-U +57 +7:7X +8R +96 +61 +;(5Q:1r*: +5&P0;6 +52(6ӟZ"7(1q*2 +6&P0 +61g@"4s*1'&00 +'3 "2&g0P&1' +T +4@"3 +'u +0c|@yc!^"5 +8"6 +*!# @ +* + +*!# @ m + + + + + + + + + + + + + + + +! + + + + + + + + + + +0z<! +6 +JM +~J +~J + + + + + + + + + + + + + +ELF ++Rby = + +R +R +R +R + +M + + +8 + +Hx +@I +KJ +J +J +J +J
wJMGKKO
JqJKOA
NM +8J%JJK +IK$JJI, +K$JI. 8JKJvJJM +J#KK +JJr<JxJIJM +J#KK +JJyJ?JvMJ +qMPJM +KJJM'J!GJJM'Jv +J +JJJ#JJJv + +ELF +$*'1hxPb@-.D2 +@b"%'B(#%0B($B(%%1 +$ + + + + +JJFLMxJPwJ +JIKK
tJJIKIFJKKJKGKKILIMIKIFJKKJKGKKILIMIKIFJKKJKGKKKHMH +ELF +%2 +2(%(2ht~~ +34 +4R*3R*4hu + R*3J@-_u +34 +4R*3R*4ht~~ + R*3#J@-_2 +3(00 +4(0htt + (0' +0G +'0;0q@- +4 +3[A-:'8483W788 +287 +182z81Z +7(38*#(4s +3*8:5 +4s*#s*44:68*5 +4*86*6 +5*4 +6s*5"2s*6N2FL&`"5L&sN5V2B +4tkz +'27@-:&8'119@8281 +380iw683558685 +~( + ++@ +! +6 +6 +6 + +4JJJJJJJJJJJJJJ + +zJP
GMMJMGMGJMM + +ELF +k~ + +OJJKJ +LIQyJMK + +ELF +"1uF-C +#d +$2MG-- +% +&C-B- +' +0D-V-455E-^-V6w7F-8f->@1 +9:R +;s +8'B(8B(#B($B(%B(&B('B(0B(4B(5B(6B(7B(<B(1@)@B(9B(28!B(3!8"n-") +.@:;'? + + +L +HLJJJJJJJ +HPFJNFNFJNFJJJ JM= + +M +MEOE 1 +IJKIKIKKJJ +KJGRJKJMJJ + +JJJNFNJFNJJQyJQyJQyJQyJJQyJJ8y~NMN
MKIN + + + + + + + +ELF + + + + +L +HLJJJJJJJ +H$JJ +JvJJ +JJvJJ@PLI +EJ +O + + + +ELF +xlE@ +$ + + +JK IJKKJJK +ttJ + +ELF + 'J JJ +JNJJJKJJJJJ +JK%JJJ
JM + + + + + +ELF +{H; + +c_D@ + + +I +& +HI +09 +LJKGMK!I +ELF +m#mWO
{I; + +3!(&R +4!(1c'!(20!(#!($ + +@a() ( ` + +@` + +@ +)B<)F) +=c@B))B<)@_@=2))B<[@ +˪ + +I +*E@ + +3!(&R +4!(1c'!(20!(#!($ + +4 + + +0 + + +HIJK + +
+w JJJJJJ
JJ
J
JJ
JJ
JJ
J +J%vJNF#JJ +J%vJJ#JJNM J(J&JJJ(JJ&JJ(JJ&JJ(JJ&JJ(JJ&JJyJ(KJ&JJIJ(KJ&JJIJ(KJ&JJIJJKIJKIJKIK(JJ&JI\J$JK(JJ&JJJvHJJJHHJHJHJHJLHQyJOEOv +J +
DxJJJJJJ
JJ
J
JJ
JJ
JJ
J +ELF +m3m+m#
m{I;)@ + +;Z<1*0qC-?(!C-1*:1*=) +1*>J ,1*){?1**(1*;1*< +5;7 +6*4 +7*6*7]B-;( (*(6;6W;7 +6*6 +7*7]C-v;6 +6*6;7 +6*6"3e +.-1 +/*,*1 2
*1!( +*N* +(H1;?1 +(h2R +(?(h@*>*1*2;(1*?1 +2*1#=e +)`@<k)nF)a=c@kB)j)a@<m)j@` +E@E@ + +˪ + +i +*E@ +BF@cF@$F@ +kAa +A + +) + +E@) +E@E@E@ + +˪ + + +*E@ +$ +1 + +KLMNO +$Ph +E +O} +O} +OwN +OqQH
+tkJJJJJJJ
JJ
J
JJ
JJ
JJ
J +
sNFJJRxJJJ'JJ'xJ
JE'x;AJF + +JtJKJKIKJJJJJ + + +L +Nw + + + + + + + +ELF +J" +ELF +h)I), +12 +2p(3*2 +3-DCN' +3'*'-1)D3-D_q2 +14 +3P*0r(4!T:&g +3(&E:% + +!s*2 +"s*4s*5TUB- +%s*6 +#s*4TYC- +'s*5U!@ +$s*4 +0s*4 +1s*4`"&f& +$ + +{ KM$" + + + + + + + + +ELF +J + +ELF + A?- + +Hv +G +M + + + + + +ELF +> +@0@o@ +@D@ +@ P@@ +@0@@o@@@@T@>@ߡ@0@ a@o@@@@ P@ @ +@ +@?=@> +_@J@4W +< + + + + + + ռ?<ߨ<ջ + + + + +ͻ + + + +@;0</߸鿃;G8<;W@º:T< + +ֻ2; +< +; x,㳼w-0;<i +`;9 +a==`f> +hpE`&/_aDР3~*$P>_S??p0@| +<x>??%@?U@_??@@@@A.A +?S,ad=~ +=SjܼוG.G??&L̾<8'<i#n<xྶ(:O2:JDu}?:?P=Kc%j3 +>>>&> +L?N? +x? + +<x>??%@?U@/_aD$P>_??@@_S??p0@@@A.AAndroid clang version 4.0.285906 (based on LLVM 4.0.285906) +4 + + + + + + + + + + + + + + + + + + + + + + +ELF +K@ + + +E@) +D +K,<$E@ e"(% m +) +gOgOdO# +&< +TAndroid clang version 4.0.285906 (based on LLVM 4.0.285906) + + + + +
DK
yJMMLK + + + +ELF + +c + +2
+ + +
+ + +zKQ +
6KO
J +~h +J
oJJLJHbKLJKK +HKKHjJRG +JKpJ +KF +H +-J + + + + + +ELF +HӀ@ +PX + ulDataSize = %d, ulFileSize = %d + + +; +KK
J +} JLI +
nL&IKo P+E0K JvJK0KKJ+MIK+KKLxOKL&KJ}<JKJJ + + + diff --git a/rcaudio/bitpack.h b/rcaudio/bitpack.h new file mode 100644 index 0000000..df09704 --- a/dev/null +++ b/rcaudio/bitpack.h @@ -0,0 +1,35 @@ +/*****************************************************************************/ +/* BroadVoice(R)32 (BV32) Floating-Point ANSI-C Source Code */ +/* Revision Date: October 5, 2012 */ +/* Version 1.2 */ +/*****************************************************************************/ + +/*****************************************************************************/ +/* Copyright 2000-2012 Broadcom Corporation */ +/* */ +/* This software is provided under the GNU Lesser General Public License, */ +/* version 2.1, as published by the Free Software Foundation ("LGPL"). */ +/* This program is distributed in the hope that it will be useful, but */ +/* WITHOUT ANY SUPPORT OR WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LGPL for */ +/* more details. A copy of the LGPL is available at */ +/* http://www.broadcom.com/licenses/LGPLv2.1.php, */ +/* or by writing to the Free Software Foundation, Inc., */ +/* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/*****************************************************************************/ + + +/***************************************************************************** + bitpack.h: BV32 bit packing routines + + $Log$ +******************************************************************************/ + +#ifndef BITPACK_H +#define BITPACK_H + +void BV32_BitPack(UWord8 * PackedStream, struct BV32_Bit_Stream * BitStruct); +void BV32_BitUnPack(UWord8 * PackedStream, struct BV32_Bit_Stream * BitStruct); + +#endif + diff --git a/rcaudio/bv32.h b/rcaudio/bv32.h new file mode 100644 index 0000000..d12ed63 --- a/dev/null +++ b/rcaudio/bv32.h @@ -0,0 +1,47 @@ +/*****************************************************************************/ +/* BroadVoice(R)32 (BV32) Floating-Point ANSI-C Source Code */ +/* Revision Date: October 5, 2012 */ +/* Version 1.2 */ +/*****************************************************************************/ + +/*****************************************************************************/ +/* Copyright 2000-2012 Broadcom Corporation */ +/* */ +/* This software is provided under the GNU Lesser General Public License, */ +/* version 2.1, as published by the Free Software Foundation ("LGPL"). */ +/* This program is distributed in the hope that it will be useful, but */ +/* WITHOUT ANY SUPPORT OR WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LGPL for */ +/* more details. A copy of the LGPL is available at */ +/* http://www.broadcom.com/licenses/LGPLv2.1.php, */ +/* or by writing to the Free Software Foundation, Inc., */ +/* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/*****************************************************************************/ + + +/***************************************************************************** + bv32.h : + + $Log$ +******************************************************************************/ + +extern void Reset_BV32_Coder( +struct BV32_Encoder_State *cs); + +extern void BV32_Encode( +struct BV32_Bit_Stream *bs, +struct BV32_Encoder_State *cs, +short *inx); + +extern void Reset_BV32_Decoder( +struct BV32_Decoder_State *ds); + +extern void BV32_Decode( +struct BV32_Bit_Stream *bs, +struct BV32_Decoder_State *ds, +short *out); + +extern void BV32_PLC( +struct BV32_Decoder_State *ds, +short *out); + diff --git a/rcaudio/bv32cnst.h b/rcaudio/bv32cnst.h new file mode 100644 index 0000000..ec733b3 --- a/dev/null +++ b/rcaudio/bv32cnst.h @@ -0,0 +1,152 @@ +/*****************************************************************************/ +/* BroadVoice(R)32 (BV32) Floating-Point ANSI-C Source Code */ +/* Revision Date: October 5, 2012 */ +/* Version 1.2 */ +/*****************************************************************************/ + +/*****************************************************************************/ +/* Copyright 2000-2012 Broadcom Corporation */ +/* */ +/* This software is provided under the GNU Lesser General Public License, */ +/* version 2.1, as published by the Free Software Foundation ("LGPL"). */ +/* This program is distributed in the hope that it will be useful, but */ +/* WITHOUT ANY SUPPORT OR WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LGPL for */ +/* more details. A copy of the LGPL is available at */ +/* http://www.broadcom.com/licenses/LGPLv2.1.php, */ +/* or by writing to the Free Software Foundation, Inc., */ +/* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/*****************************************************************************/ + + +/***************************************************************************** + bv32cnst.h : BV32 constants + + $Log$ +******************************************************************************/ + +#ifndef BV32CNST_H +#define BV32CNST_H + +/* ----- Basic Codec Parameters ----- */ +#define SF 16 /* input Sampling Frequency (in kHz) */ +#define FRSZ 80 /* the FRame SiZe */ +#define MAXPP 265 /* MAXimum Pitch Period */ +#define MINPP 10 /* Half of MINimum Pitch Period */ +#define NSF 2 /* number of subframes per frame */ +#define PWSZ 240 /* Pitch analysis Window SiZe for 8 kHz lowband */ +#define SFRSZ (FRSZ/NSF) /* SubFrame SiZe */ +#define WINSZ 160 /* Half of lpc analysis WINdow SiZe */ +#define MAXPP1 (MAXPP+1) /* Half of MAXimum Pitch Period + 1a */ + +/* NFC VQ coding parameters */ +#define VDIM 4 /* excitation vector dimension */ +#define CBSZ 32 /* codebook size */ +#define PPCBSZ 32 +#define LGPORDER 16 /* Log-Gain Predictor OODER */ +#define LGPECBSZ 32 /* Log-Gain Prediction Error CodeBook SiZe */ +#define LSPPORDER 8 /* LSP MA Predictor ORDER */ +#define LSPECBSZ1 128 /* codebook size of 1st-stage LSP VQ */ +#define SVD1 3 /* split VQ dimension 1 */ +#define LSPECBSZ21 32 /* codebook size of 2nd-stage LSP split VQ */ +#define SVD2 5 /* split VQ dimension 2 */ +#define LSPECBSZ22 32 /* codebook size of 2nd stage LSP split VQ */ + +#define NVPSF (FRSZ/VDIM) +#define NVPSSF (SFRSZ/VDIM) + +/* Packetloss Concealment */ +#define ScPLCGmin 0.1f +#define ScPLCGmax 0.9f +#define PePLCGmin 0.5f +#define PePLCGmax 0.9f +#define ScPLCG_b ((ScPLCGmin-ScPLCGmax)/(PePLCGmax-PePLCGmin)) +#define ScPLCG_a (ScPLCGmin-ScPLCG_b*PePLCGmax) +#define HoldPLCG 8 +#define AttnPLCG 50 +#define AttnFacPLCG (1.0f/(Float)AttnPLCG) + +/* Pre-emphasis filter coefficients */ +#define PEAPFC 0.75f +#define PEAZFC 0.5f + +#define INVSFRSZ (1.0f/(Float)SFRSZ) +#define FECNSF 2 /* number of FEC subframes per frame */ + +#define Minlg -2.0f /* minimum log-gain */ +#define TMinlg 0.25f /* minimum linear gain */ +#define GPO 16 /* order of MA prediction */ + +/* Level Estimation */ +#define estl_alpha (8191.0f/8192.0f) +#define estl_beta (1023.0f/1024.0f) +#define estl_beta1 (1.0f-estl_beta) +#define estl_a (511.0f/512.0f) +#define estl_a1 (1-estl_a) +#define estl_TH 0.2f + +/* Log-Gain Limitation */ +#define LGLB -24 /* Log-Gain Lower Bound */ +#define GCLB -8 /* Log-Gain Change Lower Bound */ +#define NGB 18 /* Number of Gain Bins */ +#define NGCB 11 /* Number of Gain Change Bins */ +#define MinE -2.0 + +#define PFO 1 /* preemphasis filter order */ + +#define LTMOFF MAXPP1 /* Long-Term filter Memory OFFset */ + +/* Parameters related to the gain decoder trap */ +#define NCLGLIM_TRAPPED 50 /* 0.125 sec */ +#define LEVEL_CONVERGENCE_TIME 100 /* 0.25 sec */ + +/* front-end highpass filter */ +#define HPO 2 /* High-pass filter order */ + +/* lpc weighting filter */ +#define LTWFL 0.5f + +/* Minimum gain threshold */ +#define TMinE (SFRSZ*0.25f) + +/* coarse pitch search */ +#define cpp_Qvalue 3 +#define cpp_scale (1<<cpp_Qvalue) + +/* ------ Decimation Parameters ----- */ +#define DECF 8 /* DECimation Factor for coarse pitch period search */ +#define FRSZD (FRSZ/DECF) /* FRame SiZe in DECF:1 lowband domain */ +#define MAXPPD (MAXPP/DECF) /* MAX Pitch in DECF:1, if MAXPP!=4n, ceil() */ +#define MINPPD ((int) (MINPP/DECF)) /* MINimum Pitch Period in DECF:1 */ +#define PWSZD (PWSZ/DECF) /* Pitch ana. Window SiZe in DECF:1 domain */ +#define DFO 4 +#define MAXPPD1 (MAXPPD+1) +#define LXD (MAXPPD1+PWSZD) +#define XDOFF (LXD-FRSZD) +#define HMAXPPD (MAXPPD/2) +#define M1 (MINPPD-1) +#define M2 MAXPPD1 +#define HDECF (DECF/2) +#define INVDECF (1.0F/(float)(DECF)) /* INVerse of DECF (decimation factor) */ + +/* coarse pitch */ +#define MPTH4 0.3f /* value to use for MPTH[] with index >= 4 */ +#define DEVTH 0.25f /* pitch period DEViation THreshold */ +#define TH1 0.73f /* first threshold for cor*cor/energy */ +#define TH2 0.4f /* second threshold for cor*cor/energy */ +#define LPTH1 0.78f /* Last Pitch cor*cor/energy THreshold 1 */ +#define LPTH2 0.43f /* Last Pitch cor*cor/energy THreshold 2 */ +#define MPDTH 0.06f /* Multiple Pitch Deviation THreshold */ +#define SMDTH 0.095f /* Sub-Multiple pitch Deviation THreshold */ +#define SMDTH1 (1.0f-SMDTH) +#define SMDTH2 (1.0f+SMDTH) +#define MPR1 (1.0f-MPDTH) /* Multiple Pitch Range lower threshold */ +#define MPR2 (1.0f+MPDTH) /* Multiple Pitch Range upper threshold */ +#define MAX_NPEAKS 7 + +/* buffer offset and length */ +#define XOFF MAXPP1 /* offset for x() frame */ +#define LX (XOFF+FRSZ) /* Length of x() buffer */ + +#endif + diff --git a/rcaudio/bv32strct.h b/rcaudio/bv32strct.h new file mode 100644 index 0000000..cdfc66c --- a/dev/null +++ b/rcaudio/bv32strct.h @@ -0,0 +1,93 @@ +/*****************************************************************************/ +/* BroadVoice(R)32 (BV32) Floating-Point ANSI-C Source Code */ +/* Revision Date: October 5, 2012 */ +/* Version 1.2 */ +/*****************************************************************************/ + +/*****************************************************************************/ +/* Copyright 2000-2012 Broadcom Corporation */ +/* */ +/* This software is provided under the GNU Lesser General Public License, */ +/* version 2.1, as published by the Free Software Foundation ("LGPL"). */ +/* This program is distributed in the hope that it will be useful, but */ +/* WITHOUT ANY SUPPORT OR WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LGPL for */ +/* more details. A copy of the LGPL is available at */ +/* http://www.broadcom.com/licenses/LGPLv2.1.php, */ +/* or by writing to the Free Software Foundation, Inc., */ +/* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/*****************************************************************************/ + + +/***************************************************************************** + bv32strct.h : BV32 data structures + + $Log$ +******************************************************************************/ + +#ifndef BV32STRCT_H +#define BV32STRCT_H + +struct BV32_Decoder_State { +Float stsym[LPCO]; +Float ltsym[LTMOFF]; +Float lsppm[LPCO*LSPPORDER]; +Float lgpm[LGPORDER]; +Float lsplast[LPCO]; +Float dezfm[PFO]; +Float depfm[PFO]; +short cfecount; +UWord32 idum; +Float scplcg; +Float per; +Float E; +Float atplc[LPCO+1]; +short pp_last; +Float prevlg[2]; +Float lgq_last; +Float bq_last[3]; +Float lmax; /* level-adaptation */ +Float lmin; +Float lmean; +Float x1; +Float level; +short nclglim; +short lctimer; +}; + +struct BV32_Encoder_State { +Float x[XOFF]; +Float xwd[XDOFF]; /* memory of DECF:1 decimated version of xw() */ +Float dq[XOFF]; /* quantized short-term pred error */ +Float dfm[DFO]; /* decimated xwd() filter memory */ +Float stpem[LPCO]; /* ST Pred. Error filter memory, low-band */ +Float stwpm[LPCO]; /* ST Weighting all-Pole Memory, low-band */ +Float stnfm[LPCO]; /* ST Noise Feedback filter Memory, Lowband */ +Float stsym[LPCO]; /* ST SYnthesis filter Memory, Lowband */ +Float ltsym[MAXPP1+FRSZ]; /* long-term synthesis filter memory */ +Float ltnfm[MAXPP1+FRSZ]; /* long-term noise feedback filter memory */ +Float lsppm[LPCO*LSPPORDER]; /* LSP Predictor Memory */ +Float allast[LPCO+1]; +Float lsplast[LPCO]; +Float lgpm[LGPORDER]; +Float hpfzm[HPO]; +Float hpfpm[HPO]; +Float prevlg[2]; +Float lmax; /* level-adaptation */ +Float lmin; +Float lmean; +Float x1; +Float level; +int cpplast; /* pitch period pf the previous frame */ +}; + +struct BV32_Bit_Stream { +short lspidx[3]; +short ppidx; /* 9 bit */ +short bqidx; +short gidx[2]; +short qvidx[NVPSF]; +}; + +#endif /* BV32STRCT_H */ + diff --git a/rcaudio/bvcommon.h b/rcaudio/bvcommon.h new file mode 100644 index 0000000..1316d84 --- a/dev/null +++ b/rcaudio/bvcommon.h @@ -0,0 +1,102 @@ +/*****************************************************************************/ +/* BroadVoice(R)32 (BV32) Floating-Point ANSI-C Source Code */ +/* Revision Date: October 5, 2012 */ +/* Version 1.2 */ +/*****************************************************************************/ + +/*****************************************************************************/ +/* Copyright 2000-2012 Broadcom Corporation */ +/* */ +/* This software is provided under the GNU Lesser General Public License, */ +/* version 2.1, as published by the Free Software Foundation ("LGPL"). */ +/* This program is distributed in the hope that it will be useful, but */ +/* WITHOUT ANY SUPPORT OR WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LGPL for */ +/* more details. A copy of the LGPL is available at */ +/* http://www.broadcom.com/licenses/LGPLv2.1.php, */ +/* or by writing to the Free Software Foundation, Inc., */ +/* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/*****************************************************************************/ + + +/***************************************************************************** + bvcommon.h : Common #defines and prototypes + + $Log$ +******************************************************************************/ + +#ifndef BVCOMMON_H +#define BVCOMMON_H + +/* Function Prototypes */ + + +void pp3dec( +short idx, +Float *b); + +void apfilter( + Float *a, /* (i) a[m+1] prediction coefficients (m=10) */ + int m, /* (i) LPC order */ + Float *x, /* (i) input signal */ + Float *y, /* (o) output signal */ + int lg, /* (i) size of filtering */ + Float *mem, /* (i/o) input memory */ + short update);/* (i) flag for memory update */ + +void azfilter( + Float *a, /* (i) prediction coefficients */ + int m, /* (i) LPC order */ + Float *x, /* (i) input signal vector */ + Float *y, /* (o) output signal vector */ + int lg, /* (i) size of filtering */ + Float *mem, /* (i/o) filter memory before filtering */ + short update); /* (i) flag for memory update */ + +void Autocor( +Float *r, /* (o) : Autocorrelations */ +Float *x, /* (i) : Input signal */ +Float *window, /* (i) : LPC Analysis window */ +int l_window,/* (i) : window length */ +int m); /* (i) : LPC order */ + +void Levinson( +Float *r, /* (i): autocorrelation coefficients */ +Float *a, /* (o): LPC coefficients */ +Float *old_a, /* (i/o): LPC coefficients of previous frame */ +int m); /* (i): LPC order */ + +void a2lsp( +Float pc[], /* (i) input the np+1 predictor coeff. */ +Float lsp[], /* (o) line spectral pairs */ +Float old_lsp[]); /* (i/o) old lsp[] (in case not found 10 roots) */ + +void lsp2a( +Float *lsp, /* (i) LSP vector */ +Float *a); /* (o) LPC coefficients */ + +void stblz_lsp(Float *lsp, int order); +int stblchck(Float *x, int vdim); + +/* LPC to LSP Conversion */ +extern Float grid[]; + +/* LPC bandwidth expansion */ +extern Float bwel[]; + +/* LPC WEIGHTING FILTER */ +extern Float STWAL[]; + +/* ----- Basic Codec Parameters ----- */ +#define LPCO 8 /* LPC Order */ +#define Ngrd 60 /* LPC to LSP Conversion */ + +#define LSPMIN 0.00150f /* minimum lsp frequency, 6/12 Hz for BV16/BV32 */ +#define LSPMAX 0.99775f /* maximum lsp frequency, 3991/7982 Hz for BV16/BV32 */ +#define DLSPMIN 0.01250f /* minimum lsp spacing, 50/100 Hz for BV16/BV32 */ +#define STBLDIM 3 /* dimension of stability enforcement */ + +extern Float pp9cb[]; + +#endif /* BVCOMMON_H */ + diff --git a/rcaudio/def.h b/rcaudio/def.h new file mode 100644 index 0000000..20db58b --- a/dev/null +++ b/rcaudio/def.h @@ -0,0 +1,30 @@ +#ifndef HUITONG_DEF_H +#define HUITONG_DEF_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define RAS_CMD_MASK 0x07 +#define RAS_START_CMD 0x04 +#define RAS_DATA_TIC1_CMD 0x01 +#define RAS_STOP_CMD 0x02 +#define RAS_DATA_RAW_CMD 0x03 + +#ifdef LOG_TAG +#undef LOG_TAG +#endif +#define LOG_TAG "huitong_audio_hw" + +//#define LOG_NDEBUG 0 +//#define LOG_NDEBUG_FUNCTION +#ifdef LOG_NDEBUG_FUNCTION +#define LOGFUNC(...) ((void)0) +#else +#define LOGFUNC(...) (ALOGD(__VA_ARGS__)) +#endif + +#ifdef __cplusplus +} +#endif +#endif diff --git a/rcaudio/dvi_adpcm.h b/rcaudio/dvi_adpcm.h new file mode 100644 index 0000000..48b41d2 --- a/dev/null +++ b/rcaudio/dvi_adpcm.h @@ -0,0 +1,17 @@ +#ifndef _dvi_adpcm_h +#define _dvi_adpcm_h + +#include <stdint.h> + +struct __attribute__ ((__packed__)) dvi_adpcm_state { + int16_t valpred; /* Previous predicted value */ + uint8_t index; /* Index into stepsize table */ +}; + +typedef struct dvi_adpcm_state dvi_adpcm_state_t; + +void *dvi_adpcm_init(void *, double); +int dvi_adpcm_decode(void *in_buf, int in_size, void *out_buf, int *out_size, void *state); + +#endif + diff --git a/rcaudio/huitong_audio.h b/rcaudio/huitong_audio.h new file mode 100644 index 0000000..62133e7 --- a/dev/null +++ b/rcaudio/huitong_audio.h @@ -0,0 +1,152 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef HUITONG_AUDIO_H +#define HUITONG_AUDIO_H + +#include <sys/types.h> +#include <sys/socket.h> +#include <sys/un.h> +#include <signal.h> +#include <sys/poll.h> +#include <cutils/sockets.h> + +#include <errno.h> +#include <pthread.h> +#include <stdint.h> +#include <sys/time.h> +#include <stdlib.h> +#include <sys/stat.h> +#include <fcntl.h> + +#include <cutils/log.h> +#include <cutils/str_parms.h> +#include <cutils/properties.h> + +#include <hardware/hardware.h> +#include <system/audio.h> +#include <hardware/audio.h> + +#include <tinyalsa/asoundlib.h> +#include <hardware/audio_effect.h> +#include <time.h> +#include <utils/Timers.h> + +////////////////////////// switch of huitong ////////////////////////////////////////////////// +#define ENABLE_HUITONG 1 + + + +////////////////////////// bowdlerized huitong_audio_hw.h ///////////////////////////////////// +/* ALSA cards for AML */ +#define CARD_AMLOGIC_USB 1 +/* ALSA ports for AML */ +#define PORT_MM 0 // this macro is different between amlogic and huitong +/* number of frames per period */ +#define DEFAULT_WFD_PERIOD_SIZE 256 +#define DEFAULT_CAPTURE_PERIOD_SIZE 1024 +#define MIXER_XML_PATH "/system/etc/mixer_paths.xml" + +extern struct pcm_config pcm_config_vg; + + +////////////////////////// huitong_audio_hw.c ///////////////////////////////////////////////// +#include <linux/input.h> +#include <linux/hidraw.h> +//#include <huitong_audio.h> +#include "def.h" +#include "ti_audio.h" +#include "mainSBC.h" +#include "dvi_adpcm.h" +#include "opus.h" +#include "typedef.h" +#include "bvcommon.h" +#include "bv32cnst.h" +#include "bv32strct.h" +#include "bv32.h" +#include "bitpack.h" + +#include "huitong_log.h" + +#define BV32_FRAME_LEN 80 + +#define MAX_HIDRAW_ID 20 + +#define HUITONG_TI_VID 0x000D +#define HUITONG_TI_PID 0x0001 + +#define HUITONG_BCM_VID 0x000F +#define HUITONG_BCM_PID_20734 0x0001 +#define HUITONG_BCM_PID_20735 0x0002 + + +#define HUITONG_DIALOG_VID 0x2ba5 +#define HUITONG_DIALOG_PID 0x8082 + +#define HUITONG_NORDIC_VID 0x1915 +#define HUITONG_NORDIC_PID 0x0001 + +enum { + RC_PLATFORM_UNKOWN, + RC_PLATFORM_TI, + RC_PLATFORM_BCM, + RC_PLATFORM_DIALOG, + RC_PLATFORM_NORDIC +}; + +#define REPORT_ID 0x05 +#define REPORT_ID_NORDIC_BV32 0x01 +#define REPORT_ID_NORDIC_ADPCM 0x02 +#define REPORT_ID_NORDIC_OPUS 0x03 + + +#define GATT_PDU_LENGTH 20 +#define HIDRAW_PDU_LENGTH (1 + GATT_PDU_LENGTH) //the first byte is report id added by stack + +static int part_index = 0; +static int total_lenth = 0; +static int receive_index = 0; +#define ADPCM_DATA_PART_NUM 5 //five parts as a frame +static unsigned char ADPCM_Data_Frame[ADPCM_DATA_PART_NUM*GATT_PDU_LENGTH]; + +static OpusDecoder *st; +static struct BV32_Decoder_State bv32_st; + + +static short decode_buf[1024]; + +static int hidraw_fd = -1; + +static int huitong_rc_platform = RC_PLATFORM_UNKOWN; + +///////////////////// function prototype definition used in huitong_audio_hw.c //////////////// +uint32_t huitong_in_get_sample_rate(const struct audio_stream *stream); +int huitong_in_set_sample_rate(struct audio_stream *stream, uint32_t rate); +size_t huitong_in_get_buffer_size(const struct audio_stream *stream); +audio_channel_mask_t huitong_in_get_channels(const struct audio_stream *stream); +audio_format_t huitong_in_get_format(const struct audio_stream *stream); +int huitong_in_set_format(struct audio_stream *stream, audio_format_t format); +int huitong_in_standby(struct audio_stream *stream); +int huitong_in_dump(const struct audio_stream *stream, int fd); +int huitong_in_set_parameters(struct audio_stream *stream, const char *kvpairs); +char * huitong_in_get_parameters(const struct audio_stream *stream, const char *keys); +int huitong_in_set_gain(struct audio_stream_in *stream, float gain); +ssize_t huitong_in_read(struct audio_stream_in *stream, void* buffer, size_t bytes); +uint32_t huitong_in_get_input_frames_lost(struct audio_stream_in *stream); +int get_hidraw_device_fd(); + +#endif + diff --git a/rcaudio/huitong_log.h b/rcaudio/huitong_log.h new file mode 100644 index 0000000..f98e90e --- a/dev/null +++ b/rcaudio/huitong_log.h @@ -0,0 +1,4 @@ +void log_begin(); +void log_write(unsigned char *buf, int len); +void log_end(); + diff --git a/rcaudio/mainSBC.h b/rcaudio/mainSBC.h new file mode 100644 index 0000000..a1fd48c --- a/dev/null +++ b/rcaudio/mainSBC.h @@ -0,0 +1,3 @@ +void sbc_decoder_reset(void); +int32_t BCM_SBC_Decode(uint8_t * DataIn, uint16_t *usDecodedBuffer, FILE * fOutput); + diff --git a/rcaudio/opus.h b/rcaudio/opus.h new file mode 100644 index 0000000..e029f71 --- a/dev/null +++ b/rcaudio/opus.h @@ -0,0 +1,986 @@ +/* Copyright (c) 2010-2011 Xiph.Org Foundation, Skype Limited + Written by Jean-Marc Valin and Koen Vos */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** + * @file opus.h + * @brief Opus reference implementation API + */ + +#ifndef OPUS_H +#define OPUS_H + +#include "opus_types.h" +#include "opus_defines.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup opus Opus + * @ingroup MOD_AUDIO + * @brief Opus reference implementation API + * + * The Opus codec is designed for interactive speech and audio transmission over the Internet. + * It is designed by the IETF Codec Working Group and incorporates technology from + * Skype's SILK codec and Xiph.Org's CELT codec. + * + * The Opus codec is designed to handle a wide range of interactive audio applications, + * including Voice over IP, videoconferencing, in-game chat, and even remote live music + * performances. It can scale from low bit-rate narrowband speech to very high quality + * stereo music. Its main features are: + + * @li Sampling rates from 8 to 48 kHz + * @li Bit-rates from 6 kb/s to 510 kb/s + * @li Support for both constant bit-rate (CBR) and variable bit-rate (VBR) + * @li Audio bandwidth from narrowband to full-band + * @li Support for speech and music + * @li Support for mono and stereo + * @li Support for multichannel (up to 255 channels) + * @li Frame sizes from 2.5 ms to 60 ms + * @li Good loss robustness and packet loss concealment (PLC) + * @li Floating point and fixed-point implementation + * + * Documentation sections: + * @li @ref opus_encoder + * @li @ref opus_decoder + * @li @ref opus_repacketizer + * @li @ref opus_multistream + * @li @ref opus_libinfo + * @li @ref opus_custom + */ + +/** @defgroup opus_encoder Opus Encoder + * @ingroup opus + * @{ + * + * @brief This page describes the process and functions used to encode Opus. + * + * Since Opus is a stateful codec, the encoding process starts with creating an encoder + * state. This can be done with: + * + * @code + * int error; + * OpusEncoder *enc; + * enc = opus_encoder_create(Fs, channels, application, &error); + * @endcode + * + * From this point, @c enc can be used for encoding an audio stream. An encoder state + * @b must @b not be used for more than one stream at the same time. Similarly, the encoder + * state @b must @b not be re-initialized for each frame. + * + * While opus_encoder_create() allocates memory for the state, it's also possible + * to initialize pre-allocated memory: + * + * @code + * int size; + * int error; + * OpusEncoder *enc; + * size = opus_encoder_get_size(channels); + * enc = malloc(size); + * error = opus_encoder_init(enc, Fs, channels, application); + * @endcode + * + * where opus_encoder_get_size() returns the required size for the encoder state. Note that + * future versions of this code may change the size, so no assuptions should be made about it. + * + * The encoder state is always continuous in memory and only a shallow copy is sufficient + * to copy it (e.g. memcpy()) + * + * It is possible to change some of the encoder's settings using the opus_encoder_ctl() + * interface. All these settings already default to the recommended value, so they should + * only be changed when necessary. The most common settings one may want to change are: + * + * @code + * opus_encoder_ctl(enc, OPUS_SET_BITRATE(bitrate)); + * opus_encoder_ctl(enc, OPUS_SET_COMPLEXITY(complexity)); + * opus_encoder_ctl(enc, OPUS_SET_SIGNAL(signal_type)); + * @endcode + * + * where + * + * @arg bitrate is in bits per second (b/s) + * @arg complexity is a value from 1 to 10, where 1 is the lowest complexity and 10 is the highest + * @arg signal_type is either OPUS_AUTO (default), OPUS_SIGNAL_VOICE, or OPUS_SIGNAL_MUSIC + * + * See @ref opus_encoderctls and @ref opus_genericctls for a complete list of parameters that can be set or queried. Most parameters can be set or changed at any time during a stream. + * + * To encode a frame, opus_encode() or opus_encode_float() must be called with exactly one frame (2.5, 5, 10, 20, 40 or 60 ms) of audio data: + * @code + * len = opus_encode(enc, audio_frame, frame_size, packet, max_packet); + * @endcode + * + * where + * <ul> + * <li>audio_frame is the audio data in opus_int16 (or float for opus_encode_float())</li> + * <li>frame_size is the duration of the frame in samples (per channel)</li> + * <li>packet is the byte array to which the compressed data is written</li> + * <li>max_packet is the maximum number of bytes that can be written in the packet (4000 bytes is recommended). + * Do not use max_packet to control VBR target bitrate, instead use the #OPUS_SET_BITRATE CTL.</li> + * </ul> + * + * opus_encode() and opus_encode_float() return the number of bytes actually written to the packet. + * The return value <b>can be negative</b>, which indicates that an error has occurred. If the return value + * is 2 bytes or less, then the packet does not need to be transmitted (DTX). + * + * Once the encoder state if no longer needed, it can be destroyed with + * + * @code + * opus_encoder_destroy(enc); + * @endcode + * + * If the encoder was created with opus_encoder_init() rather than opus_encoder_create(), + * then no action is required aside from potentially freeing the memory that was manually + * allocated for it (calling free(enc) for the example above) + * + */ + +/** Opus encoder state. + * This contains the complete state of an Opus encoder. + * It is position independent and can be freely copied. + * @see opus_encoder_create,opus_encoder_init + */ +typedef struct OpusEncoder OpusEncoder; + +/** Gets the size of an <code>OpusEncoder</code> structure. + * @param[in] channels <tt>int</tt>: Number of channels. + * This must be 1 or 2. + * @returns The size in bytes. + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_encoder_get_size(int channels); + +/** + */ + +/** Allocates and initializes an encoder state. + * There are three coding modes: + * + * @ref OPUS_APPLICATION_VOIP gives best quality at a given bitrate for voice + * signals. It enhances the input signal by high-pass filtering and + * emphasizing formants and harmonics. Optionally it includes in-band + * forward error correction to protect against packet loss. Use this + * mode for typical VoIP applications. Because of the enhancement, + * even at high bitrates the output may sound different from the input. + * + * @ref OPUS_APPLICATION_AUDIO gives best quality at a given bitrate for most + * non-voice signals like music. Use this mode for music and mixed + * (music/voice) content, broadcast, and applications requiring less + * than 15 ms of coding delay. + * + * @ref OPUS_APPLICATION_RESTRICTED_LOWDELAY configures low-delay mode that + * disables the speech-optimized mode in exchange for slightly reduced delay. + * This mode can only be set on an newly initialized or freshly reset encoder + * because it changes the codec delay. + * + * This is useful when the caller knows that the speech-optimized modes will not be needed (use with caution). + * @param [in] Fs <tt>opus_int32</tt>: Sampling rate of input signal (Hz) + * This must be one of 8000, 12000, 16000, + * 24000, or 48000. + * @param [in] channels <tt>int</tt>: Number of channels (1 or 2) in input signal + * @param [in] application <tt>int</tt>: Coding mode (@ref OPUS_APPLICATION_VOIP/@ref OPUS_APPLICATION_AUDIO/@ref OPUS_APPLICATION_RESTRICTED_LOWDELAY) + * @param [out] error <tt>int*</tt>: @ref opus_errorcodes + * @note Regardless of the sampling rate and number channels selected, the Opus encoder + * can switch to a lower audio bandwidth or number of channels if the bitrate + * selected is too low. This also means that it is safe to always use 48 kHz stereo input + * and let the encoder optimize the encoding. + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusEncoder *opus_encoder_create( + opus_int32 Fs, + int channels, + int application, + int *error +); + +/** Initializes a previously allocated encoder state + * The memory pointed to by st must be at least the size returned by opus_encoder_get_size(). + * This is intended for applications which use their own allocator instead of malloc. + * @see opus_encoder_create(),opus_encoder_get_size() + * To reset a previously initialized state, use the #OPUS_RESET_STATE CTL. + * @param [in] st <tt>OpusEncoder*</tt>: Encoder state + * @param [in] Fs <tt>opus_int32</tt>: Sampling rate of input signal (Hz) + * This must be one of 8000, 12000, 16000, + * 24000, or 48000. + * @param [in] channels <tt>int</tt>: Number of channels (1 or 2) in input signal + * @param [in] application <tt>int</tt>: Coding mode (OPUS_APPLICATION_VOIP/OPUS_APPLICATION_AUDIO/OPUS_APPLICATION_RESTRICTED_LOWDELAY) + * @retval #OPUS_OK Success or @ref opus_errorcodes + */ +OPUS_EXPORT int opus_encoder_init( + OpusEncoder *st, + opus_int32 Fs, + int channels, + int application +) OPUS_ARG_NONNULL(1); + +/** Encodes an Opus frame. + * @param [in] st <tt>OpusEncoder*</tt>: Encoder state + * @param [in] pcm <tt>opus_int16*</tt>: Input signal (interleaved if 2 channels). length is frame_size*channels*sizeof(opus_int16) + * @param [in] frame_size <tt>int</tt>: Number of samples per channel in the + * input signal. + * This must be an Opus frame size for + * the encoder's sampling rate. + * For example, at 48 kHz the permitted + * values are 120, 240, 480, 960, 1920, + * and 2880. + * Passing in a duration of less than + * 10 ms (480 samples at 48 kHz) will + * prevent the encoder from using the LPC + * or hybrid modes. + * @param [out] data <tt>unsigned char*</tt>: Output payload. + * This must contain storage for at + * least \a max_data_bytes. + * @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated + * memory for the output + * payload. This may be + * used to impose an upper limit on + * the instant bitrate, but should + * not be used as the only bitrate + * control. Use #OPUS_SET_BITRATE to + * control the bitrate. + * @returns The length of the encoded packet (in bytes) on success or a + * negative error code (see @ref opus_errorcodes) on failure. + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_encode( + OpusEncoder *st, + const opus_int16 *pcm, + int frame_size, + unsigned char *data, + opus_int32 max_data_bytes +) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4); + +/** Encodes an Opus frame from floating point input. + * @param [in] st <tt>OpusEncoder*</tt>: Encoder state + * @param [in] pcm <tt>float*</tt>: Input in float format (interleaved if 2 channels), with a normal range of +/-1.0. + * Samples with a range beyond +/-1.0 are supported but will + * be clipped by decoders using the integer API and should + * only be used if it is known that the far end supports + * extended dynamic range. + * length is frame_size*channels*sizeof(float) + * @param [in] frame_size <tt>int</tt>: Number of samples per channel in the + * input signal. + * This must be an Opus frame size for + * the encoder's sampling rate. + * For example, at 48 kHz the permitted + * values are 120, 240, 480, 960, 1920, + * and 2880. + * Passing in a duration of less than + * 10 ms (480 samples at 48 kHz) will + * prevent the encoder from using the LPC + * or hybrid modes. + * @param [out] data <tt>unsigned char*</tt>: Output payload. + * This must contain storage for at + * least \a max_data_bytes. + * @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated + * memory for the output + * payload. This may be + * used to impose an upper limit on + * the instant bitrate, but should + * not be used as the only bitrate + * control. Use #OPUS_SET_BITRATE to + * control the bitrate. + * @returns The length of the encoded packet (in bytes) on success or a + * negative error code (see @ref opus_errorcodes) on failure. + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_encode_float( + OpusEncoder *st, + const float *pcm, + int frame_size, + unsigned char *data, + opus_int32 max_data_bytes +) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2) OPUS_ARG_NONNULL(4); + +/** Frees an <code>OpusEncoder</code> allocated by opus_encoder_create(). + * @param[in] st <tt>OpusEncoder*</tt>: State to be freed. + */ +OPUS_EXPORT void opus_encoder_destroy(OpusEncoder *st); + +/** Perform a CTL function on an Opus encoder. + * + * Generally the request and subsequent arguments are generated + * by a convenience macro. + * @param st <tt>OpusEncoder*</tt>: Encoder state. + * @param request This and all remaining parameters should be replaced by one + * of the convenience macros in @ref opus_genericctls or + * @ref opus_encoderctls. + * @see opus_genericctls + * @see opus_encoderctls + */ +OPUS_EXPORT int opus_encoder_ctl(OpusEncoder *st, int request, ...) OPUS_ARG_NONNULL(1); +/**@}*/ + +/** @defgroup opus_decoder Opus Decoder + * @ingroup opus + * @{ + * + * @brief This page describes the process and functions used to decode Opus. + * + * The decoding process also starts with creating a decoder + * state. This can be done with: + * @code + * int error; + * OpusDecoder *dec; + * dec = opus_decoder_create(Fs, channels, &error); + * @endcode + * where + * @li Fs is the sampling rate and must be 8000, 12000, 16000, 24000, or 48000 + * @li channels is the number of channels (1 or 2) + * @li error will hold the error code in case of failure (or #OPUS_OK on success) + * @li the return value is a newly created decoder state to be used for decoding + * + * While opus_decoder_create() allocates memory for the state, it's also possible + * to initialize pre-allocated memory: + * @code + * int size; + * int error; + * OpusDecoder *dec; + * size = opus_decoder_get_size(channels); + * dec = malloc(size); + * error = opus_decoder_init(dec, Fs, channels); + * @endcode + * where opus_decoder_get_size() returns the required size for the decoder state. Note that + * future versions of this code may change the size, so no assuptions should be made about it. + * + * The decoder state is always continuous in memory and only a shallow copy is sufficient + * to copy it (e.g. memcpy()) + * + * To decode a frame, opus_decode() or opus_decode_float() must be called with a packet of compressed audio data: + * @code + * frame_size = opus_decode(dec, packet, len, decoded, max_size, 0); + * @endcode + * where + * + * @li packet is the byte array containing the compressed data + * @li len is the exact number of bytes contained in the packet + * @li decoded is the decoded audio data in opus_int16 (or float for opus_decode_float()) + * @li max_size is the max duration of the frame in samples (per channel) that can fit into the decoded_frame array + * + * opus_decode() and opus_decode_float() return the number of samples (per channel) decoded from the packet. + * If that value is negative, then an error has occurred. This can occur if the packet is corrupted or if the audio + * buffer is too small to hold the decoded audio. + * + * Opus is a stateful codec with overlapping blocks and as a result Opus + * packets are not coded independently of each other. Packets must be + * passed into the decoder serially and in the correct order for a correct + * decode. Lost packets can be replaced with loss concealment by calling + * the decoder with a null pointer and zero length for the missing packet. + * + * A single codec state may only be accessed from a single thread at + * a time and any required locking must be performed by the caller. Separate + * streams must be decoded with separate decoder states and can be decoded + * in parallel unless the library was compiled with NONTHREADSAFE_PSEUDOSTACK + * defined. + * + */ + +/** Opus decoder state. + * This contains the complete state of an Opus decoder. + * It is position independent and can be freely copied. + * @see opus_decoder_create,opus_decoder_init + */ +typedef struct OpusDecoder OpusDecoder; + +/** Gets the size of an <code>OpusDecoder</code> structure. + * @param [in] channels <tt>int</tt>: Number of channels. + * This must be 1 or 2. + * @returns The size in bytes. + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decoder_get_size(int channels); + +/** Allocates and initializes a decoder state. + * @param [in] Fs <tt>opus_int32</tt>: Sample rate to decode at (Hz). + * This must be one of 8000, 12000, 16000, + * 24000, or 48000. + * @param [in] channels <tt>int</tt>: Number of channels (1 or 2) to decode + * @param [out] error <tt>int*</tt>: #OPUS_OK Success or @ref opus_errorcodes + * + * Internally Opus stores data at 48000 Hz, so that should be the default + * value for Fs. However, the decoder can efficiently decode to buffers + * at 8, 12, 16, and 24 kHz so if for some reason the caller cannot use + * data at the full sample rate, or knows the compressed data doesn't + * use the full frequency range, it can request decoding at a reduced + * rate. Likewise, the decoder is capable of filling in either mono or + * interleaved stereo pcm buffers, at the caller's request. + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusDecoder *opus_decoder_create( + opus_int32 Fs, + int channels, + int *error +); + +/** Initializes a previously allocated decoder state. + * The state must be at least the size returned by opus_decoder_get_size(). + * This is intended for applications which use their own allocator instead of malloc. @see opus_decoder_create,opus_decoder_get_size + * To reset a previously initialized state, use the #OPUS_RESET_STATE CTL. + * @param [in] st <tt>OpusDecoder*</tt>: Decoder state. + * @param [in] Fs <tt>opus_int32</tt>: Sampling rate to decode to (Hz). + * This must be one of 8000, 12000, 16000, + * 24000, or 48000. + * @param [in] channels <tt>int</tt>: Number of channels (1 or 2) to decode + * @retval #OPUS_OK Success or @ref opus_errorcodes + */ +OPUS_EXPORT int opus_decoder_init( + OpusDecoder *st, + opus_int32 Fs, + int channels +) OPUS_ARG_NONNULL(1); + +/** Decode an Opus packet. + * @param [in] st <tt>OpusDecoder*</tt>: Decoder state + * @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss + * @param [in] len <tt>opus_int32</tt>: Number of bytes in payload* + * @param [out] pcm <tt>opus_int16*</tt>: Output signal (interleaved if 2 channels). length + * is frame_size*channels*sizeof(opus_int16) + * @param [in] frame_size Number of samples per channel of available space in \a pcm. + * If this is less than the maximum packet duration (120ms; 5760 for 48kHz), this function will + * not be capable of decoding some packets. In the case of PLC (data==NULL) or FEC (decode_fec=1), + * then frame_size needs to be exactly the duration of audio that is missing, otherwise the + * decoder will not be in the optimal state to decode the next incoming packet. For the PLC and + * FEC cases, frame_size <b>must</b> be a multiple of 2.5 ms. + * @param [in] decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band forward error correction data be + * decoded. If no such data is available, the frame is decoded as if it were lost. + * @returns Number of decoded samples or @ref opus_errorcodes + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decode( + OpusDecoder *st, + const unsigned char *data, + opus_int32 len, + opus_int16 *pcm, + int frame_size, + int decode_fec +) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4); + +/** Decode an Opus packet with floating point output. + * @param [in] st <tt>OpusDecoder*</tt>: Decoder state + * @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss + * @param [in] len <tt>opus_int32</tt>: Number of bytes in payload + * @param [out] pcm <tt>float*</tt>: Output signal (interleaved if 2 channels). length + * is frame_size*channels*sizeof(float) + * @param [in] frame_size Number of samples per channel of available space in \a pcm. + * If this is less than the maximum packet duration (120ms; 5760 for 48kHz), this function will + * not be capable of decoding some packets. In the case of PLC (data==NULL) or FEC (decode_fec=1), + * then frame_size needs to be exactly the duration of audio that is missing, otherwise the + * decoder will not be in the optimal state to decode the next incoming packet. For the PLC and + * FEC cases, frame_size <b>must</b> be a multiple of 2.5 ms. + * @param [in] decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band forward error correction data be + * decoded. If no such data is available the frame is decoded as if it were lost. + * @returns Number of decoded samples or @ref opus_errorcodes + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decode_float( + OpusDecoder *st, + const unsigned char *data, + opus_int32 len, + float *pcm, + int frame_size, + int decode_fec +) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4); + +/** Perform a CTL function on an Opus decoder. + * + * Generally the request and subsequent arguments are generated + * by a convenience macro. + * @param st <tt>OpusDecoder*</tt>: Decoder state. + * @param request This and all remaining parameters should be replaced by one + * of the convenience macros in @ref opus_genericctls or + * @ref opus_decoderctls. + * @see opus_genericctls + * @see opus_decoderctls + */ +OPUS_EXPORT int opus_decoder_ctl(OpusDecoder *st, int request, ...) OPUS_ARG_NONNULL(1); + +/** Frees an <code>OpusDecoder</code> allocated by opus_decoder_create(). + * @param[in] st <tt>OpusDecoder*</tt>: State to be freed. + */ +OPUS_EXPORT void opus_decoder_destroy(OpusDecoder *st); + +/** Parse an opus packet into one or more frames. + * Opus_decode will perform this operation internally so most applications do + * not need to use this function. + * This function does not copy the frames, the returned pointers are pointers into + * the input packet. + * @param [in] data <tt>char*</tt>: Opus packet to be parsed + * @param [in] len <tt>opus_int32</tt>: size of data + * @param [out] out_toc <tt>char*</tt>: TOC pointer + * @param [out] frames <tt>char*[48]</tt> encapsulated frames + * @param [out] size <tt>opus_int16[48]</tt> sizes of the encapsulated frames + * @param [out] payload_offset <tt>int*</tt>: returns the position of the payload within the packet (in bytes) + * @returns number of frames + */ +OPUS_EXPORT int opus_packet_parse( + const unsigned char *data, + opus_int32 len, + unsigned char *out_toc, + const unsigned char *frames[48], + opus_int16 size[48], + int *payload_offset +) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4); + +/** Gets the bandwidth of an Opus packet. + * @param [in] data <tt>char*</tt>: Opus packet + * @retval OPUS_BANDWIDTH_NARROWBAND Narrowband (4kHz bandpass) + * @retval OPUS_BANDWIDTH_MEDIUMBAND Mediumband (6kHz bandpass) + * @retval OPUS_BANDWIDTH_WIDEBAND Wideband (8kHz bandpass) + * @retval OPUS_BANDWIDTH_SUPERWIDEBAND Superwideband (12kHz bandpass) + * @retval OPUS_BANDWIDTH_FULLBAND Fullband (20kHz bandpass) + * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_bandwidth(const unsigned char *data) OPUS_ARG_NONNULL(1); + +/** Gets the number of samples per frame from an Opus packet. + * @param [in] data <tt>char*</tt>: Opus packet. + * This must contain at least one byte of + * data. + * @param [in] Fs <tt>opus_int32</tt>: Sampling rate in Hz. + * This must be a multiple of 400, or + * inaccurate results will be returned. + * @returns Number of samples per frame. + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_samples_per_frame(const unsigned char *data, opus_int32 Fs) OPUS_ARG_NONNULL(1); + +/** Gets the number of channels from an Opus packet. + * @param [in] data <tt>char*</tt>: Opus packet + * @returns Number of channels + * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_channels(const unsigned char *data) OPUS_ARG_NONNULL(1); + +/** Gets the number of frames in an Opus packet. + * @param [in] packet <tt>char*</tt>: Opus packet + * @param [in] len <tt>opus_int32</tt>: Length of packet + * @returns Number of frames + * @retval OPUS_BAD_ARG Insufficient data was passed to the function + * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_frames(const unsigned char packet[], opus_int32 len) OPUS_ARG_NONNULL(1); + +/** Gets the number of samples of an Opus packet. + * @param [in] packet <tt>char*</tt>: Opus packet + * @param [in] len <tt>opus_int32</tt>: Length of packet + * @param [in] Fs <tt>opus_int32</tt>: Sampling rate in Hz. + * This must be a multiple of 400, or + * inaccurate results will be returned. + * @returns Number of samples + * @retval OPUS_BAD_ARG Insufficient data was passed to the function + * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_samples(const unsigned char packet[], opus_int32 len, opus_int32 Fs) OPUS_ARG_NONNULL(1); + +/** Gets the number of samples of an Opus packet. + * @param [in] dec <tt>OpusDecoder*</tt>: Decoder state + * @param [in] packet <tt>char*</tt>: Opus packet + * @param [in] len <tt>opus_int32</tt>: Length of packet + * @returns Number of samples + * @retval OPUS_BAD_ARG Insufficient data was passed to the function + * @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_decoder_get_nb_samples(const OpusDecoder *dec, const unsigned char packet[], opus_int32 len) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2); + +/** Applies soft-clipping to bring a float signal within the [-1,1] range. If + * the signal is already in that range, nothing is done. If there are values + * outside of [-1,1], then the signal is clipped as smoothly as possible to + * both fit in the range and avoid creating excessive distortion in the + * process. + * @param [in,out] pcm <tt>float*</tt>: Input PCM and modified PCM + * @param [in] frame_size <tt>int</tt> Number of samples per channel to process + * @param [in] channels <tt>int</tt>: Number of channels + * @param [in,out] softclip_mem <tt>float*</tt>: State memory for the soft clipping process (one float per channel, initialized to zero) + */ +OPUS_EXPORT void opus_pcm_soft_clip(float *pcm, int frame_size, int channels, float *softclip_mem); + + +/**@}*/ + +/** @defgroup opus_repacketizer Repacketizer + * @ingroup opus + * @{ + * + * The repacketizer can be used to merge multiple Opus packets into a single + * packet or alternatively to split Opus packets that have previously been + * merged. Splitting valid Opus packets is always guaranteed to succeed, + * whereas merging valid packets only succeeds if all frames have the same + * mode, bandwidth, and frame size, and when the total duration of the merged + * packet is no more than 120 ms. The 120 ms limit comes from the + * specification and limits decoder memory requirements at a point where + * framing overhead becomes negligible. + * + * The repacketizer currently only operates on elementary Opus + * streams. It will not manipualte multistream packets successfully, except in + * the degenerate case where they consist of data from a single stream. + * + * The repacketizing process starts with creating a repacketizer state, either + * by calling opus_repacketizer_create() or by allocating the memory yourself, + * e.g., + * @code + * OpusRepacketizer *rp; + * rp = (OpusRepacketizer*)malloc(opus_repacketizer_get_size()); + * if (rp != NULL) + * opus_repacketizer_init(rp); + * @endcode + * + * Then the application should submit packets with opus_repacketizer_cat(), + * extract new packets with opus_repacketizer_out() or + * opus_repacketizer_out_range(), and then reset the state for the next set of + * input packets via opus_repacketizer_init(). + * + * For example, to split a sequence of packets into individual frames: + * @code + * unsigned char *data; + * int len; + * while (get_next_packet(&data, &len)) + * { + * unsigned char out[1276]; + * opus_int32 out_len; + * int nb_frames; + * int err; + * int i; + * err = opus_repacketizer_cat(rp, data, len); + * if (err != OPUS_OK) + * { + * release_packet(data); + * return err; + * } + * nb_frames = opus_repacketizer_get_nb_frames(rp); + * for (i = 0; i < nb_frames; i++) + * { + * out_len = opus_repacketizer_out_range(rp, i, i+1, out, sizeof(out)); + * if (out_len < 0) + * { + * release_packet(data); + * return (int)out_len; + * } + * output_next_packet(out, out_len); + * } + * opus_repacketizer_init(rp); + * release_packet(data); + * } + * @endcode + * + * Alternatively, to combine a sequence of frames into packets that each + * contain up to <code>TARGET_DURATION_MS</code> milliseconds of data: + * @code + * // The maximum number of packets with duration TARGET_DURATION_MS occurs + * // when the frame size is 2.5 ms, for a total of (TARGET_DURATION_MS*2/5) + * // packets. + * unsigned char *data[(TARGET_DURATION_MS*2/5)+1]; + * opus_int32 len[(TARGET_DURATION_MS*2/5)+1]; + * int nb_packets; + * unsigned char out[1277*(TARGET_DURATION_MS*2/2)]; + * opus_int32 out_len; + * int prev_toc; + * nb_packets = 0; + * while (get_next_packet(data+nb_packets, len+nb_packets)) + * { + * int nb_frames; + * int err; + * nb_frames = opus_packet_get_nb_frames(data[nb_packets], len[nb_packets]); + * if (nb_frames < 1) + * { + * release_packets(data, nb_packets+1); + * return nb_frames; + * } + * nb_frames += opus_repacketizer_get_nb_frames(rp); + * // If adding the next packet would exceed our target, or it has an + * // incompatible TOC sequence, output the packets we already have before + * // submitting it. + * // N.B., The nb_packets > 0 check ensures we've submitted at least one + * // packet since the last call to opus_repacketizer_init(). Otherwise a + * // single packet longer than TARGET_DURATION_MS would cause us to try to + * // output an (invalid) empty packet. It also ensures that prev_toc has + * // been set to a valid value. Additionally, len[nb_packets] > 0 is + * // guaranteed by the call to opus_packet_get_nb_frames() above, so the + * // reference to data[nb_packets][0] should be valid. + * if (nb_packets > 0 && ( + * ((prev_toc & 0xFC) != (data[nb_packets][0] & 0xFC)) || + * opus_packet_get_samples_per_frame(data[nb_packets], 48000)*nb_frames > + * TARGET_DURATION_MS*48)) + * { + * out_len = opus_repacketizer_out(rp, out, sizeof(out)); + * if (out_len < 0) + * { + * release_packets(data, nb_packets+1); + * return (int)out_len; + * } + * output_next_packet(out, out_len); + * opus_repacketizer_init(rp); + * release_packets(data, nb_packets); + * data[0] = data[nb_packets]; + * len[0] = len[nb_packets]; + * nb_packets = 0; + * } + * err = opus_repacketizer_cat(rp, data[nb_packets], len[nb_packets]); + * if (err != OPUS_OK) + * { + * release_packets(data, nb_packets+1); + * return err; + * } + * prev_toc = data[nb_packets][0]; + * nb_packets++; + * } + * // Output the final, partial packet. + * if (nb_packets > 0) + * { + * out_len = opus_repacketizer_out(rp, out, sizeof(out)); + * release_packets(data, nb_packets); + * if (out_len < 0) + * return (int)out_len; + * output_next_packet(out, out_len); + * } + * @endcode + * + * An alternate way of merging packets is to simply call opus_repacketizer_cat() + * unconditionally until it fails. At that point, the merged packet can be + * obtained with opus_repacketizer_out() and the input packet for which + * opus_repacketizer_cat() needs to be re-added to a newly reinitialized + * repacketizer state. + */ + +typedef struct OpusRepacketizer OpusRepacketizer; + +/** Gets the size of an <code>OpusRepacketizer</code> structure. + * @returns The size in bytes. + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_repacketizer_get_size(void); + +/** (Re)initializes a previously allocated repacketizer state. + * The state must be at least the size returned by opus_repacketizer_get_size(). + * This can be used for applications which use their own allocator instead of + * malloc(). + * It must also be called to reset the queue of packets waiting to be + * repacketized, which is necessary if the maximum packet duration of 120 ms + * is reached or if you wish to submit packets with a different Opus + * configuration (coding mode, audio bandwidth, frame size, or channel count). + * Failure to do so will prevent a new packet from being added with + * opus_repacketizer_cat(). + * @see opus_repacketizer_create + * @see opus_repacketizer_get_size + * @see opus_repacketizer_cat + * @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state to + * (re)initialize. + * @returns A pointer to the same repacketizer state that was passed in. + */ +OPUS_EXPORT OpusRepacketizer *opus_repacketizer_init(OpusRepacketizer *rp) OPUS_ARG_NONNULL(1); + +/** Allocates memory and initializes the new repacketizer with + * opus_repacketizer_init(). + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusRepacketizer *opus_repacketizer_create(void); + +/** Frees an <code>OpusRepacketizer</code> allocated by + * opus_repacketizer_create(). + * @param[in] rp <tt>OpusRepacketizer*</tt>: State to be freed. + */ +OPUS_EXPORT void opus_repacketizer_destroy(OpusRepacketizer *rp); + +/** Add a packet to the current repacketizer state. + * This packet must match the configuration of any packets already submitted + * for repacketization since the last call to opus_repacketizer_init(). + * This means that it must have the same coding mode, audio bandwidth, frame + * size, and channel count. + * This can be checked in advance by examining the top 6 bits of the first + * byte of the packet, and ensuring they match the top 6 bits of the first + * byte of any previously submitted packet. + * The total duration of audio in the repacketizer state also must not exceed + * 120 ms, the maximum duration of a single packet, after adding this packet. + * + * The contents of the current repacketizer state can be extracted into new + * packets using opus_repacketizer_out() or opus_repacketizer_out_range(). + * + * In order to add a packet with a different configuration or to add more + * audio beyond 120 ms, you must clear the repacketizer state by calling + * opus_repacketizer_init(). + * If a packet is too large to add to the current repacketizer state, no part + * of it is added, even if it contains multiple frames, some of which might + * fit. + * If you wish to be able to add parts of such packets, you should first use + * another repacketizer to split the packet into pieces and add them + * individually. + * @see opus_repacketizer_out_range + * @see opus_repacketizer_out + * @see opus_repacketizer_init + * @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state to which to + * add the packet. + * @param[in] data <tt>const unsigned char*</tt>: The packet data. + * The application must ensure + * this pointer remains valid + * until the next call to + * opus_repacketizer_init() or + * opus_repacketizer_destroy(). + * @param len <tt>opus_int32</tt>: The number of bytes in the packet data. + * @returns An error code indicating whether or not the operation succeeded. + * @retval #OPUS_OK The packet's contents have been added to the repacketizer + * state. + * @retval #OPUS_INVALID_PACKET The packet did not have a valid TOC sequence, + * the packet's TOC sequence was not compatible + * with previously submitted packets (because + * the coding mode, audio bandwidth, frame size, + * or channel count did not match), or adding + * this packet would increase the total amount of + * audio stored in the repacketizer state to more + * than 120 ms. + */ +OPUS_EXPORT int opus_repacketizer_cat(OpusRepacketizer *rp, const unsigned char *data, opus_int32 len) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2); + + +/** Construct a new packet from data previously submitted to the repacketizer + * state via opus_repacketizer_cat(). + * @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state from which to + * construct the new packet. + * @param begin <tt>int</tt>: The index of the first frame in the current + * repacketizer state to include in the output. + * @param end <tt>int</tt>: One past the index of the last frame in the + * current repacketizer state to include in the + * output. + * @param[out] data <tt>const unsigned char*</tt>: The buffer in which to + * store the output packet. + * @param maxlen <tt>opus_int32</tt>: The maximum number of bytes to store in + * the output buffer. In order to guarantee + * success, this should be at least + * <code>1276</code> for a single frame, + * or for multiple frames, + * <code>1277*(end-begin)</code>. + * However, <code>1*(end-begin)</code> plus + * the size of all packet data submitted to + * the repacketizer since the last call to + * opus_repacketizer_init() or + * opus_repacketizer_create() is also + * sufficient, and possibly much smaller. + * @returns The total size of the output packet on success, or an error code + * on failure. + * @retval #OPUS_BAD_ARG <code>[begin,end)</code> was an invalid range of + * frames (begin < 0, begin >= end, or end > + * opus_repacketizer_get_nb_frames()). + * @retval #OPUS_BUFFER_TOO_SMALL \a maxlen was insufficient to contain the + * complete output packet. + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_repacketizer_out_range(OpusRepacketizer *rp, int begin, int end, unsigned char *data, opus_int32 maxlen) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4); + +/** Return the total number of frames contained in packet data submitted to + * the repacketizer state so far via opus_repacketizer_cat() since the last + * call to opus_repacketizer_init() or opus_repacketizer_create(). + * This defines the valid range of packets that can be extracted with + * opus_repacketizer_out_range() or opus_repacketizer_out(). + * @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state containing the + * frames. + * @returns The total number of frames contained in the packet data submitted + * to the repacketizer state. + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_repacketizer_get_nb_frames(OpusRepacketizer *rp) OPUS_ARG_NONNULL(1); + +/** Construct a new packet from data previously submitted to the repacketizer + * state via opus_repacketizer_cat(). + * This is a convenience routine that returns all the data submitted so far + * in a single packet. + * It is equivalent to calling + * @code + * opus_repacketizer_out_range(rp, 0, opus_repacketizer_get_nb_frames(rp), + * data, maxlen) + * @endcode + * @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state from which to + * construct the new packet. + * @param[out] data <tt>const unsigned char*</tt>: The buffer in which to + * store the output packet. + * @param maxlen <tt>opus_int32</tt>: The maximum number of bytes to store in + * the output buffer. In order to guarantee + * success, this should be at least + * <code>1277*opus_repacketizer_get_nb_frames(rp)</code>. + * However, + * <code>1*opus_repacketizer_get_nb_frames(rp)</code> + * plus the size of all packet data + * submitted to the repacketizer since the + * last call to opus_repacketizer_init() or + * opus_repacketizer_create() is also + * sufficient, and possibly much smaller. + * @returns The total size of the output packet on success, or an error code + * on failure. + * @retval #OPUS_BUFFER_TOO_SMALL \a maxlen was insufficient to contain the + * complete output packet. + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_repacketizer_out(OpusRepacketizer *rp, unsigned char *data, opus_int32 maxlen) OPUS_ARG_NONNULL(1); + +/** Pads a given Opus packet to a larger size (possibly changing the TOC sequence). + * @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the + * packet to pad. + * @param len <tt>opus_int32</tt>: The size of the packet. + * This must be at least 1. + * @param new_len <tt>opus_int32</tt>: The desired size of the packet after padding. + * This must be at least as large as len. + * @returns an error code + * @retval #OPUS_OK \a on success. + * @retval #OPUS_BAD_ARG \a len was less than 1 or new_len was less than len. + * @retval #OPUS_INVALID_PACKET \a data did not contain a valid Opus packet. + */ +OPUS_EXPORT int opus_packet_pad(unsigned char *data, opus_int32 len, opus_int32 new_len); + +/** Remove all padding from a given Opus packet and rewrite the TOC sequence to + * minimize space usage. + * @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the + * packet to strip. + * @param len <tt>opus_int32</tt>: The size of the packet. + * This must be at least 1. + * @returns The new size of the output packet on success, or an error code + * on failure. + * @retval #OPUS_BAD_ARG \a len was less than 1. + * @retval #OPUS_INVALID_PACKET \a data did not contain a valid Opus packet. + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_packet_unpad(unsigned char *data, opus_int32 len); + +/** Pads a given Opus multi-stream packet to a larger size (possibly changing the TOC sequence). + * @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the + * packet to pad. + * @param len <tt>opus_int32</tt>: The size of the packet. + * This must be at least 1. + * @param new_len <tt>opus_int32</tt>: The desired size of the packet after padding. + * This must be at least 1. + * @param nb_streams <tt>opus_int32</tt>: The number of streams (not channels) in the packet. + * This must be at least as large as len. + * @returns an error code + * @retval #OPUS_OK \a on success. + * @retval #OPUS_BAD_ARG \a len was less than 1. + * @retval #OPUS_INVALID_PACKET \a data did not contain a valid Opus packet. + */ +OPUS_EXPORT int opus_multistream_packet_pad(unsigned char *data, opus_int32 len, opus_int32 new_len, int nb_streams); + +/** Remove all padding from a given Opus multi-stream packet and rewrite the TOC sequence to + * minimize space usage. + * @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the + * packet to strip. + * @param len <tt>opus_int32</tt>: The size of the packet. + * This must be at least 1. + * @param nb_streams <tt>opus_int32</tt>: The number of streams (not channels) in the packet. + * This must be at least 1. + * @returns The new size of the output packet on success, or an error code + * on failure. + * @retval #OPUS_BAD_ARG \a len was less than 1 or new_len was less than len. + * @retval #OPUS_INVALID_PACKET \a data did not contain a valid Opus packet. + */ +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_packet_unpad(unsigned char *data, opus_int32 len, int nb_streams); + +/**@}*/ + +#ifdef __cplusplus +} +#endif + +#endif /* OPUS_H */ diff --git a/rcaudio/opus_defines.h b/rcaudio/opus_defines.h new file mode 100644 index 0000000..6030118 --- a/dev/null +++ b/rcaudio/opus_defines.h @@ -0,0 +1,766 @@ +/* Copyright (c) 2010-2011 Xiph.Org Foundation, Skype Limited + Written by Jean-Marc Valin and Koen Vos */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** + * @file opus_defines.h + * @brief Opus reference implementation constants + */ + +#ifndef OPUS_DEFINES_H +#define OPUS_DEFINES_H + +#include "opus_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** @defgroup opus_errorcodes Error codes + * @ingroup opus + * @{ + */ +/** No error @hideinitializer*/ +#define OPUS_OK 0 +/** One or more invalid/out of range arguments @hideinitializer*/ +#define OPUS_BAD_ARG -1 +/** Not enough bytes allocated in the buffer @hideinitializer*/ +#define OPUS_BUFFER_TOO_SMALL -2 +/** An internal error was detected @hideinitializer*/ +#define OPUS_INTERNAL_ERROR -3 +/** The compressed data passed is corrupted @hideinitializer*/ +#define OPUS_INVALID_PACKET -4 +/** Invalid/unsupported request number @hideinitializer*/ +#define OPUS_UNIMPLEMENTED -5 +/** An encoder or decoder structure is invalid or already freed @hideinitializer*/ +#define OPUS_INVALID_STATE -6 +/** Memory allocation has failed @hideinitializer*/ +#define OPUS_ALLOC_FAIL -7 +/**@}*/ + +/** @cond OPUS_INTERNAL_DOC */ +/**Export control for opus functions */ + +#ifndef OPUS_EXPORT +# if defined(WIN32) +# if defined(OPUS_BUILD) && defined(DLL_EXPORT) +# define OPUS_EXPORT __declspec(dllexport) +# else +# define OPUS_EXPORT +# endif +# elif defined(__GNUC__) && defined(OPUS_BUILD) +# define OPUS_EXPORT __attribute__ ((visibility ("default"))) +# else +# define OPUS_EXPORT +# endif +#endif + +# if !defined(OPUS_GNUC_PREREQ) +# if defined(__GNUC__)&&defined(__GNUC_MINOR__) +# define OPUS_GNUC_PREREQ(_maj,_min) \ + ((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min)) +# else +# define OPUS_GNUC_PREREQ(_maj,_min) 0 +# endif +# endif + +#if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) ) +# if OPUS_GNUC_PREREQ(3,0) +# define OPUS_RESTRICT __restrict__ +# elif (defined(_MSC_VER) && _MSC_VER >= 1400) +# define OPUS_RESTRICT __restrict +# else +# define OPUS_RESTRICT +# endif +#else +# define OPUS_RESTRICT restrict +#endif + +#if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) ) +# if OPUS_GNUC_PREREQ(2,7) +# define OPUS_INLINE __inline__ +# elif (defined(_MSC_VER)) +# define OPUS_INLINE __inline +# else +# define OPUS_INLINE +# endif +#else +# define OPUS_INLINE inline +#endif + +/**Warning attributes for opus functions + * NONNULL is not used in OPUS_BUILD to avoid the compiler optimizing out + * some paranoid null checks. */ +#if defined(__GNUC__) && OPUS_GNUC_PREREQ(3, 4) +# define OPUS_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__)) +#else +# define OPUS_WARN_UNUSED_RESULT +#endif +#if !defined(OPUS_BUILD) && defined(__GNUC__) && OPUS_GNUC_PREREQ(3, 4) +# define OPUS_ARG_NONNULL(_x) __attribute__ ((__nonnull__(_x))) +#else +# define OPUS_ARG_NONNULL(_x) +#endif + +/** These are the actual Encoder CTL ID numbers. + * They should not be used directly by applications. + * In general, SETs should be even and GETs should be odd.*/ +#define OPUS_SET_APPLICATION_REQUEST 4000 +#define OPUS_GET_APPLICATION_REQUEST 4001 +#define OPUS_SET_BITRATE_REQUEST 4002 +#define OPUS_GET_BITRATE_REQUEST 4003 +#define OPUS_SET_MAX_BANDWIDTH_REQUEST 4004 +#define OPUS_GET_MAX_BANDWIDTH_REQUEST 4005 +#define OPUS_SET_VBR_REQUEST 4006 +#define OPUS_GET_VBR_REQUEST 4007 +#define OPUS_SET_BANDWIDTH_REQUEST 4008 +#define OPUS_GET_BANDWIDTH_REQUEST 4009 +#define OPUS_SET_COMPLEXITY_REQUEST 4010 +#define OPUS_GET_COMPLEXITY_REQUEST 4011 +#define OPUS_SET_INBAND_FEC_REQUEST 4012 +#define OPUS_GET_INBAND_FEC_REQUEST 4013 +#define OPUS_SET_PACKET_LOSS_PERC_REQUEST 4014 +#define OPUS_GET_PACKET_LOSS_PERC_REQUEST 4015 +#define OPUS_SET_DTX_REQUEST 4016 +#define OPUS_GET_DTX_REQUEST 4017 +#define OPUS_SET_VBR_CONSTRAINT_REQUEST 4020 +#define OPUS_GET_VBR_CONSTRAINT_REQUEST 4021 +#define OPUS_SET_FORCE_CHANNELS_REQUEST 4022 +#define OPUS_GET_FORCE_CHANNELS_REQUEST 4023 +#define OPUS_SET_SIGNAL_REQUEST 4024 +#define OPUS_GET_SIGNAL_REQUEST 4025 +#define OPUS_GET_LOOKAHEAD_REQUEST 4027 +/* #define OPUS_RESET_STATE 4028 */ +#define OPUS_GET_SAMPLE_RATE_REQUEST 4029 +#define OPUS_GET_FINAL_RANGE_REQUEST 4031 +#define OPUS_GET_PITCH_REQUEST 4033 +#define OPUS_SET_GAIN_REQUEST 4034 +#define OPUS_GET_GAIN_REQUEST 4045 /* Should have been 4035 */ +#define OPUS_SET_LSB_DEPTH_REQUEST 4036 +#define OPUS_GET_LSB_DEPTH_REQUEST 4037 +#define OPUS_GET_LAST_PACKET_DURATION_REQUEST 4039 +#define OPUS_SET_EXPERT_FRAME_DURATION_REQUEST 4040 +#define OPUS_GET_EXPERT_FRAME_DURATION_REQUEST 4041 +#define OPUS_SET_PREDICTION_DISABLED_REQUEST 4042 +#define OPUS_GET_PREDICTION_DISABLED_REQUEST 4043 + +/* Don't use 4045, it's already taken by OPUS_GET_GAIN_REQUEST */ + +/* Macros to trigger compilation errors when the wrong types are provided to a CTL */ +#ifdef __GNUC__ + #define __opus_check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x)) + #define __opus_check_int_ptr(ptr) ((ptr) + ((ptr) - (opus_int32*)(ptr))) + #define __opus_check_uint_ptr(ptr) ((ptr) + ((ptr) - (opus_uint32*)(ptr))) + #define __opus_check_val16_ptr(ptr) ((ptr) + ((ptr) - (opus_val16*)(ptr))) +#else + #define __opus_check_int(x) ((opus_int32)(x)) + #define __opus_check_int_ptr(ptr) ((opus_int32*)(ptr)) + #define __opus_check_uint_ptr(ptr) ((opus_uint32*)(ptr)) + #define __opus_check_val16_ptr(ptr) ((opus_val16*)(ptr)) +#endif +/** @endcond */ + +/** @defgroup opus_ctlvalues Pre-defined values for CTL interface + * @ingroup opus + * @see opus_genericctls, opus_encoderctls + * @{ + */ +/* Values for the various encoder CTLs */ +#define OPUS_AUTO -1000 /**<Auto/default setting @hideinitializer*/ +#define OPUS_BITRATE_MAX -1 /**<Maximum bitrate @hideinitializer*/ + +/** Best for most VoIP/videoconference applications where listening quality and intelligibility matter most + * @hideinitializer */ +#define OPUS_APPLICATION_VOIP 2048 +/** Best for broadcast/high-fidelity application where the decoded audio should be as close as possible to the input + * @hideinitializer */ +#define OPUS_APPLICATION_AUDIO 2049 +/** Only use when lowest-achievable latency is what matters most. Voice-optimized modes cannot be used. + * @hideinitializer */ +#define OPUS_APPLICATION_RESTRICTED_LOWDELAY 2051 + +#define OPUS_SIGNAL_VOICE 3001 /**< Signal being encoded is voice */ +#define OPUS_SIGNAL_MUSIC 3002 /**< Signal being encoded is music */ +#define OPUS_BANDWIDTH_NARROWBAND 1101 /**< 4 kHz bandpass @hideinitializer*/ +#define OPUS_BANDWIDTH_MEDIUMBAND 1102 /**< 6 kHz bandpass @hideinitializer*/ +#define OPUS_BANDWIDTH_WIDEBAND 1103 /**< 8 kHz bandpass @hideinitializer*/ +#define OPUS_BANDWIDTH_SUPERWIDEBAND 1104 /**<12 kHz bandpass @hideinitializer*/ +#define OPUS_BANDWIDTH_FULLBAND 1105 /**<20 kHz bandpass @hideinitializer*/ + +#define OPUS_FRAMESIZE_ARG 5000 /**< Select frame size from the argument (default) */ +#define OPUS_FRAMESIZE_2_5_MS 5001 /**< Use 2.5 ms frames */ +#define OPUS_FRAMESIZE_5_MS 5002 /**< Use 5 ms frames */ +#define OPUS_FRAMESIZE_10_MS 5003 /**< Use 10 ms frames */ +#define OPUS_FRAMESIZE_20_MS 5004 /**< Use 20 ms frames */ +#define OPUS_FRAMESIZE_40_MS 5005 /**< Use 40 ms frames */ +#define OPUS_FRAMESIZE_60_MS 5006 /**< Use 60 ms frames */ + +/**@}*/ + + +/** @defgroup opus_encoderctls Encoder related CTLs + * @ingroup opus + * + * These are convenience macros for use with the \c opus_encode_ctl + * interface. They are used to generate the appropriate series of + * arguments for that call, passing the correct type, size and so + * on as expected for each particular request. + * + * Some usage examples: + * + * @code + * int ret; + * ret = opus_encoder_ctl(enc_ctx, OPUS_SET_BANDWIDTH(OPUS_AUTO)); + * if (ret != OPUS_OK) return ret; + * + * opus_int32 rate; + * opus_encoder_ctl(enc_ctx, OPUS_GET_BANDWIDTH(&rate)); + * + * opus_encoder_ctl(enc_ctx, OPUS_RESET_STATE); + * @endcode + * + * @see opus_genericctls, opus_encoder + * @{ + */ + +/** Configures the encoder's computational complexity. + * The supported range is 0-10 inclusive with 10 representing the highest complexity. + * @see OPUS_GET_COMPLEXITY + * @param[in] x <tt>opus_int32</tt>: Allowed values: 0-10, inclusive. + * + * @hideinitializer */ +#define OPUS_SET_COMPLEXITY(x) OPUS_SET_COMPLEXITY_REQUEST, __opus_check_int(x) +/** Gets the encoder's complexity configuration. + * @see OPUS_SET_COMPLEXITY + * @param[out] x <tt>opus_int32 *</tt>: Returns a value in the range 0-10, + * inclusive. + * @hideinitializer */ +#define OPUS_GET_COMPLEXITY(x) OPUS_GET_COMPLEXITY_REQUEST, __opus_check_int_ptr(x) + +/** Configures the bitrate in the encoder. + * Rates from 500 to 512000 bits per second are meaningful, as well as the + * special values #OPUS_AUTO and #OPUS_BITRATE_MAX. + * The value #OPUS_BITRATE_MAX can be used to cause the codec to use as much + * rate as it can, which is useful for controlling the rate by adjusting the + * output buffer size. + * @see OPUS_GET_BITRATE + * @param[in] x <tt>opus_int32</tt>: Bitrate in bits per second. The default + * is determined based on the number of + * channels and the input sampling rate. + * @hideinitializer */ +#define OPUS_SET_BITRATE(x) OPUS_SET_BITRATE_REQUEST, __opus_check_int(x) +/** Gets the encoder's bitrate configuration. + * @see OPUS_SET_BITRATE + * @param[out] x <tt>opus_int32 *</tt>: Returns the bitrate in bits per second. + * The default is determined based on the + * number of channels and the input + * sampling rate. + * @hideinitializer */ +#define OPUS_GET_BITRATE(x) OPUS_GET_BITRATE_REQUEST, __opus_check_int_ptr(x) + +/** Enables or disables variable bitrate (VBR) in the encoder. + * The configured bitrate may not be met exactly because frames must + * be an integer number of bytes in length. + * @see OPUS_GET_VBR + * @see OPUS_SET_VBR_CONSTRAINT + * @param[in] x <tt>opus_int32</tt>: Allowed values: + * <dl> + * <dt>0</dt><dd>Hard CBR. For LPC/hybrid modes at very low bit-rate, this can + * cause noticeable quality degradation.</dd> + * <dt>1</dt><dd>VBR (default). The exact type of VBR is controlled by + * #OPUS_SET_VBR_CONSTRAINT.</dd> + * </dl> + * @hideinitializer */ +#define OPUS_SET_VBR(x) OPUS_SET_VBR_REQUEST, __opus_check_int(x) +/** Determine if variable bitrate (VBR) is enabled in the encoder. + * @see OPUS_SET_VBR + * @see OPUS_GET_VBR_CONSTRAINT + * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values: + * <dl> + * <dt>0</dt><dd>Hard CBR.</dd> + * <dt>1</dt><dd>VBR (default). The exact type of VBR may be retrieved via + * #OPUS_GET_VBR_CONSTRAINT.</dd> + * </dl> + * @hideinitializer */ +#define OPUS_GET_VBR(x) OPUS_GET_VBR_REQUEST, __opus_check_int_ptr(x) + +/** Enables or disables constrained VBR in the encoder. + * This setting is ignored when the encoder is in CBR mode. + * @warning Only the MDCT mode of Opus currently heeds the constraint. + * Speech mode ignores it completely, hybrid mode may fail to obey it + * if the LPC layer uses more bitrate than the constraint would have + * permitted. + * @see OPUS_GET_VBR_CONSTRAINT + * @see OPUS_SET_VBR + * @param[in] x <tt>opus_int32</tt>: Allowed values: + * <dl> + * <dt>0</dt><dd>Unconstrained VBR.</dd> + * <dt>1</dt><dd>Constrained VBR (default). This creates a maximum of one + * frame of buffering delay assuming a transport with a + * serialization speed of the nominal bitrate.</dd> + * </dl> + * @hideinitializer */ +#define OPUS_SET_VBR_CONSTRAINT(x) OPUS_SET_VBR_CONSTRAINT_REQUEST, __opus_check_int(x) +/** Determine if constrained VBR is enabled in the encoder. + * @see OPUS_SET_VBR_CONSTRAINT + * @see OPUS_GET_VBR + * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values: + * <dl> + * <dt>0</dt><dd>Unconstrained VBR.</dd> + * <dt>1</dt><dd>Constrained VBR (default).</dd> + * </dl> + * @hideinitializer */ +#define OPUS_GET_VBR_CONSTRAINT(x) OPUS_GET_VBR_CONSTRAINT_REQUEST, __opus_check_int_ptr(x) + +/** Configures mono/stereo forcing in the encoder. + * This can force the encoder to produce packets encoded as either mono or + * stereo, regardless of the format of the input audio. This is useful when + * the caller knows that the input signal is currently a mono source embedded + * in a stereo stream. + * @see OPUS_GET_FORCE_CHANNELS + * @param[in] x <tt>opus_int32</tt>: Allowed values: + * <dl> + * <dt>#OPUS_AUTO</dt><dd>Not forced (default)</dd> + * <dt>1</dt> <dd>Forced mono</dd> + * <dt>2</dt> <dd>Forced stereo</dd> + * </dl> + * @hideinitializer */ +#define OPUS_SET_FORCE_CHANNELS(x) OPUS_SET_FORCE_CHANNELS_REQUEST, __opus_check_int(x) +/** Gets the encoder's forced channel configuration. + * @see OPUS_SET_FORCE_CHANNELS + * @param[out] x <tt>opus_int32 *</tt>: + * <dl> + * <dt>#OPUS_AUTO</dt><dd>Not forced (default)</dd> + * <dt>1</dt> <dd>Forced mono</dd> + * <dt>2</dt> <dd>Forced stereo</dd> + * </dl> + * @hideinitializer */ +#define OPUS_GET_FORCE_CHANNELS(x) OPUS_GET_FORCE_CHANNELS_REQUEST, __opus_check_int_ptr(x) + +/** Configures the maximum bandpass that the encoder will select automatically. + * Applications should normally use this instead of #OPUS_SET_BANDWIDTH + * (leaving that set to the default, #OPUS_AUTO). This allows the + * application to set an upper bound based on the type of input it is + * providing, but still gives the encoder the freedom to reduce the bandpass + * when the bitrate becomes too low, for better overall quality. + * @see OPUS_GET_MAX_BANDWIDTH + * @param[in] x <tt>opus_int32</tt>: Allowed values: + * <dl> + * <dt>OPUS_BANDWIDTH_NARROWBAND</dt> <dd>4 kHz passband</dd> + * <dt>OPUS_BANDWIDTH_MEDIUMBAND</dt> <dd>6 kHz passband</dd> + * <dt>OPUS_BANDWIDTH_WIDEBAND</dt> <dd>8 kHz passband</dd> + * <dt>OPUS_BANDWIDTH_SUPERWIDEBAND</dt><dd>12 kHz passband</dd> + * <dt>OPUS_BANDWIDTH_FULLBAND</dt> <dd>20 kHz passband (default)</dd> + * </dl> + * @hideinitializer */ +#define OPUS_SET_MAX_BANDWIDTH(x) OPUS_SET_MAX_BANDWIDTH_REQUEST, __opus_check_int(x) + +/** Gets the encoder's configured maximum allowed bandpass. + * @see OPUS_SET_MAX_BANDWIDTH + * @param[out] x <tt>opus_int32 *</tt>: Allowed values: + * <dl> + * <dt>#OPUS_BANDWIDTH_NARROWBAND</dt> <dd>4 kHz passband</dd> + * <dt>#OPUS_BANDWIDTH_MEDIUMBAND</dt> <dd>6 kHz passband</dd> + * <dt>#OPUS_BANDWIDTH_WIDEBAND</dt> <dd>8 kHz passband</dd> + * <dt>#OPUS_BANDWIDTH_SUPERWIDEBAND</dt><dd>12 kHz passband</dd> + * <dt>#OPUS_BANDWIDTH_FULLBAND</dt> <dd>20 kHz passband (default)</dd> + * </dl> + * @hideinitializer */ +#define OPUS_GET_MAX_BANDWIDTH(x) OPUS_GET_MAX_BANDWIDTH_REQUEST, __opus_check_int_ptr(x) + +/** Sets the encoder's bandpass to a specific value. + * This prevents the encoder from automatically selecting the bandpass based + * on the available bitrate. If an application knows the bandpass of the input + * audio it is providing, it should normally use #OPUS_SET_MAX_BANDWIDTH + * instead, which still gives the encoder the freedom to reduce the bandpass + * when the bitrate becomes too low, for better overall quality. + * @see OPUS_GET_BANDWIDTH + * @param[in] x <tt>opus_int32</tt>: Allowed values: + * <dl> + * <dt>#OPUS_AUTO</dt> <dd>(default)</dd> + * <dt>#OPUS_BANDWIDTH_NARROWBAND</dt> <dd>4 kHz passband</dd> + * <dt>#OPUS_BANDWIDTH_MEDIUMBAND</dt> <dd>6 kHz passband</dd> + * <dt>#OPUS_BANDWIDTH_WIDEBAND</dt> <dd>8 kHz passband</dd> + * <dt>#OPUS_BANDWIDTH_SUPERWIDEBAND</dt><dd>12 kHz passband</dd> + * <dt>#OPUS_BANDWIDTH_FULLBAND</dt> <dd>20 kHz passband</dd> + * </dl> + * @hideinitializer */ +#define OPUS_SET_BANDWIDTH(x) OPUS_SET_BANDWIDTH_REQUEST, __opus_check_int(x) + +/** Configures the type of signal being encoded. + * This is a hint which helps the encoder's mode selection. + * @see OPUS_GET_SIGNAL + * @param[in] x <tt>opus_int32</tt>: Allowed values: + * <dl> + * <dt>#OPUS_AUTO</dt> <dd>(default)</dd> + * <dt>#OPUS_SIGNAL_VOICE</dt><dd>Bias thresholds towards choosing LPC or Hybrid modes.</dd> + * <dt>#OPUS_SIGNAL_MUSIC</dt><dd>Bias thresholds towards choosing MDCT modes.</dd> + * </dl> + * @hideinitializer */ +#define OPUS_SET_SIGNAL(x) OPUS_SET_SIGNAL_REQUEST, __opus_check_int(x) +/** Gets the encoder's configured signal type. + * @see OPUS_SET_SIGNAL + * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values: + * <dl> + * <dt>#OPUS_AUTO</dt> <dd>(default)</dd> + * <dt>#OPUS_SIGNAL_VOICE</dt><dd>Bias thresholds towards choosing LPC or Hybrid modes.</dd> + * <dt>#OPUS_SIGNAL_MUSIC</dt><dd>Bias thresholds towards choosing MDCT modes.</dd> + * </dl> + * @hideinitializer */ +#define OPUS_GET_SIGNAL(x) OPUS_GET_SIGNAL_REQUEST, __opus_check_int_ptr(x) + + +/** Configures the encoder's intended application. + * The initial value is a mandatory argument to the encoder_create function. + * @see OPUS_GET_APPLICATION + * @param[in] x <tt>opus_int32</tt>: Returns one of the following values: + * <dl> + * <dt>#OPUS_APPLICATION_VOIP</dt> + * <dd>Process signal for improved speech intelligibility.</dd> + * <dt>#OPUS_APPLICATION_AUDIO</dt> + * <dd>Favor faithfulness to the original input.</dd> + * <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt> + * <dd>Configure the minimum possible coding delay by disabling certain modes + * of operation.</dd> + * </dl> + * @hideinitializer */ +#define OPUS_SET_APPLICATION(x) OPUS_SET_APPLICATION_REQUEST, __opus_check_int(x) +/** Gets the encoder's configured application. + * @see OPUS_SET_APPLICATION + * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values: + * <dl> + * <dt>#OPUS_APPLICATION_VOIP</dt> + * <dd>Process signal for improved speech intelligibility.</dd> + * <dt>#OPUS_APPLICATION_AUDIO</dt> + * <dd>Favor faithfulness to the original input.</dd> + * <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt> + * <dd>Configure the minimum possible coding delay by disabling certain modes + * of operation.</dd> + * </dl> + * @hideinitializer */ +#define OPUS_GET_APPLICATION(x) OPUS_GET_APPLICATION_REQUEST, __opus_check_int_ptr(x) + +/** Gets the total samples of delay added by the entire codec. + * This can be queried by the encoder and then the provided number of samples can be + * skipped on from the start of the decoder's output to provide time aligned input + * and output. From the perspective of a decoding application the real data begins this many + * samples late. + * + * The decoder contribution to this delay is identical for all decoders, but the + * encoder portion of the delay may vary from implementation to implementation, + * version to version, or even depend on the encoder's initial configuration. + * Applications needing delay compensation should call this CTL rather than + * hard-coding a value. + * @param[out] x <tt>opus_int32 *</tt>: Number of lookahead samples + * @hideinitializer */ +#define OPUS_GET_LOOKAHEAD(x) OPUS_GET_LOOKAHEAD_REQUEST, __opus_check_int_ptr(x) + +/** Configures the encoder's use of inband forward error correction (FEC). + * @note This is only applicable to the LPC layer + * @see OPUS_GET_INBAND_FEC + * @param[in] x <tt>opus_int32</tt>: Allowed values: + * <dl> + * <dt>0</dt><dd>Disable inband FEC (default).</dd> + * <dt>1</dt><dd>Enable inband FEC.</dd> + * </dl> + * @hideinitializer */ +#define OPUS_SET_INBAND_FEC(x) OPUS_SET_INBAND_FEC_REQUEST, __opus_check_int(x) +/** Gets encoder's configured use of inband forward error correction. + * @see OPUS_SET_INBAND_FEC + * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values: + * <dl> + * <dt>0</dt><dd>Inband FEC disabled (default).</dd> + * <dt>1</dt><dd>Inband FEC enabled.</dd> + * </dl> + * @hideinitializer */ +#define OPUS_GET_INBAND_FEC(x) OPUS_GET_INBAND_FEC_REQUEST, __opus_check_int_ptr(x) + +/** Configures the encoder's expected packet loss percentage. + * Higher values trigger progressively more loss resistant behavior in the encoder + * at the expense of quality at a given bitrate in the absence of packet loss, but + * greater quality under loss. + * @see OPUS_GET_PACKET_LOSS_PERC + * @param[in] x <tt>opus_int32</tt>: Loss percentage in the range 0-100, inclusive (default: 0). + * @hideinitializer */ +#define OPUS_SET_PACKET_LOSS_PERC(x) OPUS_SET_PACKET_LOSS_PERC_REQUEST, __opus_check_int(x) +/** Gets the encoder's configured packet loss percentage. + * @see OPUS_SET_PACKET_LOSS_PERC + * @param[out] x <tt>opus_int32 *</tt>: Returns the configured loss percentage + * in the range 0-100, inclusive (default: 0). + * @hideinitializer */ +#define OPUS_GET_PACKET_LOSS_PERC(x) OPUS_GET_PACKET_LOSS_PERC_REQUEST, __opus_check_int_ptr(x) + +/** Configures the encoder's use of discontinuous transmission (DTX). + * @note This is only applicable to the LPC layer + * @see OPUS_GET_DTX + * @param[in] x <tt>opus_int32</tt>: Allowed values: + * <dl> + * <dt>0</dt><dd>Disable DTX (default).</dd> + * <dt>1</dt><dd>Enabled DTX.</dd> + * </dl> + * @hideinitializer */ +#define OPUS_SET_DTX(x) OPUS_SET_DTX_REQUEST, __opus_check_int(x) +/** Gets encoder's configured use of discontinuous transmission. + * @see OPUS_SET_DTX + * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values: + * <dl> + * <dt>0</dt><dd>DTX disabled (default).</dd> + * <dt>1</dt><dd>DTX enabled.</dd> + * </dl> + * @hideinitializer */ +#define OPUS_GET_DTX(x) OPUS_GET_DTX_REQUEST, __opus_check_int_ptr(x) +/** Configures the depth of signal being encoded. + * + * This is a hint which helps the encoder identify silence and near-silence. + * It represents the number of significant bits of linear intensity below + * which the signal contains ignorable quantization or other noise. + * + * For example, OPUS_SET_LSB_DEPTH(14) would be an appropriate setting + * for G.711 u-law input. OPUS_SET_LSB_DEPTH(16) would be appropriate + * for 16-bit linear pcm input with opus_encode_float(). + * + * When using opus_encode() instead of opus_encode_float(), or when libopus + * is compiled for fixed-point, the encoder uses the minimum of the value + * set here and the value 16. + * + * @see OPUS_GET_LSB_DEPTH + * @param[in] x <tt>opus_int32</tt>: Input precision in bits, between 8 and 24 + * (default: 24). + * @hideinitializer */ +#define OPUS_SET_LSB_DEPTH(x) OPUS_SET_LSB_DEPTH_REQUEST, __opus_check_int(x) +/** Gets the encoder's configured signal depth. + * @see OPUS_SET_LSB_DEPTH + * @param[out] x <tt>opus_int32 *</tt>: Input precision in bits, between 8 and + * 24 (default: 24). + * @hideinitializer */ +#define OPUS_GET_LSB_DEPTH(x) OPUS_GET_LSB_DEPTH_REQUEST, __opus_check_int_ptr(x) + +/** Configures the encoder's use of variable duration frames. + * When variable duration is enabled, the encoder is free to use a shorter frame + * size than the one requested in the opus_encode*() call. + * It is then the user's responsibility + * to verify how much audio was encoded by checking the ToC byte of the encoded + * packet. The part of the audio that was not encoded needs to be resent to the + * encoder for the next call. Do not use this option unless you <b>really</b> + * know what you are doing. + * @see OPUS_GET_EXPERT_FRAME_DURATION + * @param[in] x <tt>opus_int32</tt>: Allowed values: + * <dl> + * <dt>OPUS_FRAMESIZE_ARG</dt><dd>Select frame size from the argument (default).</dd> + * <dt>OPUS_FRAMESIZE_2_5_MS</dt><dd>Use 2.5 ms frames.</dd> + * <dt>OPUS_FRAMESIZE_5_MS</dt><dd>Use 5 ms frames.</dd> + * <dt>OPUS_FRAMESIZE_10_MS</dt><dd>Use 10 ms frames.</dd> + * <dt>OPUS_FRAMESIZE_20_MS</dt><dd>Use 20 ms frames.</dd> + * <dt>OPUS_FRAMESIZE_40_MS</dt><dd>Use 40 ms frames.</dd> + * <dt>OPUS_FRAMESIZE_60_MS</dt><dd>Use 60 ms frames.</dd> + * <dt>OPUS_FRAMESIZE_VARIABLE</dt><dd>Optimize the frame size dynamically.</dd> + * </dl> + * @hideinitializer */ +#define OPUS_SET_EXPERT_FRAME_DURATION(x) OPUS_SET_EXPERT_FRAME_DURATION_REQUEST, __opus_check_int(x) +/** Gets the encoder's configured use of variable duration frames. + * @see OPUS_SET_EXPERT_FRAME_DURATION + * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values: + * <dl> + * <dt>OPUS_FRAMESIZE_ARG</dt><dd>Select frame size from the argument (default).</dd> + * <dt>OPUS_FRAMESIZE_2_5_MS</dt><dd>Use 2.5 ms frames.</dd> + * <dt>OPUS_FRAMESIZE_5_MS</dt><dd>Use 5 ms frames.</dd> + * <dt>OPUS_FRAMESIZE_10_MS</dt><dd>Use 10 ms frames.</dd> + * <dt>OPUS_FRAMESIZE_20_MS</dt><dd>Use 20 ms frames.</dd> + * <dt>OPUS_FRAMESIZE_40_MS</dt><dd>Use 40 ms frames.</dd> + * <dt>OPUS_FRAMESIZE_60_MS</dt><dd>Use 60 ms frames.</dd> + * <dt>OPUS_FRAMESIZE_VARIABLE</dt><dd>Optimize the frame size dynamically.</dd> + * </dl> + * @hideinitializer */ +#define OPUS_GET_EXPERT_FRAME_DURATION(x) OPUS_GET_EXPERT_FRAME_DURATION_REQUEST, __opus_check_int_ptr(x) + +/** If set to 1, disables almost all use of prediction, making frames almost + * completely independent. This reduces quality. + * @see OPUS_GET_PREDICTION_DISABLED + * @param[in] x <tt>opus_int32</tt>: Allowed values: + * <dl> + * <dt>0</dt><dd>Enable prediction (default).</dd> + * <dt>1</dt><dd>Disable prediction.</dd> + * </dl> + * @hideinitializer */ +#define OPUS_SET_PREDICTION_DISABLED(x) OPUS_SET_PREDICTION_DISABLED_REQUEST, __opus_check_int(x) +/** Gets the encoder's configured prediction status. + * @see OPUS_SET_PREDICTION_DISABLED + * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values: + * <dl> + * <dt>0</dt><dd>Prediction enabled (default).</dd> + * <dt>1</dt><dd>Prediction disabled.</dd> + * </dl> + * @hideinitializer */ +#define OPUS_GET_PREDICTION_DISABLED(x) OPUS_GET_PREDICTION_DISABLED_REQUEST, __opus_check_int_ptr(x) + +/**@}*/ + +/** @defgroup opus_genericctls Generic CTLs + * @ingroup opus + * + * These macros are used with the \c opus_decoder_ctl and + * \c opus_encoder_ctl calls to generate a particular + * request. + * + * When called on an \c OpusDecoder they apply to that + * particular decoder instance. When called on an + * \c OpusEncoder they apply to the corresponding setting + * on that encoder instance, if present. + * + * Some usage examples: + * + * @code + * int ret; + * opus_int32 pitch; + * ret = opus_decoder_ctl(dec_ctx, OPUS_GET_PITCH(&pitch)); + * if (ret == OPUS_OK) return ret; + * + * opus_encoder_ctl(enc_ctx, OPUS_RESET_STATE); + * opus_decoder_ctl(dec_ctx, OPUS_RESET_STATE); + * + * opus_int32 enc_bw, dec_bw; + * opus_encoder_ctl(enc_ctx, OPUS_GET_BANDWIDTH(&enc_bw)); + * opus_decoder_ctl(dec_ctx, OPUS_GET_BANDWIDTH(&dec_bw)); + * if (enc_bw != dec_bw) { + * printf("packet bandwidth mismatch!\n"); + * } + * @endcode + * + * @see opus_encoder, opus_decoder_ctl, opus_encoder_ctl, opus_decoderctls, opus_encoderctls + * @{ + */ + +/** Resets the codec state to be equivalent to a freshly initialized state. + * This should be called when switching streams in order to prevent + * the back to back decoding from giving different results from + * one at a time decoding. + * @hideinitializer */ +#define OPUS_RESET_STATE 4028 + +/** Gets the final state of the codec's entropy coder. + * This is used for testing purposes, + * The encoder and decoder state should be identical after coding a payload + * (assuming no data corruption or software bugs) + * + * @param[out] x <tt>opus_uint32 *</tt>: Entropy coder state + * + * @hideinitializer */ +#define OPUS_GET_FINAL_RANGE(x) OPUS_GET_FINAL_RANGE_REQUEST, __opus_check_uint_ptr(x) + +/** Gets the encoder's configured bandpass or the decoder's last bandpass. + * @see OPUS_SET_BANDWIDTH + * @param[out] x <tt>opus_int32 *</tt>: Returns one of the following values: + * <dl> + * <dt>#OPUS_AUTO</dt> <dd>(default)</dd> + * <dt>#OPUS_BANDWIDTH_NARROWBAND</dt> <dd>4 kHz passband</dd> + * <dt>#OPUS_BANDWIDTH_MEDIUMBAND</dt> <dd>6 kHz passband</dd> + * <dt>#OPUS_BANDWIDTH_WIDEBAND</dt> <dd>8 kHz passband</dd> + * <dt>#OPUS_BANDWIDTH_SUPERWIDEBAND</dt><dd>12 kHz passband</dd> + * <dt>#OPUS_BANDWIDTH_FULLBAND</dt> <dd>20 kHz passband</dd> + * </dl> + * @hideinitializer */ +#define OPUS_GET_BANDWIDTH(x) OPUS_GET_BANDWIDTH_REQUEST, __opus_check_int_ptr(x) + +/** Gets the sampling rate the encoder or decoder was initialized with. + * This simply returns the <code>Fs</code> value passed to opus_encoder_init() + * or opus_decoder_init(). + * @param[out] x <tt>opus_int32 *</tt>: Sampling rate of encoder or decoder. + * @hideinitializer + */ +#define OPUS_GET_SAMPLE_RATE(x) OPUS_GET_SAMPLE_RATE_REQUEST, __opus_check_int_ptr(x) + +/**@}*/ + +/** @defgroup opus_decoderctls Decoder related CTLs + * @ingroup opus + * @see opus_genericctls, opus_encoderctls, opus_decoder + * @{ + */ + +/** Configures decoder gain adjustment. + * Scales the decoded output by a factor specified in Q8 dB units. + * This has a maximum range of -32768 to 32767 inclusive, and returns + * OPUS_BAD_ARG otherwise. The default is zero indicating no adjustment. + * This setting survives decoder reset. + * + * gain = pow(10, x/(20.0*256)) + * + * @param[in] x <tt>opus_int32</tt>: Amount to scale PCM signal by in Q8 dB units. + * @hideinitializer */ +#define OPUS_SET_GAIN(x) OPUS_SET_GAIN_REQUEST, __opus_check_int(x) +/** Gets the decoder's configured gain adjustment. @see OPUS_SET_GAIN + * + * @param[out] x <tt>opus_int32 *</tt>: Amount to scale PCM signal by in Q8 dB units. + * @hideinitializer */ +#define OPUS_GET_GAIN(x) OPUS_GET_GAIN_REQUEST, __opus_check_int_ptr(x) + +/** Gets the duration (in samples) of the last packet successfully decoded or concealed. + * @param[out] x <tt>opus_int32 *</tt>: Number of samples (at current sampling rate). + * @hideinitializer */ +#define OPUS_GET_LAST_PACKET_DURATION(x) OPUS_GET_LAST_PACKET_DURATION_REQUEST, __opus_check_int_ptr(x) + +/** Gets the pitch of the last decoded frame, if available. + * This can be used for any post-processing algorithm requiring the use of pitch, + * e.g. time stretching/shortening. If the last frame was not voiced, or if the + * pitch was not coded in the frame, then zero is returned. + * + * This CTL is only implemented for decoder instances. + * + * @param[out] x <tt>opus_int32 *</tt>: pitch period at 48 kHz (or 0 if not available) + * + * @hideinitializer */ +#define OPUS_GET_PITCH(x) OPUS_GET_PITCH_REQUEST, __opus_check_int_ptr(x) + +/**@}*/ + +/** @defgroup opus_libinfo Opus library information functions + * @ingroup opus + * @{ + */ + +/** Converts an opus error code into a human readable string. + * + * @param[in] error <tt>int</tt>: Error number + * @returns Error string + */ +OPUS_EXPORT const char *opus_strerror(int error); + +/** Gets the libopus version string. + * + * Applications may look for the substring "-fixed" in the version string to + * determine whether they have a fixed-point or floating-point build at + * runtime. + * + * @returns Version string + */ +OPUS_EXPORT const char *opus_get_version_string(void); +/**@}*/ + +#ifdef __cplusplus +} +#endif + +#endif /* OPUS_DEFINES_H */ diff --git a/rcaudio/opus_types.h b/rcaudio/opus_types.h new file mode 100644 index 0000000..b28e03a --- a/dev/null +++ b/rcaudio/opus_types.h @@ -0,0 +1,159 @@ +/* (C) COPYRIGHT 1994-2002 Xiph.Org Foundation */ +/* Modified by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +/* opus_types.h based on ogg_types.h from libogg */ + +/** + @file opus_types.h + @brief Opus reference implementation types +*/ +#ifndef OPUS_TYPES_H +#define OPUS_TYPES_H + +/* Use the real stdint.h if it's there (taken from Paul Hsieh's pstdint.h) */ +#if (defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_)) || defined (HAVE_STDINT_H)) +#include <stdint.h> + + typedef int16_t opus_int16; + typedef uint16_t opus_uint16; + typedef int32_t opus_int32; + typedef uint32_t opus_uint32; +#elif defined(_WIN32) + +# if defined(__CYGWIN__) +# include <_G_config.h> + typedef _G_int32_t opus_int32; + typedef _G_uint32_t opus_uint32; + typedef _G_int16 opus_int16; + typedef _G_uint16 opus_uint16; +# elif defined(__MINGW32__) + typedef short opus_int16; + typedef unsigned short opus_uint16; + typedef int opus_int32; + typedef unsigned int opus_uint32; +# elif defined(__MWERKS__) + typedef int opus_int32; + typedef unsigned int opus_uint32; + typedef short opus_int16; + typedef unsigned short opus_uint16; +# else + /* MSVC/Borland */ + typedef __int32 opus_int32; + typedef unsigned __int32 opus_uint32; + typedef __int16 opus_int16; + typedef unsigned __int16 opus_uint16; +# endif + +#elif defined(__MACOS__) + +# include <sys/types.h> + typedef SInt16 opus_int16; + typedef UInt16 opus_uint16; + typedef SInt32 opus_int32; + typedef UInt32 opus_uint32; + +#elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */ + +# include <sys/types.h> + typedef int16_t opus_int16; + typedef u_int16_t opus_uint16; + typedef int32_t opus_int32; + typedef u_int32_t opus_uint32; + +#elif defined(__BEOS__) + + /* Be */ +# include <inttypes.h> + typedef int16 opus_int16; + typedef u_int16 opus_uint16; + typedef int32_t opus_int32; + typedef u_int32_t opus_uint32; + +#elif defined (__EMX__) + + /* OS/2 GCC */ + typedef short opus_int16; + typedef unsigned short opus_uint16; + typedef int opus_int32; + typedef unsigned int opus_uint32; + +#elif defined (DJGPP) + + /* DJGPP */ + typedef short opus_int16; + typedef unsigned short opus_uint16; + typedef int opus_int32; + typedef unsigned int opus_uint32; + +#elif defined(R5900) + + /* PS2 EE */ + typedef int opus_int32; + typedef unsigned opus_uint32; + typedef short opus_int16; + typedef unsigned short opus_uint16; + +#elif defined(__SYMBIAN32__) + + /* Symbian GCC */ + typedef signed short opus_int16; + typedef unsigned short opus_uint16; + typedef signed int opus_int32; + typedef unsigned int opus_uint32; + +#elif defined(CONFIG_TI_C54X) || defined (CONFIG_TI_C55X) + + typedef short opus_int16; + typedef unsigned short opus_uint16; + typedef long opus_int32; + typedef unsigned long opus_uint32; + +#elif defined(CONFIG_TI_C6X) + + typedef short opus_int16; + typedef unsigned short opus_uint16; + typedef int opus_int32; + typedef unsigned int opus_uint32; + +#else + + /* Give up, take a reasonable guess */ + typedef short opus_int16; + typedef unsigned short opus_uint16; + typedef int opus_int32; + typedef unsigned int opus_uint32; + +#endif + +#define opus_int int /* used for counters etc; at least 16 bits */ +#define opus_int64 long long +#define opus_int8 signed char + +#define opus_uint unsigned int /* used for counters etc; at least 16 bits */ +#define opus_uint64 unsigned long long +#define opus_uint8 unsigned char + +#endif /* OPUS_TYPES_H */ diff --git a/rcaudio/ti_audio.h b/rcaudio/ti_audio.h new file mode 100644 index 0000000..13cd24d --- a/dev/null +++ b/rcaudio/ti_audio.h @@ -0,0 +1,15 @@ +#ifndef TI_AUDIO_H +#define TI_AUDIO_H + +#ifdef __cplusplus +extern "C" { +#endif + + +void audio_ParseData(unsigned char *pdu, unsigned short len, short *decode_buf, unsigned short *decode_len); + + +#ifdef __cplusplus +} +#endif +#endif diff --git a/rcaudio/typedef.h b/rcaudio/typedef.h new file mode 100644 index 0000000..7c89908 --- a/dev/null +++ b/rcaudio/typedef.h @@ -0,0 +1,33 @@ +/*****************************************************************************/ +/* BroadVoice(R)32 (BV32) Floating-Point ANSI-C Source Code */ +/* Revision Date: October 5, 2012 */ +/* Version 1.2 */ +/*****************************************************************************/ + +/*****************************************************************************/ +/* Copyright 2000-2012 Broadcom Corporation */ +/* */ +/* This software is provided under the GNU Lesser General Public License, */ +/* version 2.1, as published by the Free Software Foundation ("LGPL"). */ +/* This program is distributed in the hope that it will be useful, but */ +/* WITHOUT ANY SUPPORT OR WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LGPL for */ +/* more details. A copy of the LGPL is available at */ +/* http://www.broadcom.com/licenses/LGPLv2.1.php, */ +/* or by writing to the Free Software Foundation, Inc., */ +/* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/*****************************************************************************/ + + +/***************************************************************************** + typedef.h : Common Floating-Point Library: + + $Log$ +******************************************************************************/ + +#ifndef __TYPEDEF__ +#define __TYPEDEF__ +typedef float Float; +typedef unsigned char UWord8; +typedef unsigned int UWord32; +#endif |