From 58a6e7bdd3b41da588676246889ae66738516375 Mon Sep 17 00:00:00 2001 From: Richard Allen Date: Sat, 3 May 2014 22:47:46 +0000 Subject: [PATCH] Updating to ioq3 git dated 03 May 2014 --- .gitignore | 4 + Makefile | 90 +- code/SDL12/include/SDL_config.h | 2 +- code/SDL12/include/SDL_config_amiga.h | 80 - code/SDL12/include/SDL_config_minimal.h | 4 - code/cgame/cg_effects.c | 4 +- code/cgame/cg_localents.c | 2 +- code/cgame/cg_players.c | 2 +- code/cgame/cg_view.c | 2 +- code/client/cl_curl.h | 2 +- code/client/cl_main.c | 1 + code/client/cl_scrn.c | 2 +- code/client/qal.c | 6 +- code/client/qal.h | 2 - code/client/snd_mix.c | 4 + code/client/snd_openal.c | 12 +- code/game/ai_dmq3.c | 3 + code/game/ai_main.c | 2 +- code/game/bg_pmove.c | 2 +- code/game/g_client.c | 2 +- code/game/g_cmds.c | 6 +- code/game/g_items.c | 2 +- code/game/g_syscalls.c | 2 +- code/{libcurl => libcurl-7.35.0}/curl/curl.h | 1309 +- code/libcurl-7.35.0/curl/curlbuild.h | 585 + code/libcurl-7.35.0/curl/curlrules.h | 262 + .../curl/curlver.h | 25 +- code/{libcurl => libcurl-7.35.0}/curl/easy.h | 29 +- .../curl/mprintf.h | 29 +- code/{libcurl => libcurl-7.35.0}/curl/multi.h | 141 +- .../curl/stdcheaders.h | 15 +- code/libcurl-7.35.0/curl/typecheck-gcc.h | 610 + code/libcurl/curl/types.h | 1 - .../include/ogg/config_types.h | 1 + .../include/ogg/ogg.h | 0 .../include/ogg/os_types.h | 0 .../src/bitwise.c | 0 .../src/framing.c | 46 +- code/libs/win32/libSDL.la | 41 - code/libvorbis-1.3.4/include/vorbis/codec.h | 243 + .../include/vorbis/vorbisenc.h | 436 + .../include/vorbis/vorbisfile.h | 206 + code/libvorbis-1.3.4/lib/analysis.c | 120 + code/libvorbis-1.3.4/lib/backends.h | 144 + code/libvorbis-1.3.4/lib/bitrate.c | 253 + code/libvorbis-1.3.4/lib/bitrate.h | 59 + code/libvorbis-1.3.4/lib/block.c | 1046 + .../lib/books/coupled/res_books_51.h | 12274 ++++++++++++ .../lib/books/coupled/res_books_stereo.h | 15783 ++++++++++++++++ .../lib/books/floor/floor_books.h | 1547 ++ .../lib/books/uncoupled/res_books_uncoupled.h | 7758 ++++++++ code/libvorbis-1.3.4/lib/codebook.c | 484 + code/libvorbis-1.3.4/lib/codebook.h | 119 + code/libvorbis-1.3.4/lib/codec_internal.h | 167 + code/libvorbis-1.3.4/lib/envelope.c | 375 + code/libvorbis-1.3.4/lib/envelope.h | 80 + code/libvorbis-1.3.4/lib/floor0.c | 224 + code/libvorbis-1.3.4/lib/floor1.c | 1102 ++ code/libvorbis-1.3.4/lib/highlevel.h | 58 + code/libvorbis-1.3.4/lib/info.c | 668 + code/libvorbis-1.3.4/lib/lookup.c | 94 + code/libvorbis-1.3.4/lib/lookup.h | 32 + code/libvorbis-1.3.4/lib/lookup_data.h | 192 + code/libvorbis-1.3.4/lib/lpc.c | 160 + code/libvorbis-1.3.4/lib/lpc.h | 29 + code/libvorbis-1.3.4/lib/lsp.c | 456 + code/libvorbis-1.3.4/lib/lsp.h | 28 + code/libvorbis-1.3.4/lib/mapping0.c | 816 + code/libvorbis-1.3.4/lib/masking.h | 785 + code/libvorbis-1.3.4/lib/mdct.c | 563 + code/libvorbis-1.3.4/lib/mdct.h | 71 + code/libvorbis-1.3.4/lib/misc.h | 57 + code/libvorbis-1.3.4/lib/modes/floor_all.h | 260 + code/libvorbis-1.3.4/lib/modes/psych_11.h | 51 + code/libvorbis-1.3.4/lib/modes/psych_16.h | 133 + code/libvorbis-1.3.4/lib/modes/psych_44.h | 642 + code/libvorbis-1.3.4/lib/modes/psych_8.h | 101 + code/libvorbis-1.3.4/lib/modes/residue_16.h | 163 + code/libvorbis-1.3.4/lib/modes/residue_44.h | 292 + .../libvorbis-1.3.4/lib/modes/residue_44p51.h | 451 + code/libvorbis-1.3.4/lib/modes/residue_44u.h | 318 + code/libvorbis-1.3.4/lib/modes/residue_8.h | 109 + code/libvorbis-1.3.4/lib/modes/setup_11.h | 143 + code/libvorbis-1.3.4/lib/modes/setup_16.h | 153 + code/libvorbis-1.3.4/lib/modes/setup_22.h | 128 + code/libvorbis-1.3.4/lib/modes/setup_32.h | 132 + code/libvorbis-1.3.4/lib/modes/setup_44.h | 117 + code/libvorbis-1.3.4/lib/modes/setup_44p51.h | 74 + code/libvorbis-1.3.4/lib/modes/setup_44u.h | 74 + code/libvorbis-1.3.4/lib/modes/setup_8.h | 149 + code/libvorbis-1.3.4/lib/modes/setup_X.h | 225 + code/libvorbis-1.3.4/lib/os.h | 190 + code/libvorbis-1.3.4/lib/psy.c | 1206 ++ code/libvorbis-1.3.4/lib/psy.h | 154 + code/libvorbis-1.3.4/lib/registry.c | 45 + code/libvorbis-1.3.4/lib/registry.h | 32 + code/libvorbis-1.3.4/lib/res0.c | 899 + code/libvorbis-1.3.4/lib/scales.h | 90 + code/libvorbis-1.3.4/lib/sharedbook.c | 579 + code/libvorbis-1.3.4/lib/smallft.c | 1255 ++ code/libvorbis-1.3.4/lib/smallft.h | 34 + code/libvorbis-1.3.4/lib/synthesis.c | 184 + code/libvorbis-1.3.4/lib/vorbisenc.c | 1215 ++ code/libvorbis-1.3.4/lib/vorbisfile.c | 2341 +++ code/libvorbis-1.3.4/lib/window.c | 2136 +++ code/libvorbis-1.3.4/lib/window.h | 26 + code/opus-1.0.2/celt/celt.c | 2906 --- code/opus-1.0.2/celt/celt_lpc.c | 188 - code/opus-1.0.2/celt/cwrs.c | 645 - code/opus-1.0.2/src/opus_multistream.c | 1027 - .../celt/_kiss_fft_guts.h | 8 + code/{opus-1.0.2 => opus-1.1}/celt/arch.h | 15 +- code/opus-1.1/celt/arm/arm2gnu.pl | 316 + code/opus-1.1/celt/arm/arm_celt_map.c | 49 + code/opus-1.1/celt/arm/armcpu.c | 174 + code/opus-1.1/celt/arm/armcpu.h | 71 + .../opus.c => opus-1.1/celt/arm/armopts.s.in} | 28 +- code/opus-1.1/celt/arm/celt_pitch_xcorr_arm.s | 545 + code/opus-1.1/celt/arm/fixed_armv4.h | 76 + code/opus-1.1/celt/arm/fixed_armv5e.h | 116 + code/opus-1.1/celt/arm/kiss_fft_armv4.h | 121 + code/opus-1.1/celt/arm/kiss_fft_armv5e.h | 118 + code/opus-1.1/celt/arm/pitch_arm.h | 57 + code/{opus-1.0.2 => opus-1.1}/celt/bands.c | 1216 +- code/{opus-1.0.2 => opus-1.1}/celt/bands.h | 31 +- code/opus-1.1/celt/celt.c | 223 + code/{opus-1.0.2 => opus-1.1}/celt/celt.h | 107 +- code/opus-1.1/celt/celt_decoder.c | 1195 ++ code/opus-1.1/celt/celt_encoder.c | 2353 +++ code/opus-1.1/celt/celt_lpc.c | 309 + code/{opus-1.0.2 => opus-1.1}/celt/celt_lpc.h | 3 +- .../pitch.h => opus-1.1/celt/cpu_support.h} | 40 +- code/opus-1.1/celt/cwrs.c | 697 + code/{opus-1.0.2 => opus-1.1}/celt/cwrs.h | 0 code/{opus-1.0.2 => opus-1.1}/celt/ecintrin.h | 2 +- code/{opus-1.0.2 => opus-1.1}/celt/entcode.c | 0 code/{opus-1.0.2 => opus-1.1}/celt/entcode.h | 9 +- code/{opus-1.0.2 => opus-1.1}/celt/entdec.c | 2 +- code/{opus-1.0.2 => opus-1.1}/celt/entdec.h | 0 code/{opus-1.0.2 => opus-1.1}/celt/entenc.c | 0 code/{opus-1.0.2 => opus-1.1}/celt/entenc.h | 0 .../celt/fixed_debug.h | 68 +- .../celt/fixed_generic.h | 9 +- .../celt/float_cast.h | 4 +- code/{opus-1.0.2 => opus-1.1}/celt/kiss_fft.c | 3 - code/{opus-1.0.2 => opus-1.1}/celt/kiss_fft.h | 0 code/{opus-1.0.2 => opus-1.1}/celt/laplace.c | 0 code/{opus-1.0.2 => opus-1.1}/celt/laplace.h | 0 code/{opus-1.0.2 => opus-1.1}/celt/mathops.c | 4 +- code/{opus-1.0.2 => opus-1.1}/celt/mathops.h | 83 +- code/{opus-1.0.2 => opus-1.1}/celt/mdct.c | 113 +- code/{opus-1.0.2 => opus-1.1}/celt/mdct.h | 0 code/{opus-1.0.2 => opus-1.1}/celt/mfrngcod.h | 0 code/{opus-1.0.2 => opus-1.1}/celt/modes.c | 8 + code/{opus-1.0.2 => opus-1.1}/celt/modes.h | 0 .../celt/opus_custom_demo.c | 0 .../celt/os_support.h | 9 +- code/{opus-1.0.2 => opus-1.1}/celt/pitch.c | 201 +- code/opus-1.1/celt/pitch.h | 173 + .../celt/quant_bands.c | 50 +- .../celt/quant_bands.h | 8 +- code/{opus-1.0.2 => opus-1.1}/celt/rate.c | 10 +- code/{opus-1.0.2 => opus-1.1}/celt/rate.h | 8 +- .../celt/stack_alloc.h | 29 + .../celt/static_modes_fixed.h | 0 .../celt/static_modes_float.h | 0 code/{opus-1.0.2 => opus-1.1}/celt/vq.c | 0 code/{opus-1.0.2 => opus-1.1}/celt/vq.h | 7 +- code/opus-1.1/celt/x86/pitch_sse.h | 156 + code/{opus-1.0.2 => opus-1.1}/include/opus.h | 79 +- .../include/opus_custom.h | 91 +- .../include/opus_defines.h | 79 +- .../include/opus_multistream.h | 28 + .../include/opus_types.h | 0 code/{opus-1.0.2 => opus-1.1}/silk/A2NLSF.c | 10 +- code/{opus-1.0.2 => opus-1.1}/silk/API.h | 5 +- code/{opus-1.0.2 => opus-1.1}/silk/CNG.c | 13 +- .../silk/HP_variable_cutoff.c | 4 +- code/{opus-1.0.2 => opus-1.1}/silk/Inlines.h | 16 +- .../silk/LPC_analysis_filter.c | 27 +- .../silk/LPC_inv_pred_gain.c | 4 +- .../silk/LP_variable_cutoff.c | 6 +- .../silk/MacroCount.h | 164 +- .../silk/MacroDebug.h | 114 +- code/{opus-1.0.2 => opus-1.1}/silk/NLSF2A.c | 6 +- code/{opus-1.0.2 => opus-1.1}/silk/NLSF_VQ.c | 4 +- .../silk/NLSF_VQ_weights_laroia.c | 4 +- .../silk/NLSF_decode.c | 6 +- .../silk/NLSF_del_dec_quant.c | 6 +- .../silk/NLSF_encode.c | 20 +- .../silk/NLSF_stabilize.c | 4 +- .../silk/NLSF_unpack.c | 4 +- code/{opus-1.0.2 => opus-1.1}/silk/NSQ.c | 25 +- .../silk/NSQ_del_dec.c | 40 +- code/{opus-1.0.2 => opus-1.1}/silk/PLC.c | 12 +- code/{opus-1.0.2 => opus-1.1}/silk/PLC.h | 4 +- .../silk/SigProc_FIX.h | 49 +- code/{opus-1.0.2 => opus-1.1}/silk/VAD.c | 59 +- .../silk/VQ_WMat_EC.c | 15 +- .../silk/ana_filt_bank_1.c | 4 +- code/opus-1.1/silk/arm/SigProc_FIX_armv4.h | 47 + code/opus-1.1/silk/arm/SigProc_FIX_armv5e.h | 61 + code/opus-1.1/silk/arm/macros_armv4.h | 103 + code/opus-1.1/silk/arm/macros_armv5e.h | 213 + .../silk/biquad_alt.c | 4 +- .../silk/bwexpander.c | 4 +- .../silk/bwexpander_32.c | 4 +- .../silk/check_control_input.c | 4 +- .../silk/code_signs.c | 4 +- code/{opus-1.0.2 => opus-1.1}/silk/control.h | 7 +- .../silk/control_SNR.c | 4 +- .../silk/control_audio_bandwidth.c | 7 +- .../silk/control_codec.c | 47 +- code/{opus-1.0.2 => opus-1.1}/silk/debug.c | 4 +- code/{opus-1.0.2 => opus-1.1}/silk/debug.h | 9 +- code/{opus-1.0.2 => opus-1.1}/silk/dec_API.c | 11 +- .../silk/decode_core.c | 4 +- .../silk/decode_frame.c | 4 +- .../silk/decode_indices.c | 4 +- .../silk/decode_parameters.c | 4 +- .../silk/decode_pitch.c | 4 +- .../silk/decode_pulses.c | 4 +- .../silk/decoder_set_fs.c | 4 +- code/{opus-1.0.2 => opus-1.1}/silk/define.h | 4 +- code/{opus-1.0.2 => opus-1.1}/silk/enc_API.c | 50 +- .../silk/encode_indices.c | 4 +- .../silk/encode_pulses.c | 19 +- code/{opus-1.0.2 => opus-1.1}/silk/errors.h | 4 +- .../silk/fixed/LTP_analysis_filter_FIX.c | 4 +- .../silk/fixed/LTP_scale_ctrl_FIX.c | 4 +- .../silk/fixed/apply_sine_window_FIX.c | 4 +- .../silk/fixed/autocorr_FIX.c | 42 +- .../silk/fixed/burg_modified_FIX.c | 24 +- .../silk/fixed/corrMatrix_FIX.c | 4 +- .../silk/fixed/encode_frame_FIX.c | 47 +- .../silk/fixed/find_LPC_FIX.c | 16 +- .../silk/fixed/find_LTP_FIX.c | 4 +- .../silk/fixed/find_pitch_lags_FIX.c | 34 +- .../silk/fixed/find_pred_coefs_FIX.c | 21 +- .../silk/fixed/k2a_FIX.c | 4 +- .../silk/fixed/k2a_Q16_FIX.c | 4 +- .../silk/fixed/main_FIX.h | 13 +- .../silk/fixed/noise_shape_analysis_FIX.c | 19 +- .../silk/fixed/pitch_analysis_core_FIX.c | 435 +- .../silk/fixed/prefilter_FIX.c | 17 +- .../silk/fixed/process_gains_FIX.c | 4 +- .../silk/fixed/regularize_correlations_FIX.c | 4 +- .../silk/fixed/residual_energy16_FIX.c | 4 +- .../silk/fixed/residual_energy_FIX.c | 12 +- .../silk/fixed/schur64_FIX.c | 21 +- .../silk/fixed/schur_FIX.c | 20 +- .../silk/fixed/solve_LS_FIX.c | 26 +- .../silk/fixed/structs_FIX.h | 4 +- .../silk/fixed/vector_ops_FIX.c | 35 +- .../silk/fixed/warped_autocorrelation_FIX.c | 4 +- .../silk/float/LPC_analysis_filter_FLP.c | 14 +- .../silk/float/LPC_inv_pred_gain_FLP.c | 4 +- .../silk/float/LTP_analysis_filter_FLP.c | 4 +- .../silk/float/LTP_scale_ctrl_FLP.c | 4 +- .../silk/float/SigProc_FLP.h | 17 +- .../silk/float/apply_sine_window_FLP.c | 4 +- .../silk/float/autocorrelation_FLP.c | 4 +- .../silk/float/burg_modified_FLP.c | 4 +- .../silk/float/bwexpander_FLP.c | 4 +- .../silk/float/corrMatrix_FLP.c | 4 +- .../silk/float/encode_frame_FLP.c | 18 +- .../silk/float/energy_FLP.c | 4 +- .../silk/float/find_LPC_FLP.c | 4 +- .../silk/float/find_LTP_FLP.c | 4 +- .../silk/float/find_pitch_lags_FLP.c | 9 +- .../silk/float/find_pred_coefs_FLP.c | 7 +- .../silk/float/inner_product_FLP.c | 4 +- .../silk/float/k2a_FLP.c | 4 +- .../silk/float/levinsondurbin_FLP.c | 4 +- .../silk/float/main_FLP.h | 11 +- .../silk/float/noise_shape_analysis_FLP.c | 8 +- .../silk/float/pitch_analysis_core_FLP.c | 134 +- .../silk/float/prefilter_FLP.c | 8 +- .../silk/float/process_gains_FLP.c | 4 +- .../silk/float/regularize_correlations_FLP.c | 4 +- .../silk/float/residual_energy_FLP.c | 4 +- .../silk/float/scale_copy_vector_FLP.c | 4 +- .../silk/float/scale_vector_FLP.c | 4 +- .../silk/float/schur_FLP.c | 4 +- .../silk/float/solve_LS_FLP.c | 16 +- .../silk/float/sort_FLP.c | 4 +- .../silk/float/structs_FLP.h | 4 +- .../silk/float/warped_autocorrelation_FLP.c | 4 +- .../silk/float/wrappers_FLP.c | 7 +- .../silk/gain_quant.c | 4 +- .../silk/init_decoder.c | 4 +- .../silk/init_encoder.c | 10 +- .../silk/inner_prod_aligned.c | 4 +- .../silk/interpolate.c | 4 +- code/{opus-1.0.2 => opus-1.1}/silk/lin2log.c | 4 +- code/{opus-1.0.2 => opus-1.1}/silk/log2lin.c | 8 +- code/{opus-1.0.2 => opus-1.1}/silk/macros.h | 72 +- code/{opus-1.0.2 => opus-1.1}/silk/main.h | 8 +- .../silk/pitch_est_defines.h | 4 +- .../silk/pitch_est_tables.c | 4 +- .../silk/process_NLSFs.c | 4 +- .../silk/quant_LTP_gains.c | 25 +- .../{opus-1.0.2 => opus-1.1}/silk/resampler.c | 4 +- .../silk/resampler_down2.c | 8 +- .../silk/resampler_down2_3.c | 11 +- .../silk/resampler_private.h | 4 +- .../silk/resampler_private_AR2.c | 4 +- .../silk/resampler_private_IIR_FIR.c | 20 +- .../silk/resampler_private_down_FIR.c | 17 +- .../silk/resampler_private_up2_HQ.c | 4 +- .../silk/resampler_rom.c | 4 +- .../silk/resampler_rom.h | 4 +- .../silk/resampler_structs.h | 9 +- .../silk/shell_coder.c | 10 +- code/{opus-1.0.2 => opus-1.1}/silk/sigm_Q15.c | 4 +- code/{opus-1.0.2 => opus-1.1}/silk/sort.c | 4 +- .../silk/stereo_LR_to_MS.c | 20 +- .../silk/stereo_MS_to_LR.c | 4 +- .../silk/stereo_decode_pred.c | 4 +- .../silk/stereo_encode_pred.c | 4 +- .../silk/stereo_find_predictor.c | 4 +- .../silk/stereo_quant_pred.c | 4 +- code/{opus-1.0.2 => opus-1.1}/silk/structs.h | 7 +- .../silk/sum_sqr_shift.c | 4 +- .../silk/table_LSF_cos.c | 4 +- code/{opus-1.0.2 => opus-1.1}/silk/tables.h | 6 +- .../silk/tables_LTP.c | 28 +- .../silk/tables_NLSF_CB_NB_MB.c | 4 +- .../silk/tables_NLSF_CB_WB.c | 4 +- .../silk/tables_gain.c | 4 +- .../silk/tables_other.c | 4 +- .../silk/tables_pitch_lag.c | 4 +- .../silk/tables_pulses_per_block.c | 4 +- .../silk/tuning_parameters.h | 9 +- code/{opus-1.0.2 => opus-1.1}/silk/typedef.h | 7 +- code/opus-1.1/src/analysis.c | 645 + code/opus-1.1/src/analysis.h | 90 + code/opus-1.1/src/mlp.c | 140 + code/opus-1.1/src/mlp.h | 41 + code/opus-1.1/src/mlp_data.c | 105 + code/opus-1.1/src/opus.c | 329 + .../src/opus_decoder.c | 383 +- .../src/opus_encoder.c | 1199 +- code/opus-1.1/src/opus_multistream.c | 92 + code/opus-1.1/src/opus_multistream_decoder.c | 537 + code/opus-1.1/src/opus_multistream_encoder.c | 1174 ++ .../src/opus_private.h | 54 +- .../src/repacketizer.c | 197 +- code/opus-1.1/src/tansig_table.h | 45 + code/opusfile-0.2/src/info.c | 286 - code/opusfile-0.2/src/stream.c | 184 - .../include/opusfile.h | 556 +- .../{opusfile-0.2 => opusfile-0.5}/src/http.c | 664 +- code/opusfile-0.5/src/info.c | 683 + .../src/internal.c | 4 + .../src/internal.h | 40 +- .../src/opusfile.c | 805 +- code/opusfile-0.5/src/stream.c | 366 + code/opusfile-0.5/src/wincerts.c | 171 + code/opusfile-0.5/src/winerrno.h | 90 + code/qcommon/common.c | 4 +- code/qcommon/files.c | 1 + code/qcommon/q_shared.h | 2 +- code/renderercommon/tr_image_jpg.c | 4 +- code/renderercommon/tr_types.h | 1 + code/renderergl1/tr_bsp.c | 4 +- code/renderergl1/tr_image.c | 1 - code/renderergl1/tr_shader.c | 9 +- code/renderergl1/tr_surface.c | 2 + code/renderergl2/glsl/calclevels4x_fp.glsl | 9 +- code/renderergl2/glsl/generic_fp.glsl | 2 +- code/renderergl2/glsl/lightall_fp.glsl | 161 +- code/renderergl2/glsl/lightall_vp.glsl | 8 - code/renderergl2/glsl/shadowmask_fp.glsl | 9 +- code/renderergl2/glsl/tonemap_fp.glsl | 9 + code/renderergl2/tr_animation.c | 3 +- code/renderergl2/tr_bsp.c | 131 +- code/renderergl2/tr_extensions.c | 49 +- code/renderergl2/tr_glsl.c | 27 +- code/renderergl2/tr_image.c | 166 +- code/renderergl2/tr_init.c | 20 +- code/renderergl2/tr_local.h | 28 +- code/renderergl2/tr_main.c | 7 +- code/renderergl2/tr_shade.c | 46 +- code/renderergl2/tr_shader.c | 172 +- code/renderergl2/tr_sky.c | 2 +- code/renderergl2/tr_surface.c | 2 + code/renderergl2/tr_world.c | 45 +- code/server/sv_ccmds.c | 42 +- code/server/sv_client.c | 2 +- code/server/sv_init.c | 13 +- code/sys/sys_main.c | 2 + opengl2-readme.txt | 76 +- 393 files changed, 81384 insertions(+), 9113 deletions(-) delete mode 100644 code/SDL12/include/SDL_config_amiga.h rename code/{libcurl => libcurl-7.35.0}/curl/curl.h (53%) create mode 100644 code/libcurl-7.35.0/curl/curlbuild.h create mode 100644 code/libcurl-7.35.0/curl/curlrules.h rename code/{libcurl => libcurl-7.35.0}/curl/curlver.h (75%) rename code/{libcurl => libcurl-7.35.0}/curl/easy.h (76%) rename code/{libcurl => libcurl-7.35.0}/curl/mprintf.h (77%) rename code/{libcurl => libcurl-7.35.0}/curl/multi.h (75%) rename code/{libcurl => libcurl-7.35.0}/curl/stdcheaders.h (74%) create mode 100644 code/libcurl-7.35.0/curl/typecheck-gcc.h delete mode 100644 code/libcurl/curl/types.h rename code/{libogg-1.3.0 => libogg-1.3.1}/include/ogg/config_types.h (92%) rename code/{libogg-1.3.0 => libogg-1.3.1}/include/ogg/ogg.h (100%) rename code/{libogg-1.3.0 => libogg-1.3.1}/include/ogg/os_types.h (100%) rename code/{libogg-1.3.0 => libogg-1.3.1}/src/bitwise.c (100%) rename code/{libogg-1.3.0 => libogg-1.3.1}/src/framing.c (98%) delete mode 100755 code/libs/win32/libSDL.la create mode 100644 code/libvorbis-1.3.4/include/vorbis/codec.h create mode 100644 code/libvorbis-1.3.4/include/vorbis/vorbisenc.h create mode 100644 code/libvorbis-1.3.4/include/vorbis/vorbisfile.h create mode 100644 code/libvorbis-1.3.4/lib/analysis.c create mode 100644 code/libvorbis-1.3.4/lib/backends.h create mode 100644 code/libvorbis-1.3.4/lib/bitrate.c create mode 100644 code/libvorbis-1.3.4/lib/bitrate.h create mode 100644 code/libvorbis-1.3.4/lib/block.c create mode 100644 code/libvorbis-1.3.4/lib/books/coupled/res_books_51.h create mode 100644 code/libvorbis-1.3.4/lib/books/coupled/res_books_stereo.h create mode 100644 code/libvorbis-1.3.4/lib/books/floor/floor_books.h create mode 100644 code/libvorbis-1.3.4/lib/books/uncoupled/res_books_uncoupled.h create mode 100644 code/libvorbis-1.3.4/lib/codebook.c create mode 100644 code/libvorbis-1.3.4/lib/codebook.h create mode 100644 code/libvorbis-1.3.4/lib/codec_internal.h create mode 100644 code/libvorbis-1.3.4/lib/envelope.c create mode 100644 code/libvorbis-1.3.4/lib/envelope.h create mode 100644 code/libvorbis-1.3.4/lib/floor0.c create mode 100644 code/libvorbis-1.3.4/lib/floor1.c create mode 100644 code/libvorbis-1.3.4/lib/highlevel.h create mode 100644 code/libvorbis-1.3.4/lib/info.c create mode 100644 code/libvorbis-1.3.4/lib/lookup.c create mode 100644 code/libvorbis-1.3.4/lib/lookup.h create mode 100644 code/libvorbis-1.3.4/lib/lookup_data.h create mode 100644 code/libvorbis-1.3.4/lib/lpc.c create mode 100644 code/libvorbis-1.3.4/lib/lpc.h create mode 100644 code/libvorbis-1.3.4/lib/lsp.c create mode 100644 code/libvorbis-1.3.4/lib/lsp.h create mode 100644 code/libvorbis-1.3.4/lib/mapping0.c create mode 100644 code/libvorbis-1.3.4/lib/masking.h create mode 100644 code/libvorbis-1.3.4/lib/mdct.c create mode 100644 code/libvorbis-1.3.4/lib/mdct.h create mode 100644 code/libvorbis-1.3.4/lib/misc.h create mode 100644 code/libvorbis-1.3.4/lib/modes/floor_all.h create mode 100644 code/libvorbis-1.3.4/lib/modes/psych_11.h create mode 100644 code/libvorbis-1.3.4/lib/modes/psych_16.h create mode 100644 code/libvorbis-1.3.4/lib/modes/psych_44.h create mode 100644 code/libvorbis-1.3.4/lib/modes/psych_8.h create mode 100644 code/libvorbis-1.3.4/lib/modes/residue_16.h create mode 100644 code/libvorbis-1.3.4/lib/modes/residue_44.h create mode 100644 code/libvorbis-1.3.4/lib/modes/residue_44p51.h create mode 100644 code/libvorbis-1.3.4/lib/modes/residue_44u.h create mode 100644 code/libvorbis-1.3.4/lib/modes/residue_8.h create mode 100644 code/libvorbis-1.3.4/lib/modes/setup_11.h create mode 100644 code/libvorbis-1.3.4/lib/modes/setup_16.h create mode 100644 code/libvorbis-1.3.4/lib/modes/setup_22.h create mode 100644 code/libvorbis-1.3.4/lib/modes/setup_32.h create mode 100644 code/libvorbis-1.3.4/lib/modes/setup_44.h create mode 100644 code/libvorbis-1.3.4/lib/modes/setup_44p51.h create mode 100644 code/libvorbis-1.3.4/lib/modes/setup_44u.h create mode 100644 code/libvorbis-1.3.4/lib/modes/setup_8.h create mode 100644 code/libvorbis-1.3.4/lib/modes/setup_X.h create mode 100644 code/libvorbis-1.3.4/lib/os.h create mode 100644 code/libvorbis-1.3.4/lib/psy.c create mode 100644 code/libvorbis-1.3.4/lib/psy.h create mode 100644 code/libvorbis-1.3.4/lib/registry.c create mode 100644 code/libvorbis-1.3.4/lib/registry.h create mode 100644 code/libvorbis-1.3.4/lib/res0.c create mode 100644 code/libvorbis-1.3.4/lib/scales.h create mode 100644 code/libvorbis-1.3.4/lib/sharedbook.c create mode 100644 code/libvorbis-1.3.4/lib/smallft.c create mode 100644 code/libvorbis-1.3.4/lib/smallft.h create mode 100644 code/libvorbis-1.3.4/lib/synthesis.c create mode 100644 code/libvorbis-1.3.4/lib/vorbisenc.c create mode 100644 code/libvorbis-1.3.4/lib/vorbisfile.c create mode 100644 code/libvorbis-1.3.4/lib/window.c create mode 100644 code/libvorbis-1.3.4/lib/window.h delete mode 100644 code/opus-1.0.2/celt/celt.c delete mode 100644 code/opus-1.0.2/celt/celt_lpc.c delete mode 100644 code/opus-1.0.2/celt/cwrs.c delete mode 100644 code/opus-1.0.2/src/opus_multistream.c rename code/{opus-1.0.2 => opus-1.1}/celt/_kiss_fft_guts.h (97%) rename code/{opus-1.0.2 => opus-1.1}/celt/arch.h (94%) create mode 100644 code/opus-1.1/celt/arm/arm2gnu.pl create mode 100644 code/opus-1.1/celt/arm/arm_celt_map.c create mode 100644 code/opus-1.1/celt/arm/armcpu.c create mode 100644 code/opus-1.1/celt/arm/armcpu.h rename code/{opus-1.0.2/src/opus.c => opus-1.1/celt/arm/armopts.s.in} (75%) create mode 100644 code/opus-1.1/celt/arm/celt_pitch_xcorr_arm.s create mode 100644 code/opus-1.1/celt/arm/fixed_armv4.h create mode 100644 code/opus-1.1/celt/arm/fixed_armv5e.h create mode 100644 code/opus-1.1/celt/arm/kiss_fft_armv4.h create mode 100644 code/opus-1.1/celt/arm/kiss_fft_armv5e.h create mode 100644 code/opus-1.1/celt/arm/pitch_arm.h rename code/{opus-1.0.2 => opus-1.1}/celt/bands.c (54%) rename code/{opus-1.0.2 => opus-1.1}/celt/bands.h (72%) create mode 100644 code/opus-1.1/celt/celt.c rename code/{opus-1.0.2 => opus-1.1}/celt/celt.h (53%) create mode 100644 code/opus-1.1/celt/celt_decoder.c create mode 100644 code/opus-1.1/celt/celt_encoder.c create mode 100644 code/opus-1.1/celt/celt_lpc.c rename code/{opus-1.0.2 => opus-1.1}/celt/celt_lpc.h (93%) rename code/{opus-1.0.2/celt/pitch.h => opus-1.1/celt/cpu_support.h} (68%) create mode 100644 code/opus-1.1/celt/cwrs.c rename code/{opus-1.0.2 => opus-1.1}/celt/cwrs.h (100%) rename code/{opus-1.0.2 => opus-1.1}/celt/ecintrin.h (97%) rename code/{opus-1.0.2 => opus-1.1}/celt/entcode.c (100%) rename code/{opus-1.0.2 => opus-1.1}/celt/entcode.h (94%) rename code/{opus-1.0.2 => opus-1.1}/celt/entdec.c (98%) rename code/{opus-1.0.2 => opus-1.1}/celt/entdec.h (100%) rename code/{opus-1.0.2 => opus-1.1}/celt/entenc.c (100%) rename code/{opus-1.0.2 => opus-1.1}/celt/entenc.h (100%) rename code/{opus-1.0.2 => opus-1.1}/celt/fixed_debug.h (90%) rename code/{opus-1.0.2 => opus-1.1}/celt/fixed_generic.h (95%) rename code/{opus-1.0.2 => opus-1.1}/celt/float_cast.h (97%) rename code/{opus-1.0.2 => opus-1.1}/celt/kiss_fft.c (99%) rename code/{opus-1.0.2 => opus-1.1}/celt/kiss_fft.h (100%) rename code/{opus-1.0.2 => opus-1.1}/celt/laplace.c (100%) rename code/{opus-1.0.2 => opus-1.1}/celt/laplace.h (100%) rename code/{opus-1.0.2 => opus-1.1}/celt/mathops.c (98%) rename code/{opus-1.0.2 => opus-1.1}/celt/mathops.h (82%) rename code/{opus-1.0.2 => opus-1.1}/celt/mdct.c (80%) rename code/{opus-1.0.2 => opus-1.1}/celt/mdct.h (100%) rename code/{opus-1.0.2 => opus-1.1}/celt/mfrngcod.h (100%) rename code/{opus-1.0.2 => opus-1.1}/celt/modes.c (98%) rename code/{opus-1.0.2 => opus-1.1}/celt/modes.h (100%) rename code/{opus-1.0.2 => opus-1.1}/celt/opus_custom_demo.c (100%) rename code/{opus-1.0.2 => opus-1.1}/celt/os_support.h (93%) rename code/{opus-1.0.2 => opus-1.1}/celt/pitch.c (69%) create mode 100644 code/opus-1.1/celt/pitch.h rename code/{opus-1.0.2 => opus-1.1}/celt/quant_bands.c (94%) rename code/{opus-1.0.2 => opus-1.1}/celt/quant_bands.h (94%) rename code/{opus-1.0.2 => opus-1.1}/celt/rate.c (98%) rename code/{opus-1.0.2 => opus-1.1}/celt/rate.h (92%) rename code/{opus-1.0.2 => opus-1.1}/celt/stack_alloc.h (83%) rename code/{opus-1.0.2 => opus-1.1}/celt/static_modes_fixed.h (100%) rename code/{opus-1.0.2 => opus-1.1}/celt/static_modes_float.h (100%) rename code/{opus-1.0.2 => opus-1.1}/celt/vq.c (100%) rename code/{opus-1.0.2 => opus-1.1}/celt/vq.h (89%) create mode 100644 code/opus-1.1/celt/x86/pitch_sse.h rename code/{opus-1.0.2 => opus-1.1}/include/opus.h (90%) rename code/{opus-1.0.2 => opus-1.1}/include/opus_custom.h (97%) rename code/{opus-1.0.2 => opus-1.1}/include/opus_defines.h (88%) rename code/{opus-1.0.2 => opus-1.1}/include/opus_multistream.h (97%) rename code/{opus-1.0.2 => opus-1.1}/include/opus_types.h (100%) rename code/{opus-1.0.2 => opus-1.1}/silk/A2NLSF.c (97%) rename code/{opus-1.0.2 => opus-1.1}/silk/API.h (98%) rename code/{opus-1.0.2 => opus-1.1}/silk/CNG.c (97%) rename code/{opus-1.0.2 => opus-1.1}/silk/HP_variable_cutoff.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/Inlines.h (93%) rename code/{opus-1.0.2 => opus-1.1}/silk/LPC_analysis_filter.c (89%) rename code/{opus-1.0.2 => opus-1.1}/silk/LPC_inv_pred_gain.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/LP_variable_cutoff.c (98%) rename code/{opus-1.0.2 => opus-1.1}/silk/MacroCount.h (70%) rename code/{opus-1.0.2 => opus-1.1}/silk/MacroDebug.h (84%) rename code/{opus-1.0.2 => opus-1.1}/silk/NLSF2A.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/NLSF_VQ.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/NLSF_VQ_weights_laroia.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/NLSF_decode.c (97%) rename code/{opus-1.0.2 => opus-1.1}/silk/NLSF_del_dec_quant.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/NLSF_encode.c (93%) rename code/{opus-1.0.2 => opus-1.1}/silk/NLSF_stabilize.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/NLSF_unpack.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/NSQ.c (97%) rename code/{opus-1.0.2 => opus-1.1}/silk/NSQ_del_dec.c (97%) rename code/{opus-1.0.2 => opus-1.1}/silk/PLC.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/PLC.h (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/SigProc_FIX.h (96%) rename code/{opus-1.0.2 => opus-1.1}/silk/VAD.c (86%) rename code/{opus-1.0.2 => opus-1.1}/silk/VQ_WMat_EC.c (90%) rename code/{opus-1.0.2 => opus-1.1}/silk/ana_filt_bank_1.c (99%) create mode 100644 code/opus-1.1/silk/arm/SigProc_FIX_armv4.h create mode 100644 code/opus-1.1/silk/arm/SigProc_FIX_armv5e.h create mode 100644 code/opus-1.1/silk/arm/macros_armv4.h create mode 100644 code/opus-1.1/silk/arm/macros_armv5e.h rename code/{opus-1.0.2 => opus-1.1}/silk/biquad_alt.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/bwexpander.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/bwexpander_32.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/check_control_input.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/code_signs.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/control.h (97%) rename code/{opus-1.0.2 => opus-1.1}/silk/control_SNR.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/control_audio_bandwidth.c (97%) rename code/{opus-1.0.2 => opus-1.1}/silk/control_codec.c (92%) rename code/{opus-1.0.2 => opus-1.1}/silk/debug.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/debug.h (98%) rename code/{opus-1.0.2 => opus-1.1}/silk/dec_API.c (97%) rename code/{opus-1.0.2 => opus-1.1}/silk/decode_core.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/decode_frame.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/decode_indices.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/decode_parameters.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/decode_pitch.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/decode_pulses.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/decoder_set_fs.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/define.h (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/enc_API.c (94%) rename code/{opus-1.0.2 => opus-1.1}/silk/encode_indices.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/encode_pulses.c (94%) rename code/{opus-1.0.2 => opus-1.1}/silk/errors.h (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/LTP_analysis_filter_FIX.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/LTP_scale_ctrl_FIX.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/apply_sine_window_FIX.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/autocorr_FIX.c (64%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/burg_modified_FIX.c (94%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/corrMatrix_FIX.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/encode_frame_FIX.c (95%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/find_LPC_FIX.c (96%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/find_LTP_FIX.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/find_pitch_lags_FIX.c (83%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/find_pred_coefs_FIX.c (92%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/k2a_FIX.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/k2a_Q16_FIX.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/main_FIX.h (96%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/noise_shape_analysis_FIX.c (97%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/pitch_analysis_core_FIX.c (63%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/prefilter_FIX.c (96%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/process_gains_FIX.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/regularize_correlations_FIX.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/residual_energy16_FIX.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/residual_energy_FIX.c (94%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/schur64_FIX.c (87%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/schur_FIX.c (89%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/solve_LS_FIX.c (95%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/structs_FIX.h (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/vector_ops_FIX.c (80%) rename code/{opus-1.0.2 => opus-1.1}/silk/fixed/warped_autocorrelation_FIX.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/LPC_analysis_filter_FLP.c (97%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/LPC_inv_pred_gain_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/LTP_analysis_filter_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/LTP_scale_ctrl_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/SigProc_FLP.h (95%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/apply_sine_window_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/autocorrelation_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/burg_modified_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/bwexpander_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/corrMatrix_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/encode_frame_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/energy_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/find_LPC_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/find_LTP_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/find_pitch_lags_FLP.c (96%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/find_pred_coefs_FLP.c (97%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/inner_product_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/k2a_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/levinsondurbin_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/main_FLP.h (97%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/noise_shape_analysis_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/pitch_analysis_core_FLP.c (87%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/prefilter_FLP.c (98%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/process_gains_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/regularize_correlations_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/residual_energy_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/scale_copy_vector_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/scale_vector_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/schur_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/solve_LS_FLP.c (96%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/sort_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/structs_FLP.h (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/warped_autocorrelation_FLP.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/float/wrappers_FLP.c (97%) rename code/{opus-1.0.2 => opus-1.1}/silk/gain_quant.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/init_decoder.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/init_encoder.c (89%) rename code/{opus-1.0.2 => opus-1.1}/silk/inner_prod_aligned.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/interpolate.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/lin2log.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/log2lin.c (96%) rename code/{opus-1.0.2 => opus-1.1}/silk/macros.h (76%) rename code/{opus-1.0.2 => opus-1.1}/silk/main.h (98%) rename code/{opus-1.0.2 => opus-1.1}/silk/pitch_est_defines.h (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/pitch_est_tables.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/process_NLSFs.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/quant_LTP_gains.c (80%) rename code/{opus-1.0.2 => opus-1.1}/silk/resampler.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/resampler_down2.c (96%) rename code/{opus-1.0.2 => opus-1.1}/silk/resampler_down2_3.c (96%) rename code/{opus-1.0.2 => opus-1.1}/silk/resampler_private.h (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/resampler_private_AR2.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/resampler_private_IIR_FIR.c (90%) rename code/{opus-1.0.2 => opus-1.1}/silk/resampler_private_down_FIR.c (96%) rename code/{opus-1.0.2 => opus-1.1}/silk/resampler_private_up2_HQ.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/resampler_rom.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/resampler_rom.h (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/resampler_structs.h (93%) rename code/{opus-1.0.2 => opus-1.1}/silk/shell_coder.c (98%) rename code/{opus-1.0.2 => opus-1.1}/silk/sigm_Q15.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/sort.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/stereo_LR_to_MS.c (96%) rename code/{opus-1.0.2 => opus-1.1}/silk/stereo_MS_to_LR.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/stereo_decode_pred.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/stereo_encode_pred.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/stereo_find_predictor.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/stereo_quant_pred.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/structs.h (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/sum_sqr_shift.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/table_LSF_cos.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/tables.h (98%) rename code/{opus-1.0.2 => opus-1.1}/silk/tables_LTP.c (87%) rename code/{opus-1.0.2 => opus-1.1}/silk/tables_NLSF_CB_NB_MB.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/tables_NLSF_CB_WB.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/tables_gain.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/tables_other.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/tables_pitch_lag.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/tables_pulses_per_block.c (99%) rename code/{opus-1.0.2 => opus-1.1}/silk/tuning_parameters.h (98%) rename code/{opus-1.0.2 => opus-1.1}/silk/typedef.h (96%) create mode 100644 code/opus-1.1/src/analysis.c create mode 100644 code/opus-1.1/src/analysis.h create mode 100644 code/opus-1.1/src/mlp.c create mode 100644 code/opus-1.1/src/mlp.h create mode 100644 code/opus-1.1/src/mlp_data.c create mode 100644 code/opus-1.1/src/opus.c rename code/{opus-1.0.2 => opus-1.1}/src/opus_decoder.c (79%) rename code/{opus-1.0.2 => opus-1.1}/src/opus_encoder.c (59%) create mode 100644 code/opus-1.1/src/opus_multistream.c create mode 100644 code/opus-1.1/src/opus_multistream_decoder.c create mode 100644 code/opus-1.1/src/opus_multistream_encoder.c rename code/{opus-1.0.2 => opus-1.1}/src/opus_private.h (59%) rename code/{opus-1.0.2 => opus-1.1}/src/repacketizer.c (50%) create mode 100644 code/opus-1.1/src/tansig_table.h delete mode 100644 code/opusfile-0.2/src/info.c delete mode 100644 code/opusfile-0.2/src/stream.c rename code/{opusfile-0.2 => opusfile-0.5}/include/opusfile.h (76%) rename code/{opusfile-0.2 => opusfile-0.5}/src/http.c (86%) create mode 100644 code/opusfile-0.5/src/info.c rename code/{opusfile-0.2 => opusfile-0.5}/src/internal.c (96%) rename code/{opusfile-0.2 => opusfile-0.5}/src/internal.h (85%) rename code/{opusfile-0.2 => opusfile-0.5}/src/opusfile.c (86%) create mode 100644 code/opusfile-0.5/src/stream.c create mode 100644 code/opusfile-0.5/src/wincerts.c create mode 100644 code/opusfile-0.5/src/winerrno.h diff --git a/.gitignore b/.gitignore index b1758f67..15a84aa7 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,7 @@ profile !default.mode1v3 !default.mode2v3 !default.perspectivev3 + +# Microsoft Visual Studio +#################### +*.sdf \ No newline at end of file diff --git a/Makefile b/Makefile index 3dafadb2..e11392c2 100644 --- a/Makefile +++ b/Makefile @@ -195,6 +195,10 @@ ifndef USE_INTERNAL_OGG USE_INTERNAL_OGG=1 endif +ifndef USE_INTERNAL_VORBIS +USE_INTERNAL_VORBIS=1 +endif + ifndef USE_INTERNAL_OPUS USE_INTERNAL_OPUS=1 endif @@ -240,9 +244,10 @@ UIDIR=$(MOUNT_DIR)/ui Q3UIDIR=$(MOUNT_DIR)/ui JPDIR=$(MOUNT_DIR)/jpeg-8c SPEEXDIR=$(MOUNT_DIR)/libspeex -OGGDIR=$(MOUNT_DIR)/libogg-1.3.0 -OPUSDIR=$(MOUNT_DIR)/opus-1.0.2 -OPUSFILEDIR=$(MOUNT_DIR)/opusfile-0.2 +OGGDIR=$(MOUNT_DIR)/libogg-1.3.1 +VORBISDIR=$(MOUNT_DIR)/libvorbis-1.3.4 +OPUSDIR=$(MOUNT_DIR)/opus-1.1 +OPUSFILEDIR=$(MOUNT_DIR)/opusfile-0.5 ZDIR=$(MOUNT_DIR)/zlib Q3ASMDIR=$(MOUNT_DIR)/tools/asm LBURGDIR=$(MOUNT_DIR)/tools/lcc/lburg @@ -322,15 +327,13 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu")) ifeq ($(ARCH),x86_64) OPTIMIZEVM = -O3 -fomit-frame-pointer -funroll-loops \ - -falign-loops=2 -falign-jumps=2 -falign-functions=2 \ - -fstrength-reduce + -falign-functions=2 -fstrength-reduce OPTIMIZE = $(OPTIMIZEVM) -ffast-math HAVE_VM_COMPILED = true else ifeq ($(ARCH),x86) OPTIMIZEVM = -O3 -march=i586 -fomit-frame-pointer \ - -funroll-loops -falign-loops=2 -falign-jumps=2 \ - -falign-functions=2 -fstrength-reduce + -funroll-loops -falign-functions=2 -fstrength-reduce OPTIMIZE = $(OPTIMIZEVM) -ffast-math HAVE_VM_COMPILED=true else @@ -480,7 +483,6 @@ ifeq ($(PLATFORM),darwin) $(LIBSDIR)/macosx/libSDL-1.2.0.dylib RENDERER_LIBS += -framework OpenGL $(LIBSDIR)/macosx/libSDL-1.2.0.dylib - OPTIMIZEVM += -falign-loops=16 OPTIMIZE = $(OPTIMIZEVM) -ffast-math SHLIBEXT=dylib @@ -534,6 +536,10 @@ ifeq ($(PLATFORM),mingw32) endif endif + ifeq ($(CC),) + $(error Cannot find a suitable cross compiler for $(PLATFORM)) + endif + BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ -DUSE_ICON -DREACTION @@ -551,15 +557,13 @@ ifeq ($(PLATFORM),mingw32) ifeq ($(ARCH),x86_64) OPTIMIZEVM = -O3 -fno-omit-frame-pointer \ - -falign-loops=2 -funroll-loops -falign-jumps=2 -falign-functions=2 \ - -fstrength-reduce + -funroll-loops -falign-functions=2 -fstrength-reduce OPTIMIZE = $(OPTIMIZEVM) --fast-math HAVE_VM_COMPILED = true endif ifeq ($(ARCH),x86) OPTIMIZEVM = -O3 -march=i586 -fno-omit-frame-pointer \ - -falign-loops=2 -funroll-loops -falign-jumps=2 -falign-functions=2 \ - -fstrength-reduce + -funroll-loops -falign-functions=2 -fstrength-reduce OPTIMIZE = $(OPTIMIZEVM) -ffast-math HAVE_VM_COMPILED = true endif @@ -619,9 +623,9 @@ ifeq ($(PLATFORM),mingw32) $(LIBSDIR)/win32/libSDL.dll.a SDLDLL=SDL.dll else - CLIENT_LIBS += $(LIBSDIR)/win64/libSDLmain.a \ + CLIENT_LIBS += $(LIBSDIR)/win64/libSDL64main.a \ $(LIBSDIR)/win64/libSDL64.dll.a - RENDERER_LIBS += $(LIBSDIR)/win64/libSDLmain.a \ + RENDERER_LIBS += $(LIBSDIR)/win64/libSDL64main.a \ $(LIBSDIR)/win64/libSDL64.dll.a SDLDLL=SDL64.dll endif @@ -704,15 +708,13 @@ ifeq ($(PLATFORM),openbsd) ifeq ($(ARCH),x86_64) OPTIMIZEVM = -O3 -fomit-frame-pointer -funroll-loops \ - -falign-loops=2 -falign-jumps=2 -falign-functions=2 \ - -fstrength-reduce + -falign-functions=2 -fstrength-reduce OPTIMIZE = $(OPTIMIZEVM) -ffast-math HAVE_VM_COMPILED = true else ifeq ($(ARCH),x86) OPTIMIZEVM = -O3 -march=i586 -fomit-frame-pointer \ - -funroll-loops -falign-loops=2 -falign-jumps=2 \ - -falign-functions=2 -fstrength-reduce + -funroll-loops -falign-functions=2 -fstrength-reduce OPTIMIZE = $(OPTIMIZEVM) -ffast-math HAVE_VM_COMPILED=true else @@ -850,7 +852,6 @@ ifeq ($(PLATFORM),sunos) else ifeq ($(ARCH),x86) OPTIMIZEVM += -march=i586 -fomit-frame-pointer \ - -falign-loops=2 -falign-jumps=2 \ -falign-functions=2 -fstrength-reduce HAVE_VM_COMPILED=true BASE_CFLAGS += -m32 @@ -985,7 +986,6 @@ endif ifeq ($(USE_CODEC_VORBIS),1) CLIENT_CFLAGS += -DUSE_CODEC_VORBIS - CLIENT_LIBS += -lvorbisfile -lvorbis NEED_OGG=1 endif @@ -1011,6 +1011,15 @@ ifeq ($(NEED_OGG),1) endif endif +ifeq ($(USE_CODEC_VORBIS),1) + ifeq ($(USE_INTERNAL_VORBIS),1) + CLIENT_CFLAGS += -I$(VORBISDIR)/include -I$(VORBISDIR)/lib + + else + CLIENT_LIBS += -lvorbisfile -lvorbis + endif +endif + ifeq ($(USE_RENDERER_DLOPEN),1) CLIENT_CFLAGS += -DUSE_RENDERER_DLOPEN endif @@ -1276,6 +1285,7 @@ makedirs: @if [ ! -d $(B) ];then $(MKDIR) $(B);fi @if [ ! -d $(B)/client ];then $(MKDIR) $(B)/client;fi @if [ ! -d $(B)/client/opus ];then $(MKDIR) $(B)/client/opus;fi + @if [ ! -d $(B)/client/vorbis ];then $(MKDIR) $(B)/client/vorbis;fi @if [ ! -d $(B)/renderergl1 ];then $(MKDIR) $(B)/renderergl1;fi @if [ ! -d $(B)/renderergl2 ];then $(MKDIR) $(B)/renderergl2;fi @if [ ! -d $(B)/renderergl2/glsl ];then $(MKDIR) $(B)/renderergl2/glsl;fi @@ -1819,10 +1829,15 @@ endif ifeq ($(USE_CODEC_OPUS),1) ifeq ($(USE_INTERNAL_OPUS),1) Q3OBJ += \ + $(B)/client/opus/analysis.o \ + $(B)/client/opus/mlp.o \ + $(B)/client/opus/mlp_data.o \ $(B)/client/opus/opus.o \ $(B)/client/opus/opus_decoder.o \ $(B)/client/opus/opus_encoder.o \ $(B)/client/opus/opus_multistream.o \ + $(B)/client/opus/opus_multistream_encoder.o \ + $(B)/client/opus/opus_multistream_decoder.o \ $(B)/client/opus/repacketizer.o \ \ $(B)/client/opus/bands.o \ @@ -1837,6 +1852,8 @@ Q3OBJ += \ $(B)/client/opus/mdct.o \ $(B)/client/opus/modes.o \ $(B)/client/opus/pitch.o \ + $(B)/client/opus/celt_encoder.o \ + $(B)/client/opus/celt_decoder.o \ $(B)/client/opus/celt_lpc.o \ $(B)/client/opus/quant_bands.o \ $(B)/client/opus/rate.o \ @@ -1955,7 +1972,8 @@ Q3OBJ += \ $(B)/client/info.o \ $(B)/client/internal.o \ $(B)/client/opusfile.o \ - $(B)/client/stream.o + $(B)/client/stream.o \ + $(B)/client/wincerts.o endif endif @@ -1967,6 +1985,33 @@ Q3OBJ += \ endif endif +ifeq ($(USE_CODEC_VORBIS),1) +ifeq ($(USE_INTERNAL_VORBIS),1) +Q3OBJ += \ + $(B)/client/vorbis/analysis.o \ + $(B)/client/vorbis/bitrate.o \ + $(B)/client/vorbis/block.o \ + $(B)/client/vorbis/codebook.o \ + $(B)/client/vorbis/envelope.o \ + $(B)/client/vorbis/floor0.o \ + $(B)/client/vorbis/floor1.o \ + $(B)/client/vorbis/info.o \ + $(B)/client/vorbis/lookup.o \ + $(B)/client/vorbis/lpc.o \ + $(B)/client/vorbis/lsp.o \ + $(B)/client/vorbis/mapping0.o \ + $(B)/client/vorbis/mdct.o \ + $(B)/client/vorbis/psy.o \ + $(B)/client/vorbis/registry.o \ + $(B)/client/vorbis/res0.o \ + $(B)/client/vorbis/smallft.o \ + $(B)/client/vorbis/sharedbook.o \ + $(B)/client/vorbis/synthesis.o \ + $(B)/client/vorbis/vorbisfile.o \ + $(B)/client/vorbis/window.o +endif +endif + ifeq ($(USE_INTERNAL_ZLIB),1) Q3OBJ += \ $(B)/client/adler32.o \ @@ -2470,6 +2515,9 @@ $(B)/client/%.o: $(SPEEXDIR)/%.c $(B)/client/%.o: $(OGGDIR)/src/%.c $(DO_CC) +$(B)/client/vorbis/%.o: $(VORBISDIR)/lib/%.c + $(DO_CC) + $(B)/client/opus/%.o: $(OPUSDIR)/src/%.c $(DO_CC) diff --git a/code/SDL12/include/SDL_config.h b/code/SDL12/include/SDL_config.h index a5081016..09ba38a7 100644 --- a/code/SDL12/include/SDL_config.h +++ b/code/SDL12/include/SDL_config.h @@ -1,6 +1,6 @@ /* SDL - Simple DirectMedia Layer - Copyright (C) 1997-2009 Sam Lantinga + Copyright (C) 1997-2012 Sam Lantinga This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/code/SDL12/include/SDL_config_amiga.h b/code/SDL12/include/SDL_config_amiga.h deleted file mode 100644 index 23e08619..00000000 --- a/code/SDL12/include/SDL_config_amiga.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - SDL - Simple DirectMedia Layer - Copyright (C) 1997-2006 Sam Lantinga - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - Sam Lantinga - slouken@libsdl.org -*/ - -#ifndef _SDL_config_amiga_h -#define _SDL_config_amiga_h - -#include "SDL_platform.h" - -/* This is a set of defines to configure the SDL features */ - -#define SDL_HAS_64BIT_TYPE 1 - -/* Useful headers */ -#define HAVE_SYS_TYPES_H 1 -#define HAVE_STDIO_H 1 -#define STDC_HEADERS 1 -#define HAVE_STRING_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_SIGNAL_H 1 - -/* C library functions */ -#define HAVE_MALLOC 1 -#define HAVE_CALLOC 1 -#define HAVE_REALLOC 1 -#define HAVE_FREE 1 -#define HAVE_ALLOCA 1 -#define HAVE_GETENV 1 -#define HAVE_PUTENV 1 -#define HAVE_MEMSET 1 -#define HAVE_MEMCPY 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MEMCMP 1 - -/* Enable various audio drivers */ -#define SDL_AUDIO_DRIVER_AHI 1 -#define SDL_AUDIO_DRIVER_DISK 1 -#define SDL_AUDIO_DRIVER_DUMMY 1 - -/* Enable various cdrom drivers */ -#define SDL_CDROM_DUMMY 1 - -/* Enable various input drivers */ -#define SDL_JOYSTICK_AMIGA 1 - -/* Enable various shared object loading systems */ -#define SDL_LOADSO_DUMMY 1 - -/* Enable various threading systems */ -#define SDL_THREAD_AMIGA 1 - -/* Enable various timer systems */ -#define SDL_TIMER_AMIGA 1 - -/* Enable various video drivers */ -#define SDL_VIDEO_DRIVER_CYBERGRAPHICS 1 -#define SDL_VIDEO_DRIVER_DUMMY 1 - -/* Enable OpenGL support */ -#define SDL_VIDEO_OPENGL 1 - -#endif /* _SDL_config_amiga_h */ diff --git a/code/SDL12/include/SDL_config_minimal.h b/code/SDL12/include/SDL_config_minimal.h index a08e190e..d10db7c6 100644 --- a/code/SDL12/include/SDL_config_minimal.h +++ b/code/SDL12/include/SDL_config_minimal.h @@ -27,11 +27,8 @@ /* This is the minimal configuration that can be used to build SDL */ -#include -#include #include -#if 0 typedef signed char int8_t; typedef unsigned char uint8_t; typedef signed short int16_t; @@ -40,7 +37,6 @@ typedef signed int int32_t; typedef unsigned int uint32_t; typedef unsigned int size_t; typedef unsigned long uintptr_t; -#endif /* Enable the dummy audio driver (src/audio/dummy/\*.c) */ #define SDL_AUDIO_DRIVER_DUMMY 1 diff --git a/code/cgame/cg_effects.c b/code/cgame/cg_effects.c index a86e0974..12703dec 100644 --- a/code/cgame/cg_effects.c +++ b/code/cgame/cg_effects.c @@ -614,7 +614,7 @@ void CG_Bleed(vec3_t origin, int entityNum) /* ================== -CG_LaunchGib +CG_LaunchExplode ================== */ void CG_LaunchGib(vec3_t origin, vec3_t velocity, qhandle_t hModel) @@ -767,7 +767,7 @@ void CG_LaunchExplode(vec3_t origin, vec3_t velocity, qhandle_t hModel) #define EXP_JUMP 150 /* =================== -CG_GibPlayer +CG_BigExplode Generated a bunch of gibs launching out from the bodies location =================== diff --git a/code/cgame/cg_localents.c b/code/cgame/cg_localents.c index 96fe6d96..202e7b1d 100644 --- a/code/cgame/cg_localents.c +++ b/code/cgame/cg_localents.c @@ -114,7 +114,7 @@ void CG_FreeLocalEntity(localEntity_t * le) =================== CG_AllocLocalEntity -Will allways succeed, even if it requires freeing an old active entity +Will always succeed, even if it requires freeing an old active entity =================== */ localEntity_t *CG_AllocLocalEntity(void) diff --git a/code/cgame/cg_players.c b/code/cgame/cg_players.c index aeafcb5c..082de6a9 100644 --- a/code/cgame/cg_players.c +++ b/code/cgame/cg_players.c @@ -228,7 +228,7 @@ CLIENT INFO ====================== CG_ParseAnimationFile -Read a configuration file containing animation coutns and rates +Read a configuration file containing animation counts and rates models/players/visor/animation.cfg, etc ====================== */ diff --git a/code/cgame/cg_view.c b/code/cgame/cg_view.c index 24f02d92..e316b8a1 100644 --- a/code/cgame/cg_view.c +++ b/code/cgame/cg_view.c @@ -385,7 +385,7 @@ static void CG_OffsetThirdPersonView(void) VectorCopy(trace.endpos, view); view[2] += (1.0 - trace.fraction) * 32; // try another trace to this position, because a tunnel may have the ceiling - // close enogh that this is poking out + // close enough that this is poking out CG_Trace(&trace, cg.refdef.vieworg, mins, maxs, view, cg.predictedPlayerState.clientNum, MASK_SOLID); diff --git a/code/client/cl_curl.h b/code/client/cl_curl.h index d1d08b4f..c91bcf82 100644 --- a/code/client/cl_curl.h +++ b/code/client/cl_curl.h @@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "../qcommon/qcommon.h" #ifdef USE_LOCAL_HEADERS - #include "../libcurl/curl/curl.h" + #include "../libcurl-7.35.0/curl/curl.h" #else #include #endif diff --git a/code/client/cl_main.c b/code/client/cl_main.c index d9946844..edeaf060 100644 --- a/code/client/cl_main.c +++ b/code/client/cl_main.c @@ -1457,6 +1457,7 @@ void CL_Disconnect( qboolean showMainMenu ) { // Remove pure paks FS_PureServerSetLoadedPaks("", ""); + FS_PureServerSetReferencedPaks( "", "" ); CL_ClearState (); diff --git a/code/client/cl_scrn.c b/code/client/cl_scrn.c index 095dc8ad..831d5ef7 100644 --- a/code/client/cl_scrn.c +++ b/code/client/cl_scrn.c @@ -481,7 +481,7 @@ void SCR_DrawScreenField( stereoFrame_t stereoFrame ) { // wide aspect ratio screens need to have the sides cleared // unless they are displaying game renderings - if ( uiFullscreen || (clc.state != CA_ACTIVE && clc.state != CA_CINEMATIC) ) { + if ( uiFullscreen || clc.state < CA_LOADING ) { if ( cls.glconfig.vidWidth * 480 > cls.glconfig.vidHeight * 640 ) { re.SetColor( g_color_table[0] ); re.DrawStretchPic( 0, 0, cls.glconfig.vidWidth, cls.glconfig.vidHeight, 0, 0, 0, 0, cls.whiteShader ); diff --git a/code/client/qal.c b/code/client/qal.c index 1f4ceb6b..1a384aeb 100644 --- a/code/client/qal.c +++ b/code/client/qal.c @@ -84,7 +84,7 @@ LPALBUFFERDATA qalBufferData; LPALGETBUFFERF qalGetBufferf; LPALGETBUFFERI qalGetBufferi; LPALDOPPLERFACTOR qalDopplerFactor; -LPALDOPPLERVELOCITY qalDopplerVelocity; +LPALSPEEDOFSOUND qalSpeedOfSound; LPALDISTANCEMODEL qalDistanceModel; LPALCCREATECONTEXT qalcCreateContext; @@ -243,7 +243,7 @@ qboolean QAL_Init(const char *libname) qalGetBufferf = GPA("alGetBufferf"); qalGetBufferi = GPA("alGetBufferi"); qalDopplerFactor = GPA("alDopplerFactor"); - qalDopplerVelocity = GPA("alDopplerVelocity"); + qalSpeedOfSound = GPA("alSpeedOfSound"); qalDistanceModel = GPA("alDistanceModel"); qalcCreateContext = GPA("alcCreateContext"); @@ -342,7 +342,7 @@ void QAL_Shutdown( void ) qalGetBufferf = NULL; qalGetBufferi = NULL; qalDopplerFactor = NULL; - qalDopplerVelocity = NULL; + qalSpeedOfSound = NULL; qalDistanceModel = NULL; qalcCreateContext = NULL; diff --git a/code/client/qal.h b/code/client/qal.h index 4c9d16fb..9964ff40 100644 --- a/code/client/qal.h +++ b/code/client/qal.h @@ -127,7 +127,6 @@ extern LPALGETBUFFERI qalGetBufferi; extern LPALGETBUFFER3I qalGetBuffer3i; extern LPALGETBUFFERIV qalGetBufferiv; extern LPALDOPPLERFACTOR qalDopplerFactor; -extern LPALDOPPLERVELOCITY qalDopplerVelocity; extern LPALSPEEDOFSOUND qalSpeedOfSound; extern LPALDISTANCEMODEL qalDistanceModel; @@ -262,7 +261,6 @@ extern LPALGETAUXILIARYEFFECTSLOTFV qalGetAuxiliaryEffectSlotfv; #define qalGetBuffer3i alGetBuffer3i #define qalGetBufferiv alGetBufferiv #define qalDopplerFactor alDopplerFactor -#define qalDopplerVelocity alDopplerVelocity #define qalSpeedOfSound alSpeedOfSound #define qalDistanceModel alDistanceModel diff --git a/code/client/snd_mix.c b/code/client/snd_mix.c index 38bd0aae..f4fa01a4 100644 --- a/code/client/snd_mix.c +++ b/code/client/snd_mix.c @@ -711,6 +711,10 @@ void S_PaintChannels( int endtime ) { ltime = s_paintedtime; sc = ch->thesfx; + if (sc->soundData==NULL || sc->soundLength==0) { + continue; + } + sampleOffset = ltime - ch->startSample; count = end - ltime; if ( sampleOffset + count > sc->soundLength ) { diff --git a/code/client/snd_openal.c b/code/client/snd_openal.c index e4e41a64..457e5acd 100644 --- a/code/client/snd_openal.c +++ b/code/client/snd_openal.c @@ -969,7 +969,7 @@ static void S_AL_SrcSetup(srcHandle_t src, sfxHandle_t sfx, alSrcPriority_t prio /* ================= -S_AL_NewLoopMaster +S_AL_SaveLoopPos Remove given source as loop master if it is the master and hand off master status to another source in this case. ================= */ @@ -2673,7 +2673,7 @@ void S_AL_Update( void ) } if(s_alDopplerSpeed->modified) { - qalDopplerVelocity(s_alDopplerSpeed->value); + qalSpeedOfSound(s_alDopplerSpeed->value); s_alDopplerSpeed->modified = qfalse; } @@ -3243,7 +3243,7 @@ qboolean S_AL_Init( soundInterface_t *si ) s_alGain = Cvar_Get( "s_alGain", "1.0", CVAR_ARCHIVE ); s_alSources = Cvar_Get( "s_alSources", "96", CVAR_ARCHIVE ); s_alDopplerFactor = Cvar_Get( "s_alDopplerFactor", "1.0", CVAR_ARCHIVE ); - s_alDopplerSpeed = Cvar_Get( "s_alDopplerSpeed", "2200", CVAR_ARCHIVE ); + s_alDopplerSpeed = Cvar_Get( "s_alDopplerSpeed", "13512", CVAR_ARCHIVE ); s_alMinDistance = Cvar_Get( "s_alMinDistance", "120", CVAR_CHEAT ); s_alMaxDistance = Cvar_Get("s_alMaxDistance", "1024", CVAR_CHEAT); s_alRolloff = Cvar_Get( "s_alRolloff", "2", CVAR_CHEAT); @@ -3259,7 +3259,9 @@ qboolean S_AL_Init( soundInterface_t *si ) if( !QAL_Init( s_alDriver->string ) ) { Com_Printf( "Failed to load library: \"%s\".\n", s_alDriver->string ); - return qfalse; + if( !Q_stricmp( s_alDriver->string, ALDRIVER_DEFAULT ) || !QAL_Init( ALDRIVER_DEFAULT ) ) { + return qfalse; + } } device = s_alDevice->string; @@ -3362,7 +3364,7 @@ qboolean S_AL_Init( soundInterface_t *si ) // Set up OpenAL parameters (doppler, etc) qalDistanceModel(AL_INVERSE_DISTANCE_CLAMPED); qalDopplerFactor( s_alDopplerFactor->value ); - qalDopplerVelocity( s_alDopplerSpeed->value ); + qalSpeedOfSound( s_alDopplerSpeed->value ); #ifdef USE_VOIP diff --git a/code/game/ai_dmq3.c b/code/game/ai_dmq3.c index a84be428..a03df1a4 100644 --- a/code/game/ai_dmq3.c +++ b/code/game/ai_dmq3.c @@ -4491,6 +4491,9 @@ open, which buttons to activate etc. */ void BotAIBlocked(bot_state_t * bs, bot_moveresult_t * moveresult, int activate) { +#ifdef OBSTACLEDEBUG + char netname[MAX_NETNAME]; +#endif int movetype, bspent; vec3_t hordir, sideward, angles, up = {0, 0, 1}; //vec3_t start, end, mins, maxs; diff --git a/code/game/ai_main.c b/code/game/ai_main.c index d4226bac..9ee29c91 100644 --- a/code/game/ai_main.c +++ b/code/game/ai_main.c @@ -1333,7 +1333,7 @@ int BotAIShutdownClient(int client, qboolean restart) } trap_BotFreeMoveState(bs->ms); - //free the goal state` + //free the goal state trap_BotFreeGoalState(bs->gs); //free the chat file trap_BotFreeChatState(bs->cs); diff --git a/code/game/bg_pmove.c b/code/game/bg_pmove.c index 7f7271d1..fff3b8fe 100644 --- a/code/game/bg_pmove.c +++ b/code/game/bg_pmove.c @@ -2690,7 +2690,7 @@ static void PM_DropTimers(void) PM_UpdateViewAngles This can be used as another entry point when only the viewangles -are being updated isntead of a full move +are being updated instead of a full move ================ */ void PM_UpdateViewAngles(playerState_t * ps, const usercmd_t * cmd) diff --git a/code/game/g_client.c b/code/game/g_client.c index ed257a2f..c0cf9fb7 100644 --- a/code/game/g_client.c +++ b/code/game/g_client.c @@ -935,7 +935,7 @@ team_t PickTeam(int ignoreClientNum) /* =========== -ClientCheckName +ClientCleanName ============ */ static void ClientCleanName(const char *in, char *out, int outSize) diff --git a/code/game/g_cmds.c b/code/game/g_cmds.c index 78db62b3..d50404d4 100644 --- a/code/game/g_cmds.c +++ b/code/game/g_cmds.c @@ -1037,7 +1037,7 @@ void Cmd_Kill_f(gentity_t * ent) /* ================= -BroadCastTeamChange +BroadcastTeamChange Let everyone know about a team change ================= @@ -2258,7 +2258,7 @@ void Cmd_CallVote_f(gentity_t * ent) trap_SendServerCommand(-1, va("print \"%s^7 called a vote.\n\"", ent->client->pers.netname)); - // start the voting, the caller autoamtically votes yes + // start the voting, the caller automatically votes yes level.voteTime = level.time; level.voteYes = 1; level.voteNo = 0; @@ -2441,7 +2441,7 @@ void Cmd_CallTeamVote_f(gentity_t * ent) va("print \"%s^7 called a team vote.\n\"", ent->client->pers.netname)); } - // start the voting, the caller autoamtically votes yes + // start the voting, the caller automatically votes yes level.teamVoteTime[cs_offset] = level.time; level.teamVoteYes[cs_offset] = 1; level.teamVoteNo[cs_offset] = 0; diff --git a/code/game/g_items.c b/code/game/g_items.c index 89f9b2e6..5216b4b8 100644 --- a/code/game/g_items.c +++ b/code/game/g_items.c @@ -989,7 +989,7 @@ void FinishSpawningItem(gentity_t * ent) ent->r.contents = CONTENTS_TRIGGER; ent->touch = Touch_Item; - // useing an item causes it to respawn + // using an item causes it to respawn ent->use = Use_Item; if (ent->spawnflags & 1) { diff --git a/code/game/g_syscalls.c b/code/game/g_syscalls.c index 62ae6df8..3ca94035 100644 --- a/code/game/g_syscalls.c +++ b/code/game/g_syscalls.c @@ -857,7 +857,7 @@ void trap_BotSaveGoalFuzzyLogic(int goalstate, char *filename) void trap_BotMutateGoalFuzzyLogic(int goalstate, float range) { - syscall(BOTLIB_AI_MUTATE_GOAL_FUZZY_LOGIC, goalstate, range); + syscall(BOTLIB_AI_MUTATE_GOAL_FUZZY_LOGIC, goalstate, PASSFLOAT(range)); } int trap_BotAllocGoalState(int state) diff --git a/code/libcurl/curl/curl.h b/code/libcurl-7.35.0/curl/curl.h similarity index 53% rename from code/libcurl/curl/curl.h rename to code/libcurl-7.35.0/curl/curl.h index a0a04148..aafaeed2 100644 --- a/code/libcurl/curl/curl.h +++ b/code/libcurl-7.35.0/curl/curl.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2006, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -20,118 +20,107 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id: curl.h,v 1.304 2006-08-04 16:08:41 giva Exp $ ***************************************************************************/ -/* If you have problems, all libcurl docs and details are found here: - http://curl.haxx.se/libcurl/ -*/ +/* + * If you have libcurl problems, all docs and details are found here: + * http://curl.haxx.se/libcurl/ + * + * curl-library mailing list subscription and unsubscription web interface: + * http://cool.haxx.se/mailman/listinfo/curl-library/ + */ -#include "curlver.h" /* the libcurl version defines */ +#include "curlver.h" /* libcurl version defines */ +#include "curlbuild.h" /* libcurl build definitions */ +#include "curlrules.h" /* libcurl rules enforcement */ + +/* + * Define WIN32 when build target is Win32 API + */ + +#if (defined(_WIN32) || defined(__WIN32__)) && \ + !defined(WIN32) && !defined(__SYMBIAN32__) +#define WIN32 +#endif #include #include -/* The include stuff here below is mainly for time_t! */ -#ifdef vms -# include -# include -#else -# include -# include -#endif /* defined (vms) */ +#if defined(__FreeBSD__) && (__FreeBSD__ >= 2) +/* Needed for __FreeBSD_version symbol definition */ +#include +#endif -typedef void CURL; +/* The include stuff here below is mainly for time_t! */ +#include +#include + +#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__) +#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || defined(__LWIP_OPT_H__)) +/* The check above prevents the winsock2 inclusion if winsock.h already was + included, since they can't co-exist without problems */ +#include +#include +#endif +#endif + +/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish + libc5-based Linux systems. Only include it on systems that are known to + require it! */ +#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ + defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ + defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \ + (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) +#include +#endif + +#if !defined(WIN32) && !defined(_WIN32_WCE) +#include +#endif + +#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__) +#include +#endif + +#ifdef __BEOS__ +#include +#endif #ifdef __cplusplus extern "C" { #endif -/* - * Decorate exportable functions for Win32 DLL linking. - * This avoids using a .def file for building libcurl.dll. - */ -#if (defined(WIN32) || defined(_WIN32)) && !defined(CURL_STATICLIB) -#if defined(BUILDING_LIBCURL) -#define CURL_EXTERN __declspec(dllexport) -#else -#define CURL_EXTERN __declspec(dllimport) -#endif -#else - -#ifdef CURL_HIDDEN_SYMBOLS -/* - * This definition is used to make external definitions visibile in the - * shared library when symbols are hidden by default. It makes no - * difference when compiling applications whether this is set or not, - * only when compiling the library. - */ -#define CURL_EXTERN CURL_EXTERN_SYMBOL -#else -#define CURL_EXTERN -#endif -#endif +typedef void CURL; /* - * We want the typedef curl_off_t setup for large file support on all - * platforms. We also provide a CURL_FORMAT_OFF_T define to use in *printf - * format strings when outputting a variable of type curl_off_t. - * - * Note: "pocc -Ze" is MSVC compatibily mode and this sets _MSC_VER! + * libcurl external API function linkage decorations. */ -#if (defined(_MSC_VER) && !defined(__POCC__)) || (defined(__LCC__) && defined(WIN32)) -/* MSVC */ -#ifdef _WIN32_WCE - typedef long curl_off_t; -#define CURL_FORMAT_OFF_T "%ld" +#ifdef CURL_STATICLIB +# define CURL_EXTERN +#elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__) +# if defined(BUILDING_LIBCURL) +# define CURL_EXTERN __declspec(dllexport) +# else +# define CURL_EXTERN __declspec(dllimport) +# endif +#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS) +# define CURL_EXTERN CURL_EXTERN_SYMBOL #else - typedef signed __int64 curl_off_t; -#define CURL_FORMAT_OFF_T "%I64d" -#endif -#else /* (_MSC_VER && !__POCC__) || (__LCC__ && WIN32) */ -#if (defined(__GNUC__) && defined(WIN32)) || defined(__WATCOMC__) -/* gcc on windows or Watcom */ - typedef long long curl_off_t; -#define CURL_FORMAT_OFF_T "%I64d" -#else /* GCC or Watcom on Windows */ - -/* "normal" POSIX approach, do note that this does not necessarily mean that - the type is >32 bits, see the SIZEOF_CURL_OFF_T define for that! */ - typedef off_t curl_off_t; - -/* Check a range of defines to detect large file support. On Linux it seems - none of these are set by default, so if you don't explicitly switches on - large file support, this define will be made for "small file" support. */ -#ifndef _FILE_OFFSET_BITS -#define _FILE_OFFSET_BITS 0 /* to prevent warnings in the check below */ -#define UNDEF_FILE_OFFSET_BITS -#endif -#ifndef FILESIZEBITS -#define FILESIZEBITS 0 /* to prevent warnings in the check below */ -#define UNDEF_FILESIZEBITS +# define CURL_EXTERN #endif -#if defined(_LARGE_FILES) || (_FILE_OFFSET_BITS > 32) || (FILESIZEBITS > 32) \ - || defined(_LARGEFILE_SOURCE) || defined(_LARGEFILE64_SOURCE) - /* For now, we assume at least one of these to be set for large files to - work! */ -#define CURL_FORMAT_OFF_T "%lld" -#else /* LARGE_FILE support */ -#define CURL_FORMAT_OFF_T "%ld" -#endif -#endif /* GCC or Watcom on Windows */ -#endif /* (_MSC_VER && !__POCC__) || (__LCC__ && WIN32) */ - -#ifdef UNDEF_FILE_OFFSET_BITS -/* this was defined above for our checks, undefine it again */ -#undef _FILE_OFFSET_BITS -#endif - -#ifdef UNDEF_FILESIZEBITS -/* this was defined above for our checks, undefine it again */ -#undef FILESIZEBITS +#ifndef curl_socket_typedef +/* socket typedef */ +#if defined(WIN32) && !defined(__LWIP_OPT_H__) +typedef SOCKET curl_socket_t; +#define CURL_SOCKET_BAD INVALID_SOCKET +#else +typedef int curl_socket_t; +#define CURL_SOCKET_BAD -1 #endif +#define curl_socket_typedef +#endif /* curl_socket_typedef */ struct curl_httppost { struct curl_httppost *next; /* next entry in the list */ @@ -155,43 +144,206 @@ struct curl_httppost { do not free in formfree */ #define HTTPPOST_BUFFER (1<<4) /* upload file from buffer */ #define HTTPPOST_PTRBUFFER (1<<5) /* upload file from pointer contents */ +#define HTTPPOST_CALLBACK (1<<6) /* upload file contents by using the + regular read callback to get the data + and pass the given pointer as custom + pointer */ char *showfilename; /* The file name to show. If not set, the actual file name will be used (if this is a file part) */ + void *userp; /* custom pointer used for + HTTPPOST_CALLBACK posts */ }; +/* This is the CURLOPT_PROGRESSFUNCTION callback proto. It is now considered + deprecated but was the only choice up until 7.31.0 */ typedef int (*curl_progress_callback)(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow); +/* This is the CURLOPT_XFERINFOFUNCTION callback proto. It was introduced in + 7.32.0, it avoids floating point and provides more detailed information. */ +typedef int (*curl_xferinfo_callback)(void *clientp, + curl_off_t dltotal, + curl_off_t dlnow, + curl_off_t ultotal, + curl_off_t ulnow); + +#ifndef CURL_MAX_WRITE_SIZE /* Tests have proven that 20K is a very bad buffer size for uploads on - Windows, while 16K for some odd reason performed a lot better. */ + Windows, while 16K for some odd reason performed a lot better. + We do the ifndef check to allow this value to easier be changed at build + time for those who feel adventurous. The practical minimum is about + 400 bytes since libcurl uses a buffer of this size as a scratch area + (unrelated to network send operations). */ #define CURL_MAX_WRITE_SIZE 16384 +#endif + +#ifndef CURL_MAX_HTTP_HEADER +/* The only reason to have a max limit for this is to avoid the risk of a bad + server feeding libcurl with a never-ending header that will cause reallocs + infinitely */ +#define CURL_MAX_HTTP_HEADER (100*1024) +#endif + +/* This is a magic return code for the write callback that, when returned, + will signal libcurl to pause receiving on the current transfer. */ +#define CURL_WRITEFUNC_PAUSE 0x10000001 typedef size_t (*curl_write_callback)(char *buffer, size_t size, size_t nitems, void *outstream); + + +/* enumeration of file types */ +typedef enum { + CURLFILETYPE_FILE = 0, + CURLFILETYPE_DIRECTORY, + CURLFILETYPE_SYMLINK, + CURLFILETYPE_DEVICE_BLOCK, + CURLFILETYPE_DEVICE_CHAR, + CURLFILETYPE_NAMEDPIPE, + CURLFILETYPE_SOCKET, + CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */ + + CURLFILETYPE_UNKNOWN /* should never occur */ +} curlfiletype; + +#define CURLFINFOFLAG_KNOWN_FILENAME (1<<0) +#define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1) +#define CURLFINFOFLAG_KNOWN_TIME (1<<2) +#define CURLFINFOFLAG_KNOWN_PERM (1<<3) +#define CURLFINFOFLAG_KNOWN_UID (1<<4) +#define CURLFINFOFLAG_KNOWN_GID (1<<5) +#define CURLFINFOFLAG_KNOWN_SIZE (1<<6) +#define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7) + +/* Content of this structure depends on information which is known and is + achievable (e.g. by FTP LIST parsing). Please see the url_easy_setopt(3) man + page for callbacks returning this structure -- some fields are mandatory, + some others are optional. The FLAG field has special meaning. */ +struct curl_fileinfo { + char *filename; + curlfiletype filetype; + time_t time; + unsigned int perm; + int uid; + int gid; + curl_off_t size; + long int hardlinks; + + struct { + /* If some of these fields is not NULL, it is a pointer to b_data. */ + char *time; + char *perm; + char *user; + char *group; + char *target; /* pointer to the target filename of a symlink */ + } strings; + + unsigned int flags; + + /* used internally */ + char * b_data; + size_t b_size; + size_t b_used; +}; + +/* return codes for CURLOPT_CHUNK_BGN_FUNCTION */ +#define CURL_CHUNK_BGN_FUNC_OK 0 +#define CURL_CHUNK_BGN_FUNC_FAIL 1 /* tell the lib to end the task */ +#define CURL_CHUNK_BGN_FUNC_SKIP 2 /* skip this chunk over */ + +/* if splitting of data transfer is enabled, this callback is called before + download of an individual chunk started. Note that parameter "remains" works + only for FTP wildcard downloading (for now), otherwise is not used */ +typedef long (*curl_chunk_bgn_callback)(const void *transfer_info, + void *ptr, + int remains); + +/* return codes for CURLOPT_CHUNK_END_FUNCTION */ +#define CURL_CHUNK_END_FUNC_OK 0 +#define CURL_CHUNK_END_FUNC_FAIL 1 /* tell the lib to end the task */ + +/* If splitting of data transfer is enabled this callback is called after + download of an individual chunk finished. + Note! After this callback was set then it have to be called FOR ALL chunks. + Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC. + This is the reason why we don't need "transfer_info" parameter in this + callback and we are not interested in "remains" parameter too. */ +typedef long (*curl_chunk_end_callback)(void *ptr); + +/* return codes for FNMATCHFUNCTION */ +#define CURL_FNMATCHFUNC_MATCH 0 /* string corresponds to the pattern */ +#define CURL_FNMATCHFUNC_NOMATCH 1 /* pattern doesn't match the string */ +#define CURL_FNMATCHFUNC_FAIL 2 /* an error occurred */ + +/* callback type for wildcard downloading pattern matching. If the + string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */ +typedef int (*curl_fnmatch_callback)(void *ptr, + const char *pattern, + const char *string); + +/* These are the return codes for the seek callbacks */ +#define CURL_SEEKFUNC_OK 0 +#define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */ +#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so + libcurl might try other means instead */ +typedef int (*curl_seek_callback)(void *instream, + curl_off_t offset, + int origin); /* 'whence' */ + /* This is a return code for the read callback that, when returned, will signal libcurl to immediately abort the current transfer. */ #define CURL_READFUNC_ABORT 0x10000000 +/* This is a return code for the read callback that, when returned, will + signal libcurl to pause sending data on the current transfer. */ +#define CURL_READFUNC_PAUSE 0x10000001 + typedef size_t (*curl_read_callback)(char *buffer, size_t size, size_t nitems, void *instream); +typedef enum { + CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */ + CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */ + CURLSOCKTYPE_LAST /* never use */ +} curlsocktype; -#ifndef CURL_NO_OLDIES - /* not used since 7.10.8, will be removed in a future release */ -typedef int (*curl_passwd_callback)(void *clientp, - const char *prompt, - char *buffer, - int buflen); -#endif +/* The return code from the sockopt_callback can signal information back + to libcurl: */ +#define CURL_SOCKOPT_OK 0 +#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return + CURLE_ABORTED_BY_CALLBACK */ +#define CURL_SOCKOPT_ALREADY_CONNECTED 2 + +typedef int (*curl_sockopt_callback)(void *clientp, + curl_socket_t curlfd, + curlsocktype purpose); + +struct curl_sockaddr { + int family; + int socktype; + int protocol; + unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it + turned really ugly and painful on the systems that + lack this type */ + struct sockaddr addr; +}; + +typedef curl_socket_t +(*curl_opensocket_callback)(void *clientp, + curlsocktype purpose, + struct curl_sockaddr *address); + +typedef int +(*curl_closesocket_callback)(void *clientp, curl_socket_t item); typedef enum { CURLIOE_OK, /* I/O operation successful */ @@ -253,74 +405,79 @@ typedef enum { CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ CURLE_FAILED_INIT, /* 2 */ CURLE_URL_MALFORMAT, /* 3 */ - CURLE_URL_MALFORMAT_USER, /* 4 - NOT USED */ + CURLE_NOT_BUILT_IN, /* 4 - [was obsoleted in August 2007 for + 7.17.0, reused in April 2011 for 7.21.5] */ CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ CURLE_COULDNT_RESOLVE_HOST, /* 6 */ CURLE_COULDNT_CONNECT, /* 7 */ CURLE_FTP_WEIRD_SERVER_REPLY, /* 8 */ - CURLE_FTP_ACCESS_DENIED, /* 9 a service was denied by the FTP server + CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server due to lack of access - when login fails this is not returned. */ - CURLE_FTP_USER_PASSWORD_INCORRECT, /* 10 - NOT USED */ + CURLE_FTP_ACCEPT_FAILED, /* 10 - [was obsoleted in April 2006 for + 7.15.4, reused in Dec 2011 for 7.24.0]*/ CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ - CURLE_FTP_WEIRD_USER_REPLY, /* 12 */ + CURLE_FTP_ACCEPT_TIMEOUT, /* 12 - timeout occurred accepting server + [was obsoleted in August 2007 for 7.17.0, + reused in Dec 2011 for 7.24.0]*/ CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ CURLE_FTP_CANT_GET_HOST, /* 15 */ - CURLE_FTP_CANT_RECONNECT, /* 16 */ - CURLE_FTP_COULDNT_SET_BINARY, /* 17 */ + CURLE_OBSOLETE16, /* 16 - NOT USED */ + CURLE_FTP_COULDNT_SET_TYPE, /* 17 */ CURLE_PARTIAL_FILE, /* 18 */ CURLE_FTP_COULDNT_RETR_FILE, /* 19 */ - CURLE_FTP_WRITE_ERROR, /* 20 */ - CURLE_FTP_QUOTE_ERROR, /* 21 */ + CURLE_OBSOLETE20, /* 20 - NOT USED */ + CURLE_QUOTE_ERROR, /* 21 - quote command failure */ CURLE_HTTP_RETURNED_ERROR, /* 22 */ CURLE_WRITE_ERROR, /* 23 */ - CURLE_MALFORMAT_USER, /* 24 - NOT USED */ - CURLE_FTP_COULDNT_STOR_FILE, /* 25 - failed FTP upload */ - CURLE_READ_ERROR, /* 26 - could open/read from file */ + CURLE_OBSOLETE24, /* 24 - NOT USED */ + CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */ + CURLE_READ_ERROR, /* 26 - couldn't open/read from file */ CURLE_OUT_OF_MEMORY, /* 27 */ /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error instead of a memory allocation error if CURL_DOES_CONVERSIONS is defined */ - CURLE_OPERATION_TIMEOUTED, /* 28 - the timeout time was reached */ - CURLE_FTP_COULDNT_SET_ASCII, /* 29 - TYPE A failed */ + CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */ + CURLE_OBSOLETE29, /* 29 - NOT USED */ CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */ CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */ - CURLE_FTP_COULDNT_GET_SIZE, /* 32 - the SIZE command failed */ - CURLE_HTTP_RANGE_ERROR, /* 33 - RANGE "command" didn't work */ + CURLE_OBSOLETE32, /* 32 - NOT USED */ + CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */ CURLE_HTTP_POST_ERROR, /* 34 */ CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */ CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */ CURLE_FILE_COULDNT_READ_FILE, /* 37 */ CURLE_LDAP_CANNOT_BIND, /* 38 */ CURLE_LDAP_SEARCH_FAILED, /* 39 */ - CURLE_LIBRARY_NOT_FOUND, /* 40 */ + CURLE_OBSOLETE40, /* 40 - NOT USED */ CURLE_FUNCTION_NOT_FOUND, /* 41 */ CURLE_ABORTED_BY_CALLBACK, /* 42 */ CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */ - CURLE_BAD_CALLING_ORDER, /* 44 - NOT USED */ + CURLE_OBSOLETE44, /* 44 - NOT USED */ CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */ - CURLE_BAD_PASSWORD_ENTERED, /* 46 - NOT USED */ + CURLE_OBSOLETE46, /* 46 - NOT USED */ CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */ - CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */ + CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */ CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */ - CURLE_OBSOLETE, /* 50 - NOT USED */ - CURLE_SSL_PEER_CERTIFICATE, /* 51 - peer's certificate wasn't ok */ + CURLE_OBSOLETE50, /* 50 - NOT USED */ + CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint + wasn't verified fine */ CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as default */ CURLE_SEND_ERROR, /* 55 - failed sending network data */ CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ - CURLE_SHARE_IN_USE, /* 57 - share is in use */ + CURLE_OBSOLETE57, /* 57 - NOT IN USE */ CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ - CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */ + CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized/bad encoding */ CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ - CURLE_FTP_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ + CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind that failed */ CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */ @@ -328,10 +485,10 @@ typedef enum { accepted and we failed to login */ CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */ CURLE_TFTP_PERM, /* 69 - permission problem on server */ - CURLE_TFTP_DISKFULL, /* 70 - out of disk space on server */ + CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */ CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */ CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */ - CURLE_TFTP_EXISTS, /* 73 - File already exists */ + CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */ CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */ CURLE_CONV_FAILED, /* 75 - conversion failed */ CURLE_CONV_REQD, /* 76 - caller must register conversion @@ -339,9 +496,91 @@ typedef enum { CURLOPT_CONV_FROM_NETWORK_FUNCTION, CURLOPT_CONV_TO_NETWORK_FUNCTION, and CURLOPT_CONV_FROM_UTF8_FUNCTION */ + CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing + or wrong format */ + CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */ + CURLE_SSH, /* 79 - error from the SSH layer, somewhat + generic so the error message will be of + interest when this has happened */ + + CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL + connection */ + CURLE_AGAIN, /* 81 - socket is not ready for send/recv, + wait till it's ready and try again (Added + in 7.18.2) */ + CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or + wrong format (Added in 7.19.0) */ + CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in + 7.19.0) */ + CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */ + CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */ + CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Ids */ + CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */ + CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */ + CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the + session will be queued */ CURL_LAST /* never use! */ } CURLcode; +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all + the obsolete stuff removed! */ + +/* Previously obsoletes error codes re-used in 7.24.0 */ +#define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED +#define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT + +/* compatibility with older names */ +#define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING + +/* The following were added in 7.21.5, April 2011 */ +#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION + +/* The following were added in 7.17.1 */ +/* These are scheduled to disappear by 2009 */ +#define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION + +/* The following were added in 7.17.0 */ +/* These are scheduled to disappear by 2009 */ +#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */ +#define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46 +#define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44 +#define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10 +#define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16 +#define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32 +#define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29 +#define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12 +#define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20 +#define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40 +#define CURLE_MALFORMAT_USER CURLE_OBSOLETE24 +#define CURLE_SHARE_IN_USE CURLE_OBSOLETE57 +#define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN + +#define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED +#define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE +#define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR +#define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL +#define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS +#define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR +#define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED + +/* The following were added earlier */ + +#define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT + +#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR +#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED +#define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED + +#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE +#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME + +/* This was the error code 50 in 7.7.3 and a few earlier versions, this + is no longer used by libcurl but is instead #defined here only to not + make programs break */ +#define CURLE_ALREADY_COMPLETE 99999 + +#endif /*!CURL_NO_OLDIES*/ + /* This prototype applies to all conversion callbacks */ typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length); @@ -350,52 +589,142 @@ typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ OpenSSL SSL_CTX */ void *userptr); -/* Make a spelling correction for the operation timed-out define */ -#define CURLE_OPERATION_TIMEDOUT CURLE_OPERATION_TIMEOUTED - -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ -/* backwards compatibility with older names */ -#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR -#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED -#endif - typedef enum { - CURLPROXY_HTTP = 0, - CURLPROXY_SOCKS4 = 4, - CURLPROXY_SOCKS5 = 5 -} curl_proxytype; + CURLPROXY_HTTP = 0, /* added in 7.10, new in 7.19.4 default is to use + CONNECT HTTP/1.1 */ + CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT + HTTP/1.0 */ + CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already + in 7.10 */ + CURLPROXY_SOCKS5 = 5, /* added in 7.10 */ + CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */ + CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the + host name rather than the IP address. added + in 7.18.0 */ +} curl_proxytype; /* this enum was added in 7.10 */ -#define CURLAUTH_NONE 0 /* nothing */ -#define CURLAUTH_BASIC (1<<0) /* Basic (default) */ -#define CURLAUTH_DIGEST (1<<1) /* Digest */ -#define CURLAUTH_GSSNEGOTIATE (1<<2) /* GSS-Negotiate */ -#define CURLAUTH_NTLM (1<<3) /* NTLM */ -#define CURLAUTH_ANY ~0 /* all types set */ -#define CURLAUTH_ANYSAFE (~CURLAUTH_BASIC) +/* + * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options: + * + * CURLAUTH_NONE - No HTTP authentication + * CURLAUTH_BASIC - HTTP Basic authentication (default) + * CURLAUTH_DIGEST - HTTP Digest authentication + * CURLAUTH_GSSNEGOTIATE - HTTP GSS-Negotiate authentication + * CURLAUTH_NTLM - HTTP NTLM authentication + * CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavour + * CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper + * CURLAUTH_ONLY - Use together with a single other type to force no + * authentication or just that single type + * CURLAUTH_ANY - All fine types set + * CURLAUTH_ANYSAFE - All fine types except Basic + */ -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ -/* this was the error code 50 in 7.7.3 and a few earlier versions, this - is no longer used by libcurl but is instead #defined here only to not - make programs break */ -#define CURLE_ALREADY_COMPLETE 99999 +#define CURLAUTH_NONE ((unsigned long)0) +#define CURLAUTH_BASIC (((unsigned long)1)<<0) +#define CURLAUTH_DIGEST (((unsigned long)1)<<1) +#define CURLAUTH_GSSNEGOTIATE (((unsigned long)1)<<2) +#define CURLAUTH_NTLM (((unsigned long)1)<<3) +#define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4) +#define CURLAUTH_NTLM_WB (((unsigned long)1)<<5) +#define CURLAUTH_ONLY (((unsigned long)1)<<31) +#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) +#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) -/* These are just to make older programs not break: */ -#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE -#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME -#endif +#define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */ +#define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */ +#define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */ +#define CURLSSH_AUTH_PASSWORD (1<<1) /* password */ +#define CURLSSH_AUTH_HOST (1<<2) /* host key files */ +#define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */ +#define CURLSSH_AUTH_AGENT (1<<4) /* agent (ssh-agent, pageant...) */ +#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY + +#define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */ +#define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */ +#define CURLGSSAPI_DELEGATION_FLAG (1<<1) /* delegate always */ #define CURL_ERROR_SIZE 256 -/* parameter for the CURLOPT_FTP_SSL option */ +enum curl_khtype { + CURLKHTYPE_UNKNOWN, + CURLKHTYPE_RSA1, + CURLKHTYPE_RSA, + CURLKHTYPE_DSS +}; + +struct curl_khkey { + const char *key; /* points to a zero-terminated string encoded with base64 + if len is zero, otherwise to the "raw" data */ + size_t len; + enum curl_khtype keytype; +}; + +/* this is the set of return values expected from the curl_sshkeycallback + callback */ +enum curl_khstat { + CURLKHSTAT_FINE_ADD_TO_FILE, + CURLKHSTAT_FINE, + CURLKHSTAT_REJECT, /* reject the connection, return an error */ + CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now so + this causes a CURLE_DEFER error but otherwise the + connection will be left intact etc */ + CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */ +}; + +/* this is the set of status codes pass in to the callback */ +enum curl_khmatch { + CURLKHMATCH_OK, /* match */ + CURLKHMATCH_MISMATCH, /* host found, key mismatch! */ + CURLKHMATCH_MISSING, /* no matching host/key found */ + CURLKHMATCH_LAST /* not for use, only a marker for last-in-list */ +}; + +typedef int + (*curl_sshkeycallback) (CURL *easy, /* easy handle */ + const struct curl_khkey *knownkey, /* known */ + const struct curl_khkey *foundkey, /* found */ + enum curl_khmatch, /* libcurl's view on the keys */ + void *clientp); /* custom pointer passed from app */ + +/* parameter for the CURLOPT_USE_SSL option */ typedef enum { - CURLFTPSSL_NONE, /* do not attempt to use SSL */ - CURLFTPSSL_TRY, /* try using SSL, proceed anyway otherwise */ - CURLFTPSSL_CONTROL, /* SSL for the control connection or fail */ - CURLFTPSSL_ALL, /* SSL for all communication or fail */ - CURLFTPSSL_LAST /* not an option, never use */ -} curl_ftpssl; + CURLUSESSL_NONE, /* do not attempt to use SSL */ + CURLUSESSL_TRY, /* try using SSL, proceed anyway otherwise */ + CURLUSESSL_CONTROL, /* SSL for the control connection or fail */ + CURLUSESSL_ALL, /* SSL for all communication or fail */ + CURLUSESSL_LAST /* not an option, never use */ +} curl_usessl; + +/* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */ + +/* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the + name of improving interoperability with older servers. Some SSL libraries + have introduced work-arounds for this flaw but those work-arounds sometimes + make the SSL communication fail. To regain functionality with those broken + servers, a user can this way allow the vulnerability back. */ +#define CURLSSLOPT_ALLOW_BEAST (1<<0) + +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all + the obsolete stuff removed! */ + +/* Backwards compatibility with older names */ +/* These are scheduled to disappear by 2009 */ + +#define CURLFTPSSL_NONE CURLUSESSL_NONE +#define CURLFTPSSL_TRY CURLUSESSL_TRY +#define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL +#define CURLFTPSSL_ALL CURLUSESSL_ALL +#define CURLFTPSSL_LAST CURLUSESSL_LAST +#define curl_ftpssl curl_usessl +#endif /*!CURL_NO_OLDIES*/ + +/* parameter for the CURLOPT_FTP_SSL_CCC option */ +typedef enum { + CURLFTPSSL_CCC_NONE, /* do not send CCC */ + CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */ + CURLFTPSSL_CCC_ACTIVE, /* Initiate the shutdown */ + CURLFTPSSL_CCC_LAST /* not an option, never use */ +} curl_ftpccc; /* parameter for the CURLOPT_FTPSSLAUTH option */ typedef enum { @@ -405,6 +734,17 @@ typedef enum { CURLFTPAUTH_LAST /* not an option, never use */ } curl_ftpauth; +/* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */ +typedef enum { + CURLFTP_CREATE_DIR_NONE, /* do NOT create missing dirs! */ + CURLFTP_CREATE_DIR, /* (FTP/SFTP) if CWD fails, try MKD and then CWD + again if MKD succeeded, for SFTP this does + similar magic */ + CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD + again even if MKD failed! */ + CURLFTP_CREATE_DIR_LAST /* not an option, never use */ +} curl_ftpcreatedir; + /* parameter for the CURLOPT_FTP_FILEMETHOD option */ typedef enum { CURLFTPMETHOD_DEFAULT, /* let libcurl pick */ @@ -414,6 +754,35 @@ typedef enum { CURLFTPMETHOD_LAST /* not an option, never use */ } curl_ftpmethod; +/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */ +#define CURLPROTO_HTTP (1<<0) +#define CURLPROTO_HTTPS (1<<1) +#define CURLPROTO_FTP (1<<2) +#define CURLPROTO_FTPS (1<<3) +#define CURLPROTO_SCP (1<<4) +#define CURLPROTO_SFTP (1<<5) +#define CURLPROTO_TELNET (1<<6) +#define CURLPROTO_LDAP (1<<7) +#define CURLPROTO_LDAPS (1<<8) +#define CURLPROTO_DICT (1<<9) +#define CURLPROTO_FILE (1<<10) +#define CURLPROTO_TFTP (1<<11) +#define CURLPROTO_IMAP (1<<12) +#define CURLPROTO_IMAPS (1<<13) +#define CURLPROTO_POP3 (1<<14) +#define CURLPROTO_POP3S (1<<15) +#define CURLPROTO_SMTP (1<<16) +#define CURLPROTO_SMTPS (1<<17) +#define CURLPROTO_RTSP (1<<18) +#define CURLPROTO_RTMP (1<<19) +#define CURLPROTO_RTMPT (1<<20) +#define CURLPROTO_RTMPE (1<<21) +#define CURLPROTO_RTMPTE (1<<22) +#define CURLPROTO_RTMPS (1<<23) +#define CURLPROTO_RTMPTS (1<<24) +#define CURLPROTO_GOPHER (1<<25) +#define CURLPROTO_ALL (~0) /* enable everything */ + /* long may be 32 or 64 bits, but we should never depend on anything else but 32 */ #define CURLOPTTYPE_LONG 0 @@ -427,25 +796,9 @@ typedef enum { #ifdef CINIT #undef CINIT #endif -/* - * Figure out if we can use the ## operator, which is supported by ISO/ANSI C - * and C++. Some compilers support it without setting __STDC__ or __cplusplus - * so we need to carefully check for them too. We don't use configure-checks - * for these since we want these headers to remain generic and working for all - * platforms. - */ -#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ - defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ - defined(__POCC__) || defined(__SALFORDC__) - /* This compiler is believed to have an ISO compatible preprocessor */ -#define CURL_ISOCPP -#else - /* This compiler is believed NOT to have an ISO compatible preprocessor */ -#undef CURL_ISOCPP -#endif #ifdef CURL_ISOCPP -#define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number +#define CINIT(na,t,nu) CURLOPT_ ## na = CURLOPTTYPE_ ## t + nu #else /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ #define LONG CURLOPTTYPE_LONG @@ -474,10 +827,10 @@ typedef enum { /* Name of proxy to use. */ CINIT(PROXY, OBJECTPOINT, 4), - /* "name:password" to use when fetching. */ + /* "user:password;options" to use when fetching. */ CINIT(USERPWD, OBJECTPOINT, 5), - /* "name:password" to use with proxy. */ + /* "user:password" to use with proxy. */ CINIT(PROXYUSERPWD, OBJECTPOINT, 6), /* Range to get, specified as an ASCII string. */ @@ -505,7 +858,7 @@ typedef enum { /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about * how large the file being sent really is. That allows better error - * checking and better verifies that the upload was succcessful. -1 means + * checking and better verifies that the upload was successful. -1 means * unknown size. * * For large file support, there is also a _LARGE version of the key @@ -514,10 +867,10 @@ typedef enum { */ CINIT(INFILESIZE, LONG, 14), - /* POST input fields. */ + /* POST static input fields. */ CINIT(POSTFIELDS, OBJECTPOINT, 15), - /* Set the referer page (needed by some CGIs) */ + /* Set the referrer page (needed by some CGIs) */ CINIT(REFERER, OBJECTPOINT, 16), /* Set the FTP PORT string (interface name, named or numerical IP address) @@ -534,7 +887,7 @@ typedef enum { */ /* Set the "low speed limit" */ - CINIT(LOW_SPEED_LIMIT, LONG , 19), + CINIT(LOW_SPEED_LIMIT, LONG, 19), /* Set the "low speed time" */ CINIT(LOW_SPEED_TIME, LONG, 20), @@ -553,16 +906,14 @@ typedef enum { /* This points to a linked list of headers, struct curl_slist kind */ CINIT(HTTPHEADER, OBJECTPOINT, 23), - /* This points to a linked list of post entries, struct HttpPost */ + /* This points to a linked list of post entries, struct curl_httppost */ CINIT(HTTPPOST, OBJECTPOINT, 24), /* name of the file keeping your private SSL-certificate */ CINIT(SSLCERT, OBJECTPOINT, 25), - /* password for the SSL-private key, keep this for compatibility */ - CINIT(SSLCERTPASSWD, OBJECTPOINT, 26), - /* password for the SSL private key */ - CINIT(SSLKEYPASSWD, OBJECTPOINT, 26), + /* password for the SSL or SSH private key */ + CINIT(KEYPASSWD, OBJECTPOINT, 26), /* send TYPE parameter? */ CINIT(CRLF, LONG, 27), @@ -578,7 +929,7 @@ typedef enum { "cookie awareness" */ CINIT(COOKIEFILE, OBJECTPOINT, 31), - /* What version to specifly try to use. + /* What version to specifically try to use. See CURL_SSLVERSION defines below. */ CINIT(SSLVERSION, LONG, 32), @@ -605,9 +956,7 @@ typedef enum { /* send linked-list of post-transfer QUOTE commands */ CINIT(POSTQUOTE, OBJECTPOINT, 39), - /* Pass a pointer to string of the output using full variable-replacement - as described elsewhere. */ - CINIT(WRITEINFO, OBJECTPOINT, 40), + CINIT(WRITEINFO, OBJECTPOINT, 40), /* DEPRECATED, do not use! */ CINIT(VERBOSE, LONG, 41), /* talk a lot */ CINIT(HEADER, LONG, 42), /* throw the header out too */ @@ -616,9 +965,9 @@ typedef enum { CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */ CINIT(UPLOAD, LONG, 46), /* this is an upload */ CINIT(POST, LONG, 47), /* HTTP POST method */ - CINIT(FTPLISTONLY, LONG, 48), /* Use NLST when listing ftp dir */ + CINIT(DIRLISTONLY, LONG, 48), /* bare names when listing directories */ - CINIT(FTPAPPEND, LONG, 50), /* Append instead of overwrite on upload! */ + CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */ /* Specify whether to read the user+password from the .netrc or the URL. * This must be one of the CURL_NETRC_* enums below. */ @@ -631,15 +980,18 @@ typedef enum { /* 55 = OBSOLETE */ - /* Function that will be called instead of the internal progress display + /* DEPRECATED + * Function that will be called instead of the internal progress display * function. This function should be defined as the curl_progress_callback * prototype defines. */ CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56), - /* Data passed to the progress callback */ + /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION + callbacks */ CINIT(PROGRESSDATA, OBJECTPOINT, 57), +#define CURLOPT_XFERINFODATA CURLOPT_PROGRESSDATA - /* We want the referer field set automatically when following locations */ + /* We want the referrer field set automatically when following locations */ CINIT(AUTOREFERER, LONG, 58), /* Port of the proxy, can be set in the proxy string as well with: @@ -655,10 +1007,10 @@ typedef enum { /* Set the interface string to use as outgoing network interface */ CINIT(INTERFACE, OBJECTPOINT, 62), - /* Set the krb4 security level, this also enables krb4 awareness. This is a - * string, 'clear', 'safe', 'confidential' or 'private'. If the string is - * set but doesn't match one of these, 'private' will be used. */ - CINIT(KRB4LEVEL, OBJECTPOINT, 63), + /* Set the krb4/5 security level, this also enables krb4/5 awareness. This + * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string + * is set but doesn't match one of these, 'private' will be used. */ + CINIT(KRBLEVEL, OBJECTPOINT, 63), /* Set if we should verify the peer in ssl handshake, set 1 to verify. */ CINIT(SSL_VERIFYPEER, LONG, 64), @@ -683,9 +1035,7 @@ typedef enum { /* Max amount of cached alive connections */ CINIT(MAXCONNECTS, LONG, 71), - /* What policy to use when closing connections when the cache is filled - up */ - CINIT(CLOSEPOLICY, LONG, 72), + CINIT(CLOSEPOLICY, LONG, 72), /* DEPRECATED, do not use! */ /* 73 = OBSOLETE */ @@ -706,9 +1056,8 @@ typedef enum { /* Set to the Entropy Gathering Daemon socket pathname */ CINIT(EGDSOCKET, OBJECTPOINT, 77), - /* Time-out connect operations after this amount of seconds, if connects - are OK within this time, then fine... This only aborts the connect - phase. [Only works on unix-style/SIGALRM operating systems] */ + /* Time-out connect operations after this amount of seconds, if connects are + OK within this time, then fine... This only aborts the connect phase. */ CINIT(CONNECTTIMEOUT, LONG, 78), /* Function that will be called to store headers (instead of fwrite). The @@ -736,7 +1085,7 @@ typedef enum { CURL_HTTP_VERSION* enums set below. */ CINIT(HTTP_VERSION, LONG, 84), - /* Specificly switch on or off the FTP engine's use of the EPSV command. By + /* Specifically switch on or off the FTP engine's use of the EPSV command. By default, that one will always be attempted before the more traditional PASV command. */ CINIT(FTP_USE_EPSV, LONG, 85), @@ -759,12 +1108,12 @@ typedef enum { CINIT(SSLENGINE_DEFAULT, LONG, 90), /* Non-zero value means to use the global dns cache */ - CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* To becomeO BSOLETE soon */ + CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* DEPRECATED, do not use! */ /* DNS cache timeout */ CINIT(DNS_CACHE_TIMEOUT, LONG, 92), - /* send linked-list of pre-transfer QUOTE commands (Wesley Laxton)*/ + /* send linked-list of pre-transfer QUOTE commands */ CINIT(PREQUOTE, OBJECTPOINT, 93), /* set the debug function */ @@ -792,12 +1141,13 @@ typedef enum { CINIT(SHARE, OBJECTPOINT, 100), /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default), - CURLPROXY_SOCKS4 and CURLPROXY_SOCKS5. */ + CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and CURLPROXY_SOCKS5. */ CINIT(PROXYTYPE, LONG, 101), /* Set the Accept-Encoding string. Use this to tell a server you would like - the response to be compressed. */ - CINIT(ENCODING, OBJECTPOINT, 102), + the response to be compressed. Before 7.21.6, this was known as + CURLOPT_ENCODING */ + CINIT(ACCEPT_ENCODING, OBJECTPOINT, 102), /* Set pointer to private data */ CINIT(PRIVATE, OBJECTPOINT, 103), @@ -806,12 +1156,12 @@ typedef enum { CINIT(HTTP200ALIASES, OBJECTPOINT, 104), /* Continue to send authentication (user+password) when following locations, - even when hostname changed. This can potentionally send off the name + even when hostname changed. This can potentially send off the name and password to whatever host the server decides. */ CINIT(UNRESTRICTED_AUTH, LONG, 105), - /* Specificly switch on or off the FTP engine's use of the EPRT command ( it - also disables the LPRT attempt). By default, those ones will always be + /* Specifically switch on or off the FTP engine's use of the EPRT command ( + it also disables the LPRT attempt). By default, those ones will always be attempted before the good old traditional PORT command. */ CINIT(FTP_USE_EPRT, LONG, 106), @@ -829,7 +1179,10 @@ typedef enum { argument */ CINIT(SSL_CTX_DATA, OBJECTPOINT, 109), - /* FTP Option that causes missing dirs to be created on the remote server */ + /* FTP Option that causes missing dirs to be created on the remote server. + In 7.19.4 we introduced the convenience enums for this option using the + CURLFTP_CREATE_DIR prefix. + */ CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110), /* Set this to a bitmask value to enable the particular authentications @@ -841,7 +1194,8 @@ typedef enum { getting a response. This is different from transfer timeout time and essentially places a demand on the FTP server to acknowledge commands in a timely manner. */ - CINIT(FTP_RESPONSE_TIMEOUT, LONG , 112), + CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112), +#define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to tell libcurl to resolve names to those IP versions only. This only has @@ -877,11 +1231,11 @@ typedef enum { CINIT(NETRC_FILE, OBJECTPOINT, 118), /* Enable SSL/TLS for FTP, pick one of: - CURLFTPSSL_TRY - try using SSL, proceed anyway otherwise - CURLFTPSSL_CONTROL - SSL for the control connection or fail - CURLFTPSSL_ALL - SSL for all communication or fail + CURLUSESSL_TRY - try using SSL, proceed anyway otherwise + CURLUSESSL_CONTROL - SSL for the control connection or fail + CURLUSESSL_ALL - SSL for all communication or fail */ - CINIT(FTP_SSL, LONG, 119), + CINIT(USE_SSL, LONG, 119), /* The _LARGE version of the standard POSTFIELDSIZE option */ CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120), @@ -890,24 +1244,14 @@ typedef enum { CINIT(TCP_NODELAY, LONG, 121), /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ - - /* When doing 3rd party transfer, set the source user and password with - this */ - CINIT(SOURCE_USERPWD, OBJECTPOINT, 123), - + /* 123 OBSOLETE. Gone in 7.16.0 */ /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ + /* 127 OBSOLETE. Gone in 7.16.0 */ + /* 128 OBSOLETE. Gone in 7.16.0 */ - /* When doing 3rd party transfer, set the source pre-quote linked list - of commands with this */ - CINIT(SOURCE_PREQUOTE, OBJECTPOINT, 127), - - /* When doing 3rd party transfer, set the source post-quote linked list - of commands with this */ - CINIT(SOURCE_POSTQUOTE, OBJECTPOINT, 128), - - /* When FTP over SSL/TLS is selected (with CURLOPT_FTP_SSL), this option + /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option can be used to change libcurl's default action which is to first try "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK response has been received. @@ -922,12 +1266,8 @@ typedef enum { CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130), CINIT(IOCTLDATA, OBJECTPOINT, 131), - /* To make a 3rd party transfer, set the source URL with this */ - CINIT(SOURCE_URL, OBJECTPOINT, 132), - - /* When doing 3rd party transfer, set the source quote linked list of - commands with this */ - CINIT(SOURCE_QUOTE, OBJECTPOINT, 133), + /* 132 OBSOLETE. Gone in 7.16.0 */ + /* 133 OBSOLETE. Gone in 7.16.0 */ /* zero terminated string for pass on to the FTP server when asked for "account" info */ @@ -982,9 +1322,286 @@ typedef enum { /* Pointer to command string to send if USER/PASS fails. */ CINIT(FTP_ALTERNATIVE_TO_USER, OBJECTPOINT, 147), + /* callback function for setting socket options */ + CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148), + CINIT(SOCKOPTDATA, OBJECTPOINT, 149), + + /* set to 0 to disable session ID re-use for this transfer, default is + enabled (== 1) */ + CINIT(SSL_SESSIONID_CACHE, LONG, 150), + + /* allowed SSH authentication methods */ + CINIT(SSH_AUTH_TYPES, LONG, 151), + + /* Used by scp/sftp to do public/private key authentication */ + CINIT(SSH_PUBLIC_KEYFILE, OBJECTPOINT, 152), + CINIT(SSH_PRIVATE_KEYFILE, OBJECTPOINT, 153), + + /* Send CCC (Clear Command Channel) after authentication */ + CINIT(FTP_SSL_CCC, LONG, 154), + + /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */ + CINIT(TIMEOUT_MS, LONG, 155), + CINIT(CONNECTTIMEOUT_MS, LONG, 156), + + /* set to zero to disable the libcurl's decoding and thus pass the raw body + data to the application even when it is encoded/compressed */ + CINIT(HTTP_TRANSFER_DECODING, LONG, 157), + CINIT(HTTP_CONTENT_DECODING, LONG, 158), + + /* Permission used when creating new files and directories on the remote + server for protocols that support it, SFTP/SCP/FILE */ + CINIT(NEW_FILE_PERMS, LONG, 159), + CINIT(NEW_DIRECTORY_PERMS, LONG, 160), + + /* Set the behaviour of POST when redirecting. Values must be set to one + of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */ + CINIT(POSTREDIR, LONG, 161), + + /* used by scp/sftp to verify the host's public key */ + CINIT(SSH_HOST_PUBLIC_KEY_MD5, OBJECTPOINT, 162), + + /* Callback function for opening socket (instead of socket(2)). Optionally, + callback is able change the address or refuse to connect returning + CURL_SOCKET_BAD. The callback should have type + curl_opensocket_callback */ + CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163), + CINIT(OPENSOCKETDATA, OBJECTPOINT, 164), + + /* POST volatile input fields. */ + CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165), + + /* set transfer mode (;type=) when doing FTP via an HTTP proxy */ + CINIT(PROXY_TRANSFER_MODE, LONG, 166), + + /* Callback function for seeking in the input stream */ + CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167), + CINIT(SEEKDATA, OBJECTPOINT, 168), + + /* CRL file */ + CINIT(CRLFILE, OBJECTPOINT, 169), + + /* Issuer certificate */ + CINIT(ISSUERCERT, OBJECTPOINT, 170), + + /* (IPv6) Address scope */ + CINIT(ADDRESS_SCOPE, LONG, 171), + + /* Collect certificate chain info and allow it to get retrievable with + CURLINFO_CERTINFO after the transfer is complete. */ + CINIT(CERTINFO, LONG, 172), + + /* "name" and "pwd" to use when fetching. */ + CINIT(USERNAME, OBJECTPOINT, 173), + CINIT(PASSWORD, OBJECTPOINT, 174), + + /* "name" and "pwd" to use with Proxy when fetching. */ + CINIT(PROXYUSERNAME, OBJECTPOINT, 175), + CINIT(PROXYPASSWORD, OBJECTPOINT, 176), + + /* Comma separated list of hostnames defining no-proxy zones. These should + match both hostnames directly, and hostnames within a domain. For + example, local.com will match local.com and www.local.com, but NOT + notlocal.com or www.notlocal.com. For compatibility with other + implementations of this, .local.com will be considered to be the same as + local.com. A single * is the only valid wildcard, and effectively + disables the use of proxy. */ + CINIT(NOPROXY, OBJECTPOINT, 177), + + /* block size for TFTP transfers */ + CINIT(TFTP_BLKSIZE, LONG, 178), + + /* Socks Service */ + CINIT(SOCKS5_GSSAPI_SERVICE, OBJECTPOINT, 179), + + /* Socks Service */ + CINIT(SOCKS5_GSSAPI_NEC, LONG, 180), + + /* set the bitmask for the protocols that are allowed to be used for the + transfer, which thus helps the app which takes URLs from users or other + external inputs and want to restrict what protocol(s) to deal + with. Defaults to CURLPROTO_ALL. */ + CINIT(PROTOCOLS, LONG, 181), + + /* set the bitmask for the protocols that libcurl is allowed to follow to, + as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs + to be set in both bitmasks to be allowed to get redirected to. Defaults + to all protocols except FILE and SCP. */ + CINIT(REDIR_PROTOCOLS, LONG, 182), + + /* set the SSH knownhost file name to use */ + CINIT(SSH_KNOWNHOSTS, OBJECTPOINT, 183), + + /* set the SSH host key callback, must point to a curl_sshkeycallback + function */ + CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184), + + /* set the SSH host key callback custom pointer */ + CINIT(SSH_KEYDATA, OBJECTPOINT, 185), + + /* set the SMTP mail originator */ + CINIT(MAIL_FROM, OBJECTPOINT, 186), + + /* set the SMTP mail receiver(s) */ + CINIT(MAIL_RCPT, OBJECTPOINT, 187), + + /* FTP: send PRET before PASV */ + CINIT(FTP_USE_PRET, LONG, 188), + + /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */ + CINIT(RTSP_REQUEST, LONG, 189), + + /* The RTSP session identifier */ + CINIT(RTSP_SESSION_ID, OBJECTPOINT, 190), + + /* The RTSP stream URI */ + CINIT(RTSP_STREAM_URI, OBJECTPOINT, 191), + + /* The Transport: header to use in RTSP requests */ + CINIT(RTSP_TRANSPORT, OBJECTPOINT, 192), + + /* Manually initialize the client RTSP CSeq for this handle */ + CINIT(RTSP_CLIENT_CSEQ, LONG, 193), + + /* Manually initialize the server RTSP CSeq for this handle */ + CINIT(RTSP_SERVER_CSEQ, LONG, 194), + + /* The stream to pass to INTERLEAVEFUNCTION. */ + CINIT(INTERLEAVEDATA, OBJECTPOINT, 195), + + /* Let the application define a custom write method for RTP data */ + CINIT(INTERLEAVEFUNCTION, FUNCTIONPOINT, 196), + + /* Turn on wildcard matching */ + CINIT(WILDCARDMATCH, LONG, 197), + + /* Directory matching callback called before downloading of an + individual file (chunk) started */ + CINIT(CHUNK_BGN_FUNCTION, FUNCTIONPOINT, 198), + + /* Directory matching callback called after the file (chunk) + was downloaded, or skipped */ + CINIT(CHUNK_END_FUNCTION, FUNCTIONPOINT, 199), + + /* Change match (fnmatch-like) callback for wildcard matching */ + CINIT(FNMATCH_FUNCTION, FUNCTIONPOINT, 200), + + /* Let the application define custom chunk data pointer */ + CINIT(CHUNK_DATA, OBJECTPOINT, 201), + + /* FNMATCH_FUNCTION user pointer */ + CINIT(FNMATCH_DATA, OBJECTPOINT, 202), + + /* send linked-list of name:port:address sets */ + CINIT(RESOLVE, OBJECTPOINT, 203), + + /* Set a username for authenticated TLS */ + CINIT(TLSAUTH_USERNAME, OBJECTPOINT, 204), + + /* Set a password for authenticated TLS */ + CINIT(TLSAUTH_PASSWORD, OBJECTPOINT, 205), + + /* Set authentication type for authenticated TLS */ + CINIT(TLSAUTH_TYPE, OBJECTPOINT, 206), + + /* Set to 1 to enable the "TE:" header in HTTP requests to ask for + compressed transfer-encoded responses. Set to 0 to disable the use of TE: + in outgoing requests. The current default is 0, but it might change in a + future libcurl release. + + libcurl will ask for the compressed methods it knows of, and if that + isn't any, it will not ask for transfer-encoding at all even if this + option is set to 1. + + */ + CINIT(TRANSFER_ENCODING, LONG, 207), + + /* Callback function for closing socket (instead of close(2)). The callback + should have type curl_closesocket_callback */ + CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208), + CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209), + + /* allow GSSAPI credential delegation */ + CINIT(GSSAPI_DELEGATION, LONG, 210), + + /* Set the name servers to use for DNS resolution */ + CINIT(DNS_SERVERS, OBJECTPOINT, 211), + + /* Time-out accept operations (currently for FTP only) after this amount + of miliseconds. */ + CINIT(ACCEPTTIMEOUT_MS, LONG, 212), + + /* Set TCP keepalive */ + CINIT(TCP_KEEPALIVE, LONG, 213), + + /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */ + CINIT(TCP_KEEPIDLE, LONG, 214), + CINIT(TCP_KEEPINTVL, LONG, 215), + + /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */ + CINIT(SSL_OPTIONS, LONG, 216), + + /* Set the SMTP auth originator */ + CINIT(MAIL_AUTH, OBJECTPOINT, 217), + + /* Enable/disable SASL initial response */ + CINIT(SASL_IR, LONG, 218), + + /* Function that will be called instead of the internal progress display + * function. This function should be defined as the curl_xferinfo_callback + * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */ + CINIT(XFERINFOFUNCTION, FUNCTIONPOINT, 219), + + /* The XOAUTH2 bearer token */ + CINIT(XOAUTH2_BEARER, OBJECTPOINT, 220), + + /* Set the interface string to use as outgoing network + * interface for DNS requests. + * Only supported by the c-ares DNS backend */ + CINIT(DNS_INTERFACE, OBJECTPOINT, 221), + + /* Set the local IPv4 address to use for outgoing DNS requests. + * Only supported by the c-ares DNS backend */ + CINIT(DNS_LOCAL_IP4, OBJECTPOINT, 222), + + /* Set the local IPv4 address to use for outgoing DNS requests. + * Only supported by the c-ares DNS backend */ + CINIT(DNS_LOCAL_IP6, OBJECTPOINT, 223), + + /* Set authentication options directly */ + CINIT(LOGIN_OPTIONS, OBJECTPOINT, 224), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all + the obsolete stuff removed! */ + +/* Backwards compatibility with older names */ +/* These are scheduled to disappear by 2011 */ + +/* This was added in version 7.19.1 */ +#define CURLOPT_POST301 CURLOPT_POSTREDIR + +/* These are scheduled to disappear by 2009 */ + +/* The following were added in 7.17.0 */ +#define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD +#define CURLOPT_FTPAPPEND CURLOPT_APPEND +#define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY +#define CURLOPT_FTP_SSL CURLOPT_USE_SSL + +/* The following were added earlier */ + +#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD +#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL + +#else +/* This is set if CURL_NO_OLDIES is defined at compile-time */ +#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ +#endif + + /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host name resolves addresses using more than one IP protocol version, this option might be handy to force libcurl to use a specific IP version. */ @@ -997,26 +1614,7 @@ typedef enum { #define CURLOPT_WRITEDATA CURLOPT_FILE #define CURLOPT_READDATA CURLOPT_INFILE #define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER - -#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all - the obsolete stuff removed! */ -#define CURLOPT_HTTPREQUEST -1 -#define CURLOPT_FTPASCII CURLOPT_TRANSFERTEXT -#define CURLOPT_MUTE -2 -#define CURLOPT_PASSWDFUNCTION -3 -#define CURLOPT_PASSWDDATA -4 -#define CURLOPT_CLOSEFUNCTION -5 - -#define CURLOPT_SOURCE_HOST -6 -#define CURLOPT_SOURCE_PATH -7 -#define CURLOPT_SOURCE_PORT -8 -#define CURLOPT_PASV_HOST -9 - -#else -/* This is set if CURL_NO_OLDIES is defined at compile-time */ -#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ -#endif - +#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER /* These enums are for use with the CURLOPT_HTTP_VERSION option. */ enum { @@ -1025,10 +1623,30 @@ enum { for us! */ CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */ CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */ + CURL_HTTP_VERSION_2_0, /* please use HTTP 2.0 in the request */ CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */ }; +/* + * Public API enums for RTSP requests + */ +enum { + CURL_RTSPREQ_NONE, /* first in list */ + CURL_RTSPREQ_OPTIONS, + CURL_RTSPREQ_DESCRIBE, + CURL_RTSPREQ_ANNOUNCE, + CURL_RTSPREQ_SETUP, + CURL_RTSPREQ_PLAY, + CURL_RTSPREQ_PAUSE, + CURL_RTSPREQ_TEARDOWN, + CURL_RTSPREQ_GET_PARAMETER, + CURL_RTSPREQ_SET_PARAMETER, + CURL_RTSPREQ_RECORD, + CURL_RTSPREQ_RECEIVE, + CURL_RTSPREQ_LAST /* last in list */ +}; + /* These enums are for use with the CURLOPT_NETRC option. */ enum CURL_NETRC_OPTION { CURL_NETRC_IGNORED, /* The .netrc will never be read. @@ -1043,13 +1661,33 @@ enum CURL_NETRC_OPTION { enum { CURL_SSLVERSION_DEFAULT, - CURL_SSLVERSION_TLSv1, + CURL_SSLVERSION_TLSv1, /* TLS 1.x */ CURL_SSLVERSION_SSLv2, CURL_SSLVERSION_SSLv3, + CURL_SSLVERSION_TLSv1_0, + CURL_SSLVERSION_TLSv1_1, + CURL_SSLVERSION_TLSv1_2, CURL_SSLVERSION_LAST /* never use, keep last */ }; +enum CURL_TLSAUTH { + CURL_TLSAUTH_NONE, + CURL_TLSAUTH_SRP, + CURL_TLSAUTH_LAST /* never use, keep last */ +}; + +/* symbols to use with CURLOPT_POSTREDIR. + CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303 + can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302 + | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */ + +#define CURL_REDIR_GET_ALL 0 +#define CURL_REDIR_POST_301 1 +#define CURL_REDIR_POST_302 2 +#define CURL_REDIR_POST_303 4 +#define CURL_REDIR_POST_ALL \ + (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303) typedef enum { CURL_TIMECOND_NONE, @@ -1061,10 +1699,6 @@ typedef enum { CURL_TIMECOND_LAST } curl_TimeCond; -#ifdef __BEOS__ -#include -#endif - /* curl_strequal() and curl_strnequal() are subject for removal in a future libcurl, see lib/README.curlx for details */ @@ -1108,7 +1742,9 @@ typedef enum { CFINIT(END), CFINIT(OBSOLETE2), - CURLFORM_LASTENTRY /* the last unusued */ + CFINIT(STREAM), + + CURLFORM_LASTENTRY /* the last unused */ } CURLformoption; #undef CFINIT /* done */ @@ -1130,7 +1766,7 @@ struct curl_forms { * CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error) - * CURL_FORMADD_MEMORY if a HttpPost struct cannot be allocated + * CURL_FORMADD_MEMORY if a curl_httppost struct cannot be allocated * CURL_FORMADD_MEMORY if some allocation for string copying failed. * CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array * @@ -1154,7 +1790,7 @@ typedef enum { * * DESCRIPTION * - * Pretty advanved function for building multi-part formposts. Each invoke + * Pretty advanced function for building multi-part formposts. Each invoke * adds one part that together construct a full post. Then use * CURLOPT_HTTPPOST to send it off to libcurl. */ @@ -1164,11 +1800,14 @@ CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, /* * callback function for curl_formget() - * The void *arg pointer will be the one passed as second argument to curl_formget(). + * The void *arg pointer will be the one passed as second argument to + * curl_formget(). * The character buffer passed to it must not be freed. - * Should return the buffer length passed to it as the argument "len" on success. + * Should return the buffer length passed to it as the argument "len" on + * success. */ -typedef size_t (*curl_formget_callback)(void *arg, const char *buf, size_t len); +typedef size_t (*curl_formget_callback)(void *arg, const char *buf, + size_t len); /* * NAME curl_formget() @@ -1264,7 +1903,9 @@ CURL_EXTERN void curl_free(void *p); * DESCRIPTION * * curl_global_init() should be invoked exactly once for each application that - * uses libcurl + * uses libcurl and before any call of other libcurl functions. + * + * This function is not thread-safe! */ CURL_EXTERN CURLcode curl_global_init(long flags); @@ -1335,6 +1976,37 @@ CURL_EXTERN void curl_slist_free_all(struct curl_slist *); */ CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused); +/* info about the certificate chain, only for OpenSSL builds. Asked + for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */ +struct curl_certinfo { + int num_of_certs; /* number of certificates with information */ + struct curl_slist **certinfo; /* for each index in this array, there's a + linked list with textual information in the + format "name: value" */ +}; + +/* enum for the different supported SSL backends */ +typedef enum { + CURLSSLBACKEND_NONE = 0, + CURLSSLBACKEND_OPENSSL = 1, + CURLSSLBACKEND_GNUTLS = 2, + CURLSSLBACKEND_NSS = 3, + CURLSSLBACKEND_QSOSSL = 4, + CURLSSLBACKEND_GSKIT = 5, + CURLSSLBACKEND_POLARSSL = 6, + CURLSSLBACKEND_CYASSL = 7, + CURLSSLBACKEND_SCHANNEL = 8, + CURLSSLBACKEND_DARWINSSL = 9 +} curl_sslbackend; + +/* Information about the SSL library used and the respective internal SSL + handle, which can be used to obtain further information regarding the + connection. Asked for with CURLINFO_TLS_SESSION. */ +struct curl_tlssessioninfo { + curl_sslbackend backend; + void *internals; +}; + #define CURLINFO_STRING 0x100000 #define CURLINFO_LONG 0x200000 #define CURLINFO_DOUBLE 0x300000 @@ -1374,9 +2046,22 @@ typedef enum { CURLINFO_COOKIELIST = CURLINFO_SLIST + 28, CURLINFO_LASTSOCKET = CURLINFO_LONG + 29, CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30, + CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, + CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, + CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33, + CURLINFO_CERTINFO = CURLINFO_SLIST + 34, + CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35, + CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36, + CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37, + CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38, + CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39, + CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40, + CURLINFO_LOCAL_IP = CURLINFO_STRING + 41, + CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42, + CURLINFO_TLS_SESSION = CURLINFO_SLIST + 43, /* Fill in new entries below here! */ - CURLINFO_LASTONE = 30 + CURLINFO_LASTONE = 43 } CURLINFO; /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as @@ -1400,6 +2085,7 @@ typedef enum { #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32) #define CURL_GLOBAL_NOTHING 0 #define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL +#define CURL_GLOBAL_ACK_EINTR (1<<2) /***************************************************************************** @@ -1409,7 +2095,7 @@ typedef enum { /* Different data locks for a single share */ typedef enum { CURL_LOCK_DATA_NONE = 0, - /* CURL_LOCK_DATA_SHARE is used internaly to say that + /* CURL_LOCK_DATA_SHARE is used internally to say that * the locking is just made to change the internal state of the share * itself. */ @@ -1444,14 +2130,15 @@ typedef enum { CURLSHE_BAD_OPTION, /* 1 */ CURLSHE_IN_USE, /* 2 */ CURLSHE_INVALID, /* 3 */ - CURLSHE_NOMEM, /* out of memory */ - CURLSHE_LAST /* never use */ + CURLSHE_NOMEM, /* 4 out of memory */ + CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */ + CURLSHE_LAST /* never use */ } CURLSHcode; typedef enum { CURLSHOPT_NONE, /* don't use */ CURLSHOPT_SHARE, /* specify a data type to share */ - CURLSHOPT_UNSHARE, /* specify shich data type to stop sharing */ + CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */ CURLSHOPT_LOCKFUNC, /* pass in a 'curl_lock_function' pointer */ CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */ CURLSHOPT_USERDATA, /* pass in a user data pointer used in the lock/unlock @@ -1471,15 +2158,16 @@ typedef enum { CURLVERSION_FIRST, CURLVERSION_SECOND, CURLVERSION_THIRD, + CURLVERSION_FOURTH, CURLVERSION_LAST /* never actually use this */ } CURLversion; /* The 'CURLVERSION_NOW' is the symbolic name meant to be used by - basicly all programs ever, that want to get version information. It is + basically all programs ever that want to get version information. It is meant to be a built-in version number for what kind of struct the caller expects. If the struct ever changes, we redefine the NOW to another enum from above. */ -#define CURLVERSION_NOW CURLVERSION_THIRD +#define CURLVERSION_NOW CURLVERSION_FOURTH typedef struct { CURLversion age; /* age of the returned struct */ @@ -1500,8 +2188,13 @@ typedef struct { /* This field was added in CURLVERSION_THIRD */ const char *libidn; + /* These field were added in CURLVERSION_FOURTH */ + /* Same as '_libiconv_version' if built with HAVE_ICONV */ int iconv_ver_num; + + const char *libssh_version; /* human readable string */ + } curl_version_info_data; #define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ @@ -1516,10 +2209,13 @@ typedef struct { #define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */ #define CURL_VERSION_IDN (1<<10) /* International Domain Names support */ #define CURL_VERSION_SSPI (1<<11) /* SSPI is supported */ -#define CURL_VERSION_CONV (1<<12) /* character conversions are - supported */ +#define CURL_VERSION_CONV (1<<12) /* character conversions supported */ +#define CURL_VERSION_CURLDEBUG (1<<13) /* debug memory tracking supported */ +#define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */ +#define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegating to winbind helper */ +#define CURL_VERSION_HTTP2 (1<<16) /* HTTP2 support built-in */ -/* + /* * NAME curl_version_info() * * DESCRIPTION @@ -1551,6 +2247,26 @@ CURL_EXTERN const char *curl_easy_strerror(CURLcode); */ CURL_EXTERN const char *curl_share_strerror(CURLSHcode); +/* + * NAME curl_easy_pause() + * + * DESCRIPTION + * + * The curl_easy_pause function pauses or unpauses transfers. Select the new + * state by setting the bitmask, use the convenience defines below. + * + */ +CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); + +#define CURLPAUSE_RECV (1<<0) +#define CURLPAUSE_RECV_CONT (0) + +#define CURLPAUSE_SEND (1<<2) +#define CURLPAUSE_SEND_CONT (0) + +#define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND) +#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT) + #ifdef __cplusplus } #endif @@ -1560,4 +2276,21 @@ CURL_EXTERN const char *curl_share_strerror(CURLSHcode); #include "easy.h" /* nothing in curl is fun without the easy stuff */ #include "multi.h" +/* the typechecker doesn't work in C++ (yet) */ +#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \ + ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \ + !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK) +#include "typecheck-gcc.h" +#else +#if defined(__STDC__) && (__STDC__ >= 1) +/* This preprocessor magic that replaces a call with the exact same call is + only done to make sure application authors pass exactly three arguments + to these functions. */ +#define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param) +#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg) +#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) +#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) +#endif /* __STDC__ >= 1 */ +#endif /* gcc >= 4.3 && !__cplusplus */ + #endif /* __CURL_CURL_H */ diff --git a/code/libcurl-7.35.0/curl/curlbuild.h b/code/libcurl-7.35.0/curl/curlbuild.h new file mode 100644 index 00000000..3ad2f018 --- /dev/null +++ b/code/libcurl-7.35.0/curl/curlbuild.h @@ -0,0 +1,585 @@ +#ifndef __CURL_CURLBUILD_H +#define __CURL_CURLBUILD_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at http://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* ================================================================ */ +/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ +/* ================================================================ */ + +/* + * NOTE 1: + * ------- + * + * See file include/curl/curlbuild.h.in, run configure, and forget + * that this file exists it is only used for non-configure systems. + * But you can keep reading if you want ;-) + * + */ + +/* ================================================================ */ +/* NOTES FOR NON-CONFIGURE SYSTEMS */ +/* ================================================================ */ + +/* + * NOTE 1: + * ------- + * + * Nothing in this file is intended to be modified or adjusted by the + * curl library user nor by the curl library builder. + * + * If you think that something actually needs to be changed, adjusted + * or fixed in this file, then, report it on the libcurl development + * mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/ + * + * Try to keep one section per platform, compiler and architecture, + * otherwise, if an existing section is reused for a different one and + * later on the original is adjusted, probably the piggybacking one can + * be adversely changed. + * + * In order to differentiate between platforms/compilers/architectures + * use only compiler built in predefined preprocessor symbols. + * + * This header file shall only export symbols which are 'curl' or 'CURL' + * prefixed, otherwise public name space would be polluted. + * + * NOTE 2: + * ------- + * + * For any given platform/compiler curl_off_t must be typedef'ed to a + * 64-bit wide signed integral data type. The width of this data type + * must remain constant and independent of any possible large file + * support settings. + * + * As an exception to the above, curl_off_t shall be typedef'ed to a + * 32-bit wide signed integral data type if there is no 64-bit type. + * + * As a general rule, curl_off_t shall not be mapped to off_t. This + * rule shall only be violated if off_t is the only 64-bit data type + * available and the size of off_t is independent of large file support + * settings. Keep your build on the safe side avoiding an off_t gating. + * If you have a 64-bit off_t then take for sure that another 64-bit + * data type exists, dig deeper and you will find it. + * + * NOTE 3: + * ------- + * + * Right now you might be staring at file include/curl/curlbuild.h.dist or + * at file include/curl/curlbuild.h, this is due to the following reason: + * file include/curl/curlbuild.h.dist is renamed to include/curl/curlbuild.h + * when the libcurl source code distribution archive file is created. + * + * File include/curl/curlbuild.h.dist is not included in the distribution + * archive. File include/curl/curlbuild.h is not present in the git tree. + * + * The distributed include/curl/curlbuild.h file is only intended to be used + * on systems which can not run the also distributed configure script. + * + * On systems capable of running the configure script, the configure process + * will overwrite the distributed include/curl/curlbuild.h file with one that + * is suitable and specific to the library being configured and built, which + * is generated from the include/curl/curlbuild.h.in template file. + * + * If you check out from git on a non-configure platform, you must run the + * appropriate buildconf* script to set up curlbuild.h and other local files. + * + */ + +/* ================================================================ */ +/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ +/* ================================================================ */ + +#ifdef CURL_SIZEOF_LONG +# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined +#endif + +#ifdef CURL_TYPEOF_CURL_SOCKLEN_T +# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined +#endif + +#ifdef CURL_SIZEOF_CURL_SOCKLEN_T +# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined +#endif + +#ifdef CURL_TYPEOF_CURL_OFF_T +# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_FORMAT_CURL_OFF_T +# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_FORMAT_CURL_OFF_TU +# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined +#endif + +#ifdef CURL_FORMAT_OFF_T +# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined +#endif + +#ifdef CURL_SIZEOF_CURL_OFF_T +# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_SUFFIX_CURL_OFF_T +# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined +#endif + +#ifdef CURL_SUFFIX_CURL_OFF_TU +# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined +#endif + +/* ================================================================ */ +/* EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY */ +/* ================================================================ */ + +#if defined(__DJGPP__) || defined(__GO32__) +# if defined(__DJGPP__) && (__DJGPP__ > 1) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# else +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# endif +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +#elif defined(__SALFORDC__) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +#elif defined(__BORLANDC__) +# if (__BORLANDC__ < 0x520) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# else +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 +# endif +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +#elif defined(__TURBOC__) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +#elif defined(__WATCOMC__) +# if defined(__386__) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 +# else +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# endif +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +#elif defined(__POCC__) +# if (__POCC__ < 280) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# elif defined(_MSC_VER) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 +# else +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# endif +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +#elif defined(__LCC__) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +#elif defined(__SYMBIAN32__) +# if defined(__EABI__) /* Treat all ARM compilers equally */ +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# elif defined(__CW32__) +# pragma longlong on +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# elif defined(__VC32__) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# endif +# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +#elif defined(__MWERKS__) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +#elif defined(_WIN32_WCE) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +#elif defined(__MINGW32__) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +#elif defined(__VMS) +# if defined(__VAX) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# else +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# endif +# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +#elif defined(__OS400__) +# if defined(__ILEC400__) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_SYS_SOCKET_H 1 +# endif + +#elif defined(__MVS__) +# if defined(__IBMC__) || defined(__IBMCPP__) +# if defined(_ILP32) +# define CURL_SIZEOF_LONG 4 +# elif defined(_LP64) +# define CURL_SIZEOF_LONG 8 +# endif +# if defined(_LONG_LONG) +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# elif defined(_LP64) +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# else +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# endif +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_SYS_SOCKET_H 1 +# endif + +#elif defined(__370__) +# if defined(__IBMC__) || defined(__IBMCPP__) +# if defined(_ILP32) +# define CURL_SIZEOF_LONG 4 +# elif defined(_LP64) +# define CURL_SIZEOF_LONG 8 +# endif +# if defined(_LONG_LONG) +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# elif defined(_LP64) +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# else +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# endif +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_SYS_SOCKET_H 1 +# endif + +#elif defined(TPF) +# define CURL_SIZEOF_LONG 8 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +/* ===================================== */ +/* KEEP MSVC THE PENULTIMATE ENTRY */ +/* ===================================== */ + +#elif defined(_MSC_VER) +# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_FORMAT_OFF_T "%I64d" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 +# else +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# endif +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 + +/* ===================================== */ +/* KEEP GENERIC GCC THE LAST ENTRY */ +/* ===================================== */ + +#elif defined(__GNUC__) +# if defined(__ILP32__) || \ + defined(__i386__) || defined(__ppc__) || defined(__arm__) +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_FORMAT_OFF_T "%lld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# elif defined(__LP64__) || \ + defined(__x86_64__) || defined(__ppc64__) +# define CURL_SIZEOF_LONG 8 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_FORMAT_OFF_T "%ld" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# endif +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_SYS_SOCKET_H 1 + +#else +# error "Unknown non-configure build target!" + Error Compilation_aborted_Unknown_non_configure_build_target +#endif + +/* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file */ +/* sys/types.h is required here to properly make type definitions below. */ +#ifdef CURL_PULL_SYS_TYPES_H +# include +#endif + +/* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file */ +/* sys/socket.h is required here to properly make type definitions below. */ +#ifdef CURL_PULL_SYS_SOCKET_H +# include +#endif + +/* Data type definition of curl_socklen_t. */ + +#ifdef CURL_TYPEOF_CURL_SOCKLEN_T + typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; +#endif + +/* Data type definition of curl_off_t. */ + +#ifdef CURL_TYPEOF_CURL_OFF_T + typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; +#endif + +#endif /* __CURL_CURLBUILD_H */ diff --git a/code/libcurl-7.35.0/curl/curlrules.h b/code/libcurl-7.35.0/curl/curlrules.h new file mode 100644 index 00000000..7c2ede35 --- /dev/null +++ b/code/libcurl-7.35.0/curl/curlrules.h @@ -0,0 +1,262 @@ +#ifndef __CURL_CURLRULES_H +#define __CURL_CURLRULES_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at http://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* ================================================================ */ +/* COMPILE TIME SANITY CHECKS */ +/* ================================================================ */ + +/* + * NOTE 1: + * ------- + * + * All checks done in this file are intentionally placed in a public + * header file which is pulled by curl/curl.h when an application is + * being built using an already built libcurl library. Additionally + * this file is also included and used when building the library. + * + * If compilation fails on this file it is certainly sure that the + * problem is elsewhere. It could be a problem in the curlbuild.h + * header file, or simply that you are using different compilation + * settings than those used to build the library. + * + * Nothing in this file is intended to be modified or adjusted by the + * curl library user nor by the curl library builder. + * + * Do not deactivate any check, these are done to make sure that the + * library is properly built and used. + * + * You can find further help on the libcurl development mailing list: + * http://cool.haxx.se/mailman/listinfo/curl-library/ + * + * NOTE 2 + * ------ + * + * Some of the following compile time checks are based on the fact + * that the dimension of a constant array can not be a negative one. + * In this way if the compile time verification fails, the compilation + * will fail issuing an error. The error description wording is compiler + * dependent but it will be quite similar to one of the following: + * + * "negative subscript or subscript is too large" + * "array must have at least one element" + * "-1 is an illegal array size" + * "size of array is negative" + * + * If you are building an application which tries to use an already + * built libcurl library and you are getting this kind of errors on + * this file, it is a clear indication that there is a mismatch between + * how the library was built and how you are trying to use it for your + * application. Your already compiled or binary library provider is the + * only one who can give you the details you need to properly use it. + */ + +/* + * Verify that some macros are actually defined. + */ + +#ifndef CURL_SIZEOF_LONG +# error "CURL_SIZEOF_LONG definition is missing!" + Error Compilation_aborted_CURL_SIZEOF_LONG_is_missing +#endif + +#ifndef CURL_TYPEOF_CURL_SOCKLEN_T +# error "CURL_TYPEOF_CURL_SOCKLEN_T definition is missing!" + Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_is_missing +#endif + +#ifndef CURL_SIZEOF_CURL_SOCKLEN_T +# error "CURL_SIZEOF_CURL_SOCKLEN_T definition is missing!" + Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_is_missing +#endif + +#ifndef CURL_TYPEOF_CURL_OFF_T +# error "CURL_TYPEOF_CURL_OFF_T definition is missing!" + Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_is_missing +#endif + +#ifndef CURL_FORMAT_CURL_OFF_T +# error "CURL_FORMAT_CURL_OFF_T definition is missing!" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_is_missing +#endif + +#ifndef CURL_FORMAT_CURL_OFF_TU +# error "CURL_FORMAT_CURL_OFF_TU definition is missing!" + Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_is_missing +#endif + +#ifndef CURL_FORMAT_OFF_T +# error "CURL_FORMAT_OFF_T definition is missing!" + Error Compilation_aborted_CURL_FORMAT_OFF_T_is_missing +#endif + +#ifndef CURL_SIZEOF_CURL_OFF_T +# error "CURL_SIZEOF_CURL_OFF_T definition is missing!" + Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_is_missing +#endif + +#ifndef CURL_SUFFIX_CURL_OFF_T +# error "CURL_SUFFIX_CURL_OFF_T definition is missing!" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_is_missing +#endif + +#ifndef CURL_SUFFIX_CURL_OFF_TU +# error "CURL_SUFFIX_CURL_OFF_TU definition is missing!" + Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_is_missing +#endif + +/* + * Macros private to this header file. + */ + +#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1 + +#define CurlchkszGE(t1, t2) sizeof(t1) >= sizeof(t2) ? 1 : -1 + +/* + * Verify that the size previously defined and expected for long + * is the same as the one reported by sizeof() at compile time. + */ + +typedef char + __curl_rule_01__ + [CurlchkszEQ(long, CURL_SIZEOF_LONG)]; + +/* + * Verify that the size previously defined and expected for + * curl_off_t is actually the the same as the one reported + * by sizeof() at compile time. + */ + +typedef char + __curl_rule_02__ + [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)]; + +/* + * Verify at compile time that the size of curl_off_t as reported + * by sizeof() is greater or equal than the one reported for long + * for the current compilation. + */ + +typedef char + __curl_rule_03__ + [CurlchkszGE(curl_off_t, long)]; + +/* + * Verify that the size previously defined and expected for + * curl_socklen_t is actually the the same as the one reported + * by sizeof() at compile time. + */ + +typedef char + __curl_rule_04__ + [CurlchkszEQ(curl_socklen_t, CURL_SIZEOF_CURL_SOCKLEN_T)]; + +/* + * Verify at compile time that the size of curl_socklen_t as reported + * by sizeof() is greater or equal than the one reported for int for + * the current compilation. + */ + +typedef char + __curl_rule_05__ + [CurlchkszGE(curl_socklen_t, int)]; + +/* ================================================================ */ +/* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */ +/* ================================================================ */ + +/* + * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow + * these to be visible and exported by the external libcurl interface API, + * while also making them visible to the library internals, simply including + * curl_setup.h, without actually needing to include curl.h internally. + * If some day this section would grow big enough, all this should be moved + * to its own header file. + */ + +/* + * Figure out if we can use the ## preprocessor operator, which is supported + * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__ + * or __cplusplus so we need to carefully check for them too. + */ + +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ + defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ + defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \ + defined(__ILEC400__) + /* This compiler is believed to have an ISO compatible preprocessor */ +#define CURL_ISOCPP +#else + /* This compiler is believed NOT to have an ISO compatible preprocessor */ +#undef CURL_ISOCPP +#endif + +/* + * Macros for minimum-width signed and unsigned curl_off_t integer constants. + */ + +#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551) +# define __CURL_OFF_T_C_HLPR2(x) x +# define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x) +# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ + __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T) +# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ + __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU) +#else +# ifdef CURL_ISOCPP +# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix +# else +# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix +# endif +# define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix) +# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T) +# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU) +#endif + +/* + * Get rid of macros private to this header file. + */ + +#undef CurlchkszEQ +#undef CurlchkszGE + +/* + * Get rid of macros not intended to exist beyond this point. + */ + +#undef CURL_PULL_WS2TCPIP_H +#undef CURL_PULL_SYS_TYPES_H +#undef CURL_PULL_SYS_SOCKET_H +#undef CURL_PULL_SYS_POLL_H +#undef CURL_PULL_STDINT_H +#undef CURL_PULL_INTTYPES_H + +#undef CURL_TYPEOF_CURL_SOCKLEN_T +#undef CURL_TYPEOF_CURL_OFF_T + +#ifdef CURL_NO_OLDIES +#undef CURL_FORMAT_OFF_T /* not required since 7.19.0 - obsoleted in 7.20.0 */ +#endif + +#endif /* __CURL_CURLRULES_H */ diff --git a/code/libcurl/curl/curlver.h b/code/libcurl-7.35.0/curl/curlver.h similarity index 75% rename from code/libcurl/curl/curlver.h rename to code/libcurl-7.35.0/curl/curlver.h index 1634b172..2de9e5a5 100644 --- a/code/libcurl/curl/curlver.h +++ b/code/libcurl-7.35.0/curl/curlver.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2006, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -20,21 +20,23 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id: curlver.h,v 1.21 2006-06-12 07:24:14 bagder Exp $ ***************************************************************************/ /* This header file contains nothing but libcurl version info, generated by a script at release-time. This was made its own header file in 7.11.2 */ +/* This is the global package copyright */ +#define LIBCURL_COPYRIGHT "1996 - 2014 Daniel Stenberg, ." + /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.15.5" +#define LIBCURL_VERSION "7.35.0" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 -#define LIBCURL_VERSION_MINOR 15 -#define LIBCURL_VERSION_PATCH 5 +#define LIBCURL_VERSION_MINOR 35 +#define LIBCURL_VERSION_PATCH 0 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -51,6 +53,17 @@ and it is always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x070f05 +#define LIBCURL_VERSION_NUM 0x072300 + +/* + * This is the date and time when the full source package was created. The + * timestamp is not stored in git, as the timestamp is properly set in the + * tarballs by the maketgz script. + * + * The format of the date should follow this template: + * + * "Mon Feb 12 11:35:33 UTC 2007" + */ +#define LIBCURL_TIMESTAMP "Wed Jan 29 07:09:27 UTC 2014" #endif /* __CURL_CURLVER_H */ diff --git a/code/libcurl/curl/easy.h b/code/libcurl-7.35.0/curl/easy.h similarity index 76% rename from code/libcurl/curl/easy.h rename to code/libcurl-7.35.0/curl/easy.h index b5867200..c1e3e760 100644 --- a/code/libcurl/curl/easy.h +++ b/code/libcurl-7.35.0/curl/easy.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id: easy.h,v 1.13 2004/11/09 14:02:58 giva Exp $ ***************************************************************************/ #ifdef __cplusplus extern "C" { @@ -54,8 +53,8 @@ CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); * * Creates a new curl session handle with the same options set for the handle * passed in. Duplicating a handle could only be a matter of cloning data and - * options, internal state info and things like persistant connections cannot - * be transfered. It is useful in multithreaded applications when you can run + * options, internal state info and things like persistent connections cannot + * be transferred. It is useful in multithreaded applications when you can run * curl_easy_duphandle() for each new thread to avoid a series of identical * curl_easy_setopt() invokes in every thread. */ @@ -74,6 +73,28 @@ CURL_EXTERN CURL* curl_easy_duphandle(CURL *curl); */ CURL_EXTERN void curl_easy_reset(CURL *curl); +/* + * NAME curl_easy_recv() + * + * DESCRIPTION + * + * Receives data from the connected socket. Use after successful + * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. + */ +CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, + size_t *n); + +/* + * NAME curl_easy_send() + * + * DESCRIPTION + * + * Sends data over the connected socket. Use after successful + * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. + */ +CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, + size_t buflen, size_t *n); + #ifdef __cplusplus } #endif diff --git a/code/libcurl/curl/mprintf.h b/code/libcurl-7.35.0/curl/mprintf.h similarity index 77% rename from code/libcurl/curl/mprintf.h rename to code/libcurl-7.35.0/curl/mprintf.h index 8d835f13..cc9e7f5d 100644 --- a/code/libcurl/curl/mprintf.h +++ b/code/libcurl-7.35.0/curl/mprintf.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2006, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id: mprintf.h,v 1.13 2006-03-28 10:08:54 bagder Exp $ ***************************************************************************/ #include @@ -28,22 +27,38 @@ #include "curl.h" +#ifdef __cplusplus +extern "C" { +#endif + CURL_EXTERN int curl_mprintf(const char *format, ...); CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); -CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, const char *format, ...); +CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, + const char *format, ...); CURL_EXTERN int curl_mvprintf(const char *format, va_list args); CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); -CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format, va_list args); +CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, + const char *format, va_list args); CURL_EXTERN char *curl_maprintf(const char *format, ...); CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); #ifdef _MPRINTF_REPLACE +# undef printf +# undef fprintf +# undef sprintf +# undef vsprintf +# undef snprintf +# undef vprintf +# undef vfprintf +# undef vsnprintf +# undef aprintf +# undef vaprintf # define printf curl_mprintf # define fprintf curl_mfprintf #ifdef CURLDEBUG -/* When built with CURLDEBUG we define away the sprintf() functions since we +/* When built with CURLDEBUG we define away the sprintf functions since we don't want internal code to be using them */ # define sprintf sprintf_was_used # define vsprintf vsprintf_was_used @@ -59,4 +74,8 @@ CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); # define vaprintf curl_mvaprintf #endif +#ifdef __cplusplus +} +#endif + #endif /* __CURL_MPRINTF_H */ diff --git a/code/libcurl/curl/multi.h b/code/libcurl-7.35.0/curl/multi.h similarity index 75% rename from code/libcurl/curl/multi.h rename to code/libcurl-7.35.0/curl/multi.h index 05aeafc7..3c4acb0f 100644 --- a/code/libcurl/curl/multi.h +++ b/code/libcurl-7.35.0/curl/multi.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2006, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id: multi.h,v 1.38 2006-08-04 18:53:48 danf Exp $ ***************************************************************************/ /* This is an "external" header file. Don't give away any internals here! @@ -37,34 +36,6 @@ file descriptors simultaneous easily. */ -#if defined(_WIN32) && !defined(WIN32) -/* Chris Lewis mentioned that he doesn't get WIN32 defined, only _WIN32 so we - make this adjustment to catch this. */ -#define WIN32 1 -#endif - -#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) && \ - !defined(__CYGWIN__) || defined(__MINGW32__) -#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H)) -/* The check above prevents the winsock2 inclusion if winsock.h already was - included, since they can't co-exist without problems */ -#include -#endif -#else - -/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish - libc5-based Linux systems. Only include it on system that are known to - require it! */ -#if defined(_AIX) || defined(NETWARE) || defined(__NetBSD__) || defined(_MINIX) -#include -#endif - -#ifndef _WIN32_WCE -#include -#endif -#include -#include -#endif /* * This header file should not really need to include "curl.h" since curl.h @@ -83,18 +54,6 @@ extern "C" { typedef void CURLM; -#ifndef curl_socket_typedef -/* Public socket typedef */ -#ifdef WIN32 -typedef SOCKET curl_socket_t; -#define CURL_SOCKET_BAD INVALID_SOCKET -#else -typedef int curl_socket_t; -#define CURL_SOCKET_BAD -1 -#endif -#define curl_socket_typedef -#endif /* curl_socket_typedef */ - typedef enum { CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or curl_multi_socket*() soon */ @@ -105,6 +64,8 @@ typedef enum { CURLM_INTERNAL_ERROR, /* this is a libcurl bug */ CURLM_BAD_SOCKET, /* the passed in socket argument did not match */ CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */ + CURLM_ADDED_ALREADY, /* an easy handle already added to a multi handle was + attempted to get added - again */ CURLM_LAST } CURLMcode; @@ -130,6 +91,19 @@ struct CURLMsg { }; typedef struct CURLMsg CURLMsg; +/* Based on poll(2) structure and values. + * We don't use pollfd and POLL* constants explicitly + * to cover platforms without poll(). */ +#define CURL_WAIT_POLLIN 0x0001 +#define CURL_WAIT_POLLPRI 0x0002 +#define CURL_WAIT_POLLOUT 0x0004 + +struct curl_waitfd { + curl_socket_t fd; + short events; + short revents; /* not supported yet */ +}; + /* * Name: curl_multi_init() * @@ -174,6 +148,20 @@ CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle, fd_set *exc_fd_set, int *max_fd); +/* + * Name: curl_multi_wait() + * + * Desc: Poll on all fds within a CURLM set as well as any + * additional fds passed to the function. + * + * Returns: CURLMcode type, general multi error code. + */ +CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle, + struct curl_waitfd extra_fds[], + unsigned int extra_nfds, + int timeout_ms, + int *ret); + /* * Name: curl_multi_perform() * @@ -264,6 +252,10 @@ CURL_EXTERN const char *curl_multi_strerror(CURLMcode); #define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD +#define CURL_CSELECT_IN 0x01 +#define CURL_CSELECT_OUT 0x02 +#define CURL_CSELECT_ERR 0x04 + typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ curl_socket_t s, /* socket */ int what, /* see above */ @@ -271,13 +263,39 @@ typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ pointer */ void *socketp); /* private socket pointer */ +/* + * Name: curl_multi_timer_callback + * + * Desc: Called by libcurl whenever the library detects a change in the + * maximum number of milliseconds the app is allowed to wait before + * curl_multi_socket() or curl_multi_perform() must be called + * (to allow libcurl's timed events to take place). + * + * Returns: The callback should return zero. + */ +typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */ + long timeout_ms, /* see above */ + void *userp); /* private callback + pointer */ CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s, int *running_handles); +CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle, + curl_socket_t s, + int ev_bitmask, + int *running_handles); + CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle, int *running_handles); +#ifndef CURL_ALLOW_OLD_MULTI_SOCKET +/* This macro below was added in 7.16.3 to push users who recompile to use + the new curl_multi_socket_action() instead of the old curl_multi_socket() +*/ +#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z) +#endif + /* * Name: curl_multi_timeout() * @@ -293,7 +311,7 @@ CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle, #undef CINIT /* re-using the same name as in curl.h */ #ifdef CURL_ISOCPP -#define CINIT(name,type,number) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + number +#define CINIT(name,type,num) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + num #else /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ #define LONG CURLOPTTYPE_LONG @@ -310,6 +328,43 @@ typedef enum { /* This is the argument passed to the socket callback */ CINIT(SOCKETDATA, OBJECTPOINT, 2), + /* set to 1 to enable pipelining for this multi handle */ + CINIT(PIPELINING, LONG, 3), + + /* This is the timer callback function pointer */ + CINIT(TIMERFUNCTION, FUNCTIONPOINT, 4), + + /* This is the argument passed to the timer callback */ + CINIT(TIMERDATA, OBJECTPOINT, 5), + + /* maximum number of entries in the connection cache */ + CINIT(MAXCONNECTS, LONG, 6), + + /* maximum number of (pipelining) connections to one host */ + CINIT(MAX_HOST_CONNECTIONS, LONG, 7), + + /* maximum number of requests in a pipeline */ + CINIT(MAX_PIPELINE_LENGTH, LONG, 8), + + /* a connection with a content-length longer than this + will not be considered for pipelining */ + CINIT(CONTENT_LENGTH_PENALTY_SIZE, OFF_T, 9), + + /* a connection with a chunk length longer than this + will not be considered for pipelining */ + CINIT(CHUNK_LENGTH_PENALTY_SIZE, OFF_T, 10), + + /* a list of site names(+port) that are blacklisted from + pipelining */ + CINIT(PIPELINING_SITE_BL, OBJECTPOINT, 11), + + /* a list of server types that are blacklisted from + pipelining */ + CINIT(PIPELINING_SERVER_BL, OBJECTPOINT, 12), + + /* maximum number of open connections in total */ + CINIT(MAX_TOTAL_CONNECTIONS, LONG, 13), + CURLMOPT_LASTENTRY /* the last unused */ } CURLMoption; diff --git a/code/libcurl/curl/stdcheaders.h b/code/libcurl-7.35.0/curl/stdcheaders.h similarity index 74% rename from code/libcurl/curl/stdcheaders.h rename to code/libcurl-7.35.0/curl/stdcheaders.h index 024413ac..ad82ef63 100644 --- a/code/libcurl/curl/stdcheaders.h +++ b/code/libcurl-7.35.0/curl/stdcheaders.h @@ -1,18 +1,18 @@ #ifndef __STDC_HEADERS_H #define __STDC_HEADERS_H /*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at http://curl.haxx.se/docs/copyright.html. - * + * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is * furnished to do so, under the terms of the COPYING file. @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id: stdcheaders.h,v 1.8 2004/01/07 09:19:34 bagder Exp $ ***************************************************************************/ #include @@ -31,4 +30,4 @@ size_t fwrite (const void *, size_t, size_t, FILE *); int strcasecmp(const char *, const char *); int strncasecmp(const char *, const char *, size_t); -#endif +#endif /* __STDC_HEADERS_H */ diff --git a/code/libcurl-7.35.0/curl/typecheck-gcc.h b/code/libcurl-7.35.0/curl/typecheck-gcc.h new file mode 100644 index 00000000..cdeba21a --- /dev/null +++ b/code/libcurl-7.35.0/curl/typecheck-gcc.h @@ -0,0 +1,610 @@ +#ifndef __CURL_TYPECHECK_GCC_H +#define __CURL_TYPECHECK_GCC_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at http://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* wraps curl_easy_setopt() with typechecking */ + +/* To add a new kind of warning, add an + * if(_curl_is_sometype_option(_curl_opt)) + * if(!_curl_is_sometype(value)) + * _curl_easy_setopt_err_sometype(); + * block and define _curl_is_sometype_option, _curl_is_sometype and + * _curl_easy_setopt_err_sometype below + * + * NOTE: We use two nested 'if' statements here instead of the && operator, in + * order to work around gcc bug #32061. It affects only gcc 4.3.x/4.4.x + * when compiling with -Wlogical-op. + * + * To add an option that uses the same type as an existing option, you'll just + * need to extend the appropriate _curl_*_option macro + */ +#define curl_easy_setopt(handle, option, value) \ +__extension__ ({ \ + __typeof__ (option) _curl_opt = option; \ + if(__builtin_constant_p(_curl_opt)) { \ + if(_curl_is_long_option(_curl_opt)) \ + if(!_curl_is_long(value)) \ + _curl_easy_setopt_err_long(); \ + if(_curl_is_off_t_option(_curl_opt)) \ + if(!_curl_is_off_t(value)) \ + _curl_easy_setopt_err_curl_off_t(); \ + if(_curl_is_string_option(_curl_opt)) \ + if(!_curl_is_string(value)) \ + _curl_easy_setopt_err_string(); \ + if(_curl_is_write_cb_option(_curl_opt)) \ + if(!_curl_is_write_cb(value)) \ + _curl_easy_setopt_err_write_callback(); \ + if((_curl_opt) == CURLOPT_READFUNCTION) \ + if(!_curl_is_read_cb(value)) \ + _curl_easy_setopt_err_read_cb(); \ + if((_curl_opt) == CURLOPT_IOCTLFUNCTION) \ + if(!_curl_is_ioctl_cb(value)) \ + _curl_easy_setopt_err_ioctl_cb(); \ + if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \ + if(!_curl_is_sockopt_cb(value)) \ + _curl_easy_setopt_err_sockopt_cb(); \ + if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \ + if(!_curl_is_opensocket_cb(value)) \ + _curl_easy_setopt_err_opensocket_cb(); \ + if((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \ + if(!_curl_is_progress_cb(value)) \ + _curl_easy_setopt_err_progress_cb(); \ + if((_curl_opt) == CURLOPT_DEBUGFUNCTION) \ + if(!_curl_is_debug_cb(value)) \ + _curl_easy_setopt_err_debug_cb(); \ + if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \ + if(!_curl_is_ssl_ctx_cb(value)) \ + _curl_easy_setopt_err_ssl_ctx_cb(); \ + if(_curl_is_conv_cb_option(_curl_opt)) \ + if(!_curl_is_conv_cb(value)) \ + _curl_easy_setopt_err_conv_cb(); \ + if((_curl_opt) == CURLOPT_SEEKFUNCTION) \ + if(!_curl_is_seek_cb(value)) \ + _curl_easy_setopt_err_seek_cb(); \ + if(_curl_is_cb_data_option(_curl_opt)) \ + if(!_curl_is_cb_data(value)) \ + _curl_easy_setopt_err_cb_data(); \ + if((_curl_opt) == CURLOPT_ERRORBUFFER) \ + if(!_curl_is_error_buffer(value)) \ + _curl_easy_setopt_err_error_buffer(); \ + if((_curl_opt) == CURLOPT_STDERR) \ + if(!_curl_is_FILE(value)) \ + _curl_easy_setopt_err_FILE(); \ + if(_curl_is_postfields_option(_curl_opt)) \ + if(!_curl_is_postfields(value)) \ + _curl_easy_setopt_err_postfields(); \ + if((_curl_opt) == CURLOPT_HTTPPOST) \ + if(!_curl_is_arr((value), struct curl_httppost)) \ + _curl_easy_setopt_err_curl_httpost(); \ + if(_curl_is_slist_option(_curl_opt)) \ + if(!_curl_is_arr((value), struct curl_slist)) \ + _curl_easy_setopt_err_curl_slist(); \ + if((_curl_opt) == CURLOPT_SHARE) \ + if(!_curl_is_ptr((value), CURLSH)) \ + _curl_easy_setopt_err_CURLSH(); \ + } \ + curl_easy_setopt(handle, _curl_opt, value); \ +}) + +/* wraps curl_easy_getinfo() with typechecking */ +/* FIXME: don't allow const pointers */ +#define curl_easy_getinfo(handle, info, arg) \ +__extension__ ({ \ + __typeof__ (info) _curl_info = info; \ + if(__builtin_constant_p(_curl_info)) { \ + if(_curl_is_string_info(_curl_info)) \ + if(!_curl_is_arr((arg), char *)) \ + _curl_easy_getinfo_err_string(); \ + if(_curl_is_long_info(_curl_info)) \ + if(!_curl_is_arr((arg), long)) \ + _curl_easy_getinfo_err_long(); \ + if(_curl_is_double_info(_curl_info)) \ + if(!_curl_is_arr((arg), double)) \ + _curl_easy_getinfo_err_double(); \ + if(_curl_is_slist_info(_curl_info)) \ + if(!_curl_is_arr((arg), struct curl_slist *)) \ + _curl_easy_getinfo_err_curl_slist(); \ + } \ + curl_easy_getinfo(handle, _curl_info, arg); \ +}) + +/* TODO: typechecking for curl_share_setopt() and curl_multi_setopt(), + * for now just make sure that the functions are called with three + * arguments + */ +#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) +#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) + + +/* the actual warnings, triggered by calling the _curl_easy_setopt_err* + * functions */ + +/* To define a new warning, use _CURL_WARNING(identifier, "message") */ +#define _CURL_WARNING(id, message) \ + static void __attribute__((__warning__(message))) \ + __attribute__((__unused__)) __attribute__((__noinline__)) \ + id(void) { __asm__(""); } + +_CURL_WARNING(_curl_easy_setopt_err_long, + "curl_easy_setopt expects a long argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_curl_off_t, + "curl_easy_setopt expects a curl_off_t argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_string, + "curl_easy_setopt expects a " + "string (char* or char[]) argument for this option" + ) +_CURL_WARNING(_curl_easy_setopt_err_write_callback, + "curl_easy_setopt expects a curl_write_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_read_cb, + "curl_easy_setopt expects a curl_read_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_ioctl_cb, + "curl_easy_setopt expects a curl_ioctl_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_sockopt_cb, + "curl_easy_setopt expects a curl_sockopt_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_opensocket_cb, + "curl_easy_setopt expects a " + "curl_opensocket_callback argument for this option" + ) +_CURL_WARNING(_curl_easy_setopt_err_progress_cb, + "curl_easy_setopt expects a curl_progress_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_debug_cb, + "curl_easy_setopt expects a curl_debug_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_ssl_ctx_cb, + "curl_easy_setopt expects a curl_ssl_ctx_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_conv_cb, + "curl_easy_setopt expects a curl_conv_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_seek_cb, + "curl_easy_setopt expects a curl_seek_callback argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_cb_data, + "curl_easy_setopt expects a " + "private data pointer as argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_error_buffer, + "curl_easy_setopt expects a " + "char buffer of CURL_ERROR_SIZE as argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_FILE, + "curl_easy_setopt expects a FILE* argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_postfields, + "curl_easy_setopt expects a void* or char* argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_curl_httpost, + "curl_easy_setopt expects a struct curl_httppost* argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_curl_slist, + "curl_easy_setopt expects a struct curl_slist* argument for this option") +_CURL_WARNING(_curl_easy_setopt_err_CURLSH, + "curl_easy_setopt expects a CURLSH* argument for this option") + +_CURL_WARNING(_curl_easy_getinfo_err_string, + "curl_easy_getinfo expects a pointer to char * for this info") +_CURL_WARNING(_curl_easy_getinfo_err_long, + "curl_easy_getinfo expects a pointer to long for this info") +_CURL_WARNING(_curl_easy_getinfo_err_double, + "curl_easy_getinfo expects a pointer to double for this info") +_CURL_WARNING(_curl_easy_getinfo_err_curl_slist, + "curl_easy_getinfo expects a pointer to struct curl_slist * for this info") + +/* groups of curl_easy_setops options that take the same type of argument */ + +/* To add a new option to one of the groups, just add + * (option) == CURLOPT_SOMETHING + * to the or-expression. If the option takes a long or curl_off_t, you don't + * have to do anything + */ + +/* evaluates to true if option takes a long argument */ +#define _curl_is_long_option(option) \ + (0 < (option) && (option) < CURLOPTTYPE_OBJECTPOINT) + +#define _curl_is_off_t_option(option) \ + ((option) > CURLOPTTYPE_OFF_T) + +/* evaluates to true if option takes a char* argument */ +#define _curl_is_string_option(option) \ + ((option) == CURLOPT_URL || \ + (option) == CURLOPT_PROXY || \ + (option) == CURLOPT_INTERFACE || \ + (option) == CURLOPT_NETRC_FILE || \ + (option) == CURLOPT_USERPWD || \ + (option) == CURLOPT_USERNAME || \ + (option) == CURLOPT_PASSWORD || \ + (option) == CURLOPT_PROXYUSERPWD || \ + (option) == CURLOPT_PROXYUSERNAME || \ + (option) == CURLOPT_PROXYPASSWORD || \ + (option) == CURLOPT_NOPROXY || \ + (option) == CURLOPT_ACCEPT_ENCODING || \ + (option) == CURLOPT_REFERER || \ + (option) == CURLOPT_USERAGENT || \ + (option) == CURLOPT_COOKIE || \ + (option) == CURLOPT_COOKIEFILE || \ + (option) == CURLOPT_COOKIEJAR || \ + (option) == CURLOPT_COOKIELIST || \ + (option) == CURLOPT_FTPPORT || \ + (option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \ + (option) == CURLOPT_FTP_ACCOUNT || \ + (option) == CURLOPT_RANGE || \ + (option) == CURLOPT_CUSTOMREQUEST || \ + (option) == CURLOPT_SSLCERT || \ + (option) == CURLOPT_SSLCERTTYPE || \ + (option) == CURLOPT_SSLKEY || \ + (option) == CURLOPT_SSLKEYTYPE || \ + (option) == CURLOPT_KEYPASSWD || \ + (option) == CURLOPT_SSLENGINE || \ + (option) == CURLOPT_CAINFO || \ + (option) == CURLOPT_CAPATH || \ + (option) == CURLOPT_RANDOM_FILE || \ + (option) == CURLOPT_EGDSOCKET || \ + (option) == CURLOPT_SSL_CIPHER_LIST || \ + (option) == CURLOPT_KRBLEVEL || \ + (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \ + (option) == CURLOPT_SSH_PUBLIC_KEYFILE || \ + (option) == CURLOPT_SSH_PRIVATE_KEYFILE || \ + (option) == CURLOPT_CRLFILE || \ + (option) == CURLOPT_ISSUERCERT || \ + (option) == CURLOPT_SOCKS5_GSSAPI_SERVICE || \ + (option) == CURLOPT_SSH_KNOWNHOSTS || \ + (option) == CURLOPT_MAIL_FROM || \ + (option) == CURLOPT_RTSP_SESSION_ID || \ + (option) == CURLOPT_RTSP_STREAM_URI || \ + (option) == CURLOPT_RTSP_TRANSPORT || \ + (option) == CURLOPT_XOAUTH2_BEARER || \ + (option) == CURLOPT_DNS_SERVERS || \ + (option) == CURLOPT_DNS_INTERFACE || \ + (option) == CURLOPT_DNS_LOCAL_IP4 || \ + (option) == CURLOPT_DNS_LOCAL_IP6 || \ + (option) == CURLOPT_LOGIN_OPTIONS || \ + 0) + +/* evaluates to true if option takes a curl_write_callback argument */ +#define _curl_is_write_cb_option(option) \ + ((option) == CURLOPT_HEADERFUNCTION || \ + (option) == CURLOPT_WRITEFUNCTION) + +/* evaluates to true if option takes a curl_conv_callback argument */ +#define _curl_is_conv_cb_option(option) \ + ((option) == CURLOPT_CONV_TO_NETWORK_FUNCTION || \ + (option) == CURLOPT_CONV_FROM_NETWORK_FUNCTION || \ + (option) == CURLOPT_CONV_FROM_UTF8_FUNCTION) + +/* evaluates to true if option takes a data argument to pass to a callback */ +#define _curl_is_cb_data_option(option) \ + ((option) == CURLOPT_WRITEDATA || \ + (option) == CURLOPT_READDATA || \ + (option) == CURLOPT_IOCTLDATA || \ + (option) == CURLOPT_SOCKOPTDATA || \ + (option) == CURLOPT_OPENSOCKETDATA || \ + (option) == CURLOPT_PROGRESSDATA || \ + (option) == CURLOPT_WRITEHEADER || \ + (option) == CURLOPT_DEBUGDATA || \ + (option) == CURLOPT_SSL_CTX_DATA || \ + (option) == CURLOPT_SEEKDATA || \ + (option) == CURLOPT_PRIVATE || \ + (option) == CURLOPT_SSH_KEYDATA || \ + (option) == CURLOPT_INTERLEAVEDATA || \ + (option) == CURLOPT_CHUNK_DATA || \ + (option) == CURLOPT_FNMATCH_DATA || \ + 0) + +/* evaluates to true if option takes a POST data argument (void* or char*) */ +#define _curl_is_postfields_option(option) \ + ((option) == CURLOPT_POSTFIELDS || \ + (option) == CURLOPT_COPYPOSTFIELDS || \ + 0) + +/* evaluates to true if option takes a struct curl_slist * argument */ +#define _curl_is_slist_option(option) \ + ((option) == CURLOPT_HTTPHEADER || \ + (option) == CURLOPT_HTTP200ALIASES || \ + (option) == CURLOPT_QUOTE || \ + (option) == CURLOPT_POSTQUOTE || \ + (option) == CURLOPT_PREQUOTE || \ + (option) == CURLOPT_TELNETOPTIONS || \ + (option) == CURLOPT_MAIL_RCPT || \ + 0) + +/* groups of curl_easy_getinfo infos that take the same type of argument */ + +/* evaluates to true if info expects a pointer to char * argument */ +#define _curl_is_string_info(info) \ + (CURLINFO_STRING < (info) && (info) < CURLINFO_LONG) + +/* evaluates to true if info expects a pointer to long argument */ +#define _curl_is_long_info(info) \ + (CURLINFO_LONG < (info) && (info) < CURLINFO_DOUBLE) + +/* evaluates to true if info expects a pointer to double argument */ +#define _curl_is_double_info(info) \ + (CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST) + +/* true if info expects a pointer to struct curl_slist * argument */ +#define _curl_is_slist_info(info) \ + (CURLINFO_SLIST < (info)) + + +/* typecheck helpers -- check whether given expression has requested type*/ + +/* For pointers, you can use the _curl_is_ptr/_curl_is_arr macros, + * otherwise define a new macro. Search for __builtin_types_compatible_p + * in the GCC manual. + * NOTE: these macros MUST NOT EVALUATE their arguments! The argument is + * the actual expression passed to the curl_easy_setopt macro. This + * means that you can only apply the sizeof and __typeof__ operators, no + * == or whatsoever. + */ + +/* XXX: should evaluate to true iff expr is a pointer */ +#define _curl_is_any_ptr(expr) \ + (sizeof(expr) == sizeof(void*)) + +/* evaluates to true if expr is NULL */ +/* XXX: must not evaluate expr, so this check is not accurate */ +#define _curl_is_NULL(expr) \ + (__builtin_types_compatible_p(__typeof__(expr), __typeof__(NULL))) + +/* evaluates to true if expr is type*, const type* or NULL */ +#define _curl_is_ptr(expr, type) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), type *) || \ + __builtin_types_compatible_p(__typeof__(expr), const type *)) + +/* evaluates to true if expr is one of type[], type*, NULL or const type* */ +#define _curl_is_arr(expr, type) \ + (_curl_is_ptr((expr), type) || \ + __builtin_types_compatible_p(__typeof__(expr), type [])) + +/* evaluates to true if expr is a string */ +#define _curl_is_string(expr) \ + (_curl_is_arr((expr), char) || \ + _curl_is_arr((expr), signed char) || \ + _curl_is_arr((expr), unsigned char)) + +/* evaluates to true if expr is a long (no matter the signedness) + * XXX: for now, int is also accepted (and therefore short and char, which + * are promoted to int when passed to a variadic function) */ +#define _curl_is_long(expr) \ + (__builtin_types_compatible_p(__typeof__(expr), long) || \ + __builtin_types_compatible_p(__typeof__(expr), signed long) || \ + __builtin_types_compatible_p(__typeof__(expr), unsigned long) || \ + __builtin_types_compatible_p(__typeof__(expr), int) || \ + __builtin_types_compatible_p(__typeof__(expr), signed int) || \ + __builtin_types_compatible_p(__typeof__(expr), unsigned int) || \ + __builtin_types_compatible_p(__typeof__(expr), short) || \ + __builtin_types_compatible_p(__typeof__(expr), signed short) || \ + __builtin_types_compatible_p(__typeof__(expr), unsigned short) || \ + __builtin_types_compatible_p(__typeof__(expr), char) || \ + __builtin_types_compatible_p(__typeof__(expr), signed char) || \ + __builtin_types_compatible_p(__typeof__(expr), unsigned char)) + +/* evaluates to true if expr is of type curl_off_t */ +#define _curl_is_off_t(expr) \ + (__builtin_types_compatible_p(__typeof__(expr), curl_off_t)) + +/* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */ +/* XXX: also check size of an char[] array? */ +#define _curl_is_error_buffer(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), char *) || \ + __builtin_types_compatible_p(__typeof__(expr), char[])) + +/* evaluates to true if expr is of type (const) void* or (const) FILE* */ +#if 0 +#define _curl_is_cb_data(expr) \ + (_curl_is_ptr((expr), void) || \ + _curl_is_ptr((expr), FILE)) +#else /* be less strict */ +#define _curl_is_cb_data(expr) \ + _curl_is_any_ptr(expr) +#endif + +/* evaluates to true if expr is of type FILE* */ +#define _curl_is_FILE(expr) \ + (__builtin_types_compatible_p(__typeof__(expr), FILE *)) + +/* evaluates to true if expr can be passed as POST data (void* or char*) */ +#define _curl_is_postfields(expr) \ + (_curl_is_ptr((expr), void) || \ + _curl_is_arr((expr), char)) + +/* FIXME: the whole callback checking is messy... + * The idea is to tolerate char vs. void and const vs. not const + * pointers in arguments at least + */ +/* helper: __builtin_types_compatible_p distinguishes between functions and + * function pointers, hide it */ +#define _curl_callback_compatible(func, type) \ + (__builtin_types_compatible_p(__typeof__(func), type) || \ + __builtin_types_compatible_p(__typeof__(func), type*)) + +/* evaluates to true if expr is of type curl_read_callback or "similar" */ +#define _curl_is_read_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), __typeof__(fread)) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_read_callback) || \ + _curl_callback_compatible((expr), _curl_read_callback1) || \ + _curl_callback_compatible((expr), _curl_read_callback2) || \ + _curl_callback_compatible((expr), _curl_read_callback3) || \ + _curl_callback_compatible((expr), _curl_read_callback4) || \ + _curl_callback_compatible((expr), _curl_read_callback5) || \ + _curl_callback_compatible((expr), _curl_read_callback6)) +typedef size_t (_curl_read_callback1)(char *, size_t, size_t, void*); +typedef size_t (_curl_read_callback2)(char *, size_t, size_t, const void*); +typedef size_t (_curl_read_callback3)(char *, size_t, size_t, FILE*); +typedef size_t (_curl_read_callback4)(void *, size_t, size_t, void*); +typedef size_t (_curl_read_callback5)(void *, size_t, size_t, const void*); +typedef size_t (_curl_read_callback6)(void *, size_t, size_t, FILE*); + +/* evaluates to true if expr is of type curl_write_callback or "similar" */ +#define _curl_is_write_cb(expr) \ + (_curl_is_read_cb(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), __typeof__(fwrite)) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_write_callback) || \ + _curl_callback_compatible((expr), _curl_write_callback1) || \ + _curl_callback_compatible((expr), _curl_write_callback2) || \ + _curl_callback_compatible((expr), _curl_write_callback3) || \ + _curl_callback_compatible((expr), _curl_write_callback4) || \ + _curl_callback_compatible((expr), _curl_write_callback5) || \ + _curl_callback_compatible((expr), _curl_write_callback6)) +typedef size_t (_curl_write_callback1)(const char *, size_t, size_t, void*); +typedef size_t (_curl_write_callback2)(const char *, size_t, size_t, + const void*); +typedef size_t (_curl_write_callback3)(const char *, size_t, size_t, FILE*); +typedef size_t (_curl_write_callback4)(const void *, size_t, size_t, void*); +typedef size_t (_curl_write_callback5)(const void *, size_t, size_t, + const void*); +typedef size_t (_curl_write_callback6)(const void *, size_t, size_t, FILE*); + +/* evaluates to true if expr is of type curl_ioctl_callback or "similar" */ +#define _curl_is_ioctl_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_ioctl_callback) || \ + _curl_callback_compatible((expr), _curl_ioctl_callback1) || \ + _curl_callback_compatible((expr), _curl_ioctl_callback2) || \ + _curl_callback_compatible((expr), _curl_ioctl_callback3) || \ + _curl_callback_compatible((expr), _curl_ioctl_callback4)) +typedef curlioerr (_curl_ioctl_callback1)(CURL *, int, void*); +typedef curlioerr (_curl_ioctl_callback2)(CURL *, int, const void*); +typedef curlioerr (_curl_ioctl_callback3)(CURL *, curliocmd, void*); +typedef curlioerr (_curl_ioctl_callback4)(CURL *, curliocmd, const void*); + +/* evaluates to true if expr is of type curl_sockopt_callback or "similar" */ +#define _curl_is_sockopt_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_sockopt_callback) || \ + _curl_callback_compatible((expr), _curl_sockopt_callback1) || \ + _curl_callback_compatible((expr), _curl_sockopt_callback2)) +typedef int (_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype); +typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t, + curlsocktype); + +/* evaluates to true if expr is of type curl_opensocket_callback or + "similar" */ +#define _curl_is_opensocket_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_opensocket_callback) ||\ + _curl_callback_compatible((expr), _curl_opensocket_callback1) || \ + _curl_callback_compatible((expr), _curl_opensocket_callback2) || \ + _curl_callback_compatible((expr), _curl_opensocket_callback3) || \ + _curl_callback_compatible((expr), _curl_opensocket_callback4)) +typedef curl_socket_t (_curl_opensocket_callback1) + (void *, curlsocktype, struct curl_sockaddr *); +typedef curl_socket_t (_curl_opensocket_callback2) + (void *, curlsocktype, const struct curl_sockaddr *); +typedef curl_socket_t (_curl_opensocket_callback3) + (const void *, curlsocktype, struct curl_sockaddr *); +typedef curl_socket_t (_curl_opensocket_callback4) + (const void *, curlsocktype, const struct curl_sockaddr *); + +/* evaluates to true if expr is of type curl_progress_callback or "similar" */ +#define _curl_is_progress_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_progress_callback) || \ + _curl_callback_compatible((expr), _curl_progress_callback1) || \ + _curl_callback_compatible((expr), _curl_progress_callback2)) +typedef int (_curl_progress_callback1)(void *, + double, double, double, double); +typedef int (_curl_progress_callback2)(const void *, + double, double, double, double); + +/* evaluates to true if expr is of type curl_debug_callback or "similar" */ +#define _curl_is_debug_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_debug_callback) || \ + _curl_callback_compatible((expr), _curl_debug_callback1) || \ + _curl_callback_compatible((expr), _curl_debug_callback2) || \ + _curl_callback_compatible((expr), _curl_debug_callback3) || \ + _curl_callback_compatible((expr), _curl_debug_callback4) || \ + _curl_callback_compatible((expr), _curl_debug_callback5) || \ + _curl_callback_compatible((expr), _curl_debug_callback6) || \ + _curl_callback_compatible((expr), _curl_debug_callback7) || \ + _curl_callback_compatible((expr), _curl_debug_callback8)) +typedef int (_curl_debug_callback1) (CURL *, + curl_infotype, char *, size_t, void *); +typedef int (_curl_debug_callback2) (CURL *, + curl_infotype, char *, size_t, const void *); +typedef int (_curl_debug_callback3) (CURL *, + curl_infotype, const char *, size_t, void *); +typedef int (_curl_debug_callback4) (CURL *, + curl_infotype, const char *, size_t, const void *); +typedef int (_curl_debug_callback5) (CURL *, + curl_infotype, unsigned char *, size_t, void *); +typedef int (_curl_debug_callback6) (CURL *, + curl_infotype, unsigned char *, size_t, const void *); +typedef int (_curl_debug_callback7) (CURL *, + curl_infotype, const unsigned char *, size_t, void *); +typedef int (_curl_debug_callback8) (CURL *, + curl_infotype, const unsigned char *, size_t, const void *); + +/* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */ +/* this is getting even messier... */ +#define _curl_is_ssl_ctx_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_ssl_ctx_callback) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback1) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback2) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback3) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback4) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback5) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback6) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback7) || \ + _curl_callback_compatible((expr), _curl_ssl_ctx_callback8)) +typedef CURLcode (_curl_ssl_ctx_callback1)(CURL *, void *, void *); +typedef CURLcode (_curl_ssl_ctx_callback2)(CURL *, void *, const void *); +typedef CURLcode (_curl_ssl_ctx_callback3)(CURL *, const void *, void *); +typedef CURLcode (_curl_ssl_ctx_callback4)(CURL *, const void *, const void *); +#ifdef HEADER_SSL_H +/* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX + * this will of course break if we're included before OpenSSL headers... + */ +typedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *); +typedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *); +typedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *); +typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, + const void *); +#else +typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5; +typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6; +typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback7; +typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback8; +#endif + +/* evaluates to true if expr is of type curl_conv_callback or "similar" */ +#define _curl_is_conv_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_conv_callback) || \ + _curl_callback_compatible((expr), _curl_conv_callback1) || \ + _curl_callback_compatible((expr), _curl_conv_callback2) || \ + _curl_callback_compatible((expr), _curl_conv_callback3) || \ + _curl_callback_compatible((expr), _curl_conv_callback4)) +typedef CURLcode (*_curl_conv_callback1)(char *, size_t length); +typedef CURLcode (*_curl_conv_callback2)(const char *, size_t length); +typedef CURLcode (*_curl_conv_callback3)(void *, size_t length); +typedef CURLcode (*_curl_conv_callback4)(const void *, size_t length); + +/* evaluates to true if expr is of type curl_seek_callback or "similar" */ +#define _curl_is_seek_cb(expr) \ + (_curl_is_NULL(expr) || \ + __builtin_types_compatible_p(__typeof__(expr), curl_seek_callback) || \ + _curl_callback_compatible((expr), _curl_seek_callback1) || \ + _curl_callback_compatible((expr), _curl_seek_callback2)) +typedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int); +typedef CURLcode (*_curl_seek_callback2)(const void *, curl_off_t, int); + + +#endif /* __CURL_TYPECHECK_GCC_H */ diff --git a/code/libcurl/curl/types.h b/code/libcurl/curl/types.h deleted file mode 100644 index d37d6ae9..00000000 --- a/code/libcurl/curl/types.h +++ /dev/null @@ -1 +0,0 @@ -/* not used */ diff --git a/code/libogg-1.3.0/include/ogg/config_types.h b/code/libogg-1.3.1/include/ogg/config_types.h similarity index 92% rename from code/libogg-1.3.0/include/ogg/config_types.h rename to code/libogg-1.3.1/include/ogg/config_types.h index e0dd8655..28288279 100644 --- a/code/libogg-1.3.0/include/ogg/config_types.h +++ b/code/libogg-1.3.1/include/ogg/config_types.h @@ -1,6 +1,7 @@ #ifndef __CONFIG_TYPES_H__ #define __CONFIG_TYPES_H__ +/* these are filled in by configure */ /* #define INCLUDE_INTTYPES_H 1 */ #define INCLUDE_STDINT_H 1 /* #define INCLUDE_SYS_TYPES_H 1 */ diff --git a/code/libogg-1.3.0/include/ogg/ogg.h b/code/libogg-1.3.1/include/ogg/ogg.h similarity index 100% rename from code/libogg-1.3.0/include/ogg/ogg.h rename to code/libogg-1.3.1/include/ogg/ogg.h diff --git a/code/libogg-1.3.0/include/ogg/os_types.h b/code/libogg-1.3.1/include/ogg/os_types.h similarity index 100% rename from code/libogg-1.3.0/include/ogg/os_types.h rename to code/libogg-1.3.1/include/ogg/os_types.h diff --git a/code/libogg-1.3.0/src/bitwise.c b/code/libogg-1.3.1/src/bitwise.c similarity index 100% rename from code/libogg-1.3.0/src/bitwise.c rename to code/libogg-1.3.1/src/bitwise.c diff --git a/code/libogg-1.3.0/src/framing.c b/code/libogg-1.3.1/src/framing.c similarity index 98% rename from code/libogg-1.3.0/src/framing.c rename to code/libogg-1.3.1/src/framing.c index 4452cbd5..3a2f0a60 100644 --- a/code/libogg-1.3.0/src/framing.c +++ b/code/libogg-1.3.1/src/framing.c @@ -12,7 +12,7 @@ function: code raw packets into framed OggSquish stream and decode Ogg streams back into raw packets - last mod: $Id: framing.c 18052 2011-08-04 17:57:02Z giles $ + last mod: $Id: framing.c 18758 2013-01-08 16:29:56Z tterribe $ note: The CRC code is directly derived from public domain code by Ross Williams (ross@guest.adelaide.edu.au). See docs/framing.html @@ -21,6 +21,7 @@ ********************************************************************/ #include +#include #include #include @@ -236,39 +237,51 @@ int ogg_stream_destroy(ogg_stream_state *os){ /* Helpers for ogg_stream_encode; this keeps the structure and what's happening fairly clear */ -static int _os_body_expand(ogg_stream_state *os,int needed){ - if(os->body_storage<=os->body_fill+needed){ +static int _os_body_expand(ogg_stream_state *os,long needed){ + if(os->body_storage-needed<=os->body_fill){ + long body_storage; void *ret; - ret=_ogg_realloc(os->body_data,(os->body_storage+needed+1024)* - sizeof(*os->body_data)); + if(os->body_storage>LONG_MAX-needed){ + ogg_stream_clear(os); + return -1; + } + body_storage=os->body_storage+needed; + if(body_storagebody_data,body_storage*sizeof(*os->body_data)); if(!ret){ ogg_stream_clear(os); return -1; } - os->body_storage+=(needed+1024); + os->body_storage=body_storage; os->body_data=ret; } return 0; } -static int _os_lacing_expand(ogg_stream_state *os,int needed){ - if(os->lacing_storage<=os->lacing_fill+needed){ +static int _os_lacing_expand(ogg_stream_state *os,long needed){ + if(os->lacing_storage-needed<=os->lacing_fill){ + long lacing_storage; void *ret; - ret=_ogg_realloc(os->lacing_vals,(os->lacing_storage+needed+32)* - sizeof(*os->lacing_vals)); + if(os->lacing_storage>LONG_MAX-needed){ + ogg_stream_clear(os); + return -1; + } + lacing_storage=os->lacing_storage+needed; + if(lacing_storagelacing_vals,lacing_storage*sizeof(*os->lacing_vals)); if(!ret){ ogg_stream_clear(os); return -1; } os->lacing_vals=ret; - ret=_ogg_realloc(os->granule_vals,(os->lacing_storage+needed+32)* + ret=_ogg_realloc(os->granule_vals,lacing_storage* sizeof(*os->granule_vals)); if(!ret){ ogg_stream_clear(os); return -1; } os->granule_vals=ret; - os->lacing_storage+=(needed+32); + os->lacing_storage=lacing_storage; } return 0; } @@ -304,12 +317,17 @@ void ogg_page_checksum_set(ogg_page *og){ int ogg_stream_iovecin(ogg_stream_state *os, ogg_iovec_t *iov, int count, long e_o_s, ogg_int64_t granulepos){ - int bytes = 0, lacing_vals, i; + long bytes = 0, lacing_vals; + int i; if(ogg_stream_check(os)) return -1; if(!iov) return 0; - for (i = 0; i < count; ++i) bytes += (int)iov[i].iov_len; + for (i = 0; i < count; ++i){ + if(iov[i].iov_len>LONG_MAX) return -1; + if(bytes>LONG_MAX-(long)iov[i].iov_len) return -1; + bytes += (long)iov[i].iov_len; + } lacing_vals=bytes/255+1; if(os->body_returned){ diff --git a/code/libs/win32/libSDL.la b/code/libs/win32/libSDL.la deleted file mode 100755 index 4f0519f5..00000000 --- a/code/libs/win32/libSDL.la +++ /dev/null @@ -1,41 +0,0 @@ -# libSDL.la - a libtool library file -# Generated by ltmain.sh (GNU libtool) 2.2.6 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='../bin/SDL.dll' - -# Names of this library. -library_names='libSDL.dll.a' - -# The name of the static archive. -old_library='libSDL.a' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='' - -# Libraries that this one depends upon. -dependency_libs=' -luser32 -lgdi32 -lwinmm -ldxguid' - -# Names of additional weak libraries provided by this library -weak_library_names='' - -# Version information for libSDL. -current=11 -age=11 -revision=3 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/usr/local/lib' diff --git a/code/libvorbis-1.3.4/include/vorbis/codec.h b/code/libvorbis-1.3.4/include/vorbis/codec.h new file mode 100644 index 00000000..999aa335 --- /dev/null +++ b/code/libvorbis-1.3.4/include/vorbis/codec.h @@ -0,0 +1,243 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + + ******************************************************************** + + function: libvorbis codec headers + last mod: $Id: codec.h 17021 2010-03-24 09:29:41Z xiphmont $ + + ********************************************************************/ + +#ifndef _vorbis_codec_h_ +#define _vorbis_codec_h_ + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + +#include + +typedef struct vorbis_info{ + int version; + int channels; + long rate; + + /* The below bitrate declarations are *hints*. + Combinations of the three values carry the following implications: + + all three set to the same value: + implies a fixed rate bitstream + only nominal set: + implies a VBR stream that averages the nominal bitrate. No hard + upper/lower limit + upper and or lower set: + implies a VBR bitstream that obeys the bitrate limits. nominal + may also be set to give a nominal rate. + none set: + the coder does not care to speculate. + */ + + long bitrate_upper; + long bitrate_nominal; + long bitrate_lower; + long bitrate_window; + + void *codec_setup; +} vorbis_info; + +/* vorbis_dsp_state buffers the current vorbis audio + analysis/synthesis state. The DSP state belongs to a specific + logical bitstream ****************************************************/ +typedef struct vorbis_dsp_state{ + int analysisp; + vorbis_info *vi; + + float **pcm; + float **pcmret; + int pcm_storage; + int pcm_current; + int pcm_returned; + + int preextrapolate; + int eofflag; + + long lW; + long W; + long nW; + long centerW; + + ogg_int64_t granulepos; + ogg_int64_t sequence; + + ogg_int64_t glue_bits; + ogg_int64_t time_bits; + ogg_int64_t floor_bits; + ogg_int64_t res_bits; + + void *backend_state; +} vorbis_dsp_state; + +typedef struct vorbis_block{ + /* necessary stream state for linking to the framing abstraction */ + float **pcm; /* this is a pointer into local storage */ + oggpack_buffer opb; + + long lW; + long W; + long nW; + int pcmend; + int mode; + + int eofflag; + ogg_int64_t granulepos; + ogg_int64_t sequence; + vorbis_dsp_state *vd; /* For read-only access of configuration */ + + /* local storage to avoid remallocing; it's up to the mapping to + structure it */ + void *localstore; + long localtop; + long localalloc; + long totaluse; + struct alloc_chain *reap; + + /* bitmetrics for the frame */ + long glue_bits; + long time_bits; + long floor_bits; + long res_bits; + + void *internal; + +} vorbis_block; + +/* vorbis_block is a single block of data to be processed as part of +the analysis/synthesis stream; it belongs to a specific logical +bitstream, but is independent from other vorbis_blocks belonging to +that logical bitstream. *************************************************/ + +struct alloc_chain{ + void *ptr; + struct alloc_chain *next; +}; + +/* vorbis_info contains all the setup information specific to the + specific compression/decompression mode in progress (eg, + psychoacoustic settings, channel setup, options, codebook + etc). vorbis_info and substructures are in backends.h. +*********************************************************************/ + +/* the comments are not part of vorbis_info so that vorbis_info can be + static storage */ +typedef struct vorbis_comment{ + /* unlimited user comment fields. libvorbis writes 'libvorbis' + whatever vendor is set to in encode */ + char **user_comments; + int *comment_lengths; + int comments; + char *vendor; + +} vorbis_comment; + + +/* libvorbis encodes in two abstraction layers; first we perform DSP + and produce a packet (see docs/analysis.txt). The packet is then + coded into a framed OggSquish bitstream by the second layer (see + docs/framing.txt). Decode is the reverse process; we sync/frame + the bitstream and extract individual packets, then decode the + packet back into PCM audio. + + The extra framing/packetizing is used in streaming formats, such as + files. Over the net (such as with UDP), the framing and + packetization aren't necessary as they're provided by the transport + and the streaming layer is not used */ + +/* Vorbis PRIMITIVES: general ***************************************/ + +extern void vorbis_info_init(vorbis_info *vi); +extern void vorbis_info_clear(vorbis_info *vi); +extern int vorbis_info_blocksize(vorbis_info *vi,int zo); +extern void vorbis_comment_init(vorbis_comment *vc); +extern void vorbis_comment_add(vorbis_comment *vc, const char *comment); +extern void vorbis_comment_add_tag(vorbis_comment *vc, + const char *tag, const char *contents); +extern char *vorbis_comment_query(vorbis_comment *vc, const char *tag, int count); +extern int vorbis_comment_query_count(vorbis_comment *vc, const char *tag); +extern void vorbis_comment_clear(vorbis_comment *vc); + +extern int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb); +extern int vorbis_block_clear(vorbis_block *vb); +extern void vorbis_dsp_clear(vorbis_dsp_state *v); +extern double vorbis_granule_time(vorbis_dsp_state *v, + ogg_int64_t granulepos); + +extern const char *vorbis_version_string(void); + +/* Vorbis PRIMITIVES: analysis/DSP layer ****************************/ + +extern int vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi); +extern int vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op); +extern int vorbis_analysis_headerout(vorbis_dsp_state *v, + vorbis_comment *vc, + ogg_packet *op, + ogg_packet *op_comm, + ogg_packet *op_code); +extern float **vorbis_analysis_buffer(vorbis_dsp_state *v,int vals); +extern int vorbis_analysis_wrote(vorbis_dsp_state *v,int vals); +extern int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb); +extern int vorbis_analysis(vorbis_block *vb,ogg_packet *op); + +extern int vorbis_bitrate_addblock(vorbis_block *vb); +extern int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd, + ogg_packet *op); + +/* Vorbis PRIMITIVES: synthesis layer *******************************/ +extern int vorbis_synthesis_idheader(ogg_packet *op); +extern int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc, + ogg_packet *op); + +extern int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi); +extern int vorbis_synthesis_restart(vorbis_dsp_state *v); +extern int vorbis_synthesis(vorbis_block *vb,ogg_packet *op); +extern int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op); +extern int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb); +extern int vorbis_synthesis_pcmout(vorbis_dsp_state *v,float ***pcm); +extern int vorbis_synthesis_lapout(vorbis_dsp_state *v,float ***pcm); +extern int vorbis_synthesis_read(vorbis_dsp_state *v,int samples); +extern long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op); + +extern int vorbis_synthesis_halfrate(vorbis_info *v,int flag); +extern int vorbis_synthesis_halfrate_p(vorbis_info *v); + +/* Vorbis ERRORS and return codes ***********************************/ + +#define OV_FALSE -1 +#define OV_EOF -2 +#define OV_HOLE -3 + +#define OV_EREAD -128 +#define OV_EFAULT -129 +#define OV_EIMPL -130 +#define OV_EINVAL -131 +#define OV_ENOTVORBIS -132 +#define OV_EBADHEADER -133 +#define OV_EVERSION -134 +#define OV_ENOTAUDIO -135 +#define OV_EBADPACKET -136 +#define OV_EBADLINK -137 +#define OV_ENOSEEK -138 + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif + diff --git a/code/libvorbis-1.3.4/include/vorbis/vorbisenc.h b/code/libvorbis-1.3.4/include/vorbis/vorbisenc.h new file mode 100644 index 00000000..02332b50 --- /dev/null +++ b/code/libvorbis-1.3.4/include/vorbis/vorbisenc.h @@ -0,0 +1,436 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: vorbis encode-engine setup + last mod: $Id: vorbisenc.h 17021 2010-03-24 09:29:41Z xiphmont $ + + ********************************************************************/ + +/** \file + * Libvorbisenc is a convenient API for setting up an encoding + * environment using libvorbis. Libvorbisenc encapsulates the + * actions needed to set up the encoder properly. + */ + +#ifndef _OV_ENC_H_ +#define _OV_ENC_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + +#include "codec.h" + +/** + * This is the primary function within libvorbisenc for setting up managed + * bitrate modes. + * + * Before this function is called, the \ref vorbis_info + * struct should be initialized by using vorbis_info_init() from the libvorbis + * API. After encoding, vorbis_info_clear() should be called. + * + * The max_bitrate, nominal_bitrate, and min_bitrate settings are used to set + * constraints for the encoded file. This function uses these settings to + * select the appropriate encoding mode and set it up. + * + * \param vi Pointer to an initialized \ref vorbis_info struct. + * \param channels The number of channels to be encoded. + * \param rate The sampling rate of the source audio. + * \param max_bitrate Desired maximum bitrate (limit). -1 indicates unset. + * \param nominal_bitrate Desired average, or central, bitrate. -1 indicates unset. + * \param min_bitrate Desired minimum bitrate. -1 indicates unset. + * + * \return Zero for success, and negative values for failure. + * + * \retval 0 Success. + * \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption. + * \retval OV_EINVAL Invalid setup request, eg, out of range argument. + * \retval OV_EIMPL Unimplemented mode; unable to comply with bitrate request. + */ +extern int vorbis_encode_init(vorbis_info *vi, + long channels, + long rate, + + long max_bitrate, + long nominal_bitrate, + long min_bitrate); + +/** + * This function performs step-one of a three-step bitrate-managed encode + * setup. It functions similarly to the one-step setup performed by \ref + * vorbis_encode_init but allows an application to make further encode setup + * tweaks using \ref vorbis_encode_ctl before finally calling \ref + * vorbis_encode_setup_init to complete the setup process. + * + * Before this function is called, the \ref vorbis_info struct should be + * initialized by using vorbis_info_init() from the libvorbis API. After + * encoding, vorbis_info_clear() should be called. + * + * The max_bitrate, nominal_bitrate, and min_bitrate settings are used to set + * constraints for the encoded file. This function uses these settings to + * select the appropriate encoding mode and set it up. + * + * \param vi Pointer to an initialized vorbis_info struct. + * \param channels The number of channels to be encoded. + * \param rate The sampling rate of the source audio. + * \param max_bitrate Desired maximum bitrate (limit). -1 indicates unset. + * \param nominal_bitrate Desired average, or central, bitrate. -1 indicates unset. + * \param min_bitrate Desired minimum bitrate. -1 indicates unset. + * + * \return Zero for success, and negative for failure. + * + * \retval 0 Success + * \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption. + * \retval OV_EINVAL Invalid setup request, eg, out of range argument. + * \retval OV_EIMPL Unimplemented mode; unable to comply with bitrate request. + */ +extern int vorbis_encode_setup_managed(vorbis_info *vi, + long channels, + long rate, + + long max_bitrate, + long nominal_bitrate, + long min_bitrate); + +/** + * This function performs step-one of a three-step variable bitrate + * (quality-based) encode setup. It functions similarly to the one-step setup + * performed by \ref vorbis_encode_init_vbr() but allows an application to + * make further encode setup tweaks using \ref vorbis_encode_ctl() before + * finally calling \ref vorbis_encode_setup_init to complete the setup + * process. + * + * Before this function is called, the \ref vorbis_info struct should be + * initialized by using \ref vorbis_info_init() from the libvorbis API. After + * encoding, vorbis_info_clear() should be called. + * + * \param vi Pointer to an initialized vorbis_info struct. + * \param channels The number of channels to be encoded. + * \param rate The sampling rate of the source audio. + * \param quality Desired quality level, currently from -0.1 to 1.0 (lo to hi). + * + * \return Zero for success, and negative values for failure. + * + * \retval 0 Success + * \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption. + * \retval OV_EINVAL Invalid setup request, eg, out of range argument. + * \retval OV_EIMPL Unimplemented mode; unable to comply with quality level request. + */ +extern int vorbis_encode_setup_vbr(vorbis_info *vi, + long channels, + long rate, + + float quality + ); + +/** + * This is the primary function within libvorbisenc for setting up variable + * bitrate ("quality" based) modes. + * + * + * Before this function is called, the vorbis_info struct should be + * initialized by using vorbis_info_init() from the libvorbis API. After + * encoding, vorbis_info_clear() should be called. + * + * \param vi Pointer to an initialized vorbis_info struct. + * \param channels The number of channels to be encoded. + * \param rate The sampling rate of the source audio. + * \param base_quality Desired quality level, currently from -0.1 to 1.0 (lo to hi). + * + * + * \return Zero for success, or a negative number for failure. + * + * \retval 0 Success + * \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption. + * \retval OV_EINVAL Invalid setup request, eg, out of range argument. + * \retval OV_EIMPL Unimplemented mode; unable to comply with quality level request. + */ +extern int vorbis_encode_init_vbr(vorbis_info *vi, + long channels, + long rate, + + float base_quality + ); + +/** + * This function performs the last stage of three-step encoding setup, as + * described in the API overview under managed bitrate modes. + * + * Before this function is called, the \ref vorbis_info struct should be + * initialized by using vorbis_info_init() from the libvorbis API, one of + * \ref vorbis_encode_setup_managed() or \ref vorbis_encode_setup_vbr() called to + * initialize the high-level encoding setup, and \ref vorbis_encode_ctl() + * called if necessary to make encoding setup changes. + * vorbis_encode_setup_init() finalizes the highlevel encoding structure into + * a complete encoding setup after which the application may make no further + * setup changes. + * + * After encoding, vorbis_info_clear() should be called. + * + * \param vi Pointer to an initialized \ref vorbis_info struct. + * + * \return Zero for success, and negative values for failure. + * + * \retval 0 Success. + * \retval OV_EFAULT Internal logic fault; indicates a bug or heap/stack corruption. + * + * \retval OV_EINVAL Attempt to use vorbis_encode_setup_init() without first + * calling one of vorbis_encode_setup_managed() or vorbis_encode_setup_vbr() to + * initialize the high-level encoding setup + * + */ +extern int vorbis_encode_setup_init(vorbis_info *vi); + +/** + * This function implements a generic interface to miscellaneous encoder + * settings similar to the classic UNIX 'ioctl()' system call. Applications + * may use vorbis_encode_ctl() to query or set bitrate management or quality + * mode details by using one of several \e request arguments detailed below. + * vorbis_encode_ctl() must be called after one of + * vorbis_encode_setup_managed() or vorbis_encode_setup_vbr(). When used + * to modify settings, \ref vorbis_encode_ctl() must be called before \ref + * vorbis_encode_setup_init(). + * + * \param vi Pointer to an initialized vorbis_info struct. + * + * \param number Specifies the desired action; See \ref encctlcodes "the list + * of available requests". + * + * \param arg void * pointing to a data structure matching the request + * argument. + * + * \retval 0 Success. Any further return information (such as the result of a + * query) is placed into the storage pointed to by *arg. + * + * \retval OV_EINVAL Invalid argument, or an attempt to modify a setting after + * calling vorbis_encode_setup_init(). + * + * \retval OV_EIMPL Unimplemented or unknown request + */ +extern int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg); + +/** + * \deprecated This is a deprecated interface. Please use vorbis_encode_ctl() + * with the \ref ovectl_ratemanage2_arg struct and \ref + * OV_ECTL_RATEMANAGE2_GET and \ref OV_ECTL_RATEMANAGE2_SET calls in new code. + * + * The \ref ovectl_ratemanage_arg structure is used with vorbis_encode_ctl() + * and the \ref OV_ECTL_RATEMANAGE_GET, \ref OV_ECTL_RATEMANAGE_SET, \ref + * OV_ECTL_RATEMANAGE_AVG, \ref OV_ECTL_RATEMANAGE_HARD calls in order to + * query and modify specifics of the encoder's bitrate management + * configuration. +*/ +struct ovectl_ratemanage_arg { + int management_active; /**< nonzero if bitrate management is active*/ +/** hard lower limit (in kilobits per second) below which the stream bitrate + will never be allowed for any given bitrate_hard_window seconds of time.*/ + long bitrate_hard_min; +/** hard upper limit (in kilobits per second) above which the stream bitrate + will never be allowed for any given bitrate_hard_window seconds of time.*/ + long bitrate_hard_max; +/** the window period (in seconds) used to regulate the hard bitrate minimum + and maximum*/ + double bitrate_hard_window; +/** soft lower limit (in kilobits per second) below which the average bitrate + tracker will start nudging the bitrate higher.*/ + long bitrate_av_lo; +/** soft upper limit (in kilobits per second) above which the average bitrate + tracker will start nudging the bitrate lower.*/ + long bitrate_av_hi; +/** the window period (in seconds) used to regulate the average bitrate + minimum and maximum.*/ + double bitrate_av_window; +/** Regulates the relative centering of the average and hard windows; in + libvorbis 1.0 and 1.0.1, the hard window regulation overlapped but + followed the average window regulation. In libvorbis 1.1 a bit-reservoir + interface replaces the old windowing interface; the older windowing + interface is simulated and this field has no effect.*/ + double bitrate_av_window_center; +}; + +/** + * \name struct ovectl_ratemanage2_arg + * + * The ovectl_ratemanage2_arg structure is used with vorbis_encode_ctl() and + * the OV_ECTL_RATEMANAGE2_GET and OV_ECTL_RATEMANAGE2_SET calls in order to + * query and modify specifics of the encoder's bitrate management + * configuration. + * +*/ +struct ovectl_ratemanage2_arg { + int management_active; /**< nonzero if bitrate management is active */ +/** Lower allowed bitrate limit in kilobits per second */ + long bitrate_limit_min_kbps; +/** Upper allowed bitrate limit in kilobits per second */ + long bitrate_limit_max_kbps; + long bitrate_limit_reservoir_bits; /**struct ovectl_ratemanage2_arg * + * + * Used to query the current encoder bitrate management setting. Also used to + * initialize fields of an ovectl_ratemanage2_arg structure for use with + * \ref OV_ECTL_RATEMANAGE2_SET. + */ +#define OV_ECTL_RATEMANAGE2_GET 0x14 + +/** + * Set the current encoder bitrate management settings. + * + * Argument: struct ovectl_ratemanage2_arg * + * + * Used to set the current encoder bitrate management settings to the values + * listed in the ovectl_ratemanage2_arg. Passing a NULL pointer will disable + * bitrate management. +*/ +#define OV_ECTL_RATEMANAGE2_SET 0x15 + +/** + * Returns the current encoder hard-lowpass setting (kHz) in the double + * pointed to by arg. + * + * Argument: double * +*/ +#define OV_ECTL_LOWPASS_GET 0x20 + +/** + * Sets the encoder hard-lowpass to the value (kHz) pointed to by arg. Valid + * lowpass settings range from 2 to 99. + * + * Argument: double * +*/ +#define OV_ECTL_LOWPASS_SET 0x21 + +/** + * Returns the current encoder impulse block setting in the double pointed + * to by arg. + * + * Argument: double * +*/ +#define OV_ECTL_IBLOCK_GET 0x30 + +/** + * Sets the impulse block bias to the the value pointed to by arg. + * + * Argument: double * + * + * Valid range is -15.0 to 0.0 [default]. A negative impulse block bias will + * direct to encoder to use more bits when incoding short blocks that contain + * strong impulses, thus improving the accuracy of impulse encoding. + */ +#define OV_ECTL_IBLOCK_SET 0x31 + +/** + * Returns the current encoder coupling setting in the int pointed + * to by arg. + * + * Argument: int * +*/ +#define OV_ECTL_COUPLING_GET 0x40 + +/** + * Enables/disables channel coupling in multichannel encoding according to arg. + * + * Argument: int * + * + * Zero disables channel coupling for multichannel inputs, nonzer enables + * channel coupling. Setting has no effect on monophonic encoding or + * multichannel counts that do not offer coupling. At present, coupling is + * available for stereo and 5.1 encoding. + */ +#define OV_ECTL_COUPLING_SET 0x41 + + /* deprecated rate management supported only for compatibility */ + +/** + * Old interface to querying bitrate management settings. + * + * Deprecated after move to bit-reservoir style management in 1.1 rendered + * this interface partially obsolete. + + * \deprecated Please use \ref OV_ECTL_RATEMANAGE2_GET instead. + * + * Argument: struct ovectl_ratemanage_arg * + */ +#define OV_ECTL_RATEMANAGE_GET 0x10 +/** + * Old interface to modifying bitrate management settings. + * + * deprecated after move to bit-reservoir style management in 1.1 rendered + * this interface partially obsolete. + * + * \deprecated Please use \ref OV_ECTL_RATEMANAGE2_SET instead. + * + * Argument: struct ovectl_ratemanage_arg * + */ +#define OV_ECTL_RATEMANAGE_SET 0x11 +/** + * Old interface to setting average-bitrate encoding mode. + * + * Deprecated after move to bit-reservoir style management in 1.1 rendered + * this interface partially obsolete. + * + * \deprecated Please use \ref OV_ECTL_RATEMANAGE2_SET instead. + * + * Argument: struct ovectl_ratemanage_arg * + */ +#define OV_ECTL_RATEMANAGE_AVG 0x12 +/** + * Old interface to setting bounded-bitrate encoding modes. + * + * deprecated after move to bit-reservoir style management in 1.1 rendered + * this interface partially obsolete. + * + * \deprecated Please use \ref OV_ECTL_RATEMANAGE2_SET instead. + * + * Argument: struct ovectl_ratemanage_arg * + */ +#define OV_ECTL_RATEMANAGE_HARD 0x13 + +/*@}*/ + + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif diff --git a/code/libvorbis-1.3.4/include/vorbis/vorbisfile.h b/code/libvorbis-1.3.4/include/vorbis/vorbisfile.h new file mode 100644 index 00000000..9271331e --- /dev/null +++ b/code/libvorbis-1.3.4/include/vorbis/vorbisfile.h @@ -0,0 +1,206 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: stdio-based convenience library for opening/seeking/decoding + last mod: $Id: vorbisfile.h 17182 2010-04-29 03:48:32Z xiphmont $ + + ********************************************************************/ + +#ifndef _OV_FILE_H_ +#define _OV_FILE_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + +#include +#include "codec.h" + +/* The function prototypes for the callbacks are basically the same as for + * the stdio functions fread, fseek, fclose, ftell. + * The one difference is that the FILE * arguments have been replaced with + * a void * - this is to be used as a pointer to whatever internal data these + * functions might need. In the stdio case, it's just a FILE * cast to a void * + * + * If you use other functions, check the docs for these functions and return + * the right values. For seek_func(), you *MUST* return -1 if the stream is + * unseekable + */ +typedef struct { + size_t (*read_func) (void *ptr, size_t size, size_t nmemb, void *datasource); + int (*seek_func) (void *datasource, ogg_int64_t offset, int whence); + int (*close_func) (void *datasource); + long (*tell_func) (void *datasource); +} ov_callbacks; + +#ifndef OV_EXCLUDE_STATIC_CALLBACKS + +/* a few sets of convenient callbacks, especially for use under + * Windows where ov_open_callbacks() should always be used instead of + * ov_open() to avoid problems with incompatible crt.o version linking + * issues. */ + +static int _ov_header_fseek_wrap(FILE *f,ogg_int64_t off,int whence){ + if(f==NULL)return(-1); + +#ifdef __MINGW32__ + return fseeko64(f,off,whence); +#elif defined (_WIN32) + return _fseeki64(f,off,whence); +#else + return fseek(f,off,whence); +#endif +} + +/* These structs below (OV_CALLBACKS_DEFAULT etc) are defined here as + * static data. That means that every file which includes this header + * will get its own copy of these structs whether it uses them or + * not unless it #defines OV_EXCLUDE_STATIC_CALLBACKS. + * These static symbols are essential on platforms such as Windows on + * which several different versions of stdio support may be linked to + * by different DLLs, and we need to be certain we know which one + * we're using (the same one as the main application). + */ + +static ov_callbacks OV_CALLBACKS_DEFAULT = { + (size_t (*)(void *, size_t, size_t, void *)) fread, + (int (*)(void *, ogg_int64_t, int)) _ov_header_fseek_wrap, + (int (*)(void *)) fclose, + (long (*)(void *)) ftell +}; + +static ov_callbacks OV_CALLBACKS_NOCLOSE = { + (size_t (*)(void *, size_t, size_t, void *)) fread, + (int (*)(void *, ogg_int64_t, int)) _ov_header_fseek_wrap, + (int (*)(void *)) NULL, + (long (*)(void *)) ftell +}; + +static ov_callbacks OV_CALLBACKS_STREAMONLY = { + (size_t (*)(void *, size_t, size_t, void *)) fread, + (int (*)(void *, ogg_int64_t, int)) NULL, + (int (*)(void *)) fclose, + (long (*)(void *)) NULL +}; + +static ov_callbacks OV_CALLBACKS_STREAMONLY_NOCLOSE = { + (size_t (*)(void *, size_t, size_t, void *)) fread, + (int (*)(void *, ogg_int64_t, int)) NULL, + (int (*)(void *)) NULL, + (long (*)(void *)) NULL +}; + +#endif + +#define NOTOPEN 0 +#define PARTOPEN 1 +#define OPENED 2 +#define STREAMSET 3 +#define INITSET 4 + +typedef struct OggVorbis_File { + void *datasource; /* Pointer to a FILE *, etc. */ + int seekable; + ogg_int64_t offset; + ogg_int64_t end; + ogg_sync_state oy; + + /* If the FILE handle isn't seekable (eg, a pipe), only the current + stream appears */ + int links; + ogg_int64_t *offsets; + ogg_int64_t *dataoffsets; + long *serialnos; + ogg_int64_t *pcmlengths; /* overloaded to maintain binary + compatibility; x2 size, stores both + beginning and end values */ + vorbis_info *vi; + vorbis_comment *vc; + + /* Decoding working state local storage */ + ogg_int64_t pcm_offset; + int ready_state; + long current_serialno; + int current_link; + + double bittrack; + double samptrack; + + ogg_stream_state os; /* take physical pages, weld into a logical + stream of packets */ + vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */ + vorbis_block vb; /* local working space for packet->PCM decode */ + + ov_callbacks callbacks; + +} OggVorbis_File; + + +extern int ov_clear(OggVorbis_File *vf); +extern int ov_fopen(const char *path,OggVorbis_File *vf); +extern int ov_open(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes); +extern int ov_open_callbacks(void *datasource, OggVorbis_File *vf, + const char *initial, long ibytes, ov_callbacks callbacks); + +extern int ov_test(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes); +extern int ov_test_callbacks(void *datasource, OggVorbis_File *vf, + const char *initial, long ibytes, ov_callbacks callbacks); +extern int ov_test_open(OggVorbis_File *vf); + +extern long ov_bitrate(OggVorbis_File *vf,int i); +extern long ov_bitrate_instant(OggVorbis_File *vf); +extern long ov_streams(OggVorbis_File *vf); +extern long ov_seekable(OggVorbis_File *vf); +extern long ov_serialnumber(OggVorbis_File *vf,int i); + +extern ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i); +extern ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i); +extern double ov_time_total(OggVorbis_File *vf,int i); + +extern int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_time_seek(OggVorbis_File *vf,double pos); +extern int ov_time_seek_page(OggVorbis_File *vf,double pos); + +extern int ov_raw_seek_lap(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_pcm_seek_lap(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_pcm_seek_page_lap(OggVorbis_File *vf,ogg_int64_t pos); +extern int ov_time_seek_lap(OggVorbis_File *vf,double pos); +extern int ov_time_seek_page_lap(OggVorbis_File *vf,double pos); + +extern ogg_int64_t ov_raw_tell(OggVorbis_File *vf); +extern ogg_int64_t ov_pcm_tell(OggVorbis_File *vf); +extern double ov_time_tell(OggVorbis_File *vf); + +extern vorbis_info *ov_info(OggVorbis_File *vf,int link); +extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link); + +extern long ov_read_float(OggVorbis_File *vf,float ***pcm_channels,int samples, + int *bitstream); +extern long ov_read_filter(OggVorbis_File *vf,char *buffer,int length, + int bigendianp,int word,int sgned,int *bitstream, + void (*filter)(float **pcm,long channels,long samples,void *filter_param),void *filter_param); +extern long ov_read(OggVorbis_File *vf,char *buffer,int length, + int bigendianp,int word,int sgned,int *bitstream); +extern int ov_crosslap(OggVorbis_File *vf1,OggVorbis_File *vf2); + +extern int ov_halfrate(OggVorbis_File *vf,int flag); +extern int ov_halfrate_p(OggVorbis_File *vf); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif + diff --git a/code/libvorbis-1.3.4/lib/analysis.c b/code/libvorbis-1.3.4/lib/analysis.c new file mode 100644 index 00000000..01aa6f30 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/analysis.c @@ -0,0 +1,120 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: single-block PCM analysis mode dispatch + last mod: $Id: analysis.c 16226 2009-07-08 06:43:49Z xiphmont $ + + ********************************************************************/ + +#include +#include +#include +#include +#include "vorbis/codec.h" +#include "codec_internal.h" +#include "registry.h" +#include "scales.h" +#include "os.h" +#include "misc.h" + +/* decides between modes, dispatches to the appropriate mapping. */ +int vorbis_analysis(vorbis_block *vb, ogg_packet *op){ + int ret,i; + vorbis_block_internal *vbi=vb->internal; + + vb->glue_bits=0; + vb->time_bits=0; + vb->floor_bits=0; + vb->res_bits=0; + + /* first things first. Make sure encode is ready */ + for(i=0;ipacketblob[i]); + + /* we only have one mapping type (0), and we let the mapping code + itself figure out what soft mode to use. This allows easier + bitrate management */ + + if((ret=_mapping_P[0]->forward(vb))) + return(ret); + + if(op){ + if(vorbis_bitrate_managed(vb)) + /* The app is using a bitmanaged mode... but not using the + bitrate management interface. */ + return(OV_EINVAL); + + op->packet=oggpack_get_buffer(&vb->opb); + op->bytes=oggpack_bytes(&vb->opb); + op->b_o_s=0; + op->e_o_s=vb->eofflag; + op->granulepos=vb->granulepos; + op->packetno=vb->sequence; /* for sake of completeness */ + } + return(0); +} + +#ifdef ANALYSIS +int analysis_noisy=1; + +/* there was no great place to put this.... */ +void _analysis_output_always(char *base,int i,float *v,int n,int bark,int dB,ogg_int64_t off){ + int j; + FILE *of; + char buffer[80]; + + sprintf(buffer,"%s_%d.m",base,i); + of=fopen(buffer,"w"); + + if(!of)perror("failed to open data dump file"); + + for(j=0;j +#include +#include +#include +#include "vorbis/codec.h" +#include "codec_internal.h" +#include "os.h" +#include "misc.h" +#include "bitrate.h" + +/* compute bitrate tracking setup */ +void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bm){ + codec_setup_info *ci=vi->codec_setup; + bitrate_manager_info *bi=&ci->bi; + + memset(bm,0,sizeof(*bm)); + + if(bi && (bi->reservoir_bits>0)){ + long ratesamples=vi->rate; + int halfsamples=ci->blocksizes[0]>>1; + + bm->short_per_long=ci->blocksizes[1]/ci->blocksizes[0]; + bm->managed=1; + + bm->avg_bitsper= rint(1.*bi->avg_rate*halfsamples/ratesamples); + bm->min_bitsper= rint(1.*bi->min_rate*halfsamples/ratesamples); + bm->max_bitsper= rint(1.*bi->max_rate*halfsamples/ratesamples); + + bm->avgfloat=PACKETBLOBS/2; + + /* not a necessary fix, but one that leads to a more balanced + typical initialization */ + { + long desired_fill=bi->reservoir_bits*bi->reservoir_bias; + bm->minmax_reservoir=desired_fill; + bm->avg_reservoir=desired_fill; + } + + } +} + +void vorbis_bitrate_clear(bitrate_manager_state *bm){ + memset(bm,0,sizeof(*bm)); + return; +} + +int vorbis_bitrate_managed(vorbis_block *vb){ + vorbis_dsp_state *vd=vb->vd; + private_state *b=vd->backend_state; + bitrate_manager_state *bm=&b->bms; + + if(bm && bm->managed)return(1); + return(0); +} + +/* finish taking in the block we just processed */ +int vorbis_bitrate_addblock(vorbis_block *vb){ + vorbis_block_internal *vbi=vb->internal; + vorbis_dsp_state *vd=vb->vd; + private_state *b=vd->backend_state; + bitrate_manager_state *bm=&b->bms; + vorbis_info *vi=vd->vi; + codec_setup_info *ci=vi->codec_setup; + bitrate_manager_info *bi=&ci->bi; + + int choice=rint(bm->avgfloat); + long this_bits=oggpack_bytes(vbi->packetblob[choice])*8; + long min_target_bits=(vb->W?bm->min_bitsper*bm->short_per_long:bm->min_bitsper); + long max_target_bits=(vb->W?bm->max_bitsper*bm->short_per_long:bm->max_bitsper); + int samples=ci->blocksizes[vb->W]>>1; + long desired_fill=bi->reservoir_bits*bi->reservoir_bias; + if(!bm->managed){ + /* not a bitrate managed stream, but for API simplicity, we'll + buffer the packet to keep the code path clean */ + + if(bm->vb)return(-1); /* one has been submitted without + being claimed */ + bm->vb=vb; + return(0); + } + + bm->vb=vb; + + /* look ahead for avg floater */ + if(bm->avg_bitsper>0){ + double slew=0.; + long avg_target_bits=(vb->W?bm->avg_bitsper*bm->short_per_long:bm->avg_bitsper); + double slewlimit= 15./bi->slew_damp; + + /* choosing a new floater: + if we're over target, we slew down + if we're under target, we slew up + + choose slew as follows: look through packetblobs of this frame + and set slew as the first in the appropriate direction that + gives us the slew we want. This may mean no slew if delta is + already favorable. + + Then limit slew to slew max */ + + if(bm->avg_reservoir+(this_bits-avg_target_bits)>desired_fill){ + while(choice>0 && this_bits>avg_target_bits && + bm->avg_reservoir+(this_bits-avg_target_bits)>desired_fill){ + choice--; + this_bits=oggpack_bytes(vbi->packetblob[choice])*8; + } + }else if(bm->avg_reservoir+(this_bits-avg_target_bits)avg_reservoir+(this_bits-avg_target_bits)packetblob[choice])*8; + } + } + + slew=rint(choice-bm->avgfloat)/samples*vi->rate; + if(slew<-slewlimit)slew=-slewlimit; + if(slew>slewlimit)slew=slewlimit; + choice=rint(bm->avgfloat+= slew/vi->rate*samples); + this_bits=oggpack_bytes(vbi->packetblob[choice])*8; + } + + + + /* enforce min(if used) on the current floater (if used) */ + if(bm->min_bitsper>0){ + /* do we need to force the bitrate up? */ + if(this_bitsminmax_reservoir-(min_target_bits-this_bits)<0){ + choice++; + if(choice>=PACKETBLOBS)break; + this_bits=oggpack_bytes(vbi->packetblob[choice])*8; + } + } + } + + /* enforce max (if used) on the current floater (if used) */ + if(bm->max_bitsper>0){ + /* do we need to force the bitrate down? */ + if(this_bits>max_target_bits){ + while(bm->minmax_reservoir+(this_bits-max_target_bits)>bi->reservoir_bits){ + choice--; + if(choice<0)break; + this_bits=oggpack_bytes(vbi->packetblob[choice])*8; + } + } + } + + /* Choice of packetblobs now made based on floater, and min/max + requirements. Now boundary check extreme choices */ + + if(choice<0){ + /* choosing a smaller packetblob is insufficient to trim bitrate. + frame will need to be truncated */ + long maxsize=(max_target_bits+(bi->reservoir_bits-bm->minmax_reservoir))/8; + bm->choice=choice=0; + + if(oggpack_bytes(vbi->packetblob[choice])>maxsize){ + + oggpack_writetrunc(vbi->packetblob[choice],maxsize*8); + this_bits=oggpack_bytes(vbi->packetblob[choice])*8; + } + }else{ + long minsize=(min_target_bits-bm->minmax_reservoir+7)/8; + if(choice>=PACKETBLOBS) + choice=PACKETBLOBS-1; + + bm->choice=choice; + + /* prop up bitrate according to demand. pad this frame out with zeroes */ + minsize-=oggpack_bytes(vbi->packetblob[choice]); + while(minsize-->0)oggpack_write(vbi->packetblob[choice],0,8); + this_bits=oggpack_bytes(vbi->packetblob[choice])*8; + + } + + /* now we have the final packet and the final packet size. Update statistics */ + /* min and max reservoir */ + if(bm->min_bitsper>0 || bm->max_bitsper>0){ + + if(max_target_bits>0 && this_bits>max_target_bits){ + bm->minmax_reservoir+=(this_bits-max_target_bits); + }else if(min_target_bits>0 && this_bitsminmax_reservoir+=(this_bits-min_target_bits); + }else{ + /* inbetween; we want to take reservoir toward but not past desired_fill */ + if(bm->minmax_reservoir>desired_fill){ + if(max_target_bits>0){ /* logical bulletproofing against initialization state */ + bm->minmax_reservoir+=(this_bits-max_target_bits); + if(bm->minmax_reservoirminmax_reservoir=desired_fill; + }else{ + bm->minmax_reservoir=desired_fill; + } + }else{ + if(min_target_bits>0){ /* logical bulletproofing against initialization state */ + bm->minmax_reservoir+=(this_bits-min_target_bits); + if(bm->minmax_reservoir>desired_fill)bm->minmax_reservoir=desired_fill; + }else{ + bm->minmax_reservoir=desired_fill; + } + } + } + } + + /* avg reservoir */ + if(bm->avg_bitsper>0){ + long avg_target_bits=(vb->W?bm->avg_bitsper*bm->short_per_long:bm->avg_bitsper); + bm->avg_reservoir+=this_bits-avg_target_bits; + } + + return(0); +} + +int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd,ogg_packet *op){ + private_state *b=vd->backend_state; + bitrate_manager_state *bm=&b->bms; + vorbis_block *vb=bm->vb; + int choice=PACKETBLOBS/2; + if(!vb)return 0; + + if(op){ + vorbis_block_internal *vbi=vb->internal; + + if(vorbis_bitrate_managed(vb)) + choice=bm->choice; + + op->packet=oggpack_get_buffer(vbi->packetblob[choice]); + op->bytes=oggpack_bytes(vbi->packetblob[choice]); + op->b_o_s=0; + op->e_o_s=vb->eofflag; + op->granulepos=vb->granulepos; + op->packetno=vb->sequence; /* for sake of completeness */ + } + + bm->vb=0; + return(1); +} diff --git a/code/libvorbis-1.3.4/lib/bitrate.h b/code/libvorbis-1.3.4/lib/bitrate.h new file mode 100644 index 00000000..db48fcb6 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/bitrate.h @@ -0,0 +1,59 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: bitrate tracking and management + last mod: $Id: bitrate.h 13293 2007-07-24 00:09:47Z xiphmont $ + + ********************************************************************/ + +#ifndef _V_BITRATE_H_ +#define _V_BITRATE_H_ + +#include "vorbis/codec.h" +#include "codec_internal.h" +#include "os.h" + +/* encode side bitrate tracking */ +typedef struct bitrate_manager_state { + int managed; + + long avg_reservoir; + long minmax_reservoir; + long avg_bitsper; + long min_bitsper; + long max_bitsper; + + long short_per_long; + double avgfloat; + + vorbis_block *vb; + int choice; +} bitrate_manager_state; + +typedef struct bitrate_manager_info{ + long avg_rate; + long min_rate; + long max_rate; + long reservoir_bits; + double reservoir_bias; + + double slew_damp; + +} bitrate_manager_info; + +extern void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bs); +extern void vorbis_bitrate_clear(bitrate_manager_state *bs); +extern int vorbis_bitrate_managed(vorbis_block *vb); +extern int vorbis_bitrate_addblock(vorbis_block *vb); +extern int vorbis_bitrate_flushpacket(vorbis_dsp_state *vd, ogg_packet *op); + +#endif diff --git a/code/libvorbis-1.3.4/lib/block.c b/code/libvorbis-1.3.4/lib/block.c new file mode 100644 index 00000000..57dfe896 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/block.c @@ -0,0 +1,1046 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: PCM data vector blocking, windowing and dis/reassembly + last mod: $Id: block.c 19031 2013-12-03 19:20:50Z tterribe $ + + Handle windowing, overlap-add, etc of the PCM vectors. This is made + more amusing by Vorbis' current two allowed block sizes. + + ********************************************************************/ + +#include +#include +#include +#include +#include "vorbis/codec.h" +#include "codec_internal.h" + +#include "window.h" +#include "mdct.h" +#include "lpc.h" +#include "registry.h" +#include "misc.h" + +static int ilog2(unsigned int v){ + int ret=0; + if(v)--v; + while(v){ + ret++; + v>>=1; + } + return(ret); +} + +/* pcm accumulator examples (not exhaustive): + + <-------------- lW ----------------> + <--------------- W ----------------> +: .....|..... _______________ | +: .''' | '''_--- | |\ | +:.....''' |_____--- '''......| | \_______| +:.................|__________________|_______|__|______| + |<------ Sl ------>| > Sr < |endW + |beginSl |endSl | |endSr + |beginW |endlW |beginSr + + + |< lW >| + <--------------- W ----------------> + | | .. ______________ | + | | ' `/ | ---_ | + |___.'___/`. | ---_____| + |_______|__|_______|_________________| + | >|Sl|< |<------ Sr ----->|endW + | | |endSl |beginSr |endSr + |beginW | |endlW + mult[0] |beginSl mult[n] + + <-------------- lW -----------------> + |<--W-->| +: .............. ___ | | +: .''' |`/ \ | | +:.....''' |/`....\|...| +:.........................|___|___|___| + |Sl |Sr |endW + | | |endSr + | |beginSr + | |endSl + |beginSl + |beginW +*/ + +/* block abstraction setup *********************************************/ + +#ifndef WORD_ALIGN +#define WORD_ALIGN 8 +#endif + +int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb){ + int i; + memset(vb,0,sizeof(*vb)); + vb->vd=v; + vb->localalloc=0; + vb->localstore=NULL; + if(v->analysisp){ + vorbis_block_internal *vbi= + vb->internal=_ogg_calloc(1,sizeof(vorbis_block_internal)); + vbi->ampmax=-9999; + + for(i=0;ipacketblob[i]=&vb->opb; + }else{ + vbi->packetblob[i]= + _ogg_calloc(1,sizeof(oggpack_buffer)); + } + oggpack_writeinit(vbi->packetblob[i]); + } + } + + return(0); +} + +void *_vorbis_block_alloc(vorbis_block *vb,long bytes){ + bytes=(bytes+(WORD_ALIGN-1)) & ~(WORD_ALIGN-1); + if(bytes+vb->localtop>vb->localalloc){ + /* can't just _ogg_realloc... there are outstanding pointers */ + if(vb->localstore){ + struct alloc_chain *link=_ogg_malloc(sizeof(*link)); + vb->totaluse+=vb->localtop; + link->next=vb->reap; + link->ptr=vb->localstore; + vb->reap=link; + } + /* highly conservative */ + vb->localalloc=bytes; + vb->localstore=_ogg_malloc(vb->localalloc); + vb->localtop=0; + } + { + void *ret=(void *)(((char *)vb->localstore)+vb->localtop); + vb->localtop+=bytes; + return ret; + } +} + +/* reap the chain, pull the ripcord */ +void _vorbis_block_ripcord(vorbis_block *vb){ + /* reap the chain */ + struct alloc_chain *reap=vb->reap; + while(reap){ + struct alloc_chain *next=reap->next; + _ogg_free(reap->ptr); + memset(reap,0,sizeof(*reap)); + _ogg_free(reap); + reap=next; + } + /* consolidate storage */ + if(vb->totaluse){ + vb->localstore=_ogg_realloc(vb->localstore,vb->totaluse+vb->localalloc); + vb->localalloc+=vb->totaluse; + vb->totaluse=0; + } + + /* pull the ripcord */ + vb->localtop=0; + vb->reap=NULL; +} + +int vorbis_block_clear(vorbis_block *vb){ + int i; + vorbis_block_internal *vbi=vb->internal; + + _vorbis_block_ripcord(vb); + if(vb->localstore)_ogg_free(vb->localstore); + + if(vbi){ + for(i=0;ipacketblob[i]); + if(i!=PACKETBLOBS/2)_ogg_free(vbi->packetblob[i]); + } + _ogg_free(vbi); + } + memset(vb,0,sizeof(*vb)); + return(0); +} + +/* Analysis side code, but directly related to blocking. Thus it's + here and not in analysis.c (which is for analysis transforms only). + The init is here because some of it is shared */ + +static int _vds_shared_init(vorbis_dsp_state *v,vorbis_info *vi,int encp){ + int i; + codec_setup_info *ci=vi->codec_setup; + private_state *b=NULL; + int hs; + + if(ci==NULL) return 1; + hs=ci->halfrate_flag; + + memset(v,0,sizeof(*v)); + b=v->backend_state=_ogg_calloc(1,sizeof(*b)); + + v->vi=vi; + b->modebits=ilog2(ci->modes); + + b->transform[0]=_ogg_calloc(VI_TRANSFORMB,sizeof(*b->transform[0])); + b->transform[1]=_ogg_calloc(VI_TRANSFORMB,sizeof(*b->transform[1])); + + /* MDCT is tranform 0 */ + + b->transform[0][0]=_ogg_calloc(1,sizeof(mdct_lookup)); + b->transform[1][0]=_ogg_calloc(1,sizeof(mdct_lookup)); + mdct_init(b->transform[0][0],ci->blocksizes[0]>>hs); + mdct_init(b->transform[1][0],ci->blocksizes[1]>>hs); + + /* Vorbis I uses only window type 0 */ + b->window[0]=ilog2(ci->blocksizes[0])-6; + b->window[1]=ilog2(ci->blocksizes[1])-6; + + if(encp){ /* encode/decode differ here */ + + /* analysis always needs an fft */ + drft_init(&b->fft_look[0],ci->blocksizes[0]); + drft_init(&b->fft_look[1],ci->blocksizes[1]); + + /* finish the codebooks */ + if(!ci->fullbooks){ + ci->fullbooks=_ogg_calloc(ci->books,sizeof(*ci->fullbooks)); + for(i=0;ibooks;i++) + vorbis_book_init_encode(ci->fullbooks+i,ci->book_param[i]); + } + + b->psy=_ogg_calloc(ci->psys,sizeof(*b->psy)); + for(i=0;ipsys;i++){ + _vp_psy_init(b->psy+i, + ci->psy_param[i], + &ci->psy_g_param, + ci->blocksizes[ci->psy_param[i]->blockflag]/2, + vi->rate); + } + + v->analysisp=1; + }else{ + /* finish the codebooks */ + if(!ci->fullbooks){ + ci->fullbooks=_ogg_calloc(ci->books,sizeof(*ci->fullbooks)); + for(i=0;ibooks;i++){ + if(ci->book_param[i]==NULL) + goto abort_books; + if(vorbis_book_init_decode(ci->fullbooks+i,ci->book_param[i])) + goto abort_books; + /* decode codebooks are now standalone after init */ + vorbis_staticbook_destroy(ci->book_param[i]); + ci->book_param[i]=NULL; + } + } + } + + /* initialize the storage vectors. blocksize[1] is small for encode, + but the correct size for decode */ + v->pcm_storage=ci->blocksizes[1]; + v->pcm=_ogg_malloc(vi->channels*sizeof(*v->pcm)); + v->pcmret=_ogg_malloc(vi->channels*sizeof(*v->pcmret)); + { + int i; + for(i=0;ichannels;i++) + v->pcm[i]=_ogg_calloc(v->pcm_storage,sizeof(*v->pcm[i])); + } + + /* all 1 (large block) or 0 (small block) */ + /* explicitly set for the sake of clarity */ + v->lW=0; /* previous window size */ + v->W=0; /* current window size */ + + /* all vector indexes */ + v->centerW=ci->blocksizes[1]/2; + + v->pcm_current=v->centerW; + + /* initialize all the backend lookups */ + b->flr=_ogg_calloc(ci->floors,sizeof(*b->flr)); + b->residue=_ogg_calloc(ci->residues,sizeof(*b->residue)); + + for(i=0;ifloors;i++) + b->flr[i]=_floor_P[ci->floor_type[i]]-> + look(v,ci->floor_param[i]); + + for(i=0;iresidues;i++) + b->residue[i]=_residue_P[ci->residue_type[i]]-> + look(v,ci->residue_param[i]); + + return 0; + abort_books: + for(i=0;ibooks;i++){ + if(ci->book_param[i]!=NULL){ + vorbis_staticbook_destroy(ci->book_param[i]); + ci->book_param[i]=NULL; + } + } + vorbis_dsp_clear(v); + return -1; +} + +/* arbitrary settings and spec-mandated numbers get filled in here */ +int vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi){ + private_state *b=NULL; + + if(_vds_shared_init(v,vi,1))return 1; + b=v->backend_state; + b->psy_g_look=_vp_global_look(vi); + + /* Initialize the envelope state storage */ + b->ve=_ogg_calloc(1,sizeof(*b->ve)); + _ve_envelope_init(b->ve,vi); + + vorbis_bitrate_init(vi,&b->bms); + + /* compressed audio packets start after the headers + with sequence number 3 */ + v->sequence=3; + + return(0); +} + +void vorbis_dsp_clear(vorbis_dsp_state *v){ + int i; + if(v){ + vorbis_info *vi=v->vi; + codec_setup_info *ci=(vi?vi->codec_setup:NULL); + private_state *b=v->backend_state; + + if(b){ + + if(b->ve){ + _ve_envelope_clear(b->ve); + _ogg_free(b->ve); + } + + if(b->transform[0]){ + mdct_clear(b->transform[0][0]); + _ogg_free(b->transform[0][0]); + _ogg_free(b->transform[0]); + } + if(b->transform[1]){ + mdct_clear(b->transform[1][0]); + _ogg_free(b->transform[1][0]); + _ogg_free(b->transform[1]); + } + + if(b->flr){ + if(ci) + for(i=0;ifloors;i++) + _floor_P[ci->floor_type[i]]-> + free_look(b->flr[i]); + _ogg_free(b->flr); + } + if(b->residue){ + if(ci) + for(i=0;iresidues;i++) + _residue_P[ci->residue_type[i]]-> + free_look(b->residue[i]); + _ogg_free(b->residue); + } + if(b->psy){ + if(ci) + for(i=0;ipsys;i++) + _vp_psy_clear(b->psy+i); + _ogg_free(b->psy); + } + + if(b->psy_g_look)_vp_global_free(b->psy_g_look); + vorbis_bitrate_clear(&b->bms); + + drft_clear(&b->fft_look[0]); + drft_clear(&b->fft_look[1]); + + } + + if(v->pcm){ + if(vi) + for(i=0;ichannels;i++) + if(v->pcm[i])_ogg_free(v->pcm[i]); + _ogg_free(v->pcm); + if(v->pcmret)_ogg_free(v->pcmret); + } + + if(b){ + /* free header, header1, header2 */ + if(b->header)_ogg_free(b->header); + if(b->header1)_ogg_free(b->header1); + if(b->header2)_ogg_free(b->header2); + _ogg_free(b); + } + + memset(v,0,sizeof(*v)); + } +} + +float **vorbis_analysis_buffer(vorbis_dsp_state *v, int vals){ + int i; + vorbis_info *vi=v->vi; + private_state *b=v->backend_state; + + /* free header, header1, header2 */ + if(b->header)_ogg_free(b->header);b->header=NULL; + if(b->header1)_ogg_free(b->header1);b->header1=NULL; + if(b->header2)_ogg_free(b->header2);b->header2=NULL; + + /* Do we have enough storage space for the requested buffer? If not, + expand the PCM (and envelope) storage */ + + if(v->pcm_current+vals>=v->pcm_storage){ + v->pcm_storage=v->pcm_current+vals*2; + + for(i=0;ichannels;i++){ + v->pcm[i]=_ogg_realloc(v->pcm[i],v->pcm_storage*sizeof(*v->pcm[i])); + } + } + + for(i=0;ichannels;i++) + v->pcmret[i]=v->pcm[i]+v->pcm_current; + + return(v->pcmret); +} + +static void _preextrapolate_helper(vorbis_dsp_state *v){ + int i; + int order=16; + float *lpc=alloca(order*sizeof(*lpc)); + float *work=alloca(v->pcm_current*sizeof(*work)); + long j; + v->preextrapolate=1; + + if(v->pcm_current-v->centerW>order*2){ /* safety */ + for(i=0;ivi->channels;i++){ + /* need to run the extrapolation in reverse! */ + for(j=0;jpcm_current;j++) + work[j]=v->pcm[i][v->pcm_current-j-1]; + + /* prime as above */ + vorbis_lpc_from_data(work,lpc,v->pcm_current-v->centerW,order); + +#if 0 + if(v->vi->channels==2){ + if(i==0) + _analysis_output("predataL",0,work,v->pcm_current-v->centerW,0,0,0); + else + _analysis_output("predataR",0,work,v->pcm_current-v->centerW,0,0,0); + }else{ + _analysis_output("predata",0,work,v->pcm_current-v->centerW,0,0,0); + } +#endif + + /* run the predictor filter */ + vorbis_lpc_predict(lpc,work+v->pcm_current-v->centerW-order, + order, + work+v->pcm_current-v->centerW, + v->centerW); + + for(j=0;jpcm_current;j++) + v->pcm[i][v->pcm_current-j-1]=work[j]; + + } + } +} + + +/* call with val<=0 to set eof */ + +int vorbis_analysis_wrote(vorbis_dsp_state *v, int vals){ + vorbis_info *vi=v->vi; + codec_setup_info *ci=vi->codec_setup; + + if(vals<=0){ + int order=32; + int i; + float *lpc=alloca(order*sizeof(*lpc)); + + /* if it wasn't done earlier (very short sample) */ + if(!v->preextrapolate) + _preextrapolate_helper(v); + + /* We're encoding the end of the stream. Just make sure we have + [at least] a few full blocks of zeroes at the end. */ + /* actually, we don't want zeroes; that could drop a large + amplitude off a cliff, creating spread spectrum noise that will + suck to encode. Extrapolate for the sake of cleanliness. */ + + vorbis_analysis_buffer(v,ci->blocksizes[1]*3); + v->eofflag=v->pcm_current; + v->pcm_current+=ci->blocksizes[1]*3; + + for(i=0;ichannels;i++){ + if(v->eofflag>order*2){ + /* extrapolate with LPC to fill in */ + long n; + + /* make a predictor filter */ + n=v->eofflag; + if(n>ci->blocksizes[1])n=ci->blocksizes[1]; + vorbis_lpc_from_data(v->pcm[i]+v->eofflag-n,lpc,n,order); + + /* run the predictor filter */ + vorbis_lpc_predict(lpc,v->pcm[i]+v->eofflag-order,order, + v->pcm[i]+v->eofflag,v->pcm_current-v->eofflag); + }else{ + /* not enough data to extrapolate (unlikely to happen due to + guarding the overlap, but bulletproof in case that + assumtion goes away). zeroes will do. */ + memset(v->pcm[i]+v->eofflag,0, + (v->pcm_current-v->eofflag)*sizeof(*v->pcm[i])); + + } + } + }else{ + + if(v->pcm_current+vals>v->pcm_storage) + return(OV_EINVAL); + + v->pcm_current+=vals; + + /* we may want to reverse extrapolate the beginning of a stream + too... in case we're beginning on a cliff! */ + /* clumsy, but simple. It only runs once, so simple is good. */ + if(!v->preextrapolate && v->pcm_current-v->centerW>ci->blocksizes[1]) + _preextrapolate_helper(v); + + } + return(0); +} + +/* do the deltas, envelope shaping, pre-echo and determine the size of + the next block on which to continue analysis */ +int vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb){ + int i; + vorbis_info *vi=v->vi; + codec_setup_info *ci=vi->codec_setup; + private_state *b=v->backend_state; + vorbis_look_psy_global *g=b->psy_g_look; + long beginW=v->centerW-ci->blocksizes[v->W]/2,centerNext; + vorbis_block_internal *vbi=(vorbis_block_internal *)vb->internal; + + /* check to see if we're started... */ + if(!v->preextrapolate)return(0); + + /* check to see if we're done... */ + if(v->eofflag==-1)return(0); + + /* By our invariant, we have lW, W and centerW set. Search for + the next boundary so we can determine nW (the next window size) + which lets us compute the shape of the current block's window */ + + /* we do an envelope search even on a single blocksize; we may still + be throwing more bits at impulses, and envelope search handles + marking impulses too. */ + { + long bp=_ve_envelope_search(v); + if(bp==-1){ + + if(v->eofflag==0)return(0); /* not enough data currently to search for a + full long block */ + v->nW=0; + }else{ + + if(ci->blocksizes[0]==ci->blocksizes[1]) + v->nW=0; + else + v->nW=bp; + } + } + + centerNext=v->centerW+ci->blocksizes[v->W]/4+ci->blocksizes[v->nW]/4; + + { + /* center of next block + next block maximum right side. */ + + long blockbound=centerNext+ci->blocksizes[v->nW]/2; + if(v->pcm_currentlW=v->lW; + vb->W=v->W; + vb->nW=v->nW; + + if(v->W){ + if(!v->lW || !v->nW){ + vbi->blocktype=BLOCKTYPE_TRANSITION; + /*fprintf(stderr,"-");*/ + }else{ + vbi->blocktype=BLOCKTYPE_LONG; + /*fprintf(stderr,"_");*/ + } + }else{ + if(_ve_envelope_mark(v)){ + vbi->blocktype=BLOCKTYPE_IMPULSE; + /*fprintf(stderr,"|");*/ + + }else{ + vbi->blocktype=BLOCKTYPE_PADDING; + /*fprintf(stderr,".");*/ + + } + } + + vb->vd=v; + vb->sequence=v->sequence++; + vb->granulepos=v->granulepos; + vb->pcmend=ci->blocksizes[v->W]; + + /* copy the vectors; this uses the local storage in vb */ + + /* this tracks 'strongest peak' for later psychoacoustics */ + /* moved to the global psy state; clean this mess up */ + if(vbi->ampmax>g->ampmax)g->ampmax=vbi->ampmax; + g->ampmax=_vp_ampmax_decay(g->ampmax,v); + vbi->ampmax=g->ampmax; + + vb->pcm=_vorbis_block_alloc(vb,sizeof(*vb->pcm)*vi->channels); + vbi->pcmdelay=_vorbis_block_alloc(vb,sizeof(*vbi->pcmdelay)*vi->channels); + for(i=0;ichannels;i++){ + vbi->pcmdelay[i]= + _vorbis_block_alloc(vb,(vb->pcmend+beginW)*sizeof(*vbi->pcmdelay[i])); + memcpy(vbi->pcmdelay[i],v->pcm[i],(vb->pcmend+beginW)*sizeof(*vbi->pcmdelay[i])); + vb->pcm[i]=vbi->pcmdelay[i]+beginW; + + /* before we added the delay + vb->pcm[i]=_vorbis_block_alloc(vb,vb->pcmend*sizeof(*vb->pcm[i])); + memcpy(vb->pcm[i],v->pcm[i]+beginW,ci->blocksizes[v->W]*sizeof(*vb->pcm[i])); + */ + + } + + /* handle eof detection: eof==0 means that we've not yet received EOF + eof>0 marks the last 'real' sample in pcm[] + eof<0 'no more to do'; doesn't get here */ + + if(v->eofflag){ + if(v->centerW>=v->eofflag){ + v->eofflag=-1; + vb->eofflag=1; + return(1); + } + } + + /* advance storage vectors and clean up */ + { + int new_centerNext=ci->blocksizes[1]/2; + int movementW=centerNext-new_centerNext; + + if(movementW>0){ + + _ve_envelope_shift(b->ve,movementW); + v->pcm_current-=movementW; + + for(i=0;ichannels;i++) + memmove(v->pcm[i],v->pcm[i]+movementW, + v->pcm_current*sizeof(*v->pcm[i])); + + + v->lW=v->W; + v->W=v->nW; + v->centerW=new_centerNext; + + if(v->eofflag){ + v->eofflag-=movementW; + if(v->eofflag<=0)v->eofflag=-1; + /* do not add padding to end of stream! */ + if(v->centerW>=v->eofflag){ + v->granulepos+=movementW-(v->centerW-v->eofflag); + }else{ + v->granulepos+=movementW; + } + }else{ + v->granulepos+=movementW; + } + } + } + + /* done */ + return(1); +} + +int vorbis_synthesis_restart(vorbis_dsp_state *v){ + vorbis_info *vi=v->vi; + codec_setup_info *ci; + int hs; + + if(!v->backend_state)return -1; + if(!vi)return -1; + ci=vi->codec_setup; + if(!ci)return -1; + hs=ci->halfrate_flag; + + v->centerW=ci->blocksizes[1]>>(hs+1); + v->pcm_current=v->centerW>>hs; + + v->pcm_returned=-1; + v->granulepos=-1; + v->sequence=-1; + v->eofflag=0; + ((private_state *)(v->backend_state))->sample_count=-1; + + return(0); +} + +int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi){ + if(_vds_shared_init(v,vi,0)){ + vorbis_dsp_clear(v); + return 1; + } + vorbis_synthesis_restart(v); + return 0; +} + +/* Unlike in analysis, the window is only partially applied for each + block. The time domain envelope is not yet handled at the point of + calling (as it relies on the previous block). */ + +int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){ + vorbis_info *vi=v->vi; + codec_setup_info *ci=vi->codec_setup; + private_state *b=v->backend_state; + int hs=ci->halfrate_flag; + int i,j; + + if(!vb)return(OV_EINVAL); + if(v->pcm_current>v->pcm_returned && v->pcm_returned!=-1)return(OV_EINVAL); + + v->lW=v->W; + v->W=vb->W; + v->nW=-1; + + if((v->sequence==-1)|| + (v->sequence+1 != vb->sequence)){ + v->granulepos=-1; /* out of sequence; lose count */ + b->sample_count=-1; + } + + v->sequence=vb->sequence; + + if(vb->pcm){ /* no pcm to process if vorbis_synthesis_trackonly + was called on block */ + int n=ci->blocksizes[v->W]>>(hs+1); + int n0=ci->blocksizes[0]>>(hs+1); + int n1=ci->blocksizes[1]>>(hs+1); + + int thisCenter; + int prevCenter; + + v->glue_bits+=vb->glue_bits; + v->time_bits+=vb->time_bits; + v->floor_bits+=vb->floor_bits; + v->res_bits+=vb->res_bits; + + if(v->centerW){ + thisCenter=n1; + prevCenter=0; + }else{ + thisCenter=0; + prevCenter=n1; + } + + /* v->pcm is now used like a two-stage double buffer. We don't want + to have to constantly shift *or* adjust memory usage. Don't + accept a new block until the old is shifted out */ + + for(j=0;jchannels;j++){ + /* the overlap/add section */ + if(v->lW){ + if(v->W){ + /* large/large */ + const float *w=_vorbis_window_get(b->window[1]-hs); + float *pcm=v->pcm[j]+prevCenter; + float *p=vb->pcm[j]; + for(i=0;iwindow[0]-hs); + float *pcm=v->pcm[j]+prevCenter+n1/2-n0/2; + float *p=vb->pcm[j]; + for(i=0;iW){ + /* small/large */ + const float *w=_vorbis_window_get(b->window[0]-hs); + float *pcm=v->pcm[j]+prevCenter; + float *p=vb->pcm[j]+n1/2-n0/2; + for(i=0;iwindow[0]-hs); + float *pcm=v->pcm[j]+prevCenter; + float *p=vb->pcm[j]; + for(i=0;ipcm[j]+thisCenter; + float *p=vb->pcm[j]+n; + for(i=0;icenterW) + v->centerW=0; + else + v->centerW=n1; + + /* deal with initial packet state; we do this using the explicit + pcm_returned==-1 flag otherwise we're sensitive to first block + being short or long */ + + if(v->pcm_returned==-1){ + v->pcm_returned=thisCenter; + v->pcm_current=thisCenter; + }else{ + v->pcm_returned=prevCenter; + v->pcm_current=prevCenter+ + ((ci->blocksizes[v->lW]/4+ + ci->blocksizes[v->W]/4)>>hs); + } + + } + + /* track the frame number... This is for convenience, but also + making sure our last packet doesn't end with added padding. If + the last packet is partial, the number of samples we'll have to + return will be past the vb->granulepos. + + This is not foolproof! It will be confused if we begin + decoding at the last page after a seek or hole. In that case, + we don't have a starting point to judge where the last frame + is. For this reason, vorbisfile will always try to make sure + it reads the last two marked pages in proper sequence */ + + if(b->sample_count==-1){ + b->sample_count=0; + }else{ + b->sample_count+=ci->blocksizes[v->lW]/4+ci->blocksizes[v->W]/4; + } + + if(v->granulepos==-1){ + if(vb->granulepos!=-1){ /* only set if we have a position to set to */ + + v->granulepos=vb->granulepos; + + /* is this a short page? */ + if(b->sample_count>v->granulepos){ + /* corner case; if this is both the first and last audio page, + then spec says the end is cut, not beginning */ + long extra=b->sample_count-vb->granulepos; + + /* we use ogg_int64_t for granule positions because a + uint64 isn't universally available. Unfortunately, + that means granposes can be 'negative' and result in + extra being negative */ + if(extra<0) + extra=0; + + if(vb->eofflag){ + /* trim the end */ + /* no preceding granulepos; assume we started at zero (we'd + have to in a short single-page stream) */ + /* granulepos could be -1 due to a seek, but that would result + in a long count, not short count */ + + /* Guard against corrupt/malicious frames that set EOP and + a backdated granpos; don't rewind more samples than we + actually have */ + if(extra > (v->pcm_current - v->pcm_returned)<pcm_current - v->pcm_returned)<pcm_current-=extra>>hs; + }else{ + /* trim the beginning */ + v->pcm_returned+=extra>>hs; + if(v->pcm_returned>v->pcm_current) + v->pcm_returned=v->pcm_current; + } + + } + + } + }else{ + v->granulepos+=ci->blocksizes[v->lW]/4+ci->blocksizes[v->W]/4; + if(vb->granulepos!=-1 && v->granulepos!=vb->granulepos){ + + if(v->granulepos>vb->granulepos){ + long extra=v->granulepos-vb->granulepos; + + if(extra) + if(vb->eofflag){ + /* partial last frame. Strip the extra samples off */ + + /* Guard against corrupt/malicious frames that set EOP and + a backdated granpos; don't rewind more samples than we + actually have */ + if(extra > (v->pcm_current - v->pcm_returned)<pcm_current - v->pcm_returned)<pcm_current-=extra>>hs; + } /* else {Shouldn't happen *unless* the bitstream is out of + spec. Either way, believe the bitstream } */ + } /* else {Shouldn't happen *unless* the bitstream is out of + spec. Either way, believe the bitstream } */ + v->granulepos=vb->granulepos; + } + } + + /* Update, cleanup */ + + if(vb->eofflag)v->eofflag=1; + return(0); + +} + +/* pcm==NULL indicates we just want the pending samples, no more */ +int vorbis_synthesis_pcmout(vorbis_dsp_state *v,float ***pcm){ + vorbis_info *vi=v->vi; + + if(v->pcm_returned>-1 && v->pcm_returnedpcm_current){ + if(pcm){ + int i; + for(i=0;ichannels;i++) + v->pcmret[i]=v->pcm[i]+v->pcm_returned; + *pcm=v->pcmret; + } + return(v->pcm_current-v->pcm_returned); + } + return(0); +} + +int vorbis_synthesis_read(vorbis_dsp_state *v,int n){ + if(n && v->pcm_returned+n>v->pcm_current)return(OV_EINVAL); + v->pcm_returned+=n; + return(0); +} + +/* intended for use with a specific vorbisfile feature; we want access + to the [usually synthetic/postextrapolated] buffer and lapping at + the end of a decode cycle, specifically, a half-short-block worth. + This funtion works like pcmout above, except it will also expose + this implicit buffer data not normally decoded. */ +int vorbis_synthesis_lapout(vorbis_dsp_state *v,float ***pcm){ + vorbis_info *vi=v->vi; + codec_setup_info *ci=vi->codec_setup; + int hs=ci->halfrate_flag; + + int n=ci->blocksizes[v->W]>>(hs+1); + int n0=ci->blocksizes[0]>>(hs+1); + int n1=ci->blocksizes[1]>>(hs+1); + int i,j; + + if(v->pcm_returned<0)return 0; + + /* our returned data ends at pcm_returned; because the synthesis pcm + buffer is a two-fragment ring, that means our data block may be + fragmented by buffering, wrapping or a short block not filling + out a buffer. To simplify things, we unfragment if it's at all + possibly needed. Otherwise, we'd need to call lapout more than + once as well as hold additional dsp state. Opt for + simplicity. */ + + /* centerW was advanced by blockin; it would be the center of the + *next* block */ + if(v->centerW==n1){ + /* the data buffer wraps; swap the halves */ + /* slow, sure, small */ + for(j=0;jchannels;j++){ + float *p=v->pcm[j]; + for(i=0;ipcm_current-=n1; + v->pcm_returned-=n1; + v->centerW=0; + } + + /* solidify buffer into contiguous space */ + if((v->lW^v->W)==1){ + /* long/short or short/long */ + for(j=0;jchannels;j++){ + float *s=v->pcm[j]; + float *d=v->pcm[j]+(n1-n0)/2; + for(i=(n1+n0)/2-1;i>=0;--i) + d[i]=s[i]; + } + v->pcm_returned+=(n1-n0)/2; + v->pcm_current+=(n1-n0)/2; + }else{ + if(v->lW==0){ + /* short/short */ + for(j=0;jchannels;j++){ + float *s=v->pcm[j]; + float *d=v->pcm[j]+n1-n0; + for(i=n0-1;i>=0;--i) + d[i]=s[i]; + } + v->pcm_returned+=n1-n0; + v->pcm_current+=n1-n0; + } + } + + if(pcm){ + int i; + for(i=0;ichannels;i++) + v->pcmret[i]=v->pcm[i]+v->pcm_returned; + *pcm=v->pcmret; + } + + return(n1+n-v->pcm_returned); + +} + +const float *vorbis_window(vorbis_dsp_state *v,int W){ + vorbis_info *vi=v->vi; + codec_setup_info *ci=vi->codec_setup; + int hs=ci->halfrate_flag; + private_state *b=v->backend_state; + + if(b->window[W]-1<0)return NULL; + return _vorbis_window_get(b->window[W]-hs); +} diff --git a/code/libvorbis-1.3.4/lib/books/coupled/res_books_51.h b/code/libvorbis-1.3.4/lib/books/coupled/res_books_51.h new file mode 100644 index 00000000..93910ff4 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/books/coupled/res_books_51.h @@ -0,0 +1,12274 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + * + * function: static codebooks for 5.1 surround + * last modified: $Id: res_books_51.h 19057 2014-01-22 12:32:31Z xiphmont $ + * + ********************************************************************/ + +static const long _vq_quantlist__44p0_l0_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44p0_l0_0[] = { + 1, 3, 4, 7, 7, 8, 8, 9, 9, 9,10,10,10, 5, 6, 5, + 8, 7, 9, 8, 9, 9,10, 9,11,10, 5, 5, 7, 7, 8, 8, + 9, 9, 9, 9,10,10,11, 8, 9, 8,10, 9,10, 9,10, 9, + 11,10,11,10, 8, 8, 9, 9,10, 9,10, 9,11,10,11,10, + 11,10,11,11,11,11,11,11,11,11,11,11,11,11,10,11, + 11,11,12,11,11,11,11,11,11,10,12,12,12,12,12,12, + 12,11,12,12,12,11,11,11,12,12,12,12,12,12,12,11, + 12,11,12,11,11,13,12,12,12,13,12,12,12,12,11,12, + 11,11,13,13,13,12,12,12,12,12,12,11,11,11,10,13, + 13,13,12,13,12,13,11,13,10,12,11,11,13,13,12,13, + 12,12,12,12,11,12,11,11,11, +}; + +static const static_codebook _44p0_l0_0 = { + 2, 169, + (char *)_vq_lengthlist__44p0_l0_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44p0_l0_0, + 0 +}; + +static const long _vq_quantlist__44p0_l0_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p0_l0_1[] = { + 1, 4, 4, 6, 6, 5, 5, 5, 7, 5, 5, 5, 5, 6, 7, 7, + 6, 7, 7, 7, 6, 7, 7, 7, 7, +}; + +static const static_codebook _44p0_l0_1 = { + 2, 25, + (char *)_vq_lengthlist__44p0_l0_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p0_l0_1, + 0 +}; + +static const long _vq_quantlist__44p0_l1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p0_l1_0[] = { + 1, 4, 4, 4, 4, 4, 4, 4, 4, +}; + +static const static_codebook _44p0_l1_0 = { + 2, 9, + (char *)_vq_lengthlist__44p0_l1_0, + 1, -516716544, 1630767104, 2, 0, + (long *)_vq_quantlist__44p0_l1_0, + 0 +}; + +static const char _huff_lengthlist__44p0_lfe[] = { + 1, 3, 2, 3, +}; + +static const static_codebook _huff_book__44p0_lfe = { + 2, 4, + (char *)_huff_lengthlist__44p0_lfe, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44p0_long[] = { + 2, 3, 6, 7,10,14,16, 3, 2, 5, 7,11,14,17, 6, 5, + 5, 7,10,12,14, 7, 7, 6, 6, 7, 9,13,10,11, 9, 6, + 6, 9,11,15,15,13,10, 9,10,12,18,18,16,14,12,13, + 16, +}; + +static const static_codebook _huff_book__44p0_long = { + 2, 49, + (char *)_huff_lengthlist__44p0_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p0_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p0_p1_0[] = { + 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, +}; + +static const static_codebook _44p0_p1_0 = { + 5, 243, + (char *)_vq_lengthlist__44p0_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p0_p1_0, + 0 +}; + +static const long _vq_quantlist__44p0_p2_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p0_p2_0[] = { + 1, 5, 5, 0, 7, 7, 0, 8, 8, 0, 9, 9, 0,12,12, 0, + 8, 8, 0, 9, 9, 0,12,12, 0, 8, 8, 0, 6, 6, 0,11, + 11, 0,12,12, 0,12,12, 0,15,15, 0,11,11, 0,12,12, + 0,15,15, 0,12,12, 0, 5, 5, 0, 5, 5, 0, 6, 6, 0, + 7, 7, 0,11,11, 0, 6, 6, 0, 7, 7, 0,10,11, 0, 6, + 6, 0, 7, 7, 0,11,11, 0,12,12, 0,11,11, 0,15,15, + 0,10,10, 0,12,12, 0,15,15, 0,12,12, 0, 6, 6, 0, + 12,12, 0,12,12, 0,12,12, 0,15,15, 0,11,11, 0,12, + 12, 0,15,15, 0,12,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 8, 0,12,12, 0,12,12, 0,12,12, 0,15, + 15, 0,12,12, 0,11,12, 0,15,16, 0,11,11, 0, 6, 6, + 0,11,12, 0,12,12, 0,12,12, 0,16,15, 0,12,12, 0, + 13,12, 0,15,14, 0,12,12, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, +}; + +static const static_codebook _44p0_p2_0 = { + 5, 243, + (char *)_vq_lengthlist__44p0_p2_0, + 1, -533200896, 1614282752, 2, 0, + (long *)_vq_quantlist__44p0_p2_0, + 0 +}; + +static const long _vq_quantlist__44p0_p2_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p0_p2_1[] = { + 1, 3, 3, 0, 9, 9, 0, 9, 9, 0,10,10, 0, 9, 9, 0, + 10,10, 0,10,10, 0, 9, 9, 0,10,10, 0, 7, 7, 0, 7, + 7, 0, 6, 6, 0, 8, 8, 0, 7, 7, 0, 8, 8, 0, 8, 9, + 0, 8, 8, 0, 8, 8, 0, 7, 7, 0, 9, 9, 0, 8, 8, 0, + 10,10, 0, 9, 9, 0,10,10, 0,10,10, 0, 9, 9, 0,10, + 10, 0, 9, 9, 0,11,11, 0,11,11, 0,12,12, 0,11,11, + 0,12,12, 0,13,13, 0,12,12, 0,13,12, 0, 8, 8, 0, + 12,12, 0,12,12, 0,13,13, 0,12,12, 0,13,13, 0,13, + 13, 0,13,13, 0,13,13, 0, 7, 7, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 9, 0,11,11, 0,12,12, 0,13,13, 0,12, + 12, 0,13,13, 0,13,13, 0,12,12, 0,12,12, 0, 8, 8, + 0,12,12, 0,12,12, 0,13,13, 0,13,13, 0,13,14, 0, + 14,13, 0,13,13, 0,13,13, 0, 7, 7, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, +}; + +static const static_codebook _44p0_p2_1 = { + 5, 243, + (char *)_vq_lengthlist__44p0_p2_1, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p0_p2_1, + 0 +}; + +static const long _vq_quantlist__44p0_p3_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p0_p3_0[] = { + 1, 6, 6, 7, 8, 8, 7, 8, 8, 7, 9, 9,10,12,11, 9, + 8, 8, 7, 9, 9,11,12,12, 9, 9, 9, 6, 7, 7,10,11, + 11,10,11,11,10,11,11,13,13,14,12,12,12,11,11,11, + 14,14,14,12,12,12, 6, 5, 5, 9, 6, 5, 9, 6, 6, 9, + 7, 7,12,10,10,11, 6, 6,10, 7, 7,13,10,10,12, 7, + 7, 7, 8, 8,12,10,10,12,10,10,11,10,10,15,13,13, + 13, 9, 9,12,11,11,16,13,13,15,11,11, 8, 7, 7,12, + 12,12,12,11,11,12,11,11,14,14,14,14,12,12,12,12, + 12,16,15,15,14,12,12, 0,10,10, 0,12,12, 0,12,12, + 0,11,11, 0,14,14, 0,11,11, 0,12,12, 0,15,15, 0, + 11,11, 8, 8, 8,13,11,11,13,10,10,13,11,11,15,13, + 13,14,11,11,12,10,10,16,14,14,14,10,10, 9, 7, 7, + 13,11,11,13,11,11,12,11,11,16,14,14,14,12,12,13, + 12,12,15,14,14,15,13,12, 0,11,11, 0,12,12, 0,12, + 12, 0,12,12, 0,15,15, 0,12,12, 0,13,12, 0,14,15, + 0,12,12, +}; + +static const static_codebook _44p0_p3_0 = { + 5, 243, + (char *)_vq_lengthlist__44p0_p3_0, + 1, -531365888, 1616117760, 2, 0, + (long *)_vq_quantlist__44p0_p3_0, + 0 +}; + +static const long _vq_quantlist__44p0_p3_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p0_p3_1[] = { + 2, 4, 4, 8, 8,10,12,12,11,11, 9,11,11,12,13,11, + 12,12,11,11,11,12,12,12,12,10,13,12,13,13,11,12, + 12,13,13,11,12,12,13,13,11,12,13,13,13,11,13,13, + 13,13,10,13,13,12,13,11,12,12,14,14,11,13,12,12, + 12,11,12,12,13,13,11,13,13,12,12,11,13,13,13,13, + 11,12,12,13,13,11,13,13,12,12,11,12,12,13,13,11, + 13,13,12,12,11,13,13,13,13,11,12,12,14,14,11,13, + 13,12,12,11,12,12,13,13,11,13,13,12,12,11,10,10, + 10,10,12,10,10,11,11,11, 8, 8,11,11,13,10,10,10, + 10,12,10,10,10,10,13,11,11,11,11,13,10,10,11,11, + 13,11,11,12,12,13,11,11,11,11,13,11,11,12,12,13, + 11,11,12,12,13,10,10,11,11,13,11,11,11,11,13,11, + 10,11,11,13,11,11,11,11,13,11,11,11,11,13,10,10, + 11,11,13,11,11,11,11,12,10,11,11,11,13,11,11,11, + 11,13,11,11,11,11,13,10,10,11,11,13,11,11,11,11, + 13,11,11,11,11,13,11,11,11,11,11,10,10,10,10,12, + 10,10, 9, 9,12,12,12,11,11,13,12,12, 9, 9,13,12, + 12,10,10,12,12,12,12,12,13,13,13,14,14,13,12,12, + 11,11,13,13,13,12,12,13,12,12,11,11,13,12,13,11, + 11,13,13,13,14,14,13,12,12,10,10,13,13,13,11,11, + 13,12,12,10,10,13,13,13,11,11,13,13,13,14,14,13, + 12,12,10,10,13,13,13,11,11,13,12,13,10,10,13,13, + 13,11,11,13,13,13,14,14,13,12,12,10,10,13,13,13, + 11,11,13,13,12,10,10,14,12,12, 8, 8,14,12,12, 9, + 9,14,11,11, 9, 9,14,12,12, 8, 8,14,11,11, 7, 7, + 14,13,13,10,10,15,12,12,10,10,15,13,13,10,10,15, + 12,12, 9, 9,15,13,13,10,10,15,13,13,10,10,15,12, + 12,10,10,15,13,13,10,10,14,12,12, 9, 9,14,13,13, + 9, 9,14,13,13, 9, 9,15,12,12, 9, 9,15,13,13, 9, + 9,14,12,12, 9, 9,14,13,13, 9, 9,14,13,13, 9, 9, + 15,12,12, 9, 9,14,13,13, 9, 9,14,12,12, 9, 9,14, + 13,13, 9, 9,13,12,12, 8, 8,13,13,13, 8, 8,14,13, + 13, 9, 9,13,13,13, 7, 7,14,13,13, 8, 8,14,14,14, + 10,10,14,14,14,11,11,14,14,14, 9, 9,14,14,14,10, + 10,14,14,14, 9, 9,14,14,14,10, 9,15,14,14,11,11, + 14,14,14, 9, 9,14,14,14,10,10,14,14,14, 9, 9,14, + 14,14, 9, 9,15,14,14,11,11,14,14,14, 8, 8,14,14, + 14, 9, 9,14,14,14, 8, 8,14,14,14, 9, 9,15,14,14, + 11,11,14,14,14, 8, 8,14,14,14, 9, 9,14,14,14, 8, + 8,12,12,12,13,13,16,15,15,11,11,16,15,16,12,12, + 17,16,16,11,11,17,15,15,12,11,16,16,16,12,13,16, + 15,15,13,13,16,16,16,12,12,16,16,15,13,13,16,16, + 16,12,12,16,16,16,13,13,17,16,16,14,14,17,17,16, + 12,12,17,16,16,13,13,17,17,16,12,13,16,16,17,13, + 12,17,16,16,14,13,17,16,16,12,12,17,16,16,12,12, + 17,16,17,12,12,17,17,17,13,13,16,16,16,13,14,17, + 17,16,12,12,16,16,16,13,13,17,17,17,12,12,13,14, + 14,10,10,16,14,14,12,12,16,15,15,14,14,16,14,14, + 12,12,15,14,14,13,13,17,15,15,14,13,16,16,15,15, + 15,16,15,15,14,14,16,15,15,14,14,17,15,15,14,14, + 16,15,15,14,14,16,16,15,15,15,17,15,15,13,13,16, + 15,15,14,14,17,15,15,13,13,17,15,15,14,14,16,15, + 15,15,15,16,14,14,13,13,16,15,15,14,14,16,14,14, + 13,13,17,15,15,14,14,16,16,15,15,15,17,14,14,13, + 13,16,15,15,14,14,17,14,14,13,13,13,11,11,10,10, + 16,14,14,13,13,15,14,14,13,13,16,14,14,12,12,16, + 14,14,12,12,15,15,15,14,14,16,14,14,14,14,16,15, + 14,14,14,16,14,14,14,14,16,15,15,14,13,16,15,15, + 14,14,16,14,14,14,14,17,15,15,14,14,16,14,14,14, + 14,16,15,15,13,14,16,15,15,14,14,16,14,14,14,14, + 16,15,15,13,13,16,14,14,13,13,16,15,15,13,13,16, + 15,15,14,14,16,14,14,14,14,17,15,15,13,13,16,15, + 14,13,13,17,15,15,13,13,14,14,14, 9, 9,14,14,14, + 17,17,14,15,15,18,18,14,14,14,18,19,14,14,14,18, + 18,15,15,15,19,18,15,16,15,18,20,15,15,15,18,19, + 15,15,15,19,19,15,15,15,18,20,15,15,15,18,19,15, + 15,16,20,18,15,15,15,18,18,15,15,15,19,19,15,15, + 15,18,19,15,15,15,18,19,15,15,15,19,19,14,15,14, + 19,19,15,15,15,20,19,15,14,14,19,18,14,15,15,18, + 19,15,15,16,20,20,14,14,14,18,19,15,15,15,19,18, + 14,14,14,18,18,14,12,12, 9, 9,13,14,14,18,18,14, + 13,13,18,19,14,14,14,18,18,14,14,14,18,18,15,15, + 15,19,19,15,14,14,19,18,14,15,15,19,18,15,14,14, + 18,18,15,15,15,19,18,14,15,15,19,19,15,14,14,19, + 18,14,15,15,19,18,15,14,14,19,18,14,15,15,19,18, + 15,15,15,21,18,15,14,14,19,18,14,15,15,18,19,14, + 15,14,20,19,14,15,15,18,19,14,15,15,19,19,15,14, + 14,19,20,14,15,15,18,18,14,14,14,19,19,14,15,15, + 19,18,12,12,12,13,13,16,15,15,11,11,16,15,15,12, + 12,16,16,16,11,11,16,15,15,11,11,16,16,16,13,13, + 17,16,16,13,13,17,17,17,12,12,16,16,16,13,13,17, + 16,17,13,12,15,16,16,12,12,16,15,15,13,13,17,16, + 16,12,12,16,16,15,12,12,16,16,16,12,12,17,17,16, + 13,12,16,16,16,13,13,17,16,16,12,12,17,16,16,12, + 12,17,17,16,12,12,16,17,16,12,12,17,15,15,13,13, + 17,16,16,12,12,16,16,16,12,12,16,16,16,12,12,13, + 13,13, 9, 9,15,14,14,13,13,16,15,14,14,14,16,14, + 14,13,13,15,14,14,13,13,17,15,15,14,14,16,15,15, + 15,15,16,15,15,14,14,16,15,15,15,15,17,15,15,14, + 14,16,15,15,14,14,16,15,15,15,15,17,14,15,14,14, + 16,15,15,14,14,17,15,15,13,14,17,15,15,14,14,16, + 15,15,15,15,17,14,14,13,13,16,15,15,14,14,17,14, + 14,13,13,17,15,15,14,14,16,15,16,15,15,17,14,14, + 13,13,16,15,15,14,14,18,14,14,13,13,13,11,11,11, + 11,15,14,14,12,12,15,14,14,13,13,16,14,14,12,12, + 16,13,14,12,12,16,15,15,13,13,16,14,14,14,14,16, + 15,15,13,13,16,14,14,13,13,16,14,15,13,13,15,15, + 15,13,13,16,14,14,14,13,16,14,14,13,13,16,14,14, + 13,13,16,15,15,13,13,16,15,15,13,13,16,14,14,14, + 14,16,15,15,12,12,16,14,14,13,13,16,15,15,12,12, + 16,15,15,13,13,16,14,14,14,14,17,15,14,12,12,16, + 14,14,13,13,16,15,15,12,12,14,14,14, 8, 8,14,14, + 14,17,18,14,15,15,17,18,14,14,14,17,18,14,14,14, + 18,18,14,15,15,18,18,14,16,15,19,19,15,15,15,18, + 19,15,16,15,20,19,15,15,15,18,18,14,15,15,18,19, + 15,16,16,20,19,15,15,15,19,17,14,15,15,20,18,14, + 15,15,18,18,14,15,15,18,19,14,15,15,19,20,14,14, + 14,18,18,14,15,15,18,19,14,14,14,18,19,14,15,15, + 19,18,15,16,16,20,21,14,14,15,19,19,14,15,15,19, + 19,14,14,14,19,18,13,12,12, 9, 9,13,14,14,18,19, + 14,14,14,18,19,14,14,14,18,18,14,14,14,18,18,14, + 15,15,19,19,15,14,14,19,18,15,15,15,19,19,15,14, + 14,19,20,14,15,15,18,19,14,15,15,20,18,15,14,14, + 18,18,14,15,15,18,18,14,14,14,19,19,14,15,15,18, + 18,14,15,15,19,18,15,14,14,19,19,14,15,15,19,18, + 15,14,14,19,18,14,14,15,18,19,14,15,15,19,18,15, + 14,14,18,19,14,15,14,19,20,14,14,14,19,19,14,15, + 15,19,19,12,12,12,13,13,16,16,16,11,11,16,16,16, + 12,12,17,16,16,11,11,17,15,15,11,11,16,16,16,13, + 13,17,15,16,13,13,16,16,16,12,12,17,16,16,13,13, + 17,17,16,12,12,17,17,16,13,13,17,16,16,13,13,17, + 17,17,12,12,17,16,16,13,13,17,17,17,12,12,16,16, + 16,12,12,17,15,15,13,13,17,16,16,11,11,17,16,16, + 12,12,16,16,16,11,11,16,17,16,12,12,17,16,16,13, + 13,17,17,16,12,12,17,17,16,12,12,17,16,16,11,11, + 13,14,14, 9, 9,16,14,14,13,13,16,14,15,14,14,16, + 14,14,12,12,16,14,14,13,13,17,15,15,14,14,16,15, + 15,15,15,17,15,15,14,14,16,15,15,14,14,17,15,15, + 14,14,16,15,15,14,14,16,15,15,15,16,17,14,15,14, + 14,16,15,15,14,14,17,15,15,14,14,16,15,15,14,14, + 16,15,15,15,15,17,14,14,13,13,16,15,15,14,14,16, + 14,14,13,13,17,15,15,14,14,16,16,15,15,15,17,14, + 14,13,13,16,15,15,14,14,17,14,14,13,13,13,11,11, + 10,10,16,14,14,12,12,15,13,13,13,12,16,14,14,11, + 11,16,14,14,11,11,16,14,15,13,14,16,14,14,13,13, + 16,15,15,13,13,16,14,14,13,13,16,15,15,13,13,16, + 15,15,13,13,17,14,14,14,14,17,15,15,13,13,16,14, + 15,13,13,16,15,15,13,13,16,15,15,13,13,16,14,14, + 13,13,17,15,15,12,12,16,14,14,12,12,16,15,15,12, + 12,16,15,15,13,13,16,14,14,13,13,17,15,15,12,12, + 17,14,14,12,12,16,15,15,12,12,13,14,14, 8, 8,13, + 14,14,18,18,13,15,15,17,18,14,14,14,18,19,14,14, + 14,19,18,14,15,15,19,18,15,15,16,21,18,15,15,15, + 19,19,14,16,16,19,19,14,15,15,18,19,14,15,15,19, + 20,14,16,16,19,18,15,15,15,18,19,14,15,15,19,18, + 15,15,15,18,18,15,15,15,20,18,15,16,16,20,19,14, + 15,14,18,19,14,15,16,19,20,14,15,15,19,18,15,15, + 15,19,18,15,16,16,20,19,15,14,14,18,18,14,15,15, + 19,19,14,15,15,18,18,13,12,12, 8, 8,13,14,14,19, + 18,14,13,13,20,18,14,14,14,19,18,14,13,13,18,19, + 14,15,15,20,19,15,14,14,19,19,14,15,15,19,18,15, + 14,14,20,20,15,15,15,19,18,14,15,15,19,18,15,14, + 14,19,18,14,15,15,20,19,14,14,14,20,19,14,15,15, + 19,18,15,15,15,18,18,15,14,14,18,18,14,15,15,19, + 19,14,14,14,19,19,14,15,15,19,19,15,15,15,19,18, + 15,14,14,20,19,15,15,15,19,19,14,14,14,20,19,14, + 15,15,20,20,12,12,12,13,13,17,16,16,11,11,16,16, + 15,12,12,17,16,16,11,11,17,15,15,11,11,17,17,17, + 13,13,17,16,16,13,13,17,17,17,12,12,17,16,16,13, + 13,17,17,16,12,13,16,17,16,13,13,17,16,15,13,13, + 17,16,16,12,12,17,16,16,12,13,17,16,17,12,12,17, + 17,17,12,12,17,16,15,13,13,17,16,16,12,12,17,16, + 16,12,12,17,16,16,11,11,16,16,16,12,12,17,15,15, + 13,13,17,16,15,11,11,16,16,16,12,12,17,16,16,11, + 11,13,14,14, 9, 9,16,14,14,13,13,16,14,15,14,14, + 16,14,14,12,12,16,14,14,13,13,17,15,15,14,15,16, + 15,15,15,15,17,15,15,14,14,16,15,15,15,14,16,15, + 15,14,14,16,15,15,14,14,16,15,16,15,15,17,15,14, + 14,14,16,15,15,14,14,17,15,15,13,13,16,15,15,14, + 14,16,16,16,15,15,17,14,14,13,13,16,15,15,14,14, + 18,14,15,13,13,16,15,15,14,14,16,16,15,15,15,16, + 14,14,13,13,16,15,15,14,14,17,14,15,13,13,13,11, + 11,10,10,15,14,14,12,12,15,14,14,13,13,16,14,14, + 12,12,16,13,14,12,12,16,14,15,14,13,16,14,14,14, + 14,16,15,15,13,13,16,14,14,13,13,16,15,15,13,13, + 15,15,15,13,13,16,14,14,14,14,17,15,15,13,13,16, + 14,14,13,13,16,15,15,13,13,16,15,15,13,13,16,14, + 14,13,13,17,15,15,12,12,16,14,14,12,12,16,14,15, + 12,12,16,15,15,13,13,16,14,14,13,13,17,15,15,12, + 12,16,14,14,12,12,16,15,15,12,12,14,14,14, 8, 8, + 14,14,14,17,17,14,15,15,18,18,14,14,14,18,17,14, + 14,14,18,18,14,15,15,18,20,15,16,15,19,18,15,15, + 15,19,18,15,15,16,19,18,15,15,15,18,18,14,15,15, + 18,18,15,16,16,18,19,15,15,15,18,18,15,15,15,19, + 20,15,15,15,18,18,15,15,15,18,18,15,16,16,19,19, + 15,14,15,19,19,15,15,15,19,20,14,14,15,18,18,15, + 15,15,19,19,15,16,16,19,19,15,15,14,18,19,15,15, + 15,20,20,15,15,14,18,18,13,12,12, 8, 8,13,14,14, + 18,18,14,14,14,18,18,14,14,14,18,20,14,14,14,18, + 18,14,15,15,19,18,15,14,14,18,19,15,15,15,18,19, + 15,14,14,18,19,15,15,15,18,18,14,15,14,18,19,15, + 14,14,21,19,15,15,15,19,18,14,14,14,19,18,14,15, + 15,19,18,15,15,15,20,19,15,14,14,20,18,14,15,15, + 18,19,14,14,14,19,18,14,15,15,18,19,15,15,15,18, + 19,15,14,14,19,19,15,15,15,19,19,14,14,14,19,20, + 14,15,15,18,19, +}; + +static const static_codebook _44p0_p3_1 = { + 5, 3125, + (char *)_vq_lengthlist__44p0_p3_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p0_p3_1, + 0 +}; + +static const long _vq_quantlist__44p0_p4_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p0_p4_0[] = { + 2, 6, 6,14,14, 6, 8, 8,14,14, 7, 7, 7,14,14, 0, + 13,13,15,16, 0,13,13,15,15, 7, 8, 8,15,15, 9,10, + 10,16,16, 9, 8, 8,14,15, 0,13,13,17,17, 0,13,13, + 16,16, 8, 8, 8,15,15,12,11,11,16,16, 9, 8, 8,14, + 14, 0,13,13,17,17, 0,13,13,15,15, 0,14,14,16,16, + 0, 0, 0,18,19, 0,12,12,16,15, 0,16,16, 0,20, 0, + 14,14,16,16, 0,14,14,17,17, 0, 0, 0,19,19, 0,12, + 12,15,15, 0,18,17,21,21, 0,14,14,16,16, 5, 7, 7, + 12,13, 9,10, 9,14,14,11,10,10,14,14, 0, 0, 0,18, + 17, 0,20,21,18,18, 9,10,10,14,14,12,12,12,17,16, + 12,10,10,14,14, 0,20,20,18,17, 0,21,21,17,17,11, + 10,10,14,14,15,13,13,18,18,13,11,11,14,14, 0,20, + 0,18,18, 0,20,21,18,17, 0,21, 0,18,19, 0, 0, 0, + 0,21, 0,21,20,16,17, 0, 0, 0,21,21, 0, 0, 0,20, + 18, 0,20, 0,17,18, 0, 0, 0, 0, 0, 0, 0,20,16,17, + 0, 0, 0,20, 0, 0, 0, 0,18,18, 6, 6, 6,13,13, 8, + 5, 5,11,11, 9, 6, 6,13,13, 0, 9, 9,12,12, 0,10, + 10,14,14, 9, 7, 7,13,13,12, 9, 9,13,13,10, 6, 6, + 13,13, 0,10,10,14,14, 0,10,10,13,13, 9, 7, 7,13, + 13,13,10,10,13,13,11, 6, 6,13,13, 0,10,10,15,15, + 0,10,10,13,13, 0,12,11,15,15, 0,20,19,17,16, 0, + 9, 9,13,13, 0,13,13,20,19, 0,11,11,13,13, 0,11, + 11,15,15, 0,20,19,17,17, 0,10,10,13,13, 0,14,15, + 0,21, 0,12,12,13,13, 0,10,10,12,12, 0,11,11,15, + 15, 0,11,11,15,15, 0,15,15,20,20, 0,16,16, 0, 0, + 0,11,11,15,15, 0,14,14,17,17, 0,11,11,15,15, 0, + 15,15,20,21, 0,16,16,21,21, 0,12,12,15,15, 0,15, + 15,18,20, 0,11,11,16,15, 0,15,15,21,21, 0,16,16, + 0,21, 0,16,16, 0, 0, 0, 0, 0, 0, 0, 0,14,14,21, + 21, 0,17,18, 0, 0, 0,16,17,20, 0, 0,16,16, 0, 0, + 0, 0, 0, 0, 0, 0,15,15,20,20, 0,19,18, 0,21, 0, + 18,17, 0, 0, 0,10,10,11,11, 0,10,10,10,10, 0,11, + 11,12,12, 0,11,11, 9, 9, 0,13,13,12,12, 0,11,11, + 12,12, 0,13,13,12,12, 0,10,10,12,12, 0,12,12,13, + 13, 0,12,12,12,12, 0,11,11,12,12, 0,13,13,12,12, + 0,10,10,12,12, 0,13,13,13,13, 0,12,12,12,12, 0, + 14,13,13,13, 0,19,21,15,15, 0,12,11,12,12, 0,16, + 15,19,19, 0,13,13,11,11, 0,13,13,13,13, 0, 0,21, + 15,16, 0,12,12,12,12, 0,16,16,19,21, 0,13,13,12, + 12, 7, 7, 7,16,16,11, 9, 9,16,16,12, 9, 9,16,16, + 0,13,13,16,16, 0,14,14,17,16,11, 9, 9,16,16,14, + 12,11,17,17,13, 8, 9,15,15, 0,13,13,19,19, 0,13, + 13,16,15,12,10,10,17,17,15,12,12,19,18,14, 9, 9, + 17,16, 0,14,14,18, 0, 0,14,13,16,16, 0,14,15,18, + 17, 0,21, 0,19,21, 0,12,12,16,16, 0,16,16, 0, 0, + 0,14,14,16,16, 0,14,14,18,18, 0, 0,21,20, 0, 0, + 13,13,16,17, 0,18,18, 0, 0, 0,15,14,17,16, 8, 7, + 7,14,14,11,10,10,15,15,13,10,10,15,15, 0,21,20, + 19,19, 0,21, 0,17,18,11,10,10,15,16,14,12,12,18, + 18,14,11,11,15,14, 0,21,20,18,19, 0, 0,21,18,18, + 12,11,11,16,16,16,14,14,18,20,14,11,11,16,15, 0, + 20,20,19,19, 0, 0,20,18,18, 0,21, 0,18,19, 0, 0, + 0, 0, 0, 0,20,20,17,18, 0, 0, 0,20,20, 0, 0, 0, + 19,19, 0, 0, 0,20,18, 0, 0, 0, 0, 0, 0, 0,21,18, + 18, 0,21,21, 0,21, 0, 0, 0,19,20,11, 9, 9,14,14, + 13,10,10,14,14,13,11,11,15,15, 0,13,13,13,13, 0, + 14,14,16,16,13,11,11,15,15,16,12,12,15,15,14,10, + 10,14,14, 0,14,14,16,16, 0,14,14,15,15,13,10,10, + 15,15,17,13,14,15,16,15,10,10,15,15, 0,14,14,17, + 16, 0,14,14,15,15, 0,15,15,17,17, 0, 0,21,18,18, + 0,13,13,15,15, 0,16,16,21,20, 0,14,14,15,14, 0, + 15,14,16,17, 0, 0,20,20,19, 0,13,13,15,15, 0,19, + 18, 0, 0, 0,15,15,15,15, 0,11,11,14,14, 0,12,12, + 16,16, 0,12,12,16,16, 0,15,16,21,21, 0,16,17,21, + 0, 0,12,12,17,16, 0,14,14,18,19, 0,11,11,16,16, + 0,15,15,20,21, 0,16,16,21, 0, 0,12,12,17,16, 0, + 15,15,19,19, 0,12,12,16,17, 0,16,15, 0, 0, 0,16, + 16, 0, 0, 0,17,17, 0,21, 0, 0, 0, 0, 0, 0,14,15, + 20, 0, 0,17,17, 0, 0, 0,17,17, 0, 0, 0,17,16, 0, + 0, 0, 0, 0, 0, 0, 0,15,15, 0, 0, 0,18,18, 0, 0, + 0,18,17, 0, 0, 0,11,11,14,14, 0,12,12,15,15, 0, + 12,12,15,15, 0,13,13,14,14, 0,14,14,17,17, 0,12, + 12,16,16, 0,14,14,16,16, 0,11,11,15,15, 0,13,13, + 16,17, 0,13,13,16,16, 0,12,12,15,15, 0,14,14,17, + 16, 0,11,11,15,15, 0,14,14,17,17, 0,13,13,16,16, + 0,15,15,17,18, 0,21,20,20,21, 0,12,12,15,15, 0, + 16,16,20,21, 0,14,14,15,15, 0,14,14,17,17, 0, 0, + 0,18,19, 0,12,13,15,15, 0,18,17,21, 0, 0,14,15, + 15,15, 8, 8, 8,16,16,12,10,10,16,16,13, 9, 9,16, + 16, 0,14,14,18,17, 0,14,14,16,17,12,10,10,18,17, + 14,12,11,18,18,14, 9, 9,16,16, 0,13,13,18,18, 0, + 13,13,17,16,12, 9, 9,16,17,17,13,13,17,17,14, 9, + 9,15,15, 0,14,14,20,19, 0,13,13,16,16, 0,15,15, + 19,18, 0, 0, 0,20,19, 0,12,13,17,17, 0,16,16,20, + 0, 0,14,14,16,17, 0,14,14,19,18, 0, 0, 0,20,20, + 0,13,13,16,16, 0,18,17, 0, 0, 0,15,15,16,16, 9, + 7, 7,14,14,12,10,10,15,15,13,10,10,15,15, 0,21, + 0,18,19, 0,20,21,19,18,12,10,10,16,15,15,13,13, + 18,18,14,11,11,15,15, 0, 0, 0,19,18, 0, 0,21,18, + 18,13,11,11,15,15,16,14,14,17,19,15,11,11,15,15, + 0,21,21,20,18, 0, 0,21,18,18, 0, 0,21,21,19, 0, + 0, 0, 0, 0, 0,19,20,18,17, 0, 0, 0,21,21, 0,21, + 0,20,18, 0, 0,21,19,19, 0, 0, 0, 0, 0, 0,20,21, + 17,17, 0, 0, 0, 0, 0, 0,21, 0,18,20, 0,10,10,14, + 14, 0,11,11,15,15, 0,11,11,15,15, 0,14,14,15,15, + 0,15,15,16,16, 0,11,12,16,16, 0,13,13,16,16, 0, + 11,11,15,15, 0,14,14,17,17, 0,14,14,15,15, 0,11, + 11,16,15, 0,14,14,15,15, 0,11,11,15,15, 0,15,15, + 17,17, 0,14,14,15,15, 0,16,16,18,18, 0, 0, 0,20, + 19, 0,14,13,16,15, 0,17,17,21, 0, 0,15,15,15,15, + 0,16,15,17,16, 0,20, 0,20,18, 0,13,14,15,15, 0, + 19,18, 0,21, 0,15,15,15,15, 0,11,11,14,14, 0,12, + 12,16,16, 0,12,12,16,16, 0,16,15,20,21, 0,17,16, + 0, 0, 0,12,12,16,16, 0,14,14,18,18, 0,11,11,16, + 16, 0,15,15,21,20, 0,16,16, 0, 0, 0,12,12,16,17, + 0,15,14,19,19, 0,11,12,16,16, 0,15,15,21, 0, 0, + 16,16, 0, 0, 0,16,17, 0, 0, 0, 0, 0, 0, 0, 0,15, + 15,21, 0, 0,17,17, 0, 0, 0,17,17, 0, 0, 0,17,16, + 0, 0, 0, 0, 0, 0, 0, 0,15,15, 0,20, 0,19,20, 0, + 0, 0,17,17, 0, 0, 0,12,12,15,15, 0,12,12,15,15, + 0,12,12,16,16, 0,13,13,15,15, 0,15,15,17,17, 0, + 13,13,17,16, 0,14,14,17,17, 0,11,11,16,16, 0,14, + 14,17,17, 0,13,13,16,16, 0,12,12,16,16, 0,15,15, + 16,17, 0,11,11,15,16, 0,14,14,17,17, 0,13,14,16, + 16, 0,15,15,18,18, 0,21,20,20,19, 0,13,13,16,17, + 0,16,16, 0, 0, 0,14,14,16,16, 0,15,15,18,18, 0, + 0, 0,20,19, 0,13,13,16,16, 0,17,17, 0, 0, 0,14, + 14,16,16, 0,11,11,16,16, 0,13,13,18,17, 0,13,13, + 17,17, 0,16,16,17,17, 0,16,16,17,18, 0,12,12,17, + 17, 0,15,15,18,18, 0,12,12,16,16, 0,16,16,19,19, + 0,15,15,16,17, 0,12,12,17,17, 0,17,17,18,18, 0, + 12,12,17,17, 0,16,16,19,19, 0,15,16,17,17, 0,16, + 16,18,17, 0, 0, 0,21,21, 0,13,13,16,16, 0,17,17, + 0,20, 0,15,15,16,17, 0,16,16,19,18, 0, 0,21,20, + 21, 0,14,14,17,16, 0,20, 0, 0, 0, 0,15,16,16,17, + 0, 9, 9,14,14, 0,13,13,16,16, 0,14,14,15,15, 0, + 0,20,19,19, 0, 0, 0,19,19, 0,12,12,15,15, 0,15, + 16,19,18, 0,14,14,15,15, 0,21, 0,18,18, 0,20, 0, + 17,18, 0,13,13,16,16, 0,17,17,17,19, 0,14,14,16, + 15, 0,21,20,20,19, 0, 0, 0,19,19, 0, 0, 0,19,18, + 0, 0, 0, 0, 0, 0,20,20,17,18, 0, 0, 0,21,21, 0, + 0, 0,18,18, 0,21, 0,18,19, 0, 0, 0, 0, 0, 0,20, + 21,18,18, 0, 0, 0,20,21, 0, 0, 0,19,19, 0,18,18, + 15,15, 0,20,21,17,17, 0,19,21,17,17, 0, 0, 0,17, + 18, 0, 0, 0,20,19, 0,19,19,17,17, 0, 0, 0,18,18, + 0,19,20,16,17, 0, 0,21,20,20, 0,19,20,19,18, 0, + 19,20,16,16, 0, 0, 0,18,19, 0,19,20,17,17, 0, 0, + 21, 0,20, 0,21,21,17,19, 0,20, 0,19,20, 0, 0, 0, + 20, 0, 0,19,18,17,16, 0, 0, 0, 0, 0, 0, 0,20,17, + 17, 0,20,21,18,20, 0, 0, 0, 0,21, 0,19,20,17,17, + 0, 0, 0, 0, 0, 0,20,21,17,17, 0,11,11,14,14, 0, + 13,13,16,17, 0,13,13,16,16, 0,17,17, 0,21, 0,18, + 17,21, 0, 0,13,13,16,16, 0,15,15,18,18, 0,12,12, + 16,16, 0,17,16,21, 0, 0,17,17, 0, 0, 0,12,12,17, + 17, 0,17,17,19,21, 0,13,12,16,16, 0,17,17, 0, 0, + 0,17,17, 0, 0, 0,18,17, 0,21, 0, 0, 0, 0, 0, 0, + 15,15,20, 0, 0,20,18, 0, 0, 0,17,18, 0, 0, 0,16, + 17, 0, 0, 0, 0, 0, 0, 0, 0,15,15, 0, 0, 0,19,19, + 0, 0, 0,18,18, 0, 0, 0,14,14,18,18, 0,16,16, 0, + 21, 0,16,16,21,21, 0,17,17, 0,20, 0,17,17,20, 0, + 0,16,15, 0, 0, 0,20,20, 0, 0, 0,15,15,20,20, 0, + 17,17,21, 0, 0,17,18,20,20, 0,15,15,20,20, 0,18, + 18, 0, 0, 0,15,15,19,20, 0,17,18, 0, 0, 0,17,17, + 20,20, 0,18,17,21, 0, 0, 0, 0, 0,21, 0,15,15,20, + 20, 0,19,19, 0, 0, 0,17,17,21, 0, 0,17,17, 0, 0, + 0, 0, 0,21, 0, 0,15,15,19,19, 0,20,21, 0, 0, 0, + 18,17,21,21, 0,12,12,16,16, 0,14,14,17,17, 0,13, + 13,17,18, 0,16,16,18,17, 0,16,16,18,18, 0,13,13, + 18,18, 0,15,16,19,18, 0,13,13,16,16, 0,16,16,20, + 18, 0,16,16,17,17, 0,12,13,17,17, 0,17,16,18,18, + 0,12,12,16,16, 0,17,16,20,19, 0,16,16,16,16, 0, + 16,17,18,20, 0, 0, 0,21,20, 0,14,14,17,16, 0,19, + 18, 0,20, 0,16,16,17,16, 0,16,16,17,18, 0, 0,21, + 21,21, 0,14,14,16,16, 0,20,20,21, 0, 0,16,16,16, + 16, 0,10,10,14,14, 0,14,14,15,16, 0,14,14,15,15, + 0, 0,21,18,18, 0, 0,21,18,19, 0,13,13,16,16, 0, + 16,16,18,18, 0,14,14,15,15, 0,21, 0,18,18, 0,21, + 0,18,18, 0,13,13,16,16, 0,17,17,19,20, 0,14,14, + 15,15, 0, 0, 0,18,20, 0, 0,21,18,18, 0, 0,21,19, + 18, 0, 0, 0, 0, 0, 0,20,21,18,17, 0, 0, 0,21,21, + 0, 0, 0,19,19, 0,21, 0,18,19, 0, 0, 0, 0, 0, 0, + 21,20,17,17, 0, 0,21,20, 0, 0, 0, 0,19,19, 0,19, + 20,15,16, 0, 0,20,18,17, 0,20,21,17,18, 0,21, 0, + 18,18, 0, 0, 0,19,19, 0,20,20,17,18, 0, 0, 0,18, + 19, 0,20,20,18,17, 0, 0, 0, 0,20, 0, 0,21,17,18, + 0,20,21,17,17, 0, 0, 0,18,18, 0,19,19,17,17, 0, + 0, 0,21,21, 0,20,20,17,17, 0, 0, 0,21,19, 0, 0, + 0,20,19, 0,21,20,17,18, 0, 0, 0, 0, 0, 0, 0,20, + 18,17, 0,21,20,18,18, 0, 0, 0,20,21, 0,20,20,17, + 17, 0, 0, 0, 0, 0, 0,20, 0,17,17, 0,11,11,13,14, + 0,13,13,16,16, 0,13,13,16,16, 0,17,17, 0, 0, 0, + 17,18, 0, 0, 0,13,13,16,16, 0,15,16,18,18, 0,13, + 13,16,17, 0,16,17,20, 0, 0,17,18,20, 0, 0,13,13, + 17,17, 0,16,16,20,21, 0,13,13,16,16, 0,17,17,21, + 0, 0,17,18, 0, 0, 0,17,18, 0,21, 0, 0, 0, 0, 0, + 0,15,15,20, 0, 0,19,19, 0, 0, 0,17,17, 0, 0, 0, + 18,17,21,20, 0, 0, 0, 0, 0, 0,16,16,20,21, 0,21, + 20, 0,21, 0,19,21, 0, 0, 0,15,15, 0, 0, 0,16,17, + 0,19, 0,16,16, 0, 0, 0,17,17, 0, 0, 0,19,18, 0, + 0, 0,16,16,20,20, 0,20,18,21, 0, 0,15,15,21,21, + 0,18,18, 0, 0, 0,18,19, 0, 0, 0,16,15, 0,21, 0, + 20,19, 0, 0, 0,16,16, 0, 0, 0,20,18, 0,21, 0,17, + 18,21, 0, 0,18,19, 0, 0, 0, 0, 0, 0, 0, 0,16,16, + 20,20, 0,19,20, 0, 0, 0,17,17, 0, 0, 0,18,17,20, + 21, 0, 0, 0, 0, 0, 0,16,16, 0,20, 0,20,22, 0, 0, + 0,18,18, 0,22, +}; + +static const static_codebook _44p0_p4_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p0_p4_0, + 1, -528744448, 1616642048, 3, 0, + (long *)_vq_quantlist__44p0_p4_0, + 0 +}; + +static const long _vq_quantlist__44p0_p4_1[] = { + 3, + 2, + 4, + 1, + 5, + 0, + 6, +}; + +static const char _vq_lengthlist__44p0_p4_1[] = { + 2, 3, 3, 3, 3, 3, 3, +}; + +static const static_codebook _44p0_p4_1 = { + 1, 7, + (char *)_vq_lengthlist__44p0_p4_1, + 1, -533200896, 1611661312, 3, 0, + (long *)_vq_quantlist__44p0_p4_1, + 0 +}; + +static const long _vq_quantlist__44p0_p5_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p0_p5_0[] = { + 1, 6, 6, 6, 8, 8, 7, 8, 8, 7, 9, 8,10,11,11, 9, + 8, 8, 7, 8, 8,11,11,11, 9, 8, 8, 6, 7, 7,10,10, + 10,10,10,10,10,10,10,14,13,13,12,11,11,10,10,10, + 14,14,13,13,11,11, 6, 6, 6, 8, 5, 5, 8, 7, 7, 8, + 7, 7,11, 9, 9, 9, 7, 7, 8, 7, 7,12,10,10,10, 7, + 7, 7, 8, 8,12,11,11,12,10,10,11,10,10,14,13,13, + 13,10,10,11,10,11,16,14,14,13,10,10, 7, 8, 7,12, + 12,12,12,11,11,12,11,11,16,14,15,13,12,12,11,11, + 11,17,15,14,14,13,13,10, 9, 9,13,11,11,13,11,11, + 12,11,11,16,14,13,14,11,11,12,11,11,16,15,14,14, + 11,11, 7, 8, 8,12,11,11,12,10,10,12,10,10,16,14, + 13,13,11,11,12,10,10,16,14,14,13,10,10, 8, 8, 8, + 12,12,12,12,11,11,12,11,11,16,14,15,14,12,12,12, + 11,11,16,15,15,14,12,12,10,10,10,13,11,11,13,11, + 11,12,12,12,16,14,14,14,11,11,12,11,11,17,14,15, + 14,11,11, +}; + +static const static_codebook _44p0_p5_0 = { + 5, 243, + (char *)_vq_lengthlist__44p0_p5_0, + 1, -527106048, 1620377600, 2, 0, + (long *)_vq_quantlist__44p0_p5_0, + 0 +}; + +static const long _vq_quantlist__44p0_p5_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p0_p5_1[] = { + 2, 7, 7, 7, 8, 8, 7, 7, 7, 7, 8, 8, 8, 8, 9, 8, + 7, 7, 8, 8, 8, 9, 9, 9, 9, 7, 7, 6, 6, 6, 9, 7, + 7, 9, 7, 7, 9, 8, 8,10, 8, 8,10, 8, 8,10, 8, 8, + 10, 8, 8,10, 8, 8, 7, 6, 6, 9, 6, 6, 9, 6, 6, 9, + 7, 7,10, 8, 8, 9, 6, 6, 9, 7, 7,10, 8, 8, 9, 7, + 7, 7, 8, 8,11, 9, 9,11, 9, 9,11, 9, 9,12, 9, 9, + 12, 8, 8,12, 9, 9,12,10, 9,12, 8, 8, 8, 7, 7,10, + 9, 9,11, 9, 9,11, 9, 9,11,11,10,11, 9, 9,11,10, + 9,11,10,11,11, 9, 9,10, 8, 8,11, 9, 9,11, 9, 9, + 11, 9, 9,11,10,10,11, 9, 9,11, 9, 9,11,10,10,11, + 9, 9, 9, 8, 8,12, 9, 9,12, 9, 9,11, 9, 9,12, 9, + 9,12, 8, 8,12, 9, 9,12, 9, 9,12, 8, 8, 9, 7, 7, + 11, 9,10,11,10, 9,11, 9, 9,11,11,11,11, 9, 9,11, + 10,10,11,11,11,11, 9, 9,10, 9, 9,11, 9, 9,11,10, + 10,11,10, 9,11,10,10,11, 9, 9,11,10,10,11,10,11, + 11, 9, 9, +}; + +static const static_codebook _44p0_p5_1 = { + 5, 243, + (char *)_vq_lengthlist__44p0_p5_1, + 1, -530841600, 1616642048, 2, 0, + (long *)_vq_quantlist__44p0_p5_1, + 0 +}; + +static const long _vq_quantlist__44p0_p6_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p0_p6_0[] = { + 1, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, +}; + +static const static_codebook _44p0_p6_0 = { + 5, 243, + (char *)_vq_lengthlist__44p0_p6_0, + 1, -516716544, 1630767104, 2, 0, + (long *)_vq_quantlist__44p0_p6_0, + 0 +}; + +static const long _vq_quantlist__44p0_p6_1[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p0_p6_1[] = { + 1, 3, 2, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11, + 11,12,12,12,14,14,14,15,15, +}; + +static const static_codebook _44p0_p6_1 = { + 1, 25, + (char *)_vq_lengthlist__44p0_p6_1, + 1, -518864896, 1620639744, 5, 0, + (long *)_vq_quantlist__44p0_p6_1, + 0 +}; + +static const long _vq_quantlist__44p0_p6_2[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p0_p6_2[] = { + 3, 4, 4, 5, 4, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44p0_p6_2 = { + 1, 25, + (char *)_vq_lengthlist__44p0_p6_2, + 1, -529006592, 1611661312, 5, 0, + (long *)_vq_quantlist__44p0_p6_2, + 0 +}; + +static const char _huff_lengthlist__44p0_short[] = { + 3, 3, 7, 8,10,13,16, 3, 2, 5, 7, 9,13,16, 6, 4, + 4, 6,10,14,15, 7, 5, 5, 7,10,13,14, 9, 8, 9, 9, + 9,11,13,12,11,12, 9, 7, 8,11,14,12,10, 6, 5, 7, + 10, +}; + +static const static_codebook _huff_book__44p0_short = { + 2, 49, + (char *)_huff_lengthlist__44p0_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p1_l0_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44p1_l0_0[] = { + 1, 4, 4, 7, 7, 8, 8, 9, 9,10,10,11,11, 4, 6, 5, + 8, 6, 9, 8,10, 9,10,10,11,10, 5, 5, 6, 6, 8, 8, + 9, 9,10,10,10,10,11, 7, 8, 8, 9, 8,10, 9,10, 9, + 11,10,11,10, 7, 8, 8, 8,10, 9,10,10,10,10,11,10, + 11, 9,10,10,11,11,11,11,12,11,12,11,12,11, 9,10, + 10,11,11,11,11,11,11,11,12,11,12,11,11,11,12,12, + 12,12,12,12,12,12,12,11,11,12,11,12,12,12,12,12, + 12,12,12,11,12,12,12,12,12,13,12,13,12,12,12,12, + 12,12,12,12,12,13,13,13,13,12,13,12,12,12,12,12, + 13,13,12,13,12,13,12,13,12,12,12,12,13,13,13,13, + 13,13,12,12,12,12,12,11,12, +}; + +static const static_codebook _44p1_l0_0 = { + 2, 169, + (char *)_vq_lengthlist__44p1_l0_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44p1_l0_0, + 0 +}; + +static const long _vq_quantlist__44p1_l0_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p1_l0_1[] = { + 1, 4, 4, 6, 6, 5, 5, 5, 6, 6, 5, 6, 5, 6, 6, 6, + 6, 7, 7, 7, 6, 7, 6, 7, 7, +}; + +static const static_codebook _44p1_l0_1 = { + 2, 25, + (char *)_vq_lengthlist__44p1_l0_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p1_l0_1, + 0 +}; + +static const long _vq_quantlist__44p1_l1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p1_l1_0[] = { + 1, 4, 4, 4, 4, 4, 4, 4, 4, +}; + +static const static_codebook _44p1_l1_0 = { + 2, 9, + (char *)_vq_lengthlist__44p1_l1_0, + 1, -516716544, 1630767104, 2, 0, + (long *)_vq_quantlist__44p1_l1_0, + 0 +}; + +static const char _huff_lengthlist__44p1_lfe[] = { + 1, 3, 2, 3, +}; + +static const static_codebook _huff_book__44p1_lfe = { + 2, 4, + (char *)_huff_lengthlist__44p1_lfe, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44p1_long[] = { + 3, 3, 7, 7, 9,13,16, 3, 2, 4, 6,10,13,17, 7, 4, + 4, 6, 9,12,14, 7, 6, 6, 5, 7, 9,12,10,10, 9, 6, + 6, 9,12,14,14,13, 9, 8,10,11,18,18,15,13,11,10, + 11, +}; + +static const static_codebook _huff_book__44p1_long = { + 2, 49, + (char *)_huff_lengthlist__44p1_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p1_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p1_p1_0[] = { + 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, +}; + +static const static_codebook _44p1_p1_0 = { + 5, 243, + (char *)_vq_lengthlist__44p1_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p1_p1_0, + 0 +}; + +static const long _vq_quantlist__44p1_p2_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p1_p2_0[] = { + 1, 4, 4, 0, 7, 7, 0, 8, 8, 0, 9, 9, 0,12,12, 0, + 8, 8, 0, 9, 9, 0,12,12, 0, 8, 8, 0, 6, 6, 0,11, + 11, 0,11,11, 0,12,12, 0,14,14, 0,11,11, 0,12,12, + 0,14,14, 0,11,11, 0, 6, 6, 0, 6, 5, 0, 7, 6, 0, + 7, 7, 0,10,10, 0, 6, 6, 0, 7, 7, 0,10,10, 0, 7, + 7, 0, 7, 7, 0,10,10, 0,11,11, 0,11,11, 0,14,14, + 0,10,10, 0,12,12, 0,14,14, 0,12,12, 0, 6, 6, 0, + 11,11, 0,11,11, 0,12,12, 0,14,14, 0,11,11, 0,12, + 12, 0,15,15, 0,11,11, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 8, 0,11,11, 0,11,11, 0,12,12, 0,15, + 15, 0,12,12, 0,11,11, 0,15,15, 0,11,11, 0, 6, 6, + 0,11,11, 0,12,12, 0,12,12, 0,15,15, 0,11,11, 0, + 12,12, 0,14,14, 0,12,12, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, +}; + +static const static_codebook _44p1_p2_0 = { + 5, 243, + (char *)_vq_lengthlist__44p1_p2_0, + 1, -533200896, 1614282752, 2, 0, + (long *)_vq_quantlist__44p1_p2_0, + 0 +}; + +static const long _vq_quantlist__44p1_p2_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p1_p2_1[] = { + 1, 3, 3, 0, 8, 8, 0, 8, 8, 0,10,10, 0, 9, 9, 0, + 10,10, 0,10,10, 0, 9, 9, 0,10,10, 0, 7, 7, 0, 7, + 7, 0, 7, 7, 0, 8, 8, 0, 8, 8, 0, 8, 8, 0, 9, 9, + 0, 8, 8, 0, 8, 8, 0, 7, 7, 0, 8, 8, 0, 8, 8, 0, + 10,10, 0, 9, 9, 0, 9, 9, 0,10,10, 0, 9, 9, 0,10, + 10, 0, 8, 8, 0,11,11, 0,11,11, 0,12,12, 0,11,11, + 0,12,12, 0,12,12, 0,12,12, 0,12,12, 0, 8, 8, 0, + 11,11, 0,11,11, 0,13,12, 0,12,12, 0,13,12, 0,13, + 13, 0,12,12, 0,13,13, 0, 7, 7, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 8, 0,11,11, 0,11,11, 0,13,12, 0,12, + 12, 0,12,12, 0,12,12, 0,11,11, 0,12,12, 0, 8, 8, + 0,12,12, 0,12,12, 0,13,13, 0,12,12, 0,13,13, 0, + 13,13, 0,12,13, 0,13,13, 0, 7, 7, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, +}; + +static const static_codebook _44p1_p2_1 = { + 5, 243, + (char *)_vq_lengthlist__44p1_p2_1, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p1_p2_1, + 0 +}; + +static const long _vq_quantlist__44p1_p3_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p1_p3_0[] = { + 1, 6, 6, 6, 7, 7, 7, 8, 8, 7, 8, 8,10,11,11, 9, + 8, 8, 7, 9, 9,11,12,12, 9, 8, 8, 6, 7, 7, 9,11, + 11,10,11,11,10,11,11,13,13,13,11,12,12,10,11,11, + 13,14,14,12,12,12, 6, 6, 6, 8, 6, 6, 8, 6, 6, 9, + 7, 7,12,10,10,10, 6, 6, 9, 7, 7,12,10,10,11, 7, + 6, 7, 8, 8,12,10,10,12,10,10,11,10,10,15,13,13, + 13,10,10,12,11,11,15,13,13,14,11,11, 8, 7, 7,12, + 11,11,12,11,11,11,11,11,14,14,14,13,12,12,12,11, + 11,16,15,15,14,12,12, 0,10,10, 0,11,11, 0,12,12, + 0,11,11, 0,14,14, 0,11,11, 0,11,11, 0,15,15, 0, + 11,11, 7, 8, 8,13,10,10,12,10,10,12,11,11,15,13, + 13,14,11,11,12,10,10,16,14,14,14,10,10, 8, 7, 7, + 12,11,11,13,11,11,12,11,11,15,14,14,14,12,12,13, + 12,12,15,14,14,15,12,12, 0,11,11, 0,12,12, 0,12, + 12, 0,12,12, 0,15,15, 0,12,12, 0,12,12, 0,15,14, + 0,12,12, +}; + +static const static_codebook _44p1_p3_0 = { + 5, 243, + (char *)_vq_lengthlist__44p1_p3_0, + 1, -531365888, 1616117760, 2, 0, + (long *)_vq_quantlist__44p1_p3_0, + 0 +}; + +static const long _vq_quantlist__44p1_p3_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p1_p3_1[] = { + 2, 3, 4, 7, 7,10,12,12,12,12,10,11,11,13,13,11, + 12,12,11,11,12,12,12,12,12,11,13,13,13,13,12,12, + 12,13,14,12,13,13,13,13,12,13,13,13,13,12,13,13, + 13,13,11,13,13,13,13,12,12,12,14,14,12,13,13,12, + 12,12,12,13,13,13,12,13,13,13,13,12,13,13,13,13, + 12,12,12,14,14,12,13,13,12,12,12,13,13,13,13,12, + 13,13,12,12,12,13,13,13,13,12,12,12,14,14,12,13, + 13,12,12,12,13,13,13,13,12,13,13,12,12,10,10,11, + 10,10,11,11,11,11,11,11, 9, 9,10,10,12,11,11,10, + 10,12,10,10,10,10,13,12,12,12,12,13,11,11,11,11, + 13,12,12,12,12,13,11,11,11,11,13,12,12,12,12,13, + 12,12,12,12,13,11,11,11,11,13,12,12,12,12,13,11, + 11,11,11,13,12,12,11,11,13,12,12,11,11,13,11,11, + 11,11,13,12,12,11,11,13,11,11,11,11,13,12,12,11, + 11,13,12,12,11,11,13,11,11,11,11,13,12,12,11,11, + 13,11,11,11,11,13,12,12,11,11,11,11,11,10,10,11, + 11,11, 9, 9,11,12,12,11,11,12,12,12, 9, 9,13,13, + 13,10,10,13,13,13,11,11,13,13,13,14,14,13,13,13, + 11,10,13,13,14,12,12,13,13,13,11,11,13,13,13,11, + 11,13,13,13,14,14,13,13,13,10,10,13,13,13,11,11, + 13,13,13,10,10,13,14,13,11,11,13,14,14,14,14,13, + 13,13,10,10,13,14,14,11,11,13,13,13,10,10,13,14, + 14,11,11,13,13,13,14,14,14,13,13,10,10,13,14,14, + 11,11,13,13,13,10,10,14,12,12, 9, 9,14,12,12, 9, + 9,14,11,11, 9, 9,14,12,12, 8, 8,14,11,11, 7, 7, + 15,13,13,10,10,15,12,12,10,10,15,13,13,10,10,15, + 12,12,10,10,15,13,13,10,10,15,13,13,10,10,15,12, + 12,10,10,15,13,13,10,10,15,12,12,10,10,15,13,13, + 10,10,15,13,13,10,10,15,12,12,10,10,15,13,13, 9, + 9,15,12,12, 9, 9,14,13,13, 9, 9,15,13,13,10,10, + 15,12,12,10,10,15,13,13, 9, 9,15,12,12, 9, 9,15, + 13,13, 9, 9,13,12,12, 9, 9,13,13,13, 8, 8,13,13, + 13, 9, 9,13,13,13, 7, 7,14,13,13, 8, 8,14,14,14, + 10,10,15,14,14,11,11,14,14,14, 9, 9,15,14,14,10, + 10,15,14,14, 9, 9,14,14,14,10,10,15,14,14,11,11, + 15,14,14, 9, 9,14,14,14,10,10,14,14,14, 9, 9,15, + 14,15,10,10,15,14,14,11,11,14,14,14, 9, 9,14,14, + 14, 9, 9,14,14,14, 8, 8,15,14,14,10,10,15,14,14, + 11,11,14,14,14, 9, 9,15,14,14, 9, 9,14,14,14, 8, + 8,12,12,12,13,13,16,16,16,11,11,17,16,16,12,12, + 17,16,16,11,11,17,16,16,11,11,17,17,16,13,13,17, + 16,16,13,13,18,17,16,12,12,17,16,16,13,13,17,16, + 17,12,12,18,17,17,13,13,17,16,16,14,14,18,17,17, + 12,12,18,16,16,13,13,17,17,17,13,12,17,17,17,13, + 13,17,16,16,13,13,18,17,17,12,12,17,16,16,13,12, + 17,17,17,12,12,18,17,17,13,13,18,16,16,14,14,18, + 17,17,12,12,17,17,17,13,13,18,17,18,12,12,13,14, + 14,10,10,16,14,14,13,13,17,15,15,14,14,17,14,14, + 12,13,16,14,14,13,13,17,15,15,14,14,16,16,16,15, + 15,17,15,15,14,14,17,16,16,14,15,17,15,15,14,14, + 17,15,16,14,14,17,16,16,15,15,17,15,15,13,13,17, + 15,15,14,14,18,15,15,13,14,17,15,15,14,14,16,16, + 16,15,15,17,15,15,13,13,17,15,15,14,14,17,15,15, + 13,13,17,15,15,14,14,16,16,16,15,15,17,15,15,13, + 13,17,15,15,14,14,18,15,15,13,13,13,11,11,10,10, + 16,14,14,13,12,16,14,14,13,13,16,15,14,12,12,16, + 14,14,12,12,16,15,15,14,14,16,14,14,14,14,17,15, + 15,13,13,16,15,15,14,14,17,15,15,13,14,17,15,15, + 14,14,17,15,14,14,14,17,15,15,13,13,17,15,15,14, + 14,17,15,15,13,13,17,15,15,14,14,17,14,14,14,14, + 17,15,15,13,13,17,15,15,13,13,17,15,15,13,13,17, + 15,15,14,14,17,15,15,14,14,17,15,15,13,13,17,15, + 15,13,13,17,15,15,13,13,14,14,15, 8, 8,14,14,14, + 19,19,14,15,15,18,19,14,14,14,19,18,14,14,14,19, + 19,15,15,15,19,18,15,16,16,19,19,15,15,15,19,19, + 15,16,16,20,19,15,15,15,19,19,15,15,15,19,19,16, + 16,16,20,19,15,15,15,19,18,15,16,16,20,19,15,15, + 15,18,18,15,15,15,19,20,15,16,16,19,19,15,15,15, + 20,19,15,15,15,20,19,15,15,15,19,18,15,15,15,19, + 19,15,16,16,19,20,15,15,15,19,19,15,15,15,19,20, + 15,15,15,19,19,14,12,12, 9, 9,14,14,14,19,19,14, + 14,14,19,19,14,14,15,20,19,15,14,14,18,19,15,15, + 15,19,19,15,15,14,20,19,15,15,15,20,19,15,15,14, + 20,19,15,15,15,20,19,15,15,15,19,20,15,14,14,19, + 20,15,15,15,20,20,15,14,14,20,19,15,15,15,19,19, + 15,15,15,19,19,15,14,14,19,19,15,15,15,19,20,15, + 15,15,20,20,15,15,15,19,19,15,15,15,20,19,16,14, + 14,19,19,15,15,15,20,19,15,14,15,20,19,14,15,15, + 20,19,12,12,12,13,13,16,16,16,11,11,16,16,16,12, + 12,17,16,16,11,11,17,15,16,11,11,17,17,17,13,13, + 18,16,17,13,13,18,17,17,13,12,17,16,17,13,13,17, + 17,17,13,13,16,16,16,12,12,17,16,16,13,13,17,16, + 16,12,12,17,16,16,12,13,17,17,17,12,12,17,17,17, + 13,13,18,16,16,13,13,18,17,17,12,12,18,17,17,12, + 12,17,17,17,12,12,17,17,17,12,12,17,16,16,13,13, + 17,17,17,12,12,17,16,16,12,12,17,17,17,12,12,13, + 14,14, 9, 9,16,14,14,13,13,16,15,15,14,14,17,14, + 14,13,13,16,14,14,13,13,17,15,15,15,15,16,16,16, + 15,15,17,15,15,14,14,17,15,15,15,15,17,15,15,14, + 14,17,15,15,14,14,16,16,16,15,15,17,15,15,14,14, + 17,15,15,14,14,17,15,15,14,14,17,15,15,14,14,16, + 16,16,15,15,18,15,15,14,13,17,15,15,14,14,17,15, + 15,13,13,17,15,15,14,14,16,16,16,15,15,17,15,15, + 14,13,17,15,15,14,14,17,15,15,13,13,13,11,11,11, + 11,16,14,14,12,12,16,14,14,13,13,16,15,14,12,12, + 17,14,14,12,12,17,15,15,13,13,17,14,14,14,14,17, + 15,15,13,13,17,14,15,14,13,17,15,15,13,13,16,15, + 15,13,13,16,14,14,14,14,17,15,15,13,13,16,14,14, + 13,13,16,15,15,13,13,17,15,15,13,13,17,14,14,14, + 14,17,15,15,12,12,17,15,15,13,13,17,15,15,12,12, + 16,15,15,13,13,17,14,14,13,14,17,15,15,12,12,17, + 14,14,13,13,17,15,15,12,12,14,14,14, 8, 8,14,14, + 14,18,18,14,15,15,19,19,14,14,14,19,19,14,15,14, + 18,19,15,15,15,18,19,15,16,16,20,20,15,15,15,19, + 20,15,16,16,19,20,15,15,15,19,20,15,15,16,19,19, + 15,16,16,20,20,15,15,15,20,19,15,16,16,20,19,15, + 15,15,19,20,15,15,15,19,19,15,16,16,20,19,15,15, + 15,19,19,15,16,15,20,19,15,15,15,19,19,15,15,15, + 19,20,15,16,16,20,20,15,15,15,19,19,15,15,15,20, + 20,15,15,15,19,19,14,12,12, 9, 9,14,14,14,18,18, + 14,14,14,19,20,14,14,14,18,18,14,14,14,18,19,15, + 15,15,19,20,15,14,14,19,19,15,15,15,19,19,15,14, + 15,19,19,15,15,15,18,20,15,15,15,19,19,15,14,14, + 19,19,15,15,15,20,19,15,15,14,20,20,15,15,15,19, + 19,15,15,15,19,19,15,14,14,19,19,15,15,15,19,19, + 15,14,14,19,20,14,15,15,19,19,15,15,15,19,19,15, + 14,14,20,19,15,15,15,19,19,15,14,14,20,19,15,15, + 15,19,19,13,12,12,13,13,17,17,16,11,11,16,16,16, + 12,12,17,17,16,11,11,17,16,16,11,11,17,17,17,13, + 13,17,16,16,13,13,18,17,17,12,12,17,16,16,13,13, + 18,17,17,12,12,18,17,17,13,13,18,16,17,13,13,17, + 17,17,12,12,18,17,17,13,13,18,17,17,12,12,17,16, + 17,12,12,17,16,16,13,13,17,16,16,11,11,17,16,16, + 12,12,17,17,17,11,11,17,17,17,12,12,18,16,16,13, + 13,18,17,17,12,11,17,16,16,12,12,18,17,17,11,11, + 13,14,14, 9, 9,16,14,14,13,13,16,15,15,14,14,17, + 14,14,12,12,16,14,14,13,13,17,15,15,14,14,17,16, + 16,15,16,18,15,15,14,14,17,15,15,14,14,17,15,15, + 14,14,18,15,15,14,14,16,16,16,15,16,18,15,15,14, + 14,17,16,15,14,14,18,15,15,14,14,17,15,15,14,14, + 17,16,16,15,15,18,14,15,13,13,17,15,15,14,14,18, + 15,15,13,13,17,15,15,14,14,17,16,15,15,15,17,15, + 15,13,13,17,15,15,14,14,18,15,15,13,13,13,11,11, + 10,10,16,14,14,12,12,16,14,14,12,12,17,14,15,11, + 11,17,14,14,11,11,17,15,15,13,13,17,14,14,14,13, + 17,15,15,13,13,16,15,15,13,13,17,15,15,13,13,17, + 15,15,13,13,17,14,14,14,14,17,15,15,13,13,17,14, + 15,13,13,16,15,15,13,13,17,15,15,13,13,17,14,14, + 13,13,17,15,15,12,12,16,14,14,12,12,17,15,15,12, + 12,17,15,15,13,13,17,14,14,13,13,17,15,15,12,12, + 17,14,14,12,12,17,15,15,12,12,13,15,14, 8, 8,14, + 14,14,19,19,14,15,15,18,19,14,14,14,18,19,14,15, + 14,19,19,15,16,15,19,19,15,16,16,19,20,15,15,15, + 19,19,15,16,16,19,19,15,16,16,19,19,15,15,15,19, + 19,15,16,16,20,20,15,15,15,19,19,15,15,15,19,19, + 15,15,15,19,19,15,15,15,19,19,15,16,16,20,19,15, + 15,15,19,19,15,15,15,19,19,15,15,15,19,19,15,16, + 15,19,19,15,16,16,21,19,15,15,15,20,20,15,15,15, + 20,21,15,15,15,19,20,14,12,12, 8, 8,14,14,14,19, + 19,14,13,13,19,19,14,14,14,19,19,14,13,14,19,19, + 15,15,15,20,20,15,14,14,20,19,15,15,15,19,20,15, + 14,14,19,20,15,15,15,20,19,15,15,15,19,20,15,14, + 14,20,20,15,15,15,20,19,15,14,14,19,19,15,15,15, + 19,19,15,15,15,20,19,15,14,14,21,19,15,15,15,20, + 21,15,14,14,21,19,15,15,15,19,19,15,15,15,20,20, + 15,14,14,19,21,15,15,15,19,19,15,14,14,19,20,15, + 15,15,19,19,13,12,12,13,13,17,16,16,11,11,17,16, + 15,12,12,18,16,16,11,11,17,16,16,11,11,18,17,17, + 13,13,18,16,16,13,13,17,17,17,12,13,18,17,16,13, + 13,18,17,17,13,13,17,17,17,13,13,17,16,16,13,13, + 18,16,17,12,12,17,16,16,13,12,17,17,17,12,12,18, + 17,17,13,12,18,16,16,13,13,18,17,17,12,12,17,16, + 16,12,12,17,17,17,11,11,17,16,16,12,12,17,16,16, + 13,13,17,16,16,11,11,17,16,16,12,12,17,17,17,11, + 11,13,14,14, 9, 9,16,14,14,13,13,16,15,15,14,14, + 17,14,14,12,12,16,14,14,13,13,17,15,15,14,14,17, + 15,16,15,15,17,15,15,14,14,17,15,16,14,15,18,15, + 15,14,14,17,15,15,14,14,16,16,16,15,15,18,15,15, + 13,14,17,15,15,14,14,18,15,15,14,14,17,15,15,14, + 14,17,16,16,15,15,17,15,15,13,13,17,15,15,14,14, + 18,15,15,13,13,17,15,15,14,14,17,16,16,15,15,17, + 15,15,13,13,17,15,15,14,14,18,15,15,13,13,13,11, + 11,10,10,16,14,14,12,12,16,14,14,13,13,17,14,14, + 11,11,17,14,14,12,12,17,15,15,14,14,17,14,14,14, + 14,17,15,15,13,13,17,15,14,13,13,16,15,15,13,13, + 16,15,15,13,13,17,14,14,14,14,17,15,15,13,13,17, + 14,14,13,13,16,15,15,13,13,16,15,15,13,13,17,14, + 14,13,13,17,15,15,12,12,17,14,14,12,12,16,15,15, + 12,12,17,15,15,13,13,17,14,14,13,13,17,15,15,12, + 12,17,14,14,12,12,16,15,15,12,12,14,14,14, 8, 8, + 14,14,14,18,18,14,15,15,19,18,14,14,14,18,18,14, + 14,14,18,19,15,16,15,19,19,15,17,16,20,20,15,15, + 15,19,19,15,16,16,19,19,15,15,15,19,19,15,16,15, + 18,19,15,16,16,20,20,15,15,15,19,19,15,16,16,19, + 20,15,15,15,19,19,15,15,16,19,19,15,16,16,20,20, + 15,15,15,19,19,15,15,15,19,20,15,15,15,19,19,15, + 15,15,19,19,15,16,16,20,20,15,15,15,19,20,15,16, + 16,20,20,15,15,15,19,19,13,12,12, 8, 8,14,14,14, + 19,20,14,14,14,19,19,14,14,14,18,19,14,14,14,19, + 20,15,15,15,19,20,15,14,14,21,20,15,15,15,20,20, + 15,15,14,19,19,15,15,15,19,19,15,15,15,19,19,15, + 14,14,19,20,15,15,15,19,20,15,14,14,19,19,15,15, + 15,19,19,15,15,15,19,19,16,14,14,19,19,15,15,15, + 20,20,15,14,14,21,19,15,15,15,19,19,15,15,15,19, + 20,16,14,14,19,20,15,15,15,19,19,15,14,14,19,19, + 15,15,15,20,19, +}; + +static const static_codebook _44p1_p3_1 = { + 5, 3125, + (char *)_vq_lengthlist__44p1_p3_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p1_p3_1, + 0 +}; + +static const long _vq_quantlist__44p1_p4_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p1_p4_0[] = { + 2, 6, 6,14,14, 6, 7, 7,14,14, 7, 7, 7,14,14, 0, + 13,13,16,16, 0,13,13,15,14, 7, 8, 8,15,15, 9,10, + 10,16,16, 9, 8, 8,15,15, 0,13,13,17,16, 0,13,13, + 15,16, 8, 8, 8,15,15,12,11,11,16,16, 9, 8, 8,14, + 14, 0,13,13,17,18, 0,13,13,15,15, 0,14,14,16,16, + 0, 0, 0,19,18, 0,12,12,16,15, 0,15,16, 0,20, 0, + 14,14,16,16, 0,14,14,17,17, 0, 0, 0,19,18, 0,12, + 12,15,15, 0,17,17, 0,20, 0,14,14,16,16, 5, 6, 7, + 12,12, 9, 9, 9,14,14,10,10,10,14,14, 0,21,21,18, + 17, 0,20,20,18,17, 9,10,10,14,14,12,12,12,16,16, + 12,10,10,14,14, 0,20,19,18,17, 0, 0,20,17,18,11, + 10,10,14,14,14,13,13,18,18,13,11,11,14,14, 0,20, + 20,17,18, 0,21,21,17,17, 0,21, 0,18,18, 0, 0, 0, + 0, 0, 0,20,19,16,17, 0, 0, 0,19,19, 0, 0, 0,18, + 18, 0,21,21,18,18, 0, 0, 0, 0, 0, 0,20,20,16,17, + 0, 0, 0,21,21, 0, 0, 0,18,19, 6, 6, 6,13,12, 8, + 6, 6,11,11, 8, 6, 6,13,13, 0, 9, 9,11,11, 0,11, + 10,14,14, 9, 7, 7,13,13,11, 9, 9,13,13,10, 6, 6, + 13,13, 0,10,10,14,15, 0,10,10,13,13, 9, 7, 7,13, + 13,13,10, 9,13,13,10, 6, 6,13,13, 0,10,10,15,14, + 0,10,10,13,13, 0,11,11,15,15, 0,19,20,17,17, 0, + 9, 9,13,13, 0,13,13,20,20, 0,11,11,13,13, 0,11, + 11,15,15, 0,19,19,17,17, 0,10,10,13,13, 0,15,15, + 20,20, 0,12,12,13,13, 0,10,10,12,12, 0,11,11,15, + 15, 0,11,11,15,15, 0,15,15,20, 0, 0,16,16, 0,21, + 0,11,11,15,15, 0,14,14,18,17, 0,11,11,15,15, 0, + 15,16,19,20, 0,16,16,21,21, 0,12,12,15,15, 0,15, + 14,18,18, 0,11,11,16,16, 0,15,15,21,21, 0,16,15, + 0, 0, 0,16,16,21, 0, 0, 0, 0, 0, 0, 0,14,14,20, + 20, 0,18,18, 0, 0, 0,16,17,21, 0, 0,16,16,21,21, + 0, 0, 0, 0, 0, 0,15,15,21,21, 0,20,19, 0,21, 0, + 17,17, 0, 0, 0,10,10,12,11, 0,10,10,10,11, 0,11, + 11,12,12, 0,11,11, 9, 9, 0,13,13,11,12, 0,11,11, + 12,12, 0,13,13,12,12, 0,10,10,12,12, 0,12,12,13, + 13, 0,12,12,12,12, 0,11,11,12,12, 0,13,13,12,12, + 0,10,10,12,12, 0,13,13,14,14, 0,12,12,12,12, 0, + 14,14,14,13, 0,19,20,15,15, 0,12,11,12,12, 0,15, + 15,21,20, 0,13,13,11,11, 0,13,13,13,13, 0,19, 0, + 15,15, 0,12,12,12,12, 0,17,16,19, 0, 0,13,13,12, + 12, 7, 7, 7,16,16,11, 9, 9,15,15,12, 9, 9,16,16, + 0,13,13,15,14, 0,14,14,17,16,10, 9, 9,16,16,14, + 11,11,17,16,12, 9, 8,15,15, 0,13,13,18,18, 0,13, + 13,15,15,12,10,10,18,17,15,12,12,17,17,14, 9, 9, + 16,16, 0,13,13,18,19, 0,14,13,17,16, 0,14,14,18, + 18, 0, 0, 0,20,21, 0,12,12,16,16, 0,16,16,20,21, + 0,14,14,17,16, 0,14,14,18,19, 0, 0, 0,19,21, 0, + 13,13,17,17, 0,17,17, 0,21, 0,15,15,16,16, 8, 7, + 7,14,14,11,10,10,15,15,12,10,10,15,15, 0,20,20, + 18,18, 0, 0, 0,17,17,11,10,10,16,16,14,12,12,18, + 17,14,11,11,15,15, 0,20,21,18,18, 0, 0,19,18,17, + 12,10,10,16,16,17,14,14,19,19,14,11,11,15,15, 0, + 21,21,19,19, 0,21,20,19,18, 0,21, 0,18,19, 0, 0, + 0, 0, 0, 0,20,20,18,17, 0,21, 0, 0, 0, 0, 0, 0, + 19,18, 0, 0, 0,18,19, 0, 0, 0, 0, 0, 0, 0,21,17, + 18, 0, 0, 0, 0,21, 0, 0,21,18,19,11, 9, 9,14,14, + 13,10,10,13,13,13,11,11,15,15, 0,13,13,12,12, 0, + 15,15,16,16,13,10,10,15,15,16,12,12,15,15,15,10, + 10,15,15, 0,14,13,16,15, 0,14,13,15,15,13,10,10, + 15,15,18,14,14,15,15,15,10,10,14,15, 0,14,14,16, + 16, 0,14,14,16,15, 0,15,15,17,16, 0,21, 0,18,18, + 0,12,13,15,15, 0,16,16, 0, 0, 0,14,14,15,15, 0, + 15,15,16,16, 0,21,20,18,18, 0,13,13,15,15, 0,19, + 18, 0, 0, 0,15,15,15,15, 0,11,11,13,13, 0,12,12, + 16,16, 0,12,12,16,16, 0,15,16,20, 0, 0,16,17, 0, + 0, 0,12,12,16,16, 0,14,14,18,18, 0,11,11,16,17, + 0,15,15,20, 0, 0,16,16, 0, 0, 0,12,12,16,16, 0, + 15,15,19,19, 0,11,11,17,17, 0,16,16,21, 0, 0,16, + 16, 0, 0, 0,17,17,20,20, 0, 0, 0, 0, 0, 0,15,15, + 20, 0, 0,17,18, 0, 0, 0,17,17, 0, 0, 0,16,16, 0, + 21, 0, 0, 0, 0, 0, 0,15,15,21, 0, 0,19,18, 0, 0, + 0,18,17, 0, 0, 0,11,11,14,14, 0,11,11,15,15, 0, + 12,12,16,16, 0,13,13,14,14, 0,14,14,17,17, 0,12, + 12,16,16, 0,14,14,16,16, 0,11,11,16,15, 0,13,13, + 16,17, 0,13,13,16,16, 0,12,12,15,16, 0,15,14,16, + 16, 0,11,11,15,15, 0,14,14,17,17, 0,13,13,16,16, + 0,15,14,18,18, 0,21, 0,19,19, 0,13,13,15,15, 0, + 16,16,20,20, 0,14,14,16,15, 0,14,14,17,17, 0,21, + 0,20,18, 0,13,13,15,15, 0,17,17, 0, 0, 0,14,14, + 16,15, 8, 8, 8,16,16,12, 9, 9,16,16,13, 9, 9,16, + 16, 0,14,14,18,17, 0,14,14,16,17,12,10,10,18,17, + 14,11,11,18,18,14, 9, 9,16,16, 0,13,13,18,18, 0, + 13,13,17,16,12, 9, 9,16,17,17,13,13,16,16,14, 9, + 9,15,15, 0,14,14,20,20, 0,13,13,15,15, 0,15,14, + 18,18, 0, 0, 0,20,21, 0,12,13,16,17, 0,16,16,20, + 21, 0,14,14,16,17, 0,14,14,18,17, 0, 0, 0,20,21, + 0,13,13,16,16, 0,19,17, 0,21, 0,14,15,16,16, 8, + 7, 7,14,13,12,10,10,15,15,13,10,10,15,15, 0,21, + 21,18,19, 0,20,21,18,18,12,10,10,16,15,15,12,12, + 17,17,14,11,11,15,15, 0,21,21,19,18, 0, 0,21,17, + 18,13,11,11,15,15,16,13,13,18,19,15,11,11,15,14, + 0,21, 0,19,19, 0, 0,21,18,18, 0, 0,21,19,19, 0, + 0, 0, 0, 0, 0,20,19,17,17, 0, 0, 0,21, 0, 0,21, + 0,18,19, 0, 0,20,20,19, 0, 0, 0, 0, 0, 0,21,20, + 18,17, 0, 0, 0, 0,20, 0, 0, 0,18,19, 0,10,10,15, + 14, 0,11,11,14,14, 0,11,11,15,16, 0,14,14,15,15, + 0,15,15,16,16, 0,11,11,16,16, 0,14,13,16,16, 0, + 11,11,15,15, 0,14,14,16,16, 0,14,14,15,15, 0,11, + 11,15,15, 0,13,13,15,15, 0,11,11,15,15, 0,15,15, + 18,17, 0,14,14,15,15, 0,15,16,18,18, 0, 0, 0,20, + 20, 0,14,13,16,15, 0,17,17,21, 0, 0,15,15,15,15, + 0,16,15,17,17, 0, 0, 0,19,19, 0,13,13,15,15, 0, + 20,19, 0, 0, 0,15,15,15,15, 0,11,11,13,13, 0,12, + 12,16,16, 0,12,12,16,16, 0,15,15,21,21, 0,17,16, + 0, 0, 0,12,12,16,16, 0,14,14,17,17, 0,11,11,16, + 16, 0,15,15, 0, 0, 0,16,16,21, 0, 0,12,12,17,16, + 0,14,15,20,20, 0,11,11,16,16, 0,15,15, 0,20, 0, + 16,16, 0,21, 0,16,17,21, 0, 0, 0, 0, 0, 0, 0,15, + 15, 0,21, 0,18,18, 0, 0, 0,17,16, 0, 0, 0,17,17, + 21, 0, 0, 0, 0, 0, 0, 0,15,15, 0,20, 0,19,20,21, + 0, 0,17,18, 0, 0, 0,12,12,15,15, 0,12,12,15,15, + 0,12,12,16,16, 0,13,13,15,15, 0,15,15,17,17, 0, + 13,12,17,16, 0,14,14,17,16, 0,11,11,16,16, 0,14, + 14,17,17, 0,14,14,17,17, 0,12,12,16,16, 0,15,15, + 17,17, 0,11,11,16,16, 0,14,14,17,17, 0,14,14,16, + 16, 0,15,15,18,17, 0, 0, 0,19, 0, 0,13,13,16,16, + 0,16,16, 0,21, 0,14,14,16,16, 0,15,15,18,17, 0, + 0, 0,19,19, 0,13,13,16,16, 0,18,17, 0,21, 0,14, + 15,16,16, 0,11,11,16,16, 0,13,13,17,17, 0,13,13, + 17,17, 0,16,16,16,17, 0,16,16,18,18, 0,12,12,17, + 17, 0,16,15,18,17, 0,12,12,16,16, 0,16,15,19,19, + 0,16,15,17,17, 0,12,12,17,18, 0,16,16,18,18, 0, + 12,12,16,16, 0,16,16,19,19, 0,15,16,17,17, 0,15, + 16,18,18, 0, 0, 0,20,20, 0,13,13,16,16, 0,18,18, + 21,20, 0,15,15,16,16, 0,16,16,19,18, 0, 0, 0,19, + 20, 0,14,14,17,17, 0,19,19, 0,21, 0,15,16,16,16, + 0, 9, 9,14,14, 0,13,13,15,15, 0,14,14,15,15, 0, + 0,21,19,19, 0, 0,21,18,18, 0,12,12,15,15, 0,15, + 15,18,18, 0,14,13,15,15, 0,21,21,18,19, 0,21,20, + 18,18, 0,13,13,16,16, 0,17,17,18,19, 0,14,14,15, + 15, 0, 0,21,19,19, 0,21,20,18,19, 0,20,20,19,19, + 0, 0, 0, 0, 0, 0,19,20,17,17, 0, 0, 0,21,21, 0, + 21, 0,18,20, 0,21, 0,18,21, 0, 0, 0, 0, 0, 0,21, + 21,19,18, 0, 0, 0, 0, 0, 0, 0, 0,19,19, 0,18,18, + 15,15, 0,18,20,17,16, 0,20, 0,17,17, 0,21, 0,17, + 17, 0,21,20,19,20, 0,19,19,16,16, 0,21,21,17,18, + 0,19,19,17,17, 0,20,21,21,21, 0,20,20,18,18, 0, + 19,19,16,16, 0, 0,21,18,19, 0,18,19,16,17, 0,21, + 21,19,20, 0,21,19,18,18, 0,21,20,19,21, 0, 0, 0, + 20,21, 0,19,19,17,16, 0, 0, 0, 0, 0, 0,21,20,17, + 17, 0,20,21,19,18, 0, 0, 0, 0,21, 0,19,18,16,17, + 0, 0, 0, 0, 0, 0,20,20,17,17, 0,11,11,14,14, 0, + 13,13,16,16, 0,13,13,16,16, 0,17,17,21, 0, 0,17, + 18, 0, 0, 0,12,12,16,16, 0,15,15,17,18, 0,12,12, + 16,16, 0,16,16, 0,20, 0,17,17, 0,21, 0,12,12,17, + 17, 0,16,16,19,20, 0,12,12,17,17, 0,17,17, 0,20, + 0,17,17, 0, 0, 0,17,17,21, 0, 0, 0, 0, 0, 0, 0, + 15,15, 0,20, 0,19,19, 0, 0, 0,18,18, 0, 0, 0,17, + 17, 0, 0, 0, 0, 0, 0, 0, 0,15,15, 0, 0, 0,20,19, + 0, 0, 0,19,18, 0, 0, 0,14,14,21,19, 0,16,16,20, + 21, 0,16,16,20,20, 0,17,17,20, 0, 0,17,17,20,20, + 0,15,15,20,20, 0,19,18,20, 0, 0,15,15,20,20, 0, + 17,18,21,20, 0,17,17,20,21, 0,15,15,19,19, 0,19, + 18,21,21, 0,15,15,19,20, 0,17,18, 0, 0, 0,17,17, + 20,20, 0,17,18,20,21, 0, 0, 0, 0, 0, 0,15,15,20, + 20, 0,19,19, 0, 0, 0,17,17,19,21, 0,17,17, 0,21, + 0, 0, 0, 0,21, 0,15,15,20,19, 0, 0,20, 0, 0, 0, + 17,17,21,20, 0,12,12,16,16, 0,14,14,17,17, 0,13, + 13,17,17, 0,16,16,17,18, 0,17,16,18,18, 0,13,13, + 18,17, 0,15,16,19,18, 0,13,13,16,16, 0,16,16,19, + 19, 0,16,16,17,17, 0,13,12,17,17, 0,16,16,18,17, + 0,12,12,16,16, 0,17,17,19,18, 0,16,15,16,16, 0, + 16,17,18,19, 0, 0, 0,20,20, 0,14,14,17,16, 0,18, + 18,21, 0, 0,16,16,16,16, 0,16,16,18,17, 0, 0,21, + 21,21, 0,14,14,16,16, 0,21,20,21, 0, 0,16,16,16, + 16, 0,10,10,14,14, 0,14,14,15,16, 0,14,14,15,15, + 0, 0,21,18,18, 0, 0,21,18,19, 0,13,13,16,16, 0, + 16,16,18,17, 0,14,14,15,15, 0,20, 0,18,18, 0,21, + 0,18,17, 0,13,13,16,15, 0,17,17,19,19, 0,14,14, + 15,15, 0,20,20,18,19, 0, 0, 0,18,17, 0, 0,21,18, + 18, 0, 0, 0, 0, 0, 0,20,21,18,17, 0, 0, 0, 0, 0, + 0, 0, 0,19,19, 0, 0,21,18,18, 0, 0, 0, 0, 0, 0, + 21, 0,18,17, 0, 0, 0, 0,21, 0, 0, 0,19,20, 0,19, + 19,16,16, 0, 0,21,18,17, 0,21, 0,18,18, 0,20, 0, + 19,18, 0,21,20,19,19, 0,21,19,17,18, 0, 0,21,19, + 19, 0,21,19,18,18, 0,21, 0,20,18, 0, 0,21,18,18, + 0,20,21,17,17, 0,21, 0,18,18, 0,21,19,17,17, 0, + 21, 0, 0,20, 0, 0,20,17,18, 0, 0, 0,19,20, 0, 0, + 0,20,19, 0,19,21,17,18, 0,21, 0, 0, 0, 0,21,21, + 18,17, 0, 0,21,18,18, 0, 0, 0, 0,21, 0,20,19,16, + 17, 0, 0, 0, 0, 0, 0,21,20,17,17, 0,11,11,13,13, + 0,13,13,16,16, 0,13,13,16,16, 0,17,17, 0,21, 0, + 18,19,21, 0, 0,12,12,16,16, 0,15,15,19,18, 0,13, + 13,16,16, 0,16,17,21,19, 0,17,17,21,21, 0,13,13, + 16,16, 0,16,16,20,18, 0,13,13,16,16, 0,17,17, 0, + 0, 0,18,18, 0, 0, 0,18,17, 0,20, 0, 0, 0, 0, 0, + 0,15,15,21,21, 0,19,18, 0, 0, 0,17,17,21,21, 0, + 17,17, 0, 0, 0, 0, 0, 0, 0, 0,15,15,20,21, 0,20, + 20, 0, 0, 0,19,19, 0, 0, 0,14,15,21,19, 0,16,16, + 0,21, 0,17,16,21,21, 0,17,18,21,20, 0,18,18, 0, + 21, 0,16,16, 0,20, 0,19,19, 0, 0, 0,16,15, 0,20, + 0,18,18, 0, 0, 0,17,17, 0,21, 0,16,16,20,20, 0, + 20,19, 0, 0, 0,15,16,21,22, 0,18,18, 0, 0, 0,18, + 17, 0, 0, 0,18,18, 0, 0, 0, 0, 0, 0, 0, 0,16,16, + 21,20, 0,19,20, 0, 0, 0,18,17,21, 0, 0,17,18, 0, + 0, 0, 0, 0, 0, 0, 0,16,16, 0,20, 0, 0,20, 0, 0, + 0,18,18,22, 0, +}; + +static const static_codebook _44p1_p4_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p1_p4_0, + 1, -528744448, 1616642048, 3, 0, + (long *)_vq_quantlist__44p1_p4_0, + 0 +}; + +static const long _vq_quantlist__44p1_p4_1[] = { + 3, + 2, + 4, + 1, + 5, + 0, + 6, +}; + +static const char _vq_lengthlist__44p1_p4_1[] = { + 2, 3, 3, 3, 3, 3, 3, +}; + +static const static_codebook _44p1_p4_1 = { + 1, 7, + (char *)_vq_lengthlist__44p1_p4_1, + 1, -533200896, 1611661312, 3, 0, + (long *)_vq_quantlist__44p1_p4_1, + 0 +}; + +static const long _vq_quantlist__44p1_p5_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p1_p5_0[] = { + 1, 6, 6, 7, 8, 8, 7, 8, 8, 7, 9, 8,10,11,11, 9, + 8, 8, 7, 8, 8,11,11,11, 9, 8, 8, 6, 7, 7,10,10, + 10,10,10,10,10,10,10,14,13,13,12,11,11,10,10,10, + 14,14,13,12,11,11, 6, 6, 6, 8, 5, 5, 8, 7, 7, 9, + 7, 7,11,10,10, 9, 7, 7, 9, 7, 7,12,10,10,10, 7, + 7, 7, 8, 8,12,11,10,12,10,10,11,10,10,15,13,13, + 13,10,10,11,10,10,17,14,13,13,10,10, 7, 7, 7,12, + 11,12,12,11,11,12,11,11,16,14,14,13,12,12,12,11, + 11,17,15,14,14,12,12,10, 9, 9,13,11,11,13,11,11, + 13,11,11,17,14,13,14,11,11,12,11,11,16,15,14,14, + 11,11, 7, 8, 8,12,11,11,12,10,10,12,10,10,15,13, + 13,14,11,10,12,10,10,16,14,14,14,10,10, 8, 7, 7, + 12,11,11,12,11,11,12,11,11,17,14,14,14,12,12,12, + 11,11,16,15,15,14,12,12,10,10,10,13,11,11,13,11, + 11,13,11,12,16,14,14,14,11,11,13,12,11,16,15,15, + 14,11,11, +}; + +static const static_codebook _44p1_p5_0 = { + 5, 243, + (char *)_vq_lengthlist__44p1_p5_0, + 1, -527106048, 1620377600, 2, 0, + (long *)_vq_quantlist__44p1_p5_0, + 0 +}; + +static const long _vq_quantlist__44p1_p5_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p1_p5_1[] = { + 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 8, 8, 8, + 7, 7, 8, 8, 8, 9, 8, 8, 9, 7, 7, 6, 6, 6, 9, 8, + 7, 9, 7, 7, 9, 8, 8,10, 8, 8,10, 8, 8,10, 8, 8, + 10, 8, 8,10, 8, 8, 7, 6, 6, 9, 6, 6, 9, 7, 7, 9, + 7, 7,10, 8, 8, 9, 6, 6, 9, 7, 7,10, 8, 8, 9, 7, + 7, 7, 8, 8,11, 9, 9,11, 9, 9,11, 8, 9,12, 9, 9, + 12, 8, 8,11, 9, 9,12, 9, 9,12, 8, 8, 8, 7, 7,10, + 9, 9,10,10, 9,10, 9, 9,11,10,10,11, 9, 9,11, 9, + 9,11,10,11,11, 9, 9,10, 8, 8,11, 9, 9,10, 9, 9, + 11, 9, 9,11,10,10,11, 9, 9,11, 9, 9,11,10,10,11, + 9, 9, 9, 8, 8,11, 9, 9,12, 9, 9,11, 9, 9,12, 9, + 9,12, 8, 8,12, 9, 9,12, 9, 9,12, 8, 8, 9, 7, 7, + 11, 9, 9,11,10,10,11, 9, 9,11,11,11,11, 9, 9,11, + 10,10,11,11,11,11, 9, 9,10, 9, 9,11, 9, 9,11,10, + 10,11, 9, 9,11,10,10,11, 9, 9,11, 9,10,11,10,10, + 11, 9, 9, +}; + +static const static_codebook _44p1_p5_1 = { + 5, 243, + (char *)_vq_lengthlist__44p1_p5_1, + 1, -530841600, 1616642048, 2, 0, + (long *)_vq_quantlist__44p1_p5_1, + 0 +}; + +static const long _vq_quantlist__44p1_p6_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p1_p6_0[] = { + 1, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, +}; + +static const static_codebook _44p1_p6_0 = { + 5, 243, + (char *)_vq_lengthlist__44p1_p6_0, + 1, -516716544, 1630767104, 2, 0, + (long *)_vq_quantlist__44p1_p6_0, + 0 +}; + +static const long _vq_quantlist__44p1_p6_1[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p1_p6_1[] = { + 1, 3, 2, 5, 4, 7, 7, 8, 8, 9, 9,10,10,11,11,12, + 12,13,13,13,14,16,16,16,16, +}; + +static const static_codebook _44p1_p6_1 = { + 1, 25, + (char *)_vq_lengthlist__44p1_p6_1, + 1, -518864896, 1620639744, 5, 0, + (long *)_vq_quantlist__44p1_p6_1, + 0 +}; + +static const long _vq_quantlist__44p1_p6_2[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p1_p6_2[] = { + 3, 4, 4, 5, 4, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44p1_p6_2 = { + 1, 25, + (char *)_vq_lengthlist__44p1_p6_2, + 1, -529006592, 1611661312, 5, 0, + (long *)_vq_quantlist__44p1_p6_2, + 0 +}; + +static const char _huff_lengthlist__44p1_short[] = { + 4, 5, 7, 8,10,13,14, 4, 2, 4, 6, 8,11,12, 7, 4, + 3, 5, 8,12,14, 8, 5, 4, 4, 8,12,12, 9, 7, 7, 7, + 9,10,11,13,11,11, 9, 7, 8,10,13,11,10, 6, 5, 7, + 9, +}; + +static const static_codebook _huff_book__44p1_short = { + 2, 49, + (char *)_huff_lengthlist__44p1_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p2_l0_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44p2_l0_0[] = { + 1, 4, 4, 7, 7, 8, 8, 9, 9,10,10,11,11, 4, 6, 5, + 8, 7, 9, 8,10, 9,11,10,11,11, 4, 5, 6, 7, 8, 8, + 9, 9,10,10,10,10,11, 8, 9, 8,10, 8,10, 9,11,10, + 11,11,11,11, 8, 8, 9, 8,10, 9,10,10,11,11,11,11, + 11, 9,10,10,11,11,11,11,11,11,12,11,12,11, 9,10, + 10,10,11,11,11,11,11,11,12,11,12,10,11,11,12,11, + 12,12,12,12,12,12,12,12,10,11,11,11,11,12,12,12, + 13,12,12,12,12,11,12,12,12,12,13,13,12,12,12,12, + 12,12,11,12,12,12,12,13,13,12,13,12,12,12,12,12, + 13,13,13,13,13,13,12,13,12,13,12,12,12,13,13,13, + 13,13,13,13,12,13,12,12,12, +}; + +static const static_codebook _44p2_l0_0 = { + 2, 169, + (char *)_vq_lengthlist__44p2_l0_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44p2_l0_0, + 0 +}; + +static const long _vq_quantlist__44p2_l0_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p2_l0_1[] = { + 2, 4, 4, 5, 5, 4, 5, 5, 6, 5, 4, 5, 5, 5, 6, 5, + 5, 6, 6, 6, 5, 6, 5, 6, 6, +}; + +static const static_codebook _44p2_l0_1 = { + 2, 25, + (char *)_vq_lengthlist__44p2_l0_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p2_l0_1, + 0 +}; + +static const long _vq_quantlist__44p2_l1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p2_l1_0[] = { + 1, 4, 4, 4, 4, 4, 4, 4, 4, +}; + +static const static_codebook _44p2_l1_0 = { + 2, 9, + (char *)_vq_lengthlist__44p2_l1_0, + 1, -516716544, 1630767104, 2, 0, + (long *)_vq_quantlist__44p2_l1_0, + 0 +}; + +static const char _huff_lengthlist__44p2_lfe[] = { + 1, 3, 2, 3, +}; + +static const static_codebook _huff_book__44p2_lfe = { + 2, 4, + (char *)_huff_lengthlist__44p2_lfe, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44p2_long[] = { + 3, 4, 9, 8, 8,10,13,16, 4, 2, 9, 5, 7,10,14,18, + 9, 7, 6, 5, 7, 9,12,16, 7, 5, 5, 3, 5, 8,11,13, + 8, 7, 7, 5, 5, 7, 9,11,10,10, 9, 8, 6, 6, 8,10, + 13,14,13,11, 9, 8, 9,10,17,18,16,14,11,10,10,10, +}; + +static const static_codebook _huff_book__44p2_long = { + 2, 64, + (char *)_huff_lengthlist__44p2_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p2_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p2_p1_0[] = { + 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, +}; + +static const static_codebook _44p2_p1_0 = { + 5, 243, + (char *)_vq_lengthlist__44p2_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44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 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, +}; + +static const static_codebook _44p2_p2_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p2_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p2_p2_0, + 0 +}; + +static const long _vq_quantlist__44p2_p3_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p2_p3_0[] = { + 1, 5, 5, 6, 7, 7, 0, 8, 8, 6, 9, 9, 8,11,11, 0, + 8, 8, 0, 9, 9, 0,12,12, 0, 8, 8, 5, 7, 7, 7,10, + 10, 0,12,12, 8,11,11, 9,12,12, 0,11,12, 0,12,12, + 0,15,15, 0,12,12, 0, 6, 6, 0, 6, 6, 0, 7, 7, 0, + 7, 7, 0,10,10, 0, 7, 7, 0, 8, 8, 0,11,11, 0, 7, + 7, 6, 7, 7,10, 9, 9, 0,11,10,10, 9, 9,12,12,12, + 0,10,10, 0,11,11, 0,13,13, 0,11,11, 7, 6, 6,10, + 10,10, 0,11,11,11,11,11,12,12,12, 0,11,11, 0,12, + 12, 0,15,15, 0,11,11, 0,11,11, 0,11,11, 0,12,12, + 0,12,12, 0,14,14, 0,12,12, 0,12,12, 0,15,15, 0, + 11,11, 0, 8, 8, 0,10,10, 0,11,11, 0,11,11, 0,12, + 12, 0,12,12, 0,11,11, 0,15,15, 0,11,11, 0, 6, 6, + 0,10,10, 0,12,12, 0,10,10, 0,13,13, 0,12,12, 0, + 13,13, 0,14,14, 0,12,12, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, +}; + +static const static_codebook _44p2_p3_0 = { + 5, 243, + (char *)_vq_lengthlist__44p2_p3_0, + 1, -533200896, 1614282752, 2, 0, + (long *)_vq_quantlist__44p2_p3_0, + 0 +}; + +static const long _vq_quantlist__44p2_p3_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p2_p3_1[] = { + 2, 3, 3, 0, 8, 8, 0, 8, 8, 0, 9, 9, 0, 9, 9, 0, + 9, 9, 0, 9, 9, 0, 9, 9, 0, 8, 8, 0, 6, 6, 0, 7, + 7, 0, 7, 7, 0, 8, 8, 0, 8, 8, 0, 8, 8, 0, 8, 8, + 0, 8, 8, 0, 8, 8, 0, 6, 6, 0, 6, 6, 0, 6, 6, 0, + 8, 8, 0, 9, 9, 0, 7, 7, 0, 8, 8, 0, 9, 9, 0, 6, + 6, 0, 8, 8, 0, 9, 9, 0, 9, 9, 0,10,10, 0,10,10, + 0,10,10, 0,10,10, 0,11,11, 0, 9, 9, 0, 7, 7, 0, + 10,10, 0,10,10, 0,12,11, 0,12,12, 0,11,11, 0,11, + 11, 0,12,12, 0,10,10, 0, 7, 7, 0,10,10, 0,10,10, + 0,12,12, 0,11,12, 0,11,11, 0,11,11, 0,11,11, 0, + 10,10, 0, 8, 8, 0, 9, 9, 0, 9, 9, 0,10,10, 0,10, + 10, 0,10, 9, 0,10,10, 0,10,10, 0, 9, 9, 0, 6, 6, + 0,10,10, 0,10,10, 0,11,11, 0,12,12, 0,11,11, 0, + 11,11, 0,12,12, 0,11,11, 0, 7, 7, 0, 9, 9, 0, 9, + 9, 0,11,11, 0,11,11, 0,10,10, 0,10,10, 0,11,11, + 0, 9, 9, +}; + +static const static_codebook _44p2_p3_1 = { + 5, 243, + (char *)_vq_lengthlist__44p2_p3_1, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p2_p3_1, + 0 +}; + +static const long _vq_quantlist__44p2_p4_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p2_p4_0[] = { + 1, 6, 6, 6, 7, 7, 7, 8, 8, 7, 8, 8,10,11,11, 9, + 8, 8, 7, 8, 8,11,11,11, 9, 8, 8, 6, 7, 7, 9,11, + 11, 9,11,11,10,11,11,12,13,13,11,12,12,10,11,11, + 13,14,14,12,12,12, 6, 6, 6, 8, 6, 6, 8, 7, 7, 9, + 7, 7,11,10,10,10, 6, 6, 9, 7, 7,12,10,10,11, 6, + 7, 7, 7, 7,11,10,10,12,10,10,11,10,10,14,13,13, + 13,10,10,12,11,11,15,13,13,14,10,10, 8, 7, 7,12, + 11,11,12,11,11,11,11,11,14,14,14,13,12,12,12,11, + 11,15,15,15,13,12,12, 0,10,10, 0,11,11, 0,11,11, + 0,11,11, 0,14,14, 0,11,11, 0,11,11, 0,15,15, 0, + 11,11, 7, 8, 8,12,10,10,12,10,10,12,11,11,15,13, + 13,14,11,11,12,10,10,16,14,14,14,10,10, 8, 7, 7, + 12,11,11,12,11,11,12,11,11,16,14,14,14,12,12,13, + 12,12,15,14,14,15,12,12, 0,11,11, 0,12,12, 0,12, + 12, 0,12,12, 0,15,15, 0,12,12, 0,12,12, 0,14,14, + 0,12,12, +}; + +static const static_codebook _44p2_p4_0 = { + 5, 243, + (char *)_vq_lengthlist__44p2_p4_0, + 1, -531365888, 1616117760, 2, 0, + (long *)_vq_quantlist__44p2_p4_0, + 0 +}; + +static const long _vq_quantlist__44p2_p4_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p2_p4_1[] = { + 3, 4, 4, 8, 8,11, 9, 9,12,12,11,10,10,12,12,12, + 10,10,11,11,12,12,12,12,12,12,11,11,13,13,12,12, + 12,13,13,12,10,10,12,12,12,11,11,13,13,12,13,13, + 13,13,12,11,11,13,13,12,12,12,13,13,12,10,10,12, + 12,12,11,11,13,13,12,13,13,12,12,12,11,11,13,13, + 12,13,13,13,13,12,11,11,12,12,12,11,11,12,12,12, + 13,13,12,12,12,13,13,13,13,12,13,13,13,13,13,13, + 13,12,12,12,13,13,13,13,12,13,13,12,12,11, 8, 8, + 10,10,12,11,11,11,11,12,10,10,10,10,13,11,11,10, + 10,13,11,11,10,10,13,12,12,12,12,13,11,11,11,11, + 13,12,12,11,11,13,12,12,11,11,13,12,12,12,11,13, + 12,12,12,12,13,11,11,11,11,13,12,12,11,11,13,11, + 12,11,11,13,12,12,11,11,14,12,12,11,11,13,11,11, + 11,11,14,12,12,11,11,13,11,12,10,10,14,12,12,11, + 11,14,12,12,11,11,14,11,11,11,11,14,12,12,11,11, + 13,12,12,11,11,14,12,12,11,11,11, 8, 8,10,10,12, + 7, 7,10,10,12, 9, 9,11,11,13, 9, 9, 9, 9,13,13, + 13,10,10,13, 9, 9,12,12,13,13,13,12,12,13, 9, 8, + 11,11,13,10,10,12,12,14,13,13,11,11,13, 9, 9,11, + 11,13,13,13,12,12,13, 9, 9,10,10,13,10,10,11,11, + 13,13,13,10,10,14,10,10,11,11,14,14,14,12,12,13, + 9, 9,10,10,13,10,10,11,11,14,13,14,10,10,14,14, + 14,11,12,14,14,14,14,14,14,13,13,10,10,13,14,14, + 11,11,14,14,14,10,10,14, 9, 9, 9, 9,14, 9, 9, 9, + 9,14,10,10, 9, 9,14,10,10, 8, 8,14,11,11, 8, 8, + 15,11,11,10,10,15,12,12,10,10,15,10,10,10,10,15, + 11,11,10,10,15,13,13,10,10,15,11,11,10,10,15,12, + 12,10,10,15,10,10,10,10,15,11,11,10,10,15,13,13, + 10,10,15,11,11,10,10,15,12,12,10,10,15,11,11, 9, + 9,15,11,11, 9, 9,15,13,13, 9, 9,15,13,13,10,10, + 15,12,12,10,10,15,13,13,10,10,15,13,12, 9, 9,15, + 13,13, 9, 9,14,12,12, 9, 9,14,13,13, 9, 9,14,13, + 13, 9, 9,14,13,13, 7, 7,14,13,13, 8, 8,15,14,14, + 10,10,15,14,14,10,10,15,14,14,10,10,15,14,14,10, + 10,15,14,14, 9, 9,15,14,14,10,10,15,14,14,10,10, + 14,14,14, 9, 9,15,14,14,10,10,14,14,14, 9, 9,15, + 14,14,10,10,15,14,14,10,10,14,14,14, 9, 9,14,14, + 14, 9, 9,14,14,14, 8, 8,15,14,14,10,10,15,14,14, + 11,11,15,14,14, 9, 9,15,14,14, 9, 9,14,14,14, 8, + 8,13, 9, 9,12,12,17,11,11,12,12,17,12,12,12,12, + 17,12,12,11,11,18,15,15,12,12,17,12,12,12,12,17, + 14,15,13,13,17,12,12,12,12,17,13,13,12,13,17,15, + 15,12,12,18,13,13,13,13,18,15,15,13,13,18,12,12, + 12,12,18,13,13,13,13,18,15,15,12,12,18,13,13,12, + 12,18,15,15,13,13,18,13,13,12,12,17,13,13,12,12, + 17,15,15,12,12,18,15,15,13,13,18,15,15,13,14,18, + 15,16,12,12,18,15,15,12,12,18,16,16,12,12,13, 8, + 8,10,10,14,15,14,11,11,14,15,15,12,12,15,14,14, + 12,11,15,15,15,12,12,15,15,15,12,12,15,15,15,13, + 13,15,15,15,12,12,15,15,15,13,13,15,15,15,13,13, + 15,15,15,13,13,15,15,16,13,13,15,15,15,12,12,15, + 15,15,13,13,15,15,15,13,13,15,15,15,13,13,15,15, + 15,13,13,15,15,14,12,12,15,15,15,12,12,16,15,14, + 12,12,16,15,15,13,13,16,16,16,13,13,16,15,15,12, + 12,15,15,15,13,13,15,15,15,12,12,13,12,12,10,10, + 14,14,14,11,11,15,14,14,12,12,15,14,14,11,11,15, + 14,14,11,11,15,15,15,13,13,15,14,14,13,13,15,15, + 15,12,12,15,14,15,13,13,16,15,15,12,12,15,15,15, + 13,13,16,14,14,13,13,15,15,15,12,12,15,15,15,13, + 13,16,15,15,12,12,16,15,15,12,12,16,14,14,13,13, + 15,15,15,11,11,15,15,15,12,12,16,15,15,11,11,16, + 15,15,13,13,16,14,15,14,14,16,15,15,12,12,16,15, + 14,12,12,16,15,15,12,12,14,10,10, 9, 9,14,11,11, + 12,12,14,12,12,13,13,14,12,12,12,12,15,14,14,13, + 13,15,13,13,14,14,15,14,14,15,15,15,12,12,13,13, + 15,13,13,14,14,15,14,14,13,13,15,13,13,13,14,15, + 14,14,15,15,15,12,12,13,13,15,13,13,14,14,15,14, + 14,13,13,15,13,13,14,14,15,14,14,15,15,15,13,13, + 12,12,15,13,13,13,13,15,14,14,13,12,15,15,15,14, + 15,15,15,14,20,20,15,14,14,13,13,15,14,14,13,13, + 15,14,14,13,13,14,12,12, 9, 9,14,14,14,12,12,14, + 13,13,12,13,14,14,14,12,12,15,14,14,12,12,15,14, + 14,14,13,15,14,14,14,14,15,14,14,13,13,15,14,14, + 13,13,15,15,15,14,14,15,14,14,13,13,15,14,14,14, + 14,15,14,14,13,13,15,14,14,13,13,15,15,15,15,14, + 15,15,15,13,13,15,14,14,14,14,15,14,14,13,13,15, + 14,14,13,13,14,15,15,14,14,15,15,15,14,14,15,14, + 14,14,14,15,15,15,14,14,15,14,14,13,14,15,15,15, + 14,14,13,10,10,12,12,17,11,11,12,12,17,12,12,12, + 12,17,12,12,11,11,17,15,15,12,11,18,13,13,13,13, + 18,15,15,13,13,17,12,12,12,12,18,13,13,13,13,17, + 15,15,12,12,17,12,12,12,12,17,15,15,13,13,17,12, + 12,12,12,17,13,13,12,12,17,15,15,12,12,18,14,13, + 12,12,18,15,15,13,13,18,13,13,12,12,18,13,13,12, + 12,18,16,16,12,12,18,16,16,12,12,18,15,15,13,13, + 18,16,16,12,12,17,15,15,12,12,17,16,16,12,12,13, + 8, 8,10,10,14,14,15,12,12,14,15,15,12,12,15,14, + 14,12,12,15,15,14,12,12,15,15,15,13,13,15,15,15, + 13,13,15,15,15,12,12,16,15,15,13,13,16,15,15,13, + 13,15,15,15,12,12,15,15,15,14,14,15,15,15,12,12, + 15,15,15,13,13,16,15,15,13,13,15,15,15,13,13,16, + 15,15,13,13,15,15,14,12,12,15,15,15,12,12,16,14, + 15,13,13,16,15,15,13,13,15,16,15,13,13,16,15,14, + 13,13,16,15,15,13,13,16,15,15,13,13,13,12,12,11, + 11,14,14,14,11,11,14,14,14,12,12,15,14,14,11,11, + 16,14,14,11,11,15,15,15,12,13,16,14,14,13,13,15, + 15,15,12,12,15,14,14,13,13,16,15,15,12,12,15,15, + 15,12,12,15,14,14,13,13,15,15,15,12,12,15,14,14, + 12,12,16,15,15,12,12,16,15,15,12,12,16,14,14,13, + 13,15,15,15,11,11,15,15,14,12,12,16,15,15,11,11, + 16,15,15,12,12,16,14,14,13,13,16,15,15,11,11,16, + 14,14,12,12,16,15,15,11,11,14,10,10, 9, 9,14,11, + 11,12,12,14,12,12,13,14,14,12,12,12,12,14,14,14, + 13,13,15,13,13,14,14,15,14,14,15,15,15,12,12,13, + 13,15,13,13,14,14,15,15,15,14,14,15,13,13,14,14, + 15,15,15,15,15,15,12,12,13,13,15,13,13,14,14,15, + 14,14,13,13,15,13,13,14,14,15,14,14,15,15,15,12, + 12,13,13,15,13,13,13,13,14,14,14,13,13,15,15,15, + 14,15,15,15,15,21,19,15,14,14,13,13,15,14,14,14, + 14,14,14,14,13,13,14,12,12, 9, 9,14,14,14,12,12, + 14,14,13,13,13,14,14,14,12,12,14,14,14,12,12,15, + 14,14,13,13,15,14,14,14,14,15,14,14,13,13,15,14, + 14,13,13,15,15,15,15,15,15,14,14,13,13,15,14,14, + 14,14,15,14,14,13,13,15,14,14,13,13,14,15,15,15, + 15,15,14,15,13,13,15,14,14,14,14,15,14,14,13,13, + 15,14,14,13,13,14,15,15,14,14,15,15,15,14,14,15, + 14,14,14,14,15,15,15,15,15,15,14,14,14,13,14,15, + 15,14,14,13,10,10,12,12,18,12,12,12,12,17,12,12, + 12,12,18,13,13,11,11,18,15,14,11,11,17,13,13,13, + 13,18,15,15,12,12,18,12,12,12,12,17,13,13,12,12, + 18,15,15,12,12,18,13,13,13,12,18,15,15,13,13,18, + 13,13,12,12,18,13,13,12,12,18,15,15,12,12,17,13, + 13,12,12,17,15,15,12,12,17,12,12,11,11,17,13,13, + 11,11,17,15,15,11,11,18,16,16,12,12,18,15,15,13, + 13,18,15,15,11,11,17,15,15,12,12,18,15,15,11,11, + 13, 8, 8,10,10,14,14,14,11,11,15,15,15,12,12,15, + 14,14,11,11,16,14,14,12,12,15,15,15,12,12,15,15, + 15,13,13,15,15,15,12,12,15,15,15,12,12,16,15,15, + 13,13,15,15,15,12,12,15,15,15,13,13,16,15,15,12, + 12,15,15,15,12,12,16,15,15,13,13,16,15,15,12,12, + 15,15,15,13,13,15,14,14,12,12,15,15,15,12,12,16, + 15,14,12,12,16,15,15,13,13,16,16,16,13,13,16,14, + 15,13,13,15,15,15,13,13,16,15,15,12,12,13,12,12, + 10,10,14,14,14,11,11,15,14,14,12,12,15,14,14,11, + 11,16,14,14,11,11,15,14,15,12,12,15,14,14,13,13, + 15,15,15,12,12,15,14,14,12,12,15,14,15,12,12,15, + 15,15,12,12,16,14,14,13,13,15,15,15,11,12,16,14, + 14,12,12,16,15,15,12,12,15,15,15,12,12,16,14,14, + 12,12,15,15,15,11,11,15,14,14,11,12,15,15,14,11, + 11,16,15,15,12,12,16,14,14,13,13,16,15,15,11,11, + 16,14,14,12,12,16,15,15,11,11,13,10,10, 8, 8,14, + 12,12,12,12,14,12,12,13,13,14,12,12,12,12,14,14, + 14,13,13,15,13,13,14,14,15,15,14,15,15,15,13,13, + 13,13,15,13,13,14,14,15,14,15,14,14,15,13,13,13, + 13,15,15,15,15,15,15,12,12,13,12,15,13,13,14,14, + 15,14,14,13,13,15,13,13,14,13,15,15,15,16,16,15, + 13,13,12,12,15,13,13,13,13,14,14,14,12,12,15,15, + 15,14,14,15,15,15,20,20,15,14,14,13,13,15,15,14, + 14,14,15,14,14,13,13,13,12,12, 9, 9,14,13,13,12, + 12,14,13,13,12,12,14,14,14,12,12,14,14,14,13,13, + 15,14,14,13,13,15,14,14,14,14,15,15,14,12,12,15, + 14,14,13,13,15,14,15,14,15,15,14,14,13,13,15,14, + 14,14,14,15,14,14,12,12,15,14,14,13,13,14,15,14, + 15,14,15,14,14,13,13,15,14,14,14,14,15,14,14,12, + 12,15,14,14,13,13,15,15,15,14,14,15,15,15,14,14, + 16,14,14,14,14,15,15,15,14,14,15,14,14,14,14,14, + 15,15,14,14,13,13,13,12,13,17,15,15,12,12,17,15, + 15,12,12,18,15,15,11,11,17,16,16,11,11,18,16,16, + 13,13,18,17,16,13,13,18,16,16,12,12,18,16,16,12, + 12,18,17,17,12,12,17,16,16,12,13,17,16,16,12,13, + 17,16,16,12,12,17,16,16,12,12,18,17,16,12,12,18, + 16,16,12,12,17,16,17,12,12,18,15,15,11,11,18,15, + 15,12,12,17,17,17,11,11,17,17,17,12,12,17,16,16, + 13,13,18,16,16,11,11,18,16,16,12,12,18,17,16,11, + 11,14,14,14,10,10,16,15,14,11,11,16,15,15,12,12, + 16,14,14,12,12,17,14,14,13,13,17,15,15,13,13,17, + 15,15,14,14,16,15,15,12,12,16,15,15,13,13,18,15, + 15,14,14,16,15,15,12,12,16,15,15,14,14,16,15,15, + 12,12,16,15,15,13,13,17,15,15,13,13,17,15,15,13, + 13,17,15,15,14,14,16,14,14,12,12,17,15,15,12,12, + 18,15,15,13,13,17,15,15,14,14,17,16,16,15,15,17, + 15,14,13,13,17,15,15,14,14,17,15,15,13,13,14,12, + 12,11,11,15,14,14,12,12,16,14,14,12,12,16,14,14, + 11,11,17,14,14,12,12,16,15,14,13,13,16,14,14,13, + 13,16,15,15,12,12,16,14,14,13,13,17,15,15,13,13, + 16,15,15,13,13,17,14,14,13,13,16,15,15,12,12,16, + 14,14,12,12,16,15,15,12,12,17,15,15,12,12,17,14, + 14,13,13,16,15,15,12,12,16,14,14,12,12,16,15,15, + 12,12,17,15,15,13,13,17,14,14,13,13,17,15,15,12, + 12,17,14,14,12,12,17,15,15,12,12,14,14,14, 8, 8, + 14,14,14,13,13,14,15,15,14,14,14,14,14,14,14,15, + 15,15,19,19,15,15,15,14,14,15,15,16,20,19,15,15, + 15,14,14,15,16,16,15,15,15,15,15,19,19,15,15,15, + 14,14,15,16,16,19,20,15,15,15,14,14,15,15,15,15, + 15,15,15,15,19,19,15,15,15,15,15,15,15,16,19,20, + 15,14,15,14,14,15,15,15,15,15,15,15,15,20,19,15, + 15,15,21,19,15,16,16,20,20,15,15,14,19,19,15,15, + 16,20,21,15,15,15,20,19,13,12,12, 9, 9,14,14,14, + 12,12,14,13,13,13,13,14,14,14,13,13,15,14,14,20, + 19,15,14,14,14,13,15,14,14,19,19,15,15,14,13,13, + 15,14,14,14,14,15,15,15,19,20,15,14,14,13,13,15, + 14,14,20,19,14,15,14,13,13,15,14,14,14,13,15,15, + 15,19,20,15,15,14,14,14,15,14,14,21,19,15,15,15, + 13,13,15,14,14,14,14,14,15,15,20,20,15,15,15,21, + 20,15,14,14,19,20,15,15,15,20,20,15,14,14,19,20, + 15,15,15,21,19, +}; + +static const static_codebook _44p2_p4_1 = { + 5, 3125, + (char *)_vq_lengthlist__44p2_p4_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p2_p4_1, + 0 +}; + +static const long _vq_quantlist__44p2_p5_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p2_p5_0[] = { + 2, 6, 6,14,14, 6, 7, 7,14,14, 7, 7, 7,15,15, 0, + 13,13,16,16, 0,13,13,15,15, 7, 8, 8,15,15, 9,10, + 10,17,16, 9, 8, 8,15,15, 0,13,13,18,17, 0,13,13, + 16,16, 8, 8, 8,15,15,12,11,11,16,17, 9, 8, 8,14, + 14, 0,13,13,18,17, 0,13,13,16,15, 0,14,14,18,17, + 0,20,22,18,20, 0,12,12,16,16, 0,16,16,22,20, 0, + 14,14,16,16, 0,14,14,17,17, 0,22,22,22,19, 0,12, + 13,16,16, 0,17,17, 0, 0, 0,15,15,16,16, 5, 7, 7, + 13,13, 9, 9, 9,15,14,10,10,10,14,14, 0,21,21,18, + 17, 0,21,22,18,17, 9,10,10,14,14,12,12,12,17,17, + 12,10,10,14,14, 0,19,21,18,17, 0,20,22,18,18,11, + 10,10,14,14,14,13,13,18,17,12,11,11,14,14, 0,22, + 19,17,18, 0,20, 0,18,17, 0,22,21,17,17, 0, 0, 0, + 0, 0, 0,20,22,17,17, 0,22, 0,21,19, 0,22, 0,18, + 18, 0, 0,22,18,19, 0, 0, 0, 0, 0, 0,19,21,17,17, + 0, 0, 0,20,20, 0, 0, 0,18,18, 6, 6, 6,13,12, 8, + 6, 6,11,11, 8, 6, 6,13,13, 0, 9, 9,11,11, 0,11, + 11,14,14, 9, 7, 7,13,13,11, 9, 9,13,13,10, 6, 6, + 13,13, 0,10,10,14,14, 0,10,10,13,13, 9, 7, 7,13, + 14,13, 9, 9,13,13,10, 6, 6,13,12, 0,11,11,15,15, + 0,10,10,13,13, 0,12,12,15,15, 0,19, 0,17,17, 0, + 9, 9,13,13, 0,13,14,19,20, 0,11,11,13,13, 0,11, + 11,14,14, 0,19,20,17,18, 0,10,10,13,13, 0,15,15, + 21,19, 0,12,12,13,13, 0,10,10,12,13, 0,11,11,15, + 15, 0,11,11,15,15, 0,15,15,22, 0, 0,16,17,22, 0, + 0,11,11,15,15, 0,14,14,18,17, 0,11,11,15,16, 0, + 15,15,22,21, 0,16,16, 0,20, 0,12,12,16,15, 0,15, + 14,19,19, 0,11,11,16,16, 0,15,15,21, 0, 0,16,15, + 0, 0, 0,16,16,22,21, 0, 0, 0, 0, 0, 0,15,15,20, + 20, 0,18,18, 0, 0, 0,16,17, 0, 0, 0,17,17, 0,22, + 0, 0, 0, 0, 0, 0,15,15,21,22, 0,20,18, 0, 0, 0, + 18,17,22, 0, 0,10,10,12,11, 0,10,10,10,10, 0,11, + 11,12,12, 0,11,11, 9, 9, 0,13,13,12,12, 0,11,11, + 12,12, 0,13,13,12,12, 0,10,10,12,12, 0,13,12,13, + 13, 0,12,12,12,12, 0,11,11,12,12, 0,13,13,12,12, + 0,10,10,12,12, 0,13,13,13,14, 0,12,12,12,12, 0, + 13,14,14,14, 0,20,21,15,15, 0,12,11,12,12, 0,15, + 16,20,22, 0,13,12,11,11, 0,13,13,14,13, 0,20, 0, + 16,15, 0,12,12,12,12, 0,16,16,22,21, 0,13,13,12, + 12, 6, 7, 7,16,16,11, 9, 9,15,15,12, 9, 9,16,16, + 0,13,13,14,14, 0,14,14,16,17,10, 9, 9,16,16,14, + 12,12,16,16,12, 9, 9,15,15, 0,13,13,18,18, 0,13, + 13,15,16,12,10,10,17,18,15,12,12,17,17,13, 9, 9, + 16,16, 0,13,13,17,18, 0,14,14,16,16, 0,15,15,18, + 18, 0,22, 0,20,20, 0,12,12,16,16, 0,16,16,20,22, + 0,14,14,16,16, 0,15,14,18,18, 0, 0,22,19,21, 0, + 13,13,16,17, 0,17,17,22,22, 0,15,15,16,16, 7, 7, + 7,14,14,11,10,10,15,15,12,10,10,15,14, 0,22, 0, + 18,18, 0, 0,21,17,18,11,10,10,15,15,14,12,12,17, + 17,14,11,11,15,15, 0,22,20,18,18, 0, 0,20,18,17, + 12,10,10,16,16,17,14,14,19,18,14,11,11,15,15, 0, + 21,22,19,19, 0,21,22,18,18, 0,22, 0,19,21, 0, 0, + 0, 0, 0, 0,22,22,18,17, 0, 0, 0,21,20, 0,22,22, + 20,19, 0, 0,22,20,20, 0, 0, 0, 0, 0, 0,20,21,17, + 17, 0, 0,22,21,21, 0, 0, 0,18,18,10, 9, 9,14,14, + 13,10,10,13,13,13,10,11,14,14, 0,13,13,12,12, 0, + 15,15,16,16,13,10,10,15,15,15,12,12,14,14,15,10, + 10,14,15, 0,14,14,16,15, 0,14,14,15,15,13,10,10, + 15,15,18,13,13,15,15,15,10,10,14,15, 0,14,14,16, + 16, 0,14,14,15,15, 0,15,15,16,16, 0,22, 0,18,18, + 0,12,13,14,14, 0,17,17,22, 0, 0,14,14,14,14, 0, + 15,15,16,16, 0,22, 0,18,17, 0,13,13,14,14, 0,19, + 18,21,22, 0,15,15,14,14, 0,11,11,13,13, 0,12,12, + 16,16, 0,12,12,16,16, 0,15,16,21, 0, 0,16,17, 0, + 22, 0,12,12,16,16, 0,14,14,17,18, 0,11,11,16,16, + 0,15,15,21,22, 0,16,16, 0, 0, 0,12,12,16,16, 0, + 15,15, 0,19, 0,12,12,16,17, 0,16,16,22, 0, 0,16, + 16, 0,22, 0,17,17, 0,22, 0, 0, 0, 0, 0, 0,15,15, + 20,19, 0,18,18, 0, 0, 0,17,18, 0, 0, 0,17,17, 0, + 0, 0, 0, 0, 0, 0, 0,15,15, 0,22, 0,20,18, 0, 0, + 0,18,18,22,22, 0,11,11,14,14, 0,12,12,14,14, 0, + 12,12,15,15, 0,13,13,14,14, 0,14,14,17,16, 0,12, + 12,16,16, 0,14,14,16,16, 0,11,11,15,15, 0,13,13, + 16,16, 0,13,13,15,15, 0,12,12,15,15, 0,15,14,16, + 16, 0,11,11,15,15, 0,14,14,17,17, 0,13,13,15,15, + 0,15,15,17,17, 0, 0, 0,19,18, 0,13,12,15,15, 0, + 16,16, 0, 0, 0,14,14,15,15, 0,14,14,16,17, 0,22, + 0,18,18, 0,13,13,15,15, 0,17,17, 0, 0, 0,14,14, + 15,15, 8, 8, 8,16,16,12,10,10,16,16,13, 9, 9,16, + 16, 0,14,14,17,17, 0,14,14,17,16,12,10,10,18,17, + 14,11,11,18,18,14, 9,10,16,16, 0,13,13,18,19, 0, + 14,13,16,16,12, 9, 9,16,16,17,13,13,17,17,14, 9, + 9,15,15, 0,14,14,19,20, 0,13,13,15,15, 0,15,15, + 18,19, 0, 0,22,22,22, 0,13,13,17,17, 0,16,16,19, + 21, 0,14,14,16,16, 0,14,14,18,18, 0, 0, 0, 0, 0, + 0,13,13,16,16, 0,18,18, 0, 0, 0,15,15,16,16, 8, + 7, 7,14,14,12,10,10,15,15,13,10,10,15,14, 0,22, + 0,18,18, 0,22, 0,18,18,12,10,10,16,15,15,12,12, + 17,17,14,11,11,15,15, 0,20,21,19,18, 0, 0, 0,17, + 18,13,11,11,15,15,16,13,13,18,18,15,11,11,14,14, + 0,22,21,19,19, 0,21,22,18,18, 0,22,22,20,18, 0, + 0, 0, 0, 0, 0,22,19,17,17, 0, 0, 0,22,21, 0, 0, + 22,19,17, 0, 0,22,19,19, 0, 0, 0, 0, 0, 0,22,21, + 18,17, 0, 0, 0,22, 0, 0, 0, 0,19,19, 0,10,10,14, + 14, 0,11,11,15,14, 0,11,11,15,15, 0,14,14,15,14, + 0,15,15,16,16, 0,11,11,16,16, 0,13,13,16,16, 0, + 11,11,15,15, 0,14,14,17,16, 0,14,14,15,15, 0,11, + 11,16,16, 0,14,13,15,15, 0,11,11,15,15, 0,15,15, + 17,17, 0,14,14,15,14, 0,16,16,17,17, 0, 0,22,18, + 18, 0,13,13,15,15, 0,17,17,22, 0, 0,15,15,15,14, + 0,15,16,16,17, 0, 0,22,18,19, 0,13,13,15,15, 0, + 20,18,21, 0, 0,15,15,14,14, 0,11,11,13,13, 0,12, + 12,16,16, 0,12,12,16,15, 0,15,16,22,22, 0,17,17, + 0, 0, 0,12,12,16,16, 0,14,14,18,18, 0,11,11,16, + 16, 0,15,16,22,20, 0,16,16, 0,22, 0,12,12,16,16, + 0,15,15,18,20, 0,11,11,16,16, 0,15,15, 0, 0, 0, + 16,16, 0, 0, 0,17,17,22, 0, 0, 0, 0, 0, 0, 0,15, + 15, 0,21, 0,18,18, 0, 0, 0,17,16, 0, 0, 0,17,17, + 22,22, 0, 0, 0, 0, 0, 0,15,15,21, 0, 0,20,22, 0, + 0, 0,18,18, 0, 0, 0,12,12,15,15, 0,12,12,15,15, + 0,12,12,16,16, 0,13,13,15,15, 0,15,15,17,17, 0, + 13,12,16,16, 0,14,14,16,16, 0,12,11,16,16, 0,14, + 14,17,17, 0,14,14,16,16, 0,12,12,16,16, 0,15,15, + 17,16, 0,11,11,15,16, 0,14,14,17,17, 0,14,14,16, + 16, 0,15,15,18,18, 0, 0, 0,22,19, 0,13,13,15,16, + 0,16,17, 0, 0, 0,14,14,16,16, 0,15,15,18,17, 0, + 0, 0,20,20, 0,13,13,16,15, 0,17,17,22,22, 0,14, + 14,15,15, 0,11,11,16,16, 0,13,13,16,17, 0,13,13, + 17,18, 0,16,16,17,17, 0,17,17,18,18, 0,12,12,17, + 17, 0,16,15,18,18, 0,12,12,16,16, 0,16,16,18,18, + 0,15,15,17,17, 0,12,12,17,17, 0,16,16,19,18, 0, + 12,12,16,17, 0,16,16,19,19, 0,15,16,16,17, 0,16, + 16,19,17, 0, 0, 0,20,22, 0,13,13,16,16, 0,19,18, + 21, 0, 0,15,15,16,16, 0,16,16,18,18, 0, 0, 0,22, + 21, 0,14,14,16,16, 0,21,19,21,22, 0,16,16,16,16, + 0, 9, 9,14,14, 0,13,13,15,15, 0,14,14,15,15, 0, + 0,20,18,19, 0, 0,22,18,18, 0,12,12,15,15, 0,15, + 15,17,18, 0,14,13,14,14, 0,20, 0,18,18, 0,21, 0, + 18,17, 0,13,13,15,16, 0,17,17,18,18, 0,14,14,15, + 15, 0,22,22,20,19, 0,20,21,18,18, 0,20,22,19,19, + 0, 0, 0, 0, 0, 0,20,20,17,17, 0, 0,22,22,21, 0, + 22, 0,18,18, 0,20,22,19,19, 0, 0, 0, 0, 0, 0,21, + 21,17,18, 0, 0, 0,21,20, 0, 0,22,19,18, 0,18,18, + 15,15, 0,22,21,17,16, 0, 0,22,17,17, 0,20,22,18, + 18, 0, 0,22,20,20, 0,21,19,16,16, 0,21,21,18,18, + 0,19,19,17,17, 0, 0,22,19,19, 0,22,20,17,17, 0, + 21,19,16,16, 0,22,22,19,18, 0,19,20,16,16, 0,22, + 21,19,21, 0,21,22,17,18, 0,21,20,18,18, 0, 0, 0, + 19,20, 0,20,19,16,16, 0,22,22, 0, 0, 0,21,21,17, + 16, 0,22,20,19,18, 0, 0, 0,20,20, 0,20,19,16,16, + 0, 0, 0, 0, 0, 0,21,22,17,17, 0,11,11,13,13, 0, + 13,13,15,16, 0,13,13,16,16, 0,17,18,21, 0, 0,17, + 18, 0, 0, 0,12,12,15,16, 0,15,15,19,18, 0,12,12, + 16,16, 0,17,17,22, 0, 0,17,17, 0,22, 0,12,12,17, + 16, 0,16,16,19,20, 0,12,12,16,16, 0,17,17, 0, 0, + 0,17,17, 0,21, 0,17,16,22, 0, 0, 0, 0, 0, 0, 0, + 15,15,20,22, 0,20,18, 0, 0, 0,18,18, 0, 0, 0,17, + 17,21, 0, 0, 0, 0, 0, 0, 0,15,15,21,22, 0,19,20, + 22, 0, 0,19,18, 0, 0, 0,14,14,18,18, 0,16,16,22, + 20, 0,16,16,22,19, 0,17,17,20,22, 0,19,19, 0, 0, + 0,15,15,20, 0, 0,18,21, 0,20, 0,15,15,21,20, 0, + 18,17, 0, 0, 0,17,17, 0,22, 0,15,15,19,19, 0,19, + 18, 0, 0, 0,15,15,20, 0, 0,18,18,22,22, 0,17,17, + 0,20, 0,18,18, 0, 0, 0, 0,22, 0, 0, 0,15,15,19, + 20, 0,20,19, 0, 0, 0,17,17,20,21, 0,17,18,20,22, + 0, 0, 0, 0,22, 0,15,15,20,20, 0,22,20, 0, 0, 0, + 17,18,20, 0, 0,12,12,17,16, 0,14,14,17,17, 0,13, + 13,17,17, 0,16,16,18,18, 0,17,16,17,17, 0,13,13, + 17,17, 0,15,16,18,18, 0,13,13,16,16, 0,16,16,18, + 18, 0,16,16,17,16, 0,13,13,16,16, 0,17,17,18,17, + 0,12,12,15,16, 0,17,17,19,19, 0,16,16,16,16, 0, + 16,17,19,18, 0, 0, 0,21,22, 0,14,14,16,16, 0,18, + 18, 0,22, 0,16,16,16,16, 0,16,16,18,17, 0, 0, 0, + 21,20, 0,14,14,16,16, 0,21,22,22, 0, 0,16,16,16, + 16, 0, 9, 9,14,13, 0,13,14,15,16, 0,14,13,15,14, + 0,22, 0,18,18, 0,21, 0,17,18, 0,13,13,15,15, 0, + 15,16,18,17, 0,14,14,15,14, 0,20,22,18,18, 0,22, + 21,17,17, 0,13,13,15,15, 0,17,17,19,19, 0,14,14, + 14,14, 0, 0,22,18,18, 0, 0,22,17,17, 0, 0,22,19, + 20, 0, 0, 0, 0, 0, 0,21,20,17,16, 0, 0, 0,21,22, + 0, 0, 0,18,19, 0, 0, 0,18,18, 0, 0, 0, 0, 0, 0, + 22, 0,17,17, 0, 0, 0,20,22, 0, 0, 0,18,19, 0,18, + 19,16,16, 0,22,20,17,17, 0,22,22,17,18, 0,22,22, + 18,17, 0, 0,22,18,19, 0,20,20,17,18, 0, 0,22,19, + 18, 0,22,22,17,17, 0,22, 0,19,19, 0, 0,22,18,18, + 0,20,22,17,17, 0, 0,22,18,18, 0,19,20,17,17, 0, + 22, 0,20,19, 0,22,21,17,17, 0, 0, 0,18,18, 0, 0, + 0,22,19, 0,20, 0,17,17, 0,22, 0, 0,22, 0, 0,20, + 17,18, 0,22, 0,19,19, 0, 0, 0, 0,19, 0,19,21,17, + 17, 0, 0, 0, 0, 0, 0,20,21,17,16, 0,11,11,13,13, + 0,13,13,16,16, 0,13,13,15,16, 0,17,17,21,22, 0, + 17,18, 0, 0, 0,12,12,16,16, 0,15,15,18,18, 0,13, + 13,16,16, 0,17,16,21,21, 0,17,17, 0, 0, 0,13,13, + 16,16, 0,16,16,19,18, 0,13,13,16,16, 0,17,17, 0, + 22, 0,17,18,20,22, 0,17,18, 0, 0, 0, 0, 0, 0, 0, + 0,15,15,20, 0, 0,18,19, 0, 0, 0,17,17, 0, 0, 0, + 18,17,22, 0, 0, 0, 0, 0, 0, 0,15,16,21,20, 0,20, + 20, 0, 0, 0,18,19, 0, 0, 0,15,15,22,22, 0,17,16, + 20,22, 0,17,17,20,22, 0,18,18, 0,21, 0,19,18, 0, + 0, 0,16,16,20,20, 0,19,19,22, 0, 0,15,16,21,22, + 0,18,19,22, 0, 0,17,18, 0, 0, 0,16,16,22, 0, 0, + 19,19, 0,21, 0,15,16,20, 0, 0,18,18, 0,22, 0,18, + 17, 0, 0, 0,18,18, 0, 0, 0, 0, 0, 0, 0, 0,16,16, + 22,21, 0,20,21, 0, 0, 0,17,18,22, 0, 0,18,18, 0, + 0, 0, 0, 0, 0, 0, 0,16,16,20,19, 0,22,21, 0, 0, + 0,18,18,22,22, +}; + +static const static_codebook _44p2_p5_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p2_p5_0, + 1, -528744448, 1616642048, 3, 0, + (long *)_vq_quantlist__44p2_p5_0, + 0 +}; + +static const long _vq_quantlist__44p2_p5_1[] = { + 3, + 2, + 4, + 1, + 5, + 0, + 6, +}; + +static const char _vq_lengthlist__44p2_p5_1[] = { + 2, 3, 3, 3, 3, 3, 3, +}; + +static const static_codebook _44p2_p5_1 = { + 1, 7, + (char *)_vq_lengthlist__44p2_p5_1, + 1, -533200896, 1611661312, 3, 0, + (long *)_vq_quantlist__44p2_p5_1, + 0 +}; + +static const long _vq_quantlist__44p2_p6_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p2_p6_0[] = { + 1, 7, 7, 7, 8, 8, 7, 8, 8, 7, 9, 9,10,11,11, 9, + 8, 8, 7, 8, 9,11,11,11, 9, 8, 8, 6, 7, 7,10,10, + 10,10,10,10,10,10,10,14,14,14,12,11,11,10,11,11, + 15,14,14,13,11,11, 6, 6, 6, 8, 5, 5, 8, 7, 7, 8, + 7, 7,11,10,10, 9, 7, 7, 9, 7, 7,12,10,10,10, 7, + 7, 6, 8, 7,12,10,10,12,10,10,11,10,10,15,14,13, + 13,10,10,11,10,10,16,14,14,14,10,10, 7, 7, 7,12, + 11,11,12,11,11,11,11,11,16,14,14,13,12,12,11,11, + 11,17,15,15,14,12,12,10, 9, 9,13,11,11,13,11,11, + 12,11,11,16,14,13,14,11,11,12,11,11,17,15,14,14, + 11,11, 7, 8, 8,12,11,11,12,10,10,12,10,10,16,13, + 14,13,10,10,11,10,10,17,14,14,14,10,10, 7, 7, 7, + 12,11,11,12,11,11,12,11,11,15,14,15,14,12,12,12, + 11,11,17,15,15,14,12,12,10,10, 9,13,11,11,13,11, + 11,13,11,11,16,14,14,14,11,11,13,11,11,16,15,15, + 15,11,11, +}; + +static const static_codebook _44p2_p6_0 = { + 5, 243, + (char *)_vq_lengthlist__44p2_p6_0, + 1, -527106048, 1620377600, 2, 0, + (long *)_vq_quantlist__44p2_p6_0, + 0 +}; + +static const long _vq_quantlist__44p2_p6_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p2_p6_1[] = { + 2, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, 8, + 7, 7, 8, 8, 8, 9, 9, 9, 9, 8, 8, 6, 7, 7, 9, 8, + 8, 9, 7, 7, 9, 8, 8,10, 8, 8,10, 8, 8,10, 8, 8, + 10, 8, 9,10, 8, 8, 7, 6, 6, 8, 6, 6, 9, 6, 6, 9, + 7, 7,10, 8, 8, 9, 6, 6, 9, 7, 7,10, 9, 8, 9, 7, + 7, 7, 7, 7,11, 8, 8,11, 9, 9,10, 9, 9,12, 9, 9, + 12, 8, 8,11, 9, 9,12, 9, 9,12, 8, 8, 8, 7, 7,10, + 9, 9,10, 9, 9,10, 9, 9,11,10,11,11, 9, 9,11, 9, + 9,11,11,11,11, 9, 9,10, 8, 8,11, 9, 9,10, 9, 9, + 11, 9, 9,11,10,10,11, 9, 9,11, 9, 9,12,10,10,11, + 9, 9, 8, 8, 8,11, 9, 9,12, 9, 9,11, 9, 9,12, 9, + 9,12, 8, 8,12, 9, 9,12, 9,10,12, 8, 8, 9, 7, 7, + 11, 9, 9,11,10,10,11, 9, 9,11,11,11,11, 9, 9,11, + 10,10,12,11,11,11, 9,10,10, 9, 9,11, 9, 9,11,10, + 10,11,10,10,11,11,11,11, 9, 9,11, 9,10,11,11,11, + 11, 9, 9, +}; + +static const static_codebook _44p2_p6_1 = { + 5, 243, + (char *)_vq_lengthlist__44p2_p6_1, + 1, -530841600, 1616642048, 2, 0, + (long *)_vq_quantlist__44p2_p6_1, + 0 +}; + +static const long _vq_quantlist__44p2_p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p2_p7_0[] = { + 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, +}; + +static const static_codebook _44p2_p7_0 = { + 5, 243, + (char *)_vq_lengthlist__44p2_p7_0, + 1, -513979392, 1633504256, 2, 0, + (long *)_vq_quantlist__44p2_p7_0, + 0 +}; + +static const long _vq_quantlist__44p2_p7_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p2_p7_1[] = { + 1, 9, 9, 6, 9, 9, 5, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10, +}; + +static const static_codebook _44p2_p7_1 = { + 5, 243, + (char *)_vq_lengthlist__44p2_p7_1, + 1, -516716544, 1630767104, 2, 0, + (long *)_vq_quantlist__44p2_p7_1, + 0 +}; + +static const long _vq_quantlist__44p2_p7_2[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p2_p7_2[] = { + 1, 3, 2, 5, 4, 7, 7, 8, 8, 9, 9,10,10,11,11,12, + 12,13,13,14,14,15,15,15,15, +}; + +static const static_codebook _44p2_p7_2 = { + 1, 25, + (char *)_vq_lengthlist__44p2_p7_2, + 1, -518864896, 1620639744, 5, 0, + (long *)_vq_quantlist__44p2_p7_2, + 0 +}; + +static const long _vq_quantlist__44p2_p7_3[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p2_p7_3[] = { + 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44p2_p7_3 = { + 1, 25, + (char *)_vq_lengthlist__44p2_p7_3, + 1, -529006592, 1611661312, 5, 0, + (long *)_vq_quantlist__44p2_p7_3, + 0 +}; + +static const char _huff_lengthlist__44p2_short[] = { + 4, 4,12, 9, 8,12,15,17, 4, 2,11, 6, 5, 9,13,15, + 11, 7, 8, 7, 7,10,14,13, 8, 5, 7, 5, 5, 8,12,12, + 8, 4, 7, 4, 3, 6,11,12,11, 8, 9, 7, 6, 8,11,12, + 15,13,14,12, 9, 7,10,13,16,12,17,12, 7, 5, 8,11, +}; + +static const static_codebook _huff_book__44p2_short = { + 2, 64, + (char *)_huff_lengthlist__44p2_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p3_l0_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44p3_l0_0[] = { + 1, 4, 4, 8, 8, 8, 8, 9, 9,10,10,10,10, 4, 6, 5, + 8, 7, 9, 9, 9, 9,10, 9,11, 9, 4, 5, 6, 7, 8, 9, + 9, 9, 9, 9,10, 9,10, 8, 9, 8, 9, 8,10, 9,11, 9, + 12,10,12,10, 8, 8, 9, 8, 9, 9,10, 9,11,10,12,10, + 12, 9,10,10,11,10,12,11,12,11,12,12,12,12, 9,10, + 10,11,11,11,11,11,12,12,12,12,12,10,11,11,12,12, + 12,12,12,12,12,12,12,12,10,11,11,12,12,12,12,12, + 12,12,12,12,12,11,12,12,12,12,12,13,12,13,12,13, + 12,12,11,12,12,12,12,12,12,13,12,12,12,12,12,12, + 12,12,13,13,12,13,12,13,12,13,12,12,12,13,12,13, + 12,13,12,13,12,13,12,12,12, +}; + +static const static_codebook _44p3_l0_0 = { + 2, 169, + (char *)_vq_lengthlist__44p3_l0_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44p3_l0_0, + 0 +}; + +static const long _vq_quantlist__44p3_l0_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p3_l0_1[] = { + 3, 4, 4, 5, 5, 4, 4, 5, 5, 5, 4, 5, 4, 5, 5, 5, + 5, 6, 5, 6, 5, 6, 5, 6, 5, +}; + +static const static_codebook _44p3_l0_1 = { + 2, 25, + (char *)_vq_lengthlist__44p3_l0_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p3_l0_1, + 0 +}; + +static const long _vq_quantlist__44p3_l1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p3_l1_0[] = { + 1, 4, 4, 4, 4, 4, 4, 4, 4, +}; + +static const static_codebook _44p3_l1_0 = { + 2, 9, + (char *)_vq_lengthlist__44p3_l1_0, + 1, -516716544, 1630767104, 2, 0, + (long *)_vq_quantlist__44p3_l1_0, + 0 +}; + +static const char _huff_lengthlist__44p3_lfe[] = { + 1, 3, 2, 3, +}; + +static const static_codebook _huff_book__44p3_lfe = { + 2, 4, + (char *)_huff_lengthlist__44p3_lfe, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44p3_long[] = { + 3, 4,13, 9, 9,12,15,17, 4, 2,18, 5, 7,10,14,18, + 11, 8, 6, 5, 6, 8,11,14, 8, 5, 5, 3, 5, 8,11,13, + 9, 6, 7, 5, 5, 7, 9,10,11,10, 9, 8, 6, 6, 8,10, + 14,14,11,11, 9, 8, 9,10,17,17,14,13,10, 9,10,10, +}; + +static const static_codebook _huff_book__44p3_long = { + 2, 64, + (char *)_huff_lengthlist__44p3_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p3_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p3_p1_0[] = { + 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, +}; + +static const static_codebook _44p3_p1_0 = { + 5, 243, + (char *)_vq_lengthlist__44p3_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p3_p1_0, + 0 +}; + +static const long _vq_quantlist__44p3_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p3_p2_0[] = { + 3, 7, 7, 0, 0, 0, 8, 8, 0, 0, 0, 8, 8, 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0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, +}; + +static const static_codebook _44p3_p2_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p3_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p3_p2_0, + 0 +}; + +static const long _vq_quantlist__44p3_p3_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p3_p3_0[] = { + 1, 5, 5, 5, 8, 8, 0, 8, 8, 6, 9, 9, 8,10,10, 0, + 8, 8, 0, 9, 9, 0,12,12, 0, 8, 8, 4, 7, 7, 6,10, + 10, 0,12,12, 7,11,11, 9,12,12, 0,12,12, 0,13,13, + 0,15,15, 0,12,12, 0, 7, 7, 0, 7, 7, 0, 8, 8, 0, + 8, 8, 0,10,10, 0, 7, 7, 0, 8, 8, 0,11,11, 0, 7, + 7, 5, 7, 7, 9, 9, 9, 0,11,10, 9, 9, 9,11,12,12, + 0,10,10, 0,11,11, 0,13,13, 0,11,11, 6, 7, 7, 9, + 10,10, 0,12,12,10,11,11,11,12,12, 0,12,12, 0,13, + 13, 0,15,15, 0,12,12, 0,10,10, 0,11,11, 0,11,11, + 0,12,12, 0,13,13, 0,11,11, 0,12,12, 0,15,15, 0, + 11,11, 0, 8, 8, 0,10,10, 0,12,12, 0,11,11, 0,12, + 12, 0,12,12, 0,12,12, 0,15,15, 0,11,11, 0, 7, 7, + 0,10,10, 0,12,12, 0,10,10, 0,12,13, 0,12,12, 0, + 13,13, 0,14,14, 0,12,12, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, +}; + +static const static_codebook _44p3_p3_0 = { + 5, 243, + (char *)_vq_lengthlist__44p3_p3_0, + 1, -533200896, 1614282752, 2, 0, + (long *)_vq_quantlist__44p3_p3_0, + 0 +}; + +static const long _vq_quantlist__44p3_p3_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p3_p3_1[] = { + 3, 4, 4, 0, 8, 8, 0, 8, 8, 0, 9, 9, 0,10,10, 0, + 8, 8, 0, 9, 9, 0,10,10, 0, 8, 8, 0, 7, 7, 0, 8, + 8, 0, 8, 8, 0, 8, 8, 0, 8, 8, 0, 8, 8, 0, 8, 8, + 0, 8, 8, 0, 8, 8, 0, 7, 7, 0, 6, 6, 0, 7, 7, 0, + 7, 7, 0,10,10, 0, 6, 6, 0, 7, 7, 0,10,10, 0, 6, + 5, 0, 8, 8, 0, 7, 7, 0, 8, 8, 0, 8, 8, 0, 9, 9, + 0, 7, 7, 0, 8, 8, 0, 9, 9, 0, 7, 7, 0, 6, 6, 0, + 9,10, 0,10,10, 0,10,10, 0,11,11, 0, 9, 9, 0,10, + 10, 0,11,11, 0, 9, 9, 0, 8, 8, 0, 8, 8, 0, 8, 8, + 0, 9, 9, 0, 9, 9, 0, 8, 8, 0, 8, 8, 0, 9, 9, 0, + 7, 7, 0, 8, 8, 0, 7, 7, 0, 7, 7, 0, 8, 8, 0, 9, + 9, 0, 7, 7, 0, 7, 7, 0, 9, 9, 0, 6, 6, 0, 6, 6, + 0,10,10, 0,10,10, 0,10,10, 0,12,12, 0, 9, 9, 0, + 10,10, 0,12,12, 0, 9, 9, 0, 8, 8, 0, 7, 7, 0, 8, + 8, 0, 8, 8, 0, 9, 9, 0, 7, 7, 0, 8, 8, 0, 9, 9, + 0, 7, 7, +}; + +static const static_codebook _44p3_p3_1 = { + 5, 243, + (char *)_vq_lengthlist__44p3_p3_1, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p3_p3_1, + 0 +}; + +static const long _vq_quantlist__44p3_p4_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p3_p4_0[] = { + 1, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8,10,11,11, 9, + 8, 8, 8, 8, 8,11,11,11,10, 8, 8, 5, 7, 7, 9,11, + 11,10,11,11,10,11,11,12,13,14,11,12,12,10,11,11, + 13,14,14,12,12,12, 5, 6, 6, 8, 6, 6, 8, 7, 7, 8, + 7, 7,11,10,10,10, 7, 7, 9, 7, 7,12,11,11,11, 7, + 7, 7, 7, 7,11,10,10,12,10,10,11,10,10,15,13,13, + 13,10,10,12,11,11,15,13,13,14,11,11, 7, 7, 7,11, + 11,11,12,11,11,12,11,11,14,14,14,14,12,12,12,12, + 12,16,15,15,14,12,12, 0,10,10, 0,11,11, 0,11,12, + 0,11,11, 0,14,14, 0,11,11, 0,12,12, 0,15,15, 0, + 11,11, 8, 8, 8,12,10,10,12,10,10,13,11,11,15,13, + 13,14,11,11,12,10,10,16,14,14,14,10,10, 8, 7, 7, + 12,11,11,13,11,11,12,11,11,15,14,14,14,12,12,13, + 12,12,15,14,14,15,12,12, 0,11,11, 0,12,12, 0,12, + 12, 0,12,12, 0,15,15, 0,12,12, 0,13,13, 0,14,15, + 0,12,12, +}; + +static const static_codebook _44p3_p4_0 = { + 5, 243, + (char *)_vq_lengthlist__44p3_p4_0, + 1, -531365888, 1616117760, 2, 0, + (long *)_vq_quantlist__44p3_p4_0, + 0 +}; + +static const long _vq_quantlist__44p3_p4_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p3_p4_1[] = { + 3, 4, 5, 8, 8,12,10,10,12,12,12,10,10,12,12,13, + 11,11,12,12,13,12,12,12,12,13,10,10,13,13,13,13, + 13,13,13,13,10,10,13,13,13,11,11,13,13,14,13,13, + 12,12,13,10,10,13,13,13,13,13,13,13,13,10,10,12, + 12,13,11,11,13,13,13,13,13,12,12,13,12,12,13,13, + 13,13,13,13,13,14,11,11,12,12,14,12,12,13,12,14, + 14,14,12,12,13,14,14,13,13,14,13,13,13,13,14,14, + 14,12,12,14,13,13,13,13,14,14,14,12,12,12, 8, 8, + 11,11,12,12,12,11,11,12,11,11,10,10,13,12,12,10, + 10,13,12,12,10,10,13,12,12,12,12,14,12,12,12,12, + 13,13,13,11,11,14,12,12,11,11,14,12,12,12,12,14, + 12,12,12,12,13,12,12,12,12,13,13,13,11,11,14,12, + 12,11,11,14,12,12,12,12,14,13,13,12,12,14,12,12, + 12,11,14,13,13,11,11,14,13,12,11,11,14,13,13,11, + 11,14,13,13,12,12,14,12,12,12,12,15,13,13,12,12, + 14,12,12,11,11,14,13,13,11,11,12, 9, 9,10,10,12, + 7, 7,11,11,12, 9, 9,12,12,13,10,10,10,10,14,14, + 14,11,11,13, 9, 9,12,12,14,14,14,12,12,13, 8, 8, + 11,11,14, 9, 9,12,12,14,14,14,11,11,13, 9, 9,12, + 12,14,14,14,12,12,14, 8, 8,11,11,14, 9, 9,12,12, + 14,14,14,11,11,14,10,10,12,12,14,14,14,13,13,14, + 9, 9,11,11,14,10,10,12,12,14,14,14,11,11,14,14, + 15,12,12,15,14,14,14,14,15,14,14,11,11,14,14,14, + 12,12,14,14,14,11,11,14,11,11,10,10,14,10,10,10, + 10,14,10,10,10,10,15,11,11, 9, 9,14,12,12, 9, 9, + 15,11,11,11,11,15,13,13,11,11,15,10,10,10,10,15, + 11,11,10,10,15,13,13,11,11,15,11,11,11,11,15,13, + 13,11,11,15,10,10,10,10,15,11,11,10,10,15,13,13, + 11,11,15,12,12,11,11,15,13,13,11,11,15,11,11,10, + 10,15,12,12,10,10,15,13,13,10,10,15,14,14,11,11, + 15,13,13,11,11,15,14,14,10,11,15,13,13,10,10,15, + 13,14,10,10,14,13,13,10,10,14,13,13,10,10,14,13, + 13,10,10,14,13,13, 9, 9,14,14,14, 9, 9,15,14,14, + 11,11,15,14,14,10,10,15,14,14,10,10,15,14,14,11, + 11,15,14,14,10,10,15,14,14,11,11,15,14,14,10,10, + 14,14,14,10,10,15,14,14,10,10,14,14,14,10,10,15, + 14,14,11,11,15,14,14,11,11,14,14,14,10,10,15,14, + 14,10,10,14,14,14, 9, 9,15,15,15,11,11,15,14,14, + 12,12,15,15,14,10,10,15,14,14,10,10,14,15,15, 9, + 9,14,10,10,12,12,17, 9, 9,12,12,17,10,10,13,13, + 17,11,11,12,12,18,14,14,12,12,17,10,10,13,13,17, + 14,14,12,12,17, 9, 9,12,12,17,11,11,12,12,17,14, + 14,12,12,18,10,10,13,13,18,14,14,13,13,18, 9, 9, + 12,12,18,10,10,13,13,18,14,14,12,12,18,11,11,13, + 13,18,14,14,13,13,18,10,10,12,12,17,11,11,12,12, + 17,14,14,12,12,18,15,15,13,13,18,14,14,14,14,18, + 15,15,12,12,18,14,14,12,12,18,15,15,12,12,13, 7, + 7,11,11,14,15,15,11,11,14,15,15,12,12,14,15,15, + 11,11,15,15,15,11,11,14,15,15,12,12,14,15,15,12, + 12,14,15,15,11,11,14,15,15,11,11,15,15,15,12,12, + 14,15,15,12,12,14,15,15,12,12,14,15,15,11,11,14, + 15,15,11,11,15,15,15,12,12,15,15,15,12,12,14,15, + 15,12,12,14,15,14,12,12,14,15,15,11,11,15,14,14, + 12,12,15,15,15,12,12,15,16,16,12,12,15,15,15,12, + 12,15,15,15,12,12,15,15,15,12,12,13,13,13,11,10, + 14,14,15,11,11,14,14,14,12,12,15,14,14,10,10,15, + 15,15,11,11,14,15,15,12,12,14,14,14,11,11,14,15, + 15,11,11,14,15,15,12,12,15,15,15,11,11,14,15,15, + 12,12,14,14,14,12,12,14,15,15,11,11,14,15,15,12, + 12,15,15,15,11,11,15,15,15,12,12,15,14,14,12,12, + 14,15,15,11,11,14,15,15,11,11,15,15,15,10,10,15, + 15,16,12,12,15,15,15,14,14,15,15,15,11,11,15,15, + 15,12,12,15,15,15,11,11,14,11,11,10,10,15, 9, 9, + 12,12,15,10,10,12,12,15,11,11,11,11,15,14,14,12, + 12,15,10,10,13,13,15,14,14,12,12,15, 9, 9,12,12, + 15,10,10,13,13,15,13,13,12,11,15,10,10,12,12,15, + 14,14,12,12,15, 9, 9,11,11,15,11,11,12,12,15,13, + 13,11,11,15,11,11,13,13,15,13,14,13,14,15,11,11, + 11,11,15,11,11,12,12,15,14,14,11,11,15,14,14,13, + 13,15,14,14,20,20,15,14,14,12,12,15,14,14,12,12, + 15,14,14,11,11,14,13,13,10,10,14,13,13,12,12,14, + 14,13,12,12,15,14,14,12,12,15,14,14,11,11,15,14, + 14,12,12,15,14,14,13,13,15,14,14,12,11,15,14,14, + 11,11,15,14,14,13,13,15,14,14,12,12,15,14,14,13, + 13,15,14,14,12,11,15,14,14,12,12,15,14,14,13,13, + 15,14,14,13,13,15,14,14,12,12,15,14,14,12,12,15, + 14,14,12,12,15,15,15,13,13,15,15,15,13,13,15,14, + 14,13,13,15,15,15,13,13,15,14,15,12,12,15,15,15, + 13,13,14,10,10,12,13,17, 9, 9,12,12,17,10,10,13, + 13,17,11,11,12,12,18,14,14,12,12,18,10,10,13,13, + 18,14,14,12,12,17, 9, 9,12,12,18,10,11,13,13,18, + 14,14,12,12,17,10,10,12,12,17,14,14,12,12,17, 9, + 9,12,12,17,11,11,12,12,17,14,14,12,12,18,11,11, + 12,12,18,14,14,13,13,18,11,11,12,12,18,11,11,12, + 12,18,14,14,12,12,18,15,15,12,12,18,14,14,13,13, + 18,15,15,12,12,17,14,14,12,12,17,15,15,12,12,13, + 7, 7,11,11,14,15,15,11,11,14,15,15,11,11,14,15, + 14,12,12,15,15,15,12,11,14,15,15,12,12,14,15,15, + 12,12,14,15,15,11,11,14,15,15,11,11,15,15,15,13, + 13,14,15,15,11,11,14,15,15,13,12,14,15,15,11,11, + 14,15,15,11,11,15,15,15,13,13,14,15,15,12,12,15, + 15,15,12,12,15,15,15,11,11,15,15,15,11,11,15,15, + 15,12,12,15,15,15,13,13,15,16,16,12,12,15,15,15, + 12,13,15,15,15,12,12,15,15,15,12,12,13,13,13,11, + 11,14,14,14,11,11,14,14,14,12,12,14,14,14,10,10, + 15,14,14,11,11,14,15,15,12,12,14,14,14,12,12,14, + 15,15,11,11,14,15,14,12,12,15,14,14,11,11,14,15, + 15,12,12,14,14,14,11,11,14,15,15,11,11,14,14,14, + 12,12,15,15,14,11,11,15,15,15,12,12,15,14,14,12, + 12,14,15,15,11,11,14,15,14,11,11,15,15,15,10,10, + 15,15,15,12,12,15,14,14,14,13,15,15,15,11,11,15, + 15,15,11,11,15,15,15,10,10,14,11,11,10,10,15, 9, + 9,12,12,15,10,10,12,12,15,11,11,11,11,15,14,14, + 12,12,15,10,10,13,13,15,13,13,12,12,15, 9, 9,12, + 12,15,11,11,13,13,15,14,14,12,12,15,10,10,13,13, + 15,13,14,12,12,15, 9, 9,12,12,15,10,10,13,13,15, + 13,13,11,11,15,11,11,13,13,15,14,14,13,13,15,10, + 10,11,11,15,11,11,12,12,15,14,14,11,11,15,14,14, + 13,13,15,14,14,21,20,15,14,14,11,11,15,14,14,12, + 12,15,14,14,11,11,14,13,13,10,10,14,13,13,11,11, + 15,14,14,12,12,15,14,14,12,12,14,14,14,12,12,15, + 14,14,12,12,15,14,14,13,13,14,14,14,11,11,15,14, + 14,11,11,15,14,14,13,13,15,14,14,12,12,15,14,14, + 13,13,14,14,14,11,11,15,14,14,11,11,14,14,14,13, + 13,15,14,14,12,12,15,14,14,12,12,15,14,14,12,12, + 15,14,14,12,12,14,14,14,13,13,15,15,15,13,13,16, + 14,14,12,13,15,15,15,13,13,15,14,14,12,12,15,15, + 15,13,13,15,11,11,13,12,18,10,10,12,12,17,11,11, + 12,12,18,12,12,11,11,18,14,14,12,12,18,11,11,13, + 13,17,14,14,12,12,18,10,10,12,12,18,12,12,12,12, + 18,14,15,12,12,18,11,11,13,13,18,14,14,12,12,17, + 10,10,12,12,18,11,11,12,12,18,15,14,12,12,17,12, + 12,12,12,17,14,14,12,12,17,11,11,11,11,17,12,12, + 12,11,17,15,15,11,11,18,15,15,12,12,18,14,15,13, + 13,18,15,15,11,11,17,15,15,12,12,18,15,15,11,11, + 14, 9, 9,11,11,14,15,15,11,11,15,15,15,11,11,15, + 15,15,12,11,15,15,15,12,12,15,15,15,11,11,15,15, + 15,13,13,14,15,15,11,11,15,15,15,11,11,15,15,15, + 13,13,15,15,15,11,11,15,15,15,13,13,15,15,15,11, + 11,15,15,15,11,11,15,15,15,13,13,15,15,15,12,12, + 15,15,15,13,13,15,15,14,11,11,15,15,15,12,12,15, + 15,15,12,12,16,15,15,13,13,15,16,16,13,13,16,15, + 15,12,12,15,15,15,13,12,15,15,15,12,12,13,12,12, + 11,11,14,14,14,11,11,14,14,14,12,12,15,14,14,11, + 11,15,14,14,12,12,15,14,14,12,12,15,14,14,12,12, + 14,15,15,11,11,15,14,14,12,12,15,14,14,11,11,15, + 14,14,12,12,15,14,14,12,12,14,15,15,11,11,15,14, + 14,12,12,15,14,14,11,11,15,15,15,12,12,15,14,14, + 12,12,15,15,15,11,11,15,14,14,11,11,15,14,15,11, + 11,15,15,15,12,12,15,14,14,13,13,16,15,15,11,11, + 15,14,14,12,12,15,15,15,11,11,14,11,11, 9, 9,15, + 10,10,12,12,14,11,11,12,12,15,12,12,12,12,15,14, + 14,13,13,15,11,11,13,13,15,14,14,13,13,15,10,10, + 12,12,15,12,12,13,13,15,14,14,13,13,15,11,11,12, + 12,15,14,14,13,13,14,10,10,12,12,15,12,12,13,13, + 15,14,14,12,12,15,12,12,13,13,15,14,14,15,15,15, + 11,11,12,12,15,12,12,12,13,15,14,14,12,12,15,15, + 15,14,14,15,14,14,20,20,15,14,14,12,12,15,14,14, + 13,13,15,14,14,12,12,14,13,13,10,10,14,13,13,11, + 11,14,13,13,12,12,14,14,14,12,12,15,14,14,13,13, + 15,14,14,12,12,14,14,14,14,14,14,14,14,11,11,15, + 14,14,12,12,15,14,14,14,14,15,14,14,12,12,14,14, + 14,14,14,14,14,14,11,11,15,14,14,12,12,14,14,14, + 14,14,15,14,14,12,12,15,14,14,13,13,15,14,14,12, + 12,15,14,14,12,12,14,14,14,14,13,15,15,15,14,14, + 15,14,14,13,13,15,15,15,14,14,15,14,14,13,13,15, + 15,15,13,13,14,13,13,13,13,18,15,15,12,12,18,15, + 15,13,12,18,15,16,11,11,18,16,17,12,12,18,15,15, + 13,13,18,17,17,12,12,18,15,15,12,12,17,15,15,12, + 12,18,17,17,12,12,18,15,15,13,13,18,16,17,12,12, + 17,15,15,12,12,18,15,15,12,12,18,16,17,11,12,18, + 16,16,12,12,17,16,17,12,12,18,15,15,11,11,18,15, + 15,12,12,18,17,17,11,11,17,17,17,12,12,18,16,16, + 13,13,18,17,17,11,11,18,16,16,12,12,18,17,17,11, + 11,15,14,14,11,11,16,15,15,11,11,16,15,15,12,12, + 16,15,15,12,12,17,15,15,14,13,16,15,15,12,12,17, + 15,15,14,14,16,15,15,11,11,16,15,15,12,12,18,15, + 15,13,13,16,15,15,11,11,17,15,15,14,14,16,15,15, + 11,11,16,15,15,12,12,17,15,15,13,13,16,15,15,12, + 12,17,16,15,14,14,16,14,15,12,12,16,15,15,12,12, + 18,15,15,13,13,17,15,15,14,14,17,16,16,15,15,17, + 15,15,13,13,17,15,15,14,14,18,15,15,13,13,15,12, + 13,11,11,15,14,14,12,12,16,14,14,12,12,16,14,14, + 12,12,16,14,14,12,12,16,14,14,13,12,17,14,14,13, + 13,16,15,15,12,12,16,14,14,12,12,17,14,14,12,12, + 16,14,14,12,12,17,14,14,13,13,15,15,15,12,12,16, + 14,14,12,12,17,14,14,12,12,17,15,15,12,12,17,14, + 14,13,13,16,15,15,12,12,16,14,14,12,12,17,15,15, + 12,12,18,15,15,13,13,17,14,14,13,13,17,15,15,12, + 12,17,14,14,12,12,17,15,15,12,12,14,15,15, 9, 9, + 15,15,15,12,12,15,15,15,13,13,15,15,15,14,14,15, + 15,15,19,19,15,15,16,13,13,15,15,16,19,20,15,15, + 15,13,12,15,16,16,14,14,15,15,15,19,19,15,15,15, + 13,13,15,16,15,20,19,14,15,15,13,13,15,15,15,14, + 14,15,15,15,19,19,15,15,15,14,14,15,16,16,19,20, + 15,15,15,14,14,15,15,15,14,14,15,15,15,19,19,15, + 15,15,20,19,15,16,16,20,19,15,15,15,19,19,15,16, + 16,20,20,15,15,15,19,20,14,13,13,10,10,14,14,14, + 11,11,14,14,14,12,12,15,14,14,13,13,15,14,14,19, + 20,15,14,14,12,12,14,14,14,20,19,14,14,14,11,11, + 15,14,14,12,12,15,14,14,20,20,15,14,14,12,12,14, + 14,14,20,19,14,14,14,11,11,15,14,14,12,12,15,14, + 14,19,20,15,14,14,13,13,15,14,14,22,19,15,15,14, + 12,12,15,14,14,13,13,14,15,15,22,20,15,15,15,20, + 20,15,14,14,21,20,15,15,15,20,21,15,14,14,20,20, + 14,15,15,20,20, +}; + +static const static_codebook _44p3_p4_1 = { + 5, 3125, + (char *)_vq_lengthlist__44p3_p4_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p3_p4_1, + 0 +}; + +static const long _vq_quantlist__44p3_p5_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p3_p5_0[] = { + 2, 6, 6,14,14, 6, 7, 7,14,14, 7, 7, 7,15,15, 0, + 12,12,15,15, 0,13,13,15,15, 7, 8, 8,15,15,10,10, + 10,16,16, 9, 8, 8,15,15, 0,13,13,18,17, 0,13,13, + 16,16, 8, 8, 8,15,15,12,11,11,16,16, 9, 8, 8,15, + 15, 0,13,13,18,18, 0,13,13,16,16, 0,14,14,17,17, + 0,20, 0,19,20, 0,12,12,16,16, 0,16,16,20,22, 0, + 14,14,16,16, 0,14,14,17,17, 0,20,22,20,19, 0,13, + 13,15,16, 0,17,18, 0,21, 0,15,15,16,16, 5, 7, 7, + 13,13, 8, 9, 9,14,14,10,10,10,14,14, 0,20,22,18, + 18, 0,22,21,18,17, 9,10,10,14,14,12,12,12,17,17, + 12,10,10,14,14, 0, 0,20,17,17, 0,22,21,17,18,11, + 10,10,14,14,14,13,13,18,18,12,11,11,14,14, 0,22, + 21,18,19, 0,20, 0,17,17, 0,22, 0,18,18, 0, 0, 0, + 0, 0, 0,20,20,17,17, 0,22, 0,22,21, 0,21, 0,19, + 18, 0,22,22,18,18, 0, 0, 0, 0, 0, 0,21, 0,17,17, + 0,22, 0,20,20, 0, 0, 0,19,18, 6, 6, 6,12,12, 8, + 6, 6,10,10, 8, 6, 6,13,12, 0,10,10,11,11, 0,11, + 11,13,13, 8, 7, 7,13,13,11, 9, 9,13,13,10, 6, 6, + 12,12, 0,10,10,14,14, 0,10,10,13,13, 9, 7, 7,13, + 13,12,10,10,13,13,10, 6, 6,12,12, 0,11,11,15,15, + 0,10,10,13,13, 0,12,12,15,14, 0,19,20,16,17, 0, + 9, 9,13,13, 0,14,14,20,21, 0,12,11,13,12, 0,12, + 12,15,14, 0,20,19,17,17, 0,10,10,12,13, 0,15,15, + 22,21, 0,12,12,12,13, 0,10,10,12,12, 0,11,11,15, + 15, 0,11,11,15,15, 0,15,15,22,22, 0,16,17, 0, 0, + 0,11,11,15,15, 0,14,14,18,18, 0,11,11,16,16, 0, + 16,15, 0,21, 0,16,16, 0, 0, 0,12,12,15,15, 0,14, + 14,19,19, 0,11,11,15,15, 0,15,15,22, 0, 0,16,16, + 22, 0, 0,16,16, 0,21, 0, 0, 0, 0, 0, 0,15,15,19, + 20, 0,18,18, 0, 0, 0,17,17, 0, 0, 0,17,17, 0, 0, + 0, 0, 0, 0, 0, 0,16,15,22,21, 0,20,20, 0, 0, 0, + 18,18, 0, 0, 0,10,10,12,12, 0,10,10,11,11, 0,11, + 11,12,12, 0,11,11, 9, 9, 0,13,12,12,12, 0,11,11, + 13,13, 0,13,13,12,12, 0,10,10,12,12, 0,13,12,13, + 13, 0,12,12,12,12, 0,11,11,13,13, 0,13,13,12,12, + 0,10,10,12,12, 0,13,13,14,13, 0,12,12,12,12, 0, + 14,13,13,14, 0,20,21,15,15, 0,11,11,12,12, 0,15, + 16,20,20, 0,12,13,10,10, 0,13,13,14,13, 0,20,20, + 15,15, 0,11,11,12,12, 0,16,17,21,21, 0,13,13,11, + 11, 6, 7, 7,16,15,11, 9, 9,14,15,12, 9, 9,16,16, + 0,13,13,15,15, 0,14,14,17,17,10, 9, 9,16,16,14, + 12,12,16,16,12, 9, 9,15,15, 0,13,13,17,18, 0,13, + 13,15,15,12,10,10,17,17,15,12,12,17,17,13, 9, 9, + 16,16, 0,13,13,18,19, 0,14,14,16,16, 0,15,15,18, + 18, 0, 0, 0,20,19, 0,12,12,17,16, 0,16,17, 0,21, + 0,14,15,16,16, 0,15,15,18,18, 0, 0,22,19,21, 0, + 13,13,16,16, 0,18,17,22,22, 0,15,15,16,16, 7, 7, + 7,13,13,11,10,10,15,15,12,10,10,14,14, 0,21, 0, + 18,17, 0,21,22,18,18,11,10,10,15,15,14,12,12,17, + 17,14,11,11,14,14, 0,21,20,18,18, 0,22,21,18,17, + 12,11,10,16,16,16,14,14,17,19,14,11,11,15,15, 0, + 0,22,19,19, 0,21,22,18,18, 0,21, 0,18,19, 0, 0, + 0,22, 0, 0,22,21,17,17, 0, 0, 0,20,22, 0, 0,21, + 18,18, 0, 0, 0,19,20, 0, 0, 0, 0, 0, 0, 0,21,17, + 17, 0, 0, 0,22,21, 0, 0, 0,19,19,10, 9, 9,14,13, + 13,10,10,12,12,13,10,10,14,14, 0,13,13,12,12, 0, + 15,14,16,15,13,10,10,14,14,15,12,12,14,14,15,10, + 10,14,14, 0,14,14,15,15, 0,14,13,14,14,13,10,10, + 15,15,17,13,13,15,15,14,10,10,14,14, 0,14,14,15, + 16, 0,14,14,15,15, 0,15,15,16,16, 0,21,22,17,18, + 0,12,12,14,14, 0,17,17,20,21, 0,14,14,14,14, 0, + 15,15,16,16, 0,21,22,18,18, 0,13,13,14,14, 0,18, + 18,22, 0, 0,15,15,14,14, 0,11,11,13,13, 0,12,12, + 16,15, 0,12,12,16,16, 0,16,16, 0, 0, 0,16,17, 0, + 22, 0,12,12,16,16, 0,14,14,17,18, 0,11,11,16,16, + 0,15,15, 0,21, 0,16,16,21,22, 0,12,12,16,16, 0, + 15,15,19,19, 0,12,12,17,16, 0,16,16,21,22, 0,16, + 16, 0, 0, 0,17,17, 0,22, 0, 0, 0, 0, 0, 0,15,15, + 19,20, 0,17,19, 0, 0, 0,17,17,22, 0, 0,17,17, 0, + 22, 0, 0, 0, 0, 0, 0,15,15,21, 0, 0,19,20, 0, 0, + 0,19,18,22, 0, 0,11,12,14,14, 0,11,11,14,14, 0, + 12,12,15,15, 0,13,13,13,13, 0,14,14,16,16, 0,12, + 12,15,15, 0,14,14,16,15, 0,11,11,15,15, 0,13,13, + 16,16, 0,13,13,15,15, 0,12,12,15,15, 0,15,14,16, + 16, 0,11,11,15,15, 0,14,14,17,17, 0,13,13,15,15, + 0,15,15,16,16, 0, 0, 0,18,18, 0,12,12,14,14, 0, + 16,16,22, 0, 0,14,14,15,15, 0,15,15,16,17, 0,21, + 22,18,18, 0,13,13,15,14, 0,18,17,22, 0, 0,14,14, + 15,15, 8, 8, 8,16,15,12,10,10,16,15,12,10,10,16, + 16, 0,14,14,16,17, 0,14,14,17,16,12,10,10,17,18, + 14,12,12,18,18,14,10,10,16,16, 0,14,14,18,18, 0, + 14,14,16,16,12, 9, 9,16,16,17,13,13,16,17,14, 9, + 9,15,15, 0,14,14,18,19, 0,13,13,15,15, 0,15,15, + 18,19, 0, 0, 0,22,21, 0,13,13,16,16, 0,16,16,22, + 0, 0,15,15,16,16, 0,14,14,18,17, 0, 0, 0,20, 0, + 0,13,13,16,16, 0,18,18, 0, 0, 0,15,15,16,16, 8, + 7, 7,13,13,12,10,10,15,15,12,10,10,14,14, 0,22, + 22,19,18, 0, 0, 0,18,18,12,10,10,15,15,14,13,13, + 17,17,14,11,11,15,15, 0,19,20,18,18, 0,22,21,17, + 18,13,11,11,15,15,16,13,13,18,18,14,11,11,14,15, + 0,22,21,20,19, 0,22,21,17,17, 0, 0,22,19,18, 0, + 0, 0, 0, 0, 0,22,20,17,17, 0, 0, 0,21,20, 0, 0, + 0,19,17, 0, 0,22,19,19, 0, 0, 0, 0, 0, 0,22,20, + 18,17, 0, 0, 0, 0, 0, 0, 0, 0,18,18, 0,10,10,14, + 14, 0,11,11,14,14, 0,11,11,15,15, 0,14,14,14,14, + 0,15,15,16,16, 0,11,11,16,16, 0,13,13,16,16, 0, + 11,11,15,15, 0,14,14,16,16, 0,14,14,15,15, 0,11, + 11,15,15, 0,13,13,15,15, 0,10,10,15,15, 0,15,15, + 17,17, 0,14,14,14,14, 0,16,16,16,16, 0, 0,22,19, + 19, 0,13,13,14,14, 0,17,17, 0, 0, 0,15,15,14,14, + 0,16,16,17,17, 0, 0,22,18,18, 0,13,13,14,14, 0, + 21,18, 0, 0, 0,15,15,14,14, 0,11,11,13,13, 0,12, + 12,15,15, 0,12,12,16,15, 0,16,16, 0, 0, 0,17,17, + 22,22, 0,12,12,16,16, 0,14,14,18,18, 0,11,12,16, + 16, 0,15,16, 0,21, 0,16,16,22,21, 0,12,12,16,16, + 0,15,15,19,20, 0,11,12,16,16, 0,15,15,20,22, 0, + 16,16, 0,22, 0,17,17,22, 0, 0, 0, 0, 0, 0, 0,15, + 15,21,22, 0,19,18, 0, 0, 0,17,17, 0, 0, 0,17,17, + 0,22, 0, 0, 0, 0, 0, 0,16,15,22, 0, 0,19,19, 0, + 0, 0,17,18, 0, 0, 0,12,12,15,15, 0,12,12,15,15, + 0,12,12,15,15, 0,13,13,14,14, 0,15,15,16,17, 0, + 12,12,16,16, 0,14,14,16,16, 0,12,11,15,16, 0,14, + 14,16,17, 0,14,14,16,16, 0,13,12,16,16, 0,15,15, + 16,16, 0,11,11,15,15, 0,14,14,16,16, 0,14,14,15, + 15, 0,15,15,18,17, 0, 0,22, 0,20, 0,13,13,15,15, + 0,16,17,22,22, 0,14,14,15,15, 0,15,15,17,18, 0, + 20, 0,19,19, 0,13,13,15,15, 0,18,18,22, 0, 0,14, + 14,15,15, 0,11,11,16,16, 0,14,14,17,16, 0,13,13, + 17,17, 0,16,16,17,17, 0,17,17,18,19, 0,12,12,16, + 17, 0,15,15,18,18, 0,12,12,16,16, 0,16,16,19,18, + 0,16,16,17,16, 0,12,13,17,17, 0,17,16,18,17, 0, + 13,12,16,16, 0,16,16,18,19, 0,16,16,16,17, 0,16, + 16,18,18, 0,22, 0,22,22, 0,13,13,16,16, 0,19,18, + 22,20, 0,16,15,16,16, 0,16,17,18,18, 0, 0, 0,22, + 20, 0,14,14,16,16, 0,19,19, 0, 0, 0,16,16,16,16, + 0, 9, 9,13,13, 0,13,13,15,15, 0,14,14,15,15, 0, + 0,22,17,18, 0,22, 0,18,19, 0,12,12,15,15, 0,15, + 16,17,17, 0,14,14,14,14, 0,22, 0,18,18, 0,21,22, + 17,17, 0,13,13,15,15, 0,17,17,17,18, 0,14,14,15, + 15, 0,22,21,21,19, 0,20,21,17,17, 0,21,21,19,18, + 0, 0, 0, 0, 0, 0,21,21,17,17, 0, 0, 0,22,22, 0, + 0,22,19,18, 0, 0,21,19,18, 0, 0, 0, 0,22, 0,19, + 20,17,17, 0, 0, 0, 0,22, 0, 0, 0,19,18, 0,19,19, + 15,16, 0,21,19,16,17, 0, 0,21,17,17, 0, 0,22,17, + 17, 0,22,22,18,19, 0,20,20,16,16, 0, 0,22,18,18, + 0,20,19,16,17, 0,22,21,20,19, 0, 0,21,17,17, 0, + 21,20,17,17, 0, 0, 0,18,18, 0,19,19,17,16, 0,22, + 0,19,19, 0,21,22,17,18, 0, 0,22,19,18, 0, 0, 0, + 19,20, 0,19,19,16,16, 0,22,22,22, 0, 0,20,22,16, + 16, 0,22,20,18,19, 0, 0, 0,20,19, 0,20,20,16,16, + 0, 0, 0, 0, 0, 0,22,20,17,16, 0,11,11,13,13, 0, + 14,13,15,15, 0,13,13,16,15, 0,18,17,21, 0, 0,18, + 18,21, 0, 0,12,12,15,15, 0,15,16,17,18, 0,12,12, + 15,15, 0,17,17,22,20, 0,17,18,22, 0, 0,12,12,17, + 16, 0,16,17,19,19, 0,13,13,16,16, 0,17,17, 0,22, + 0,17,17, 0,21, 0,18,18,20,22, 0, 0, 0, 0, 0, 0, + 15,15,21,20, 0,20,19, 0, 0, 0,18,18,22, 0, 0,17, + 17,22, 0, 0, 0, 0, 0, 0, 0,15,16,20,22, 0,20,21, + 0, 0, 0,19,18, 0, 0, 0,15,15,19,19, 0,17,16,20, + 20, 0,16,17,20,21, 0,18,17, 0, 0, 0,19,19, 0, 0, + 0,15,15,21,19, 0,19,19, 0, 0, 0,15,15,22,22, 0, + 18,18, 0,22, 0,17,18,22,21, 0,15,15,20,19, 0,19, + 19, 0, 0, 0,15,15,20,22, 0,18,19,20, 0, 0,18,17, + 21,21, 0,18,18,19,22, 0, 0, 0, 0, 0, 0,15,15,20, + 19, 0,19,19, 0, 0, 0,18,18,21,22, 0,18,18,22, 0, + 0, 0, 0, 0, 0, 0,15,15,19,20, 0,21,21, 0, 0, 0, + 17,17,20,20, 0,12,12,17,17, 0,14,14,16,17, 0,13, + 14,17,17, 0,16,16,17,17, 0,17,17,17,19, 0,13,13, + 17,17, 0,16,16,18,18, 0,13,13,16,16, 0,16,16,18, + 18, 0,16,16,17,17, 0,13,13,17,17, 0,17,17,18,17, + 0,12,12,15,16, 0,17,18,19,20, 0,16,16,16,16, 0, + 17,16,18,19, 0, 0,22,21,22, 0,14,14,16,16, 0,19, + 19, 0, 0, 0,16,16,16,16, 0,16,16,18,17, 0, 0,22, + 21,21, 0,14,14,16,16, 0,22,20,22, 0, 0,16,16,15, + 15, 0, 9, 9,13,13, 0,14,14,15,15, 0,14,14,14,14, + 0,22,22,18,18, 0, 0,22,18,18, 0,12,12,15,15, 0, + 16,16,18,17, 0,14,14,14,14, 0,20,21,18,18, 0,22, + 21,17,17, 0,13,13,15,15, 0,17,17,18,18, 0,14,14, + 14,14, 0, 0,21,18,19, 0, 0,22,17,17, 0,22,22,19, + 18, 0, 0, 0, 0, 0, 0,19,21,17,17, 0, 0, 0,22,20, + 0, 0,21,18,19, 0, 0,22,18,18, 0, 0, 0, 0,22, 0, + 20,22,17,17, 0, 0, 0,20,22, 0, 0, 0,18,18, 0,19, + 21,16,16, 0,20,22,16,17, 0,20, 0,17,17, 0,22, 0, + 18,17, 0,21, 0,18,19, 0,20,20,17,17, 0,22, 0,18, + 18, 0,21,20,17,17, 0, 0,20,20,19, 0, 0,21,18,17, + 0,21,21,17,17, 0,22, 0,18,17, 0,19,19,17,17, 0, + 0,22,20,21, 0, 0,21,17,17, 0,22, 0,18,18, 0, 0, + 0,20,22, 0,20,19,16,16, 0, 0, 0, 0, 0, 0,22,22, + 17,17, 0,22, 0,18,19, 0, 0, 0,21,20, 0,19,21,16, + 17, 0, 0, 0, 0, 0, 0,22,22,17,16, 0,11,11,13,13, + 0,13,13,15,15, 0,13,13,15,15, 0,17,17,22,21, 0, + 18,18,22, 0, 0,12,13,16,15, 0,15,16,18,18, 0,13, + 13,16,16, 0,17,17, 0,22, 0,17,17,22,22, 0,13,13, + 16,16, 0,16,16,19,18, 0,13,13,16,16, 0,18,17, 0, + 20, 0,18,17,20, 0, 0,17,17,21, 0, 0, 0, 0, 0, 0, + 0,15,15,21,22, 0,19,20, 0, 0, 0,18,18, 0, 0, 0, + 18,17, 0, 0, 0, 0, 0, 0, 0, 0,16,16,22,22, 0,20, + 20, 0, 0, 0,21,19, 0, 0, 0,15,15,20,19, 0,16,16, + 22,20, 0,17,17, 0,22, 0,18,18, 0,22, 0,19,17, 0, + 0, 0,15,16,22,20, 0,18,19, 0, 0, 0,16,16,22,20, + 0,18,18, 0,22, 0,18,18,22, 0, 0,16,16,21,20, 0, + 19,20, 0,22, 0,16,16, 0,22, 0,18,18, 0,22, 0,18, + 18, 0,21, 0,19,18, 0,22, 0, 0, 0, 0, 0, 0,16,16, + 21,20, 0,20, 0, 0, 0, 0,18,18,21, 0, 0,18,18, 0, + 0, 0, 0, 0, 0, 0, 0,16,16,21,19, 0, 0, 0, 0, 0, + 0,18,18, 0,21, +}; + +static const static_codebook _44p3_p5_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p3_p5_0, + 1, -528744448, 1616642048, 3, 0, + (long *)_vq_quantlist__44p3_p5_0, + 0 +}; + +static const long _vq_quantlist__44p3_p5_1[] = { + 3, + 2, + 4, + 1, + 5, + 0, + 6, +}; + +static const char _vq_lengthlist__44p3_p5_1[] = { + 2, 3, 3, 3, 3, 3, 3, +}; + +static const static_codebook _44p3_p5_1 = { + 1, 7, + (char *)_vq_lengthlist__44p3_p5_1, + 1, -533200896, 1611661312, 3, 0, + (long *)_vq_quantlist__44p3_p5_1, + 0 +}; + +static const long _vq_quantlist__44p3_p6_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p3_p6_0[] = { + 1, 6, 6, 7, 7, 7, 7, 8, 8, 7, 9, 9,11,11,11, 9, + 8, 8, 8, 9, 9,12,11,11, 9, 8, 8, 6, 7, 7,10,11, + 10,10,10,10,11,11,10,14,13,14,12,11,11,11,11,11, + 15,14,14,13,12,12, 5, 6, 6, 8, 5, 5, 8, 7, 7, 8, + 8, 8,12,10,10, 9, 7, 7, 9, 7, 8,12,10,10,10, 7, + 7, 7, 8, 8,12,10,10,12,10,10,11,10,10,15,13,13, + 13,10,10,11,10,10,16,13,14,14,10,10, 7, 7, 7,12, + 11,11,12,11,11,11,11,11,16,15,15,14,12,12,12,11, + 11,16,15,16,14,12,12,10, 9, 9,14,11,11,13,11,11, + 12,11,11,16,14,14,14,11,11,12,11,11,17,15,15,14, + 11,11, 7, 8, 8,12,11,11,12,10,10,12,10,10,16,14, + 13,14,10,10,12,10,10,17,14,14,14,10,10, 8, 7, 7, + 13,11,11,12,11,11,12,11,11,16,15,14,14,12,12,12, + 11,11,16,15,14,15,12,12,11,10,10,13,11,11,13,12, + 11,13,11,11,17,14,14,14,11,11,13,11,11,17,14,15, + 14,11,11, +}; + +static const static_codebook _44p3_p6_0 = { + 5, 243, + (char *)_vq_lengthlist__44p3_p6_0, + 1, -527106048, 1620377600, 2, 0, + (long *)_vq_quantlist__44p3_p6_0, + 0 +}; + +static const long _vq_quantlist__44p3_p6_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p3_p6_1[] = { + 2, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, + 7, 7, 8, 8, 8, 9, 9, 9, 9, 7, 8, 6, 7, 7, 8, 8, + 8, 8, 8, 8, 9, 8, 8,10, 9, 9,10, 8, 8,10, 8, 8, + 10, 9, 9,10, 8, 8, 6, 6, 6, 8, 6, 6, 8, 7, 7, 8, + 7, 7,10, 8, 8, 9, 7, 7, 9, 7, 7,10, 8, 9, 9, 7, + 7, 7, 7, 7,10, 8, 8,11, 8, 8,10, 8, 8,12, 9, 9, + 12, 8, 8,11, 9, 9,12, 9, 9,11, 8, 8, 7, 7, 7,10, + 9, 9,10, 9, 9,10, 9, 9,11,10,10,10, 9, 9,11, 9, + 9,11,10,10,11, 9, 9, 9, 8, 8,10, 9, 9,10, 9, 9, + 11, 9, 9,11,10,10,11, 9, 9,11, 9, 9,11,10,10,11, + 9, 9, 8, 8, 8,11, 9, 9,11, 9, 9,11, 9, 9,12, 9, + 9,12, 8, 8,12, 9, 9,12, 9, 9,12, 8, 8, 8, 7, 7, + 10, 9, 9,10, 9, 9,11, 9, 9,11,11,11,11, 9, 9,11, + 10,10,11,11,11,11, 9, 9,10, 9, 9,11, 9, 9,11, 9, + 10,11,10, 9,11,10,10,11, 9, 9,11, 9,10,11,10,10, + 11, 9, 9, +}; + +static const static_codebook _44p3_p6_1 = { + 5, 243, + (char *)_vq_lengthlist__44p3_p6_1, + 1, -530841600, 1616642048, 2, 0, + (long *)_vq_quantlist__44p3_p6_1, + 0 +}; + +static const long _vq_quantlist__44p3_p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p3_p7_0[] = { + 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, +}; + +static const static_codebook _44p3_p7_0 = { + 5, 243, + (char *)_vq_lengthlist__44p3_p7_0, + 1, -513979392, 1633504256, 2, 0, + (long *)_vq_quantlist__44p3_p7_0, + 0 +}; + +static const long _vq_quantlist__44p3_p7_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p3_p7_1[] = { + 1, 9, 9, 6, 9, 9, 5, 9, 9, 8, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10, +}; + +static const static_codebook _44p3_p7_1 = { + 5, 243, + (char *)_vq_lengthlist__44p3_p7_1, + 1, -516716544, 1630767104, 2, 0, + (long *)_vq_quantlist__44p3_p7_1, + 0 +}; + +static const long _vq_quantlist__44p3_p7_2[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p3_p7_2[] = { + 1, 3, 2, 5, 4, 7, 7, 8, 8, 9, 9,10,10,11,11,12, + 12,13,13,14,14,15,15,15,15, +}; + +static const static_codebook _44p3_p7_2 = { + 1, 25, + (char *)_vq_lengthlist__44p3_p7_2, + 1, -518864896, 1620639744, 5, 0, + (long *)_vq_quantlist__44p3_p7_2, + 0 +}; + +static const long _vq_quantlist__44p3_p7_3[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p3_p7_3[] = { + 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44p3_p7_3 = { + 1, 25, + (char *)_vq_lengthlist__44p3_p7_3, + 1, -529006592, 1611661312, 5, 0, + (long *)_vq_quantlist__44p3_p7_3, + 0 +}; + +static const char _huff_lengthlist__44p3_short[] = { + 4, 5,16, 9, 9,12,17,18, 4, 2,18, 6, 5, 9,13,15, + 10, 7, 7, 6, 7, 9,13,13, 8, 5, 6, 5, 5, 7,11,12, + 8, 4, 7, 4, 3, 6,10,12,11, 8, 9, 7, 6, 8,11,12, + 15,13,13,11, 9, 7,10,12,16,12,16,12, 6, 5, 8,11, +}; + +static const static_codebook _huff_book__44p3_short = { + 2, 64, + (char *)_huff_lengthlist__44p3_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p4_l0_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44p4_l0_0[] = { + 1, 4, 4, 8, 8, 9, 8, 9, 9,10,10,10,10, 4, 6, 5, + 8, 7, 9, 9, 9, 9,10, 9,10,10, 4, 5, 6, 7, 8, 9, + 9, 9, 9, 9,10, 9,10, 8, 9, 8, 9, 8,10, 9,11, 9, + 12,10,11,10, 8, 8, 9, 8, 9, 9,10, 9,11,10,11,10, + 12, 9,10,10,11,10,11,11,12,11,12,12,12,12, 9,10, + 10,11,11,11,11,11,12,12,12,12,12,10,11,11,12,12, + 12,12,12,12,12,12,12,12,10,11,11,12,12,12,12,12, + 12,12,12,12,12,11,12,12,12,12,12,12,12,12,12,13, + 12,12,11,12,11,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,13,12,12,12,12,12,12,11,13,12,12, + 12,13,12,12,12,12,12,12,12, +}; + +static const static_codebook _44p4_l0_0 = { + 2, 169, + (char *)_vq_lengthlist__44p4_l0_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44p4_l0_0, + 0 +}; + +static const long _vq_quantlist__44p4_l0_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p4_l0_1[] = { + 3, 4, 4, 5, 5, 4, 4, 5, 5, 5, 4, 5, 4, 5, 5, 5, + 5, 6, 5, 6, 5, 6, 5, 6, 5, +}; + +static const static_codebook _44p4_l0_1 = { + 2, 25, + (char *)_vq_lengthlist__44p4_l0_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p4_l0_1, + 0 +}; + +static const long _vq_quantlist__44p4_l1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p4_l1_0[] = { + 1, 4, 4, 4, 4, 4, 4, 4, 4, +}; + +static const static_codebook _44p4_l1_0 = { + 2, 9, + (char *)_vq_lengthlist__44p4_l1_0, + 1, -516716544, 1630767104, 2, 0, + (long *)_vq_quantlist__44p4_l1_0, + 0 +}; + +static const char _huff_lengthlist__44p4_lfe[] = { + 1, 3, 2, 3, +}; + +static const static_codebook _huff_book__44p4_lfe = { + 2, 4, + (char *)_huff_lengthlist__44p4_lfe, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44p4_long[] = { + 3, 5,13, 9, 9,12,16,18, 4, 2,20, 6, 7,10,15,20, + 10, 7, 5, 5, 6, 8,10,13, 8, 5, 5, 3, 5, 7,10,11, + 9, 7, 6, 5, 5, 7, 9, 9,11,10, 8, 7, 6, 6, 8, 8, + 15,15,10,10, 9, 7, 8, 9,17,19,13,12,10, 8, 9, 9, +}; + +static const static_codebook _huff_book__44p4_long = { + 2, 64, + (char *)_huff_lengthlist__44p4_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p4_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p4_p1_0[] = { + 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, +}; + +static const static_codebook _44p4_p1_0 = { + 5, 243, + (char *)_vq_lengthlist__44p4_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p4_p1_0, + 0 +}; + +static const long _vq_quantlist__44p4_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p4_p2_0[] = { + 3, 9, 9, 0, 0, 0, 8, 8, 0, 0, 0, 9, 9, 0, 0, 0, + 12,12, 0, 0, 0, 0, 0, 0, 0, 0,10,10, 0, 0, 0, 0, + 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, +}; + +static const static_codebook _44p4_p2_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p4_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p4_p2_0, + 0 +}; + +static const long _vq_quantlist__44p4_p3_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p4_p3_0[] = { + 1, 6, 6, 5, 7, 8, 0, 8, 8, 6, 9, 9, 7,10,10, 0, + 8, 8, 0, 9, 9, 0,12,12, 0, 8, 8, 4, 7, 7, 6,10, + 10, 0,12,12, 7,11,11, 8,12,12, 0,12,12, 0,13,12, + 0,15,15, 0,12,12, 0, 7, 7, 0, 7, 7, 0, 7, 7, 0, + 8, 8, 0,10,10, 0, 7, 7, 0, 8, 8, 0,11,11, 0, 7, + 7, 5, 7, 7, 8, 9, 9, 0,10,10, 8, 9, 9,11,11,11, + 0,10, 9, 0,11,11, 0,13,13, 0,10,10, 6, 7, 7, 8, + 10,10, 0,12,12, 9,10,10,10,12,12, 0,12,12, 0,12, + 12, 0,15,15, 0,12,12, 0,10,10, 0,11,11, 0,11,11, + 0,11,11, 0,13,13, 0,11,11, 0,11,11, 0,15,15, 0, + 10,10, 0, 8, 8, 0,10,10, 0,12,12, 0,11,11, 0,12, + 12, 0,12,12, 0,12,12, 0,15,15, 0,11,11, 0, 7, 7, + 0,10,10, 0,12,12, 0,10,10, 0,12,12, 0,12,12, 0, + 13,13, 0,14,14, 0,12,12, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, +}; + +static const static_codebook _44p4_p3_0 = { + 5, 243, + (char *)_vq_lengthlist__44p4_p3_0, + 1, -533200896, 1614282752, 2, 0, + (long *)_vq_quantlist__44p4_p3_0, + 0 +}; + +static const long _vq_quantlist__44p4_p3_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p4_p3_1[] = { + 3, 5, 5, 0, 8, 8, 0, 8, 8, 0, 9, 9, 0,10,10, 0, + 8, 8, 0, 8, 8, 0,10,10, 0, 8, 8, 0, 7, 7, 0, 8, + 8, 0, 7, 7, 0, 8, 8, 0, 8, 8, 0, 8, 8, 0, 8, 8, + 0, 8, 8, 0, 8, 8, 0, 7, 7, 0, 6, 6, 0, 7, 7, 0, + 7, 7, 0,10,10, 0, 6, 6, 0, 7, 7, 0,10,10, 0, 5, + 5, 0, 8, 8, 0, 7, 7, 0, 8, 8, 0, 8, 8, 0, 9, 9, + 0, 7, 7, 0, 8, 8, 0, 9, 9, 0, 7, 7, 0, 6, 6, 0, + 9,10, 0,10,10, 0,10,10, 0,11,11, 0, 9, 9, 0,10, + 10, 0,11,11, 0, 9, 9, 0, 8, 8, 0, 8, 8, 0, 8, 8, + 0, 9, 9, 0, 9, 9, 0, 7, 7, 0, 8, 8, 0, 9, 9, 0, + 7, 7, 0, 8, 8, 0, 7, 7, 0, 7, 7, 0, 8, 8, 0, 9, + 9, 0, 7, 7, 0, 7, 7, 0, 8, 8, 0, 6, 6, 0, 6, 6, + 0,10,10, 0,10,10, 0,10,10, 0,12,12, 0, 9, 9, 0, + 10,10, 0,12,12, 0, 9, 9, 0, 8, 8, 0, 7, 7, 0, 7, + 7, 0, 8, 8, 0, 9, 9, 0, 7, 7, 0, 8, 8, 0, 9, 9, + 0, 6, 6, +}; + +static const static_codebook _44p4_p3_1 = { + 5, 243, + (char *)_vq_lengthlist__44p4_p3_1, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p4_p3_1, + 0 +}; + +static const long _vq_quantlist__44p4_p4_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p4_p4_0[] = { + 1, 6, 6, 6, 7, 7, 7, 8, 8, 7, 8, 8,10,11,11, 9, + 8, 8, 8, 8, 8,11,11,12, 9, 8, 8, 5, 7, 7, 9,11, + 11,10,11,11,10,11,11,12,14,14,11,12,12,10,12,12, + 13,14,14,12,12,12, 5, 6, 6, 7, 6, 6, 8, 7, 7, 8, + 7, 7,11,10,10,10, 7, 7, 9, 8, 8,12,11,11,10, 7, + 7, 7, 7, 7,11,10,10,12,10,10,11,10,10,15,13,13, + 13,10,10,12,11,11,15,13,13,14,11,11, 7, 7, 7,11, + 11,11,12,11,11,12,11,11,14,14,14,13,12,12,12,12, + 12,16,15,15,14,12,12, 0,10,10, 0,11,11, 0,12,12, + 0,11,11, 0,14,14, 0,11,11, 0,12,12, 0,15,15, 0, + 11,11, 7, 8, 8,12,11,10,12,10,10,12,11,11,15,13, + 13,14,11,11,12,10,10,16,14,14,14,10,10, 8, 7, 7, + 12,11,11,12,11,11,12,11,11,15,14,14,14,12,12,13, + 12,12,15,14,14,15,13,13, 0,11,11, 0,12,12, 0,12, + 12, 0,12,12, 0,15,15, 0,12,12, 0,13,13, 0,15,14, + 0,12,12, +}; + +static const static_codebook _44p4_p4_0 = { + 5, 243, + (char *)_vq_lengthlist__44p4_p4_0, + 1, -531365888, 1616117760, 2, 0, + (long *)_vq_quantlist__44p4_p4_0, + 0 +}; + +static const long _vq_quantlist__44p4_p4_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p4_p4_1[] = { + 4, 5, 5, 9, 9,12, 9, 9,12,12,12,10,10,13,13,13, + 11,11,12,12,13,13,13,12,12,13,10,10,13,13,13,13, + 13,13,13,13,10,10,13,12,13,11,11,13,13,13,14,14, + 13,12,13,10,10,13,13,12,13,13,13,13,13,10,10,12, + 12,13,11,11,13,13,13,14,14,12,12,13,12,12,13,13, + 13,13,13,13,13,13,11,11,12,12,13,11,11,13,13,13, + 14,14,12,12,13,14,14,13,13,14,13,13,14,14,14,14, + 14,12,12,13,14,14,13,13,14,14,14,12,12,12, 8, 8, + 12,12,13,12,12,11,11,13,11,11,11,11,14,12,12,11, + 11,14,12,12,10,11,14,12,12,12,12,14,12,12,12,12, + 13,13,13,11,11,14,12,12,11,11,14,12,12,12,12,14, + 12,12,12,12,14,12,12,12,12,14,13,13,11,11,14,12, + 12,11,11,14,12,12,12,12,14,13,13,12,12,14,12,12, + 12,12,14,13,13,11,11,14,12,12,11,11,14,13,13,11, + 11,15,13,13,12,12,14,12,12,12,12,15,13,13,12,12, + 14,12,12,11,11,15,13,13,11,11,12, 9, 9,11,11,13, + 7, 7,11,11,13, 8, 8,12,12,14,10,10,10,10,14,14, + 14,11,11,14, 8, 8,12,12,14,14,14,12,12,14, 7, 7, + 11,11,14, 9, 9,12,12,14,14,14,11,11,14, 8, 8,12, + 12,14,14,14,12,12,14, 7, 7,11,11,14, 9, 9,12,12, + 14,14,14,11,11,14,10,10,12,12,14,14,14,13,13,14, + 9, 9,11,11,14,10,10,12,11,15,14,14,11,11,14,15, + 15,12,12,15,14,14,14,14,15,14,14,11,11,15,14,14, + 12,12,15,14,14,11,11,14,11,11,10,10,15,10,10,10, + 10,15,10,10,10,10,15,11,11, 9, 9,15,12,13, 9, 9, + 15,11,11,11,11,15,13,13,11,11,15,10,10,10,10,15, + 11,11,10,10,15,13,13,11,11,15,11,11,11,11,15,13, + 13,11,11,15,10,10,10,10,15,11,11,10,10,15,13,13, + 10,11,15,12,12,11,11,15,13,13,11,10,15,11,11,10, + 10,15,11,12,10, 9,15,13,13,10,10,15,14,14,11,11, + 15,13,13,11,11,15,14,14,10,10,15,13,13,10,10,15, + 14,14,10,10,14,13,13,10,10,15,13,13,10,10,15,13, + 13,10,10,14,14,14, 8, 9,15,14,14, 9, 9,15,14,14, + 11,11,15,14,14,10,10,15,14,14,10,10,15,14,14,11, + 11,15,14,14,10,10,15,14,14,11,11,15,14,14,10,10, + 15,14,14,10,10,15,14,14,10,10,15,14,14, 9, 9,15, + 14,14,11,11,15,14,14,11,11,15,14,14,10,10,15,14, + 14,10,10,14,14,14, 9, 9,15,15,15,11,11,15,14,14, + 12,12,15,15,15,10,10,15,14,15,10,10,15,15,15, 9, + 9,15,10,10,13,13,17, 8, 8,12,12,17,10, 9,13,13, + 18,11,11,12,12,18,14,14,12,12,17, 9, 9,13,13,17, + 13,13,12,12,18, 8, 8,12,12,18,10,10,12,12,18,14, + 14,12,12,18,10,10,13,13,18,13,13,13,13,18, 9, 9, + 12,12,18,10,10,13,13,18,14,14,12,12,18,11,11,13, + 13,18,14,14,13,13,18,10,10,12,12,17,11,11,12,12, + 18,14,14,12,12,18,14,14,13,13,18,14,14,13,13,19, + 14,15,12,12,18,14,14,12,12,18,15,15,12,12,13, 7, + 7,11,11,14,15,15,11,11,14,16,15,11,11,14,15,15, + 11,11,14,15,15,11,11,14,15,15,11,12,14,15,15,12, + 12,13,15,15,11,11,14,15,15,11,11,15,15,15,12,12, + 14,15,15,12,12,14,16,16,12,12,14,15,15,11,11,14, + 15,15,11,11,15,15,15,12,12,15,15,15,12,12,14,15, + 15,12,12,14,15,15,11,11,14,15,15,11,11,15,14,15, + 12,12,15,15,15,12,12,15,16,16,12,12,15,15,15,12, + 12,14,15,15,12,12,15,15,15,12,12,13,13,13,11,11, + 14,14,15,11,11,14,14,14,12,12,14,15,15,10,10,15, + 15,15,11,11,14,15,15,12,12,14,14,14,11,11,14,15, + 15,11,11,14,15,15,12,12,15,15,15,11,11,14,15,15, + 12,12,14,14,15,11,11,14,15,15,11,11,14,15,15,12, + 12,15,15,15,11,11,15,15,15,12,12,14,15,15,12,12, + 14,15,15,10,10,14,15,15,11,11,15,15,15,10,10,15, + 15,15,12,12,15,15,15,14,14,15,15,15,11,11,15,15, + 15,11,11,15,15,15,11,11,14,10,10,10,10,15, 9, 9, + 12,11,15,10,10,12,12,15,11,11,11,11,15,13,13,12, + 12,16,10,10,12,12,15,13,13,12,12,15, 9, 9,11,11, + 15,10,10,13,12,15,13,13,11,11,15,10,10,12,12,15, + 13,13,12,12,15, 9, 9,11,11,15,10,10,12,12,15,13, + 13,11,11,15,11,11,12,12,15,13,13,13,13,15,10,10, + 11,11,15,11,11,12,12,15,13,14,11,11,15,14,14,13, + 13,16,14,14,20,19,15,14,14,11,11,15,13,14,12,12, + 15,14,14,11,11,14,13,13,10,10,14,14,13,11,11,15, + 13,14,12,12,15,14,14,12,12,15,14,14,11,11,15,14, + 14,12,12,15,15,14,13,13,15,14,14,11,11,15,14,14, + 11,11,15,14,14,13,13,15,14,14,12,12,15,14,14,13, + 13,15,14,14,11,11,15,14,14,11,11,15,14,14,13,13, + 15,14,14,12,12,15,14,14,12,12,15,14,14,12,12,15, + 14,14,11,11,15,15,15,12,12,15,15,15,13,13,16,14, + 14,12,12,15,15,15,13,13,15,15,15,12,12,15,15,15, + 12,12,14,10,10,13,13,17, 9, 9,12,12,17, 9, 9,13, + 13,17,11,11,12,12,18,14,14,12,12,18,10,10,13,13, + 18,14,13,12,12,18, 9, 9,12,12,18,10,10,12,13,18, + 14,14,12,12,17, 9, 9,12,12,17,13,14,12,12,17, 9, + 9,12,12,17,10,10,12,12,17,14,14,11,11,18,11,11, + 12,12,18,14,14,12,13,18,10,10,12,12,18,11,11,12, + 12,18,14,14,11,11,18,15,15,12,12,18,14,14,13,13, + 18,14,15,12,12,17,14,14,12,12,17,15,15,12,12,13, + 7, 7,11,11,14,15,15,11,11,14,15,15,11,11,14,15, + 15,11,11,14,15,15,11,11,14,15,15,11,11,14,15,15, + 12,12,14,15,15,11,11,14,15,15,11,11,15,15,15,12, + 12,14,15,15,11,11,14,15,15,12,12,14,15,15,11,11, + 15,15,15,11,11,15,15,15,12,12,14,15,15,12,12,14, + 15,16,12,12,14,15,15,11,11,14,15,15,11,11,15,15, + 15,12,12,15,15,15,12,12,15,16,16,12,12,15,15,15, + 12,12,15,15,15,12,12,15,15,15,12,12,13,13,13,12, + 12,14,14,14,11,11,14,14,14,12,12,14,14,14,10,10, + 15,15,15,11,11,14,15,15,12,12,14,14,14,11,11,14, + 15,15,11,11,14,14,14,12,12,15,15,14,11,11,14,15, + 15,12,12,14,14,14,11,11,14,15,15,11,11,14,14,14, + 11,11,15,14,14,10,10,14,15,15,12,12,14,14,14,12, + 12,14,15,15,10,10,14,15,15,11,11,15,15,15,10,10, + 15,15,15,12,12,15,14,14,13,13,15,15,15,10,10,15, + 14,14,11,11,15,15,15,10,10,14,10,10,10,10,14, 9, + 9,12,12,15,10,10,12,12,14,11,11,11,11,15,13,14, + 12,12,15,10,10,13,13,15,13,13,12,12,15, 9, 9,12, + 12,15,10,10,13,13,15,13,14,11,11,15,10,10,12,12, + 15,13,13,12,12,15, 9, 9,11,11,15,10,10,12,12,15, + 13,13,11,11,15,11,11,12,12,15,13,13,13,13,15,10, + 10,11,11,15,11,11,12,12,15,14,14,11,11,15,14,14, + 13,13,15,14,14,20,19,15,14,14,11,11,15,14,14,12, + 12,15,14,14,11,11,14,13,13,11,11,15,13,13,11,11, + 15,14,13,12,12,15,14,14,11,12,15,14,14,11,11,15, + 14,14,12,12,14,14,14,13,13,15,14,14,11,11,15,14, + 14,11,11,15,14,14,13,13,15,14,14,12,12,15,14,14, + 13,13,14,14,14,11,11,15,14,14,11,11,15,14,14,13, + 13,15,14,14,12,12,15,14,14,12,12,15,14,14,12,12, + 15,14,14,11,11,14,14,14,12,12,15,15,15,13,13,16, + 14,14,12,12,15,15,15,13,13,15,14,14,12,12,15,15, + 15,12,12,15,11,11,13,13,18,10,10,12,12,17,11,11, + 12,12,18,12,12,11,11,18,14,14,12,12,18,10,10,13, + 13,18,14,14,12,12,18,10,10,12,12,18,11,11,12,12, + 18,14,14,12,12,18,11,11,12,13,18,14,14,12,12,18, + 10,10,12,12,18,11,11,12,12,18,14,14,11,11,18,11, + 11,12,12,18,14,14,12,12,17,10,10,11,11,17,12,12, + 11,11,17,14,14,11,11,18,15,15,12,12,18,14,14,13, + 13,18,15,15,11,11,18,15,14,12,12,18,15,15,11,11, + 14, 8, 8,11,11,14,15,15,10,10,14,15,15,11,11,14, + 15,15,11,11,15,15,15,12,12,15,15,15,11,11,15,15, + 15,12,12,14,15,15,10,10,15,15,15,11,11,15,15,15, + 12,12,15,15,15,11,11,15,15,15,13,13,14,15,15,10, + 10,15,15,15,11,11,15,15,15,12,12,15,15,15,12,12, + 15,16,16,12,12,15,14,14,11,11,15,15,15,11,11,15, + 15,15,12,12,16,15,15,13,13,15,16,16,13,13,16,15, + 15,12,12,15,15,15,12,12,15,15,15,12,12,14,13,13, + 11,11,14,14,14,11,11,14,14,14,12,12,15,14,14,11, + 11,15,15,14,11,11,15,14,14,12,12,15,14,14,12,12, + 14,15,15,11,11,15,14,14,12,12,15,14,14,11,11,15, + 14,15,12,12,15,14,14,12,12,14,15,15,11,11,15,14, + 14,11,11,15,14,14,11,11,15,15,14,12,12,15,14,14, + 12,12,15,15,15,10,11,15,14,14,11,11,15,15,15,10, + 10,15,15,15,12,12,16,14,14,13,13,15,15,15,11,11, + 15,14,14,11,11,15,15,15,11,11,14,11,11, 9, 9,14, + 10,10,12,12,15,11,11,12,12,15,12,12,12,12,15,14, + 14,13,13,15,11,11,12,12,15,14,14,13,13,14,10,10, + 12,12,15,11,11,13,13,15,14,14,12,12,15,10,10,12, + 12,14,14,14,13,13,14,10,10,11,11,15,11,11,12,12, + 15,14,14,12,12,15,12,12,13,13,15,14,14,14,14,15, + 11,11,11,11,15,12,11,12,12,15,14,14,11,11,15,15, + 15,13,14,15,14,14,20,19,15,14,14,12,12,15,14,14, + 13,13,15,14,14,12,12,14,13,13,10,10,14,13,13,11, + 11,14,13,13,11,11,15,14,14,12,12,15,14,14,12,12, + 15,14,14,12,11,14,14,14,13,13,15,14,14,11,11,15, + 14,14,11,11,15,14,14,14,14,15,14,14,11,12,15,14, + 14,13,13,14,14,14,11,11,15,14,14,11,11,15,14,14, + 14,14,15,14,14,12,12,15,14,14,13,13,15,14,14,11, + 11,14,14,14,12,12,15,14,14,13,13,15,15,15,13,13, + 15,14,14,13,13,15,15,15,13,13,15,14,14,13,13,15, + 15,15,13,13,15,14,14,13,13,18,15,15,12,12,18,15, + 15,12,12,18,16,16,11,11,18,17,17,12,12,18,15,15, + 13,13,18,17,17,12,12,18,15,15,12,12,18,15,16,12, + 12,18,17,17,12,12,18,15,15,13,12,17,16,17,12,12, + 17,15,15,11,12,18,15,15,12,12,18,17,17,11,11,18, + 16,16,12,12,18,17,16,12,12,18,15,15,11,11,18,15, + 15,12,12,18,17,17,11,11,18,17,17,12,12,18,16,16, + 13,13,18,17,17,11,11,17,16,16,11,11,18,17,17,11, + 11,15,15,15,11,11,16,15,15,11,11,16,15,15,11,11, + 16,15,15,12,12,17,15,15,14,14,16,15,15,11,11,17, + 15,15,14,14,16,15,15,11,11,16,15,15,12,12,18,15, + 15,13,13,16,15,15,11,11,17,15,15,14,14,16,15,15, + 11,11,16,15,15,12,12,17,15,15,13,13,16,15,15,12, + 12,17,16,15,14,14,16,15,15,11,11,16,15,15,12,12, + 18,15,15,13,13,17,15,15,14,14,17,16,16,15,15,18, + 14,15,13,13,18,15,15,14,14,18,15,15,13,13,15,13, + 13,12,12,15,14,14,12,12,16,14,14,12,12,16,14,14, + 12,12,17,14,15,12,12,16,14,14,12,12,17,14,14,13, + 13,16,15,15,12,12,16,14,14,12,12,17,14,14,12,12, + 16,14,14,12,12,17,14,14,13,13,15,15,15,11,11,16, + 14,14,12,12,17,14,14,12,12,16,15,15,12,12,17,14, + 14,13,12,16,15,15,11,11,16,14,14,12,12,17,15,15, + 11,11,17,15,15,13,13,17,14,14,13,13,18,15,15,12, + 12,17,14,14,12,12,17,15,15,12,12,14,15,15, 9, 9, + 14,15,15,12,12,15,16,15,13,13,15,15,15,14,14,15, + 15,15,21,19,15,15,15,13,13,15,15,15,19,19,15,15, + 15,12,12,15,16,16,14,14,15,15,15,19,19,15,16,15, + 13,13,15,16,16,19,20,15,15,15,12,13,15,16,16,14, + 14,15,15,15,20,19,15,15,15,14,14,15,16,16,19,19, + 15,15,15,14,13,15,15,15,14,14,15,15,15,19,19,15, + 16,16,20,19,15,17,16,21,20,15,15,15,20,19,15,16, + 16,20,20,15,15,15,19,20,14,13,13,10,10,14,14,14, + 11,11,14,14,14,12,12,15,14,14,13,13,15,15,14,20, + 20,15,14,14,12,12,14,14,14,19,19,15,14,14,11,11, + 15,14,14,12,12,15,14,14,20,19,15,14,14,12,12,14, + 14,14,20,20,14,14,14,11,11,15,14,14,12,12,15,14, + 14,20,21,15,14,14,13,13,15,14,14,20,20,15,14,14, + 12,12,15,14,14,13,13,14,15,15,20,20,15,15,15,20, + 19,15,14,14,20,19,15,15,15,20,20,15,14,14,21,20, + 15,15,15,20,20, +}; + +static const static_codebook _44p4_p4_1 = { + 5, 3125, + (char *)_vq_lengthlist__44p4_p4_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p4_p4_1, + 0 +}; + +static const long _vq_quantlist__44p4_p5_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p4_p5_0[] = { + 1, 7, 6,15,15, 7, 8, 8,15,15, 8, 8, 8,15,15, 0, + 13,13,16,16, 0,14,14,16,16, 7, 9, 9,16,16,10,11, + 11,17,17,10, 8, 8,15,16, 0,14,14,18,18, 0,14,14, + 16,16, 9, 9, 9,16,16,12,11,11,17,17,10, 9, 9,15, + 15, 0,14,14,19,19, 0,14,14,16,16, 0,15,15,18,17, + 0, 0, 0,20,20, 0,13,13,16,16, 0,17,17,22,20, 0, + 15,15,17,17, 0,15,15,18,18, 0,22,21,20,21, 0,13, + 13,16,16, 0,18,18, 0,22, 0,15,15,17,17, 6, 7, 7, + 13,13, 9,10,10,15,15,11,10,10,15,15, 0,21,22,18, + 18, 0, 0, 0,18,18,10,10,10,15,15,12,13,13,17,17, + 12,11,11,15,15, 0,22,22,18,18, 0, 0,21,18,18,12, + 11,11,15,15,15,14,14,18,18,13,11,11,15,15, 0, 0, + 21,18,19, 0,21,22,18,19, 0,22, 0,18,19, 0, 0, 0, + 0, 0, 0,21,21,18,18, 0,22, 0, 0,21, 0, 0, 0,19, + 18, 0, 0, 0,18,19, 0, 0, 0, 0, 0, 0,20,20,18,17, + 0, 0,22, 0,21, 0, 0, 0,19,19, 6, 6, 6,13,13, 8, + 6, 6,11,11, 9, 7, 7,13,13, 0,10,10,11,11, 0,12, + 12,14,14, 9, 8, 8,14,14,12,10,10,13,13,10, 7, 7, + 13,13, 0,11,11,15,15, 0,11,11,13,13, 9, 8, 8,14, + 14,13,10,10,13,14,11, 7, 7,13,13, 0,11,11,15,15, + 0,11,11,13,13, 0,12,12,15,15, 0,21,21,17,17, 0, + 10,10,13,13, 0,14,14,20,20, 0,12,12,13,13, 0,12, + 12,15,15, 0,21,22,17,18, 0,10,10,13,13, 0,16,16, + 20,21, 0,12,12,13,13, 0,11,11,13,13, 0,12,12,16, + 16, 0,12,12,16,16, 0,16,16, 0,21, 0,17,18, 0, 0, + 0,12,12,15,15, 0,15,15,18,18, 0,12,12,16,16, 0, + 16,16,21,22, 0,17,17,22,21, 0,12,12,16,16, 0,15, + 15,19,19, 0,12,12,16,16, 0,16,16,22,22, 0,17,16, + 22, 0, 0,17,18, 0, 0, 0, 0, 0, 0, 0, 0,15,15,21, + 20, 0,19,20, 0,22, 0,18,18, 0, 0, 0,18,17, 0, 0, + 0, 0, 0, 0, 0, 0,16,16,22,21, 0,20,20, 0,22, 0, + 20,19, 0, 0, 0,11,11,12,12, 0,10,10,11,11, 0,11, + 11,12,12, 0,12,12,10,10, 0,13,13,12,12, 0,11,11, + 13,13, 0,13,13,12,12, 0,10,10,12,12, 0,13,13,14, + 13, 0,12,12,12,12, 0,12,12,13,13, 0,14,14,13,13, + 0,10,10,12,12, 0,13,13,14,14, 0,13,12,12,12, 0, + 14,14,14,14, 0,21,21,16,16, 0,12,12,12,12, 0,16, + 16,20,21, 0,13,13,11,11, 0,14,14,14,14, 0,20,20, + 16,15, 0,12,12,12,12, 0,17,17,20,20, 0,13,13,11, + 11, 7, 8, 8,16,16,11,10,10,15,15,12,10,10,17,17, + 0,14,14,16,15, 0,15,15,17,17,11, 9, 9,16,16,14, + 12,12,17,17,13, 9, 9,16,15, 0,14,14,19,18, 0,14, + 14,16,16,12,10,10,17,18,16,13,13,17,18,14,10,10, + 16,16, 0,14,14,19,19, 0,14,15,17,17, 0,15,15,18, + 19, 0, 0, 0,20,20, 0,13,13,17,17, 0,17,18, 0,22, + 0,15,15,16,17, 0,15,15,18,18, 0, 0, 0,20,21, 0, + 14,14,17,17, 0,19,18, 0, 0, 0,16,16,17,17, 8, 7, + 7,14,14,12,11,11,15,15,13,11,11,15,15, 0, 0, 0, + 18,19, 0,21,20,18,18,12,10,11,15,16,14,13,13,18, + 18,14,11,11,15,15, 0,20,20,19,18, 0,20, 0,18,18, + 13,11,11,16,16,17,15,15,19,19,14,12,12,15,15, 0, + 21, 0,18,20, 0,22,22,18,19, 0,22,22,19,19, 0, 0, + 0, 0, 0, 0,21,22,19,18, 0, 0, 0, 0,21, 0, 0, 0, + 19,19, 0, 0,22,20,20, 0, 0, 0, 0, 0, 0,22, 0,18, + 18, 0, 0, 0, 0,22, 0, 0, 0,19,20,11,10,10,14,14, + 14,11,11,13,13,14,11,11,15,15, 0,14,13,12,12, 0, + 15,15,16,16,13,11,11,15,15,16,13,13,15,15,15,10, + 10,14,15, 0,14,14,16,16, 0,14,14,15,15,13,11,11, + 15,15,18,14,14,15,15,15,10,10,15,14, 0,14,14,16, + 16, 0,14,14,15,15, 0,15,15,17,16, 0,21,22,18,18, + 0,13,13,14,14, 0,18,17,20,21, 0,15,15,14,14, 0, + 15,16,16,17, 0, 0, 0,19,18, 0,13,13,15,14, 0,19, + 19, 0, 0, 0,15,15,14,14, 0,12,12,14,13, 0,13,13, + 16,16, 0,12,12,16,16, 0,16,16,22, 0, 0,17,18, 0, + 22, 0,13,13,16,16, 0,15,15,18,18, 0,12,12,16,16, + 0,16,16,22,22, 0,17,17, 0, 0, 0,13,13,17,17, 0, + 16,16,19,20, 0,12,12,17,17, 0,17,17,22, 0, 0,17, + 17,22,21, 0,18,18, 0, 0, 0, 0, 0, 0, 0, 0,16,16, + 21,21, 0,19,19, 0, 0, 0,18,18, 0,22, 0,18,18, 0, + 22, 0, 0, 0, 0, 0, 0,16,16,22, 0, 0,20,20, 0, 0, + 0,19,18, 0, 0, 0,12,12,15,15, 0,12,12,15,14, 0, + 13,13,15,15, 0,14,14,14,14, 0,15,15,16,16, 0,13, + 13,15,16, 0,15,15,16,16, 0,12,12,15,15, 0,14,14, + 16,16, 0,14,14,15,15, 0,13,13,15,16, 0,15,15,16, + 16, 0,12,12,15,15, 0,15,15,17,17, 0,14,14,15,15, + 0,15,15,17,17, 0,21,21,19,19, 0,13,13,14,14, 0, + 17,17,22, 0, 0,14,14,15,15, 0,15,15,17,17, 0,22, + 0,18,20, 0,13,13,15,15, 0,18,18, 0,22, 0,15,15, + 14,15, 8, 8, 8,17,16,12,10,10,16,16,13,10,10,17, + 16, 0,15,15,17,17, 0,15,15,17,17,12,11,11,18,18, + 15,12,12,18,18,15,10,10,16,17, 0,14,14,18,18, 0, + 14,14,17,17,13,10,10,16,16,17,14,14,17,17,15,10, + 10,16,15, 0,15,15,19,20, 0,14,14,15,16, 0,16,16, + 19,19, 0, 0, 0,21,22, 0,13,13,17,17, 0,18,17, 0, + 21, 0,15,15,17,17, 0,15,15,18,19, 0, 0,22, 0,21, + 0,13,13,16,17, 0,19,19, 0,22, 0,16,15,16,16, 9, + 8, 8,14,14,12,11,11,15,15,13,11,11,15,15, 0,21, + 20,19,18, 0, 0, 0,19,18,12,11,11,16,15,15,13,13, + 17,18,14,11,11,15,15, 0,22,22,19,18, 0,22,21,18, + 18,14,11,11,15,15,17,14,14,18,18,15,12,12,15,15, + 0,22,22,20,19, 0, 0,21,18,18, 0, 0,22,20,20, 0, + 0, 0, 0, 0, 0,20,21,18,18, 0, 0, 0,21,21, 0, 0, + 0,20,19, 0,22,21,19,19, 0, 0, 0, 0, 0, 0, 0,22, + 17,18, 0, 0,22, 0,22, 0,22, 0,19,19, 0,11,11,15, + 15, 0,11,11,14,14, 0,12,12,15,15, 0,15,15,14,14, + 0,16,16,16,16, 0,12,12,16,16, 0,14,14,16,16, 0, + 11,11,15,15, 0,15,15,17,17, 0,15,15,15,15, 0,12, + 12,16,16, 0,14,14,15,15, 0,11,11,15,15, 0,15,15, + 17,17, 0,15,15,14,15, 0,16,16,17,17, 0, 0, 0,19, + 19, 0,14,14,15,15, 0,18,18,21, 0, 0,15,15,14,15, + 0,16,16,17,17, 0,21, 0,19,19, 0,14,14,15,15, 0, + 20,20,22, 0, 0,16,15,14,14, 0,12,12,13,13, 0,12, + 12,16,16, 0,12,12,16,16, 0,16,16,22,21, 0,18,17, + 21, 0, 0,13,13,16,16, 0,15,15,18,19, 0,12,12,16, + 16, 0,16,17,22, 0, 0,17,17, 0,22, 0,13,13,17,16, + 0,15,15,19,19, 0,12,12,16,16, 0,16,16,21,20, 0, + 17,16,22, 0, 0,18,18,22,21, 0, 0, 0, 0, 0, 0,15, + 16,21,21, 0,19,19, 0, 0, 0,18,17, 0, 0, 0,18,18, + 21, 0, 0, 0, 0, 0, 0, 0,16,16,22,22, 0,20,21, 0, + 0, 0,18,19, 0,22, 0,13,13,16,16, 0,12,12,15,15, + 0,13,13,16,16, 0,14,14,15,15, 0,15,15,17,17, 0, + 13,13,17,16, 0,15,15,17,17, 0,12,12,16,16, 0,15, + 15,17,17, 0,14,14,16,16, 0,13,13,16,17, 0,15,15, + 17,17, 0,12,12,16,16, 0,14,14,17,17, 0,14,14,16, + 16, 0,16,16,17,17, 0,21, 0,21,19, 0,13,13,16,16, + 0,17,17, 0, 0, 0,15,15,16,16, 0,16,15,18,18, 0, + 22, 0,20,20, 0,13,13,15,15, 0,18,18, 0, 0, 0,15, + 15,15,15, 0,12,12,17,17, 0,14,14,17,17, 0,14,14, + 17,17, 0,17,17,18,17, 0,17,17,19,18, 0,13,13,17, + 17, 0,16,16,18,18, 0,13,13,16,16, 0,17,17,19,19, + 0,16,16,17,17, 0,13,13,18,18, 0,17,17,18,18, 0, + 13,13,17,17, 0,17,17,19,19, 0,16,17,17,17, 0,17, + 17,19,19, 0,21, 0,21,19, 0,14,14,16,16, 0,20,19, + 0,21, 0,16,16,16,16, 0,17,18,19,19, 0, 0, 0, 0, + 21, 0,15,15,16,17, 0,21,20, 0, 0, 0,17,18,16,17, + 0, 9, 9,14,14, 0,14,14,15,16, 0,14,14,15,15, 0, + 0, 0,18,18, 0,21, 0,18,19, 0,12,12,15,15, 0,16, + 16,17,17, 0,14,14,14,14, 0,22, 0,19,18, 0,22, 0, + 17,18, 0,14,14,16,15, 0,18,18,19,18, 0,14,15,15, + 15, 0, 0,21,20,20, 0, 0, 0,18,18, 0,21,21,19,19, + 0, 0, 0, 0, 0, 0,21,21,18,18, 0,22, 0,20,20, 0, + 22, 0,19,19, 0,22, 0,19,20, 0, 0, 0, 0, 0, 0, 0, + 21,17,18, 0, 0, 0,22,22, 0, 0, 0,19,18, 0,18,20, + 16,16, 0,21,20,17,17, 0, 0,21,18,18, 0,22,21,18, + 18, 0, 0,22,19,19, 0,20,20,17,17, 0, 0, 0,18,18, + 0,19,20,17,17, 0,22, 0,19,21, 0,22,21,18,18, 0, + 20,19,17,18, 0, 0, 0,19,19, 0,20,20,17,17, 0,22, + 22,21,21, 0,20, 0,18,18, 0,22,22,18,18, 0, 0, 0, + 20,22, 0,20,20,16,16, 0, 0, 0,21, 0, 0,21,20,16, + 17, 0,22, 0,19,20, 0, 0, 0,21,20, 0,19,21,17,17, + 0, 0, 0, 0, 0, 0,21,21,17,17, 0,12,12,13,13, 0, + 14,14,16,16, 0,14,14,16,16, 0,18,18, 0, 0, 0,19, + 18,22, 0, 0,13,13,16,16, 0,16,16,18,18, 0,13,13, + 16,16, 0,17,18,21, 0, 0,18,18,21, 0, 0,13,13,16, + 16, 0,17,17,19,20, 0,13,13,16,17, 0,18,18,21, 0, + 0,18,18,21, 0, 0,18,19, 0,21, 0, 0, 0, 0, 0, 0, + 16,16,21,20, 0,20,20, 0, 0, 0,18,19, 0, 0, 0,18, + 18, 0, 0, 0, 0, 0, 0, 0, 0,16,16, 0,21, 0,22,22, + 0, 0, 0,19,19, 0, 0, 0,16,16,19,20, 0,17,16,22, + 21, 0,17,17,21,20, 0,19,18, 0,22, 0,19,19,22,22, + 0,16,15,22,22, 0,19,19, 0,21, 0,15,15,20,20, 0, + 18,19, 0,21, 0,18,18,22,22, 0,16,16,21,20, 0,20, + 19,21,22, 0,16,15,20,20, 0,19,19, 0,22, 0,18,18, + 21, 0, 0,19,18,21,22, 0, 0, 0, 0, 0, 0,16,16,19, + 21, 0,20,22, 0,22, 0,18,18,20,21, 0,19,18, 0,22, + 0, 0, 0,22, 0, 0,16,16,20,20, 0,21,21, 0, 0, 0, + 18,18,21, 0, 0,12,12,17,17, 0,15,14,17,17, 0,14, + 14,18,18, 0,17,17,17,18, 0,18,18,18,18, 0,13,13, + 18,18, 0,16,17,19,18, 0,13,13,16,17, 0,17,17,18, + 19, 0,17,17,17,17, 0,13,13,17,17, 0,17,18,18,18, + 0,13,13,16,16, 0,18,18,19,20, 0,16,17,17,16, 0, + 17,18,19,18, 0, 0, 0,22,21, 0,15,15,16,16, 0,20, + 20,21,22, 0,17,17,16,16, 0,16,17,18,18, 0, 0, 0, + 21,21, 0,15,15,16,16, 0,21,20, 0, 0, 0,17,17,16, + 16, 0,10,10,14,14, 0,14,14,15,15, 0,14,14,15,15, + 0,22, 0,18,18, 0, 0, 0,19,19, 0,13,13,15,16, 0, + 17,16,18,18, 0,14,14,15,15, 0,21,21,19,18, 0,22, + 21,18,17, 0,14,14,15,15, 0,18,18,19,18, 0,15,15, + 14,14, 0,22,21,19,19, 0,22,21,17,18, 0, 0, 0,19, + 19, 0, 0, 0, 0, 0, 0,20,22,17,17, 0, 0,22,22,20, + 0, 0, 0,19,18, 0,21,22,19,18, 0, 0, 0, 0, 0, 0, + 22,22,17,18, 0, 0, 0,21,22, 0, 0, 0,19,18, 0,20, + 20,17,17, 0,21,21,17,18, 0,21,22,18,18, 0,21, 0, + 18,18, 0,22, 0,19,19, 0,19,21,18,18, 0, 0,22,18, + 18, 0,22,21,17,17, 0,22, 0,20,20, 0, 0, 0,18,18, + 0,22,21,18,18, 0,21, 0,19,19, 0,20,21,17,17, 0, + 0,22,22,20, 0,21,22,17,17, 0, 0,21,19,18, 0, 0, + 0,21,21, 0,21,20,16,17, 0, 0, 0, 0, 0, 0,21, 0, + 17,17, 0,21, 0,19,20, 0, 0, 0,20,22, 0,20,20,17, + 17, 0, 0, 0, 0, 0, 0,21,21,17,17, 0,12,12,13,13, + 0,14,14,16,16, 0,14,14,16,16, 0,18,18,21, 0, 0, + 19,19,22, 0, 0,13,13,16,16, 0,16,16,18,18, 0,13, + 13,16,16, 0,18,18,21,22, 0,18,18, 0,22, 0,13,13, + 16,16, 0,17,17,20,18, 0,13,13,16,16, 0,19,18, 0, + 22, 0,18,18,22,21, 0,18,19, 0, 0, 0, 0, 0, 0, 0, + 0,16,16,21,21, 0,21,21, 0, 0, 0,18,19, 0, 0, 0, + 19,19,21, 0, 0, 0, 0, 0, 0, 0,16,16, 0,21, 0,20, + 20, 0, 0, 0,20,20, 0, 0, 0,16,16,21,20, 0,18,17, + 21,22, 0,17,18, 0,21, 0,18,19,22,22, 0,19,19, 0, + 22, 0,16,17,21,22, 0,20,19, 0, 0, 0,16,16,20,21, + 0,19,19, 0, 0, 0,19,19, 0,22, 0,17,17,21,21, 0, + 19,20, 0, 0, 0,16,16, 0,20, 0,19,20, 0,21, 0,18, + 18, 0,22, 0,19,20,22,22, 0, 0, 0, 0,22, 0,17,17, + 0,21, 0,21,21, 0, 0, 0,18,19,23,21, 0,20,19, 0, + 0, 0, 0, 0, 0, 0, 0,17,17, 0,20, 0, 0, 0, 0, 0, + 0,19,19,23,22, +}; + +static const static_codebook _44p4_p5_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p4_p5_0, + 1, -528744448, 1616642048, 3, 0, + (long *)_vq_quantlist__44p4_p5_0, + 0 +}; + +static const long _vq_quantlist__44p4_p5_1[] = { + 3, + 2, + 4, + 1, + 5, + 0, + 6, +}; + +static const char _vq_lengthlist__44p4_p5_1[] = { + 2, 3, 3, 3, 3, 3, 3, +}; + +static const static_codebook _44p4_p5_1 = { + 1, 7, + (char *)_vq_lengthlist__44p4_p5_1, + 1, -533200896, 1611661312, 3, 0, + (long *)_vq_quantlist__44p4_p5_1, + 0 +}; + +static const long _vq_quantlist__44p4_p6_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p4_p6_0[] = { + 1, 7, 7, 7, 8, 8, 7, 8, 8, 7, 9, 9,11,11,11, 9, + 8, 8, 8, 9, 9,12,11,12, 9, 8, 8, 6, 7, 7,10,11, + 11,10,10,10,11,11,11,14,14,14,12,11,12,11,11,11, + 15,15,14,13,12,12, 5, 6, 6, 8, 5, 5, 8, 7, 7, 8, + 7, 7,12,10,10,10, 7, 6, 9, 8, 8,12,10,10,10, 6, + 6, 7, 8, 8,12,10,10,12,10,10,11,10,10,16,14,14, + 13,10,10,12,10,10,15,14,14,14,10,10, 7, 7, 7,13, + 11,11,13,11,11,12,11,11,16,14,14,14,12,12,12,11, + 11,18,15,15,14,12,12,10, 9,10,14,11,11,13,11,11, + 12,11,11,17,14,14,14,11,11,13,11,11,16,15,15,14, + 11,11, 7, 8, 8,13,11,11,12,10,10,12,10,10,16,14, + 13,13,10,10,12,10,10,17,14,14,14,10,10, 8, 7, 7, + 12,11,11,13,11,11,12,11,11,16,15,14,14,12,12,12, + 11,11,16,15,15,14,12,12,11,10,10,14,11,11,13,11, + 11,13,11,11,17,14,14,14,11,11,13,11,11,18,14,15, + 15,11,10, +}; + +static const static_codebook _44p4_p6_0 = { + 5, 243, + (char *)_vq_lengthlist__44p4_p6_0, + 1, -527106048, 1620377600, 2, 0, + (long *)_vq_quantlist__44p4_p6_0, + 0 +}; + +static const long _vq_quantlist__44p4_p6_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p4_p6_1[] = { + 2, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, + 7, 7, 8, 8, 8, 9, 9, 9, 9, 8, 8, 6, 7, 7, 8, 8, + 8, 8, 8, 8, 9, 8, 8, 9, 8, 9, 9, 8, 8,10, 8, 8, + 10, 9, 9,10, 8, 8, 6, 6, 6, 8, 6, 6, 8, 7, 7, 8, + 7, 7,10, 8, 8, 9, 7, 7, 9, 7, 7,10, 8, 8, 9, 7, + 7, 7, 7, 7,10, 8, 8,11, 9, 9,10, 9, 9,11, 9, 9, + 11, 8, 8,11, 9, 9,12, 9, 9,12, 8, 8, 7, 7, 7,10, + 9, 9,10, 9, 9,10, 9, 9,11,10,10,10, 9, 9,11, 9, + 10,11,10,11,10, 9, 9, 9, 8, 8,10, 9, 9,10, 9, 9, + 11, 9, 9,11,10,10,11, 9, 9,11, 9, 9,11,10,10,11, + 9, 9, 8, 8, 8,11, 9, 9,11, 9, 9,11, 9, 9,12, 9, + 9,12, 8, 8,11, 9, 9,12, 9, 9,12, 8, 8, 8, 7, 7, + 10, 9, 9,10, 9, 9,10, 9, 9,11,11,11,11, 9, 9,11, + 10,10,11,11,11,11, 9, 9,10, 9, 9,11, 9, 9,11, 9, + 10,11,10,10,11,10,10,11, 9, 9,11,10,10,11,10,10, + 11, 9, 9, +}; + +static const static_codebook _44p4_p6_1 = { + 5, 243, + (char *)_vq_lengthlist__44p4_p6_1, + 1, -530841600, 1616642048, 2, 0, + (long *)_vq_quantlist__44p4_p6_1, + 0 +}; + +static const long _vq_quantlist__44p4_p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p4_p7_0[] = { + 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, +}; + +static const static_codebook _44p4_p7_0 = { + 5, 243, + (char *)_vq_lengthlist__44p4_p7_0, + 1, -513979392, 1633504256, 2, 0, + (long *)_vq_quantlist__44p4_p7_0, + 0 +}; + +static const long _vq_quantlist__44p4_p7_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p4_p7_1[] = { + 1, 9, 9, 7, 9, 9, 8, 8, 9, 9, 9, 9, 9, 9, 9, 8, + 9, 9, 7, 9, 9, 9, 9, 9, 9, 9, 9, 7, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 6, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 5, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 5,10, 9,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10, 8,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10, +}; + +static const static_codebook _44p4_p7_1 = { + 5, 243, + (char *)_vq_lengthlist__44p4_p7_1, + 1, -516716544, 1630767104, 2, 0, + (long *)_vq_quantlist__44p4_p7_1, + 0 +}; + +static const long _vq_quantlist__44p4_p7_2[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p4_p7_2[] = { + 1, 3, 2, 5, 4, 7, 7, 8, 8, 9, 9,10,10,11,11,12, + 12,13,13,14,14,15,15,15,15, +}; + +static const static_codebook _44p4_p7_2 = { + 1, 25, + (char *)_vq_lengthlist__44p4_p7_2, + 1, -518864896, 1620639744, 5, 0, + (long *)_vq_quantlist__44p4_p7_2, + 0 +}; + +static const long _vq_quantlist__44p4_p7_3[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p4_p7_3[] = { + 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44p4_p7_3 = { + 1, 25, + (char *)_vq_lengthlist__44p4_p7_3, + 1, -529006592, 1611661312, 5, 0, + (long *)_vq_quantlist__44p4_p7_3, + 0 +}; + +static const char _huff_lengthlist__44p4_short[] = { + 3, 5,16, 9, 9,13,18,21, 4, 2,21, 6, 6,10,15,21, + 16,19, 6, 5, 7,10,13,16, 8, 6, 5, 4, 4, 8,13,16, + 8, 5, 6, 4, 4, 7,12,15,13,10, 9, 7, 7, 9,13,16, + 18,15,13,12, 9, 7,10,14,21,18,13,13, 7, 5, 8,12, +}; + +static const static_codebook _huff_book__44p4_short = { + 2, 64, + (char *)_huff_lengthlist__44p4_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p5_l0_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44p5_l0_0[] = { + 1, 4, 4, 8, 8,10,10,10,10, 9, 8,11,11, 4, 6, 5, + 8, 6,10,10,10,10,10, 9,10, 9, 4, 5, 6, 6, 9,10, + 10,10,10, 9,10, 9,10, 8, 9, 8, 9, 8, 9, 9,10, 9, + 11,10,12,10, 8, 8, 9, 8, 9, 9, 9, 9,10,10,11,10, + 12, 9,10,10,11,10,11,10,12,11,12,11,13,11, 9,10, + 10,10,11,10,11,11,12,11,12,11,12,11,12,12,12,12, + 13,12,13,12,13,12,13,13,11,12,12,12,12,12,12,12, + 13,13,13,13,13,12,12,12,13,13,13,13,13,13,13,13, + 13,13,12,13,12,13,13,13,13,13,13,13,13,13,13,12, + 13,13,13,14,14,13,13,13,13,13,13,13,12,13,12,13, + 13,13,13,13,13,13,13,13,13, +}; + +static const static_codebook _44p5_l0_0 = { + 2, 169, + (char *)_vq_lengthlist__44p5_l0_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44p5_l0_0, + 0 +}; + +static const long _vq_quantlist__44p5_l0_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p5_l0_1[] = { + 4, 4, 4, 5, 5, 4, 5, 5, 5, 5, 4, 5, 4, 4, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44p5_l0_1 = { + 2, 25, + (char *)_vq_lengthlist__44p5_l0_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p5_l0_1, + 0 +}; + +static const long _vq_quantlist__44p5_l1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p5_l1_0[] = { + 1, 4, 4, 4, 4, 4, 4, 4, 4, +}; + +static const static_codebook _44p5_l1_0 = { + 2, 9, + (char *)_vq_lengthlist__44p5_l1_0, + 1, -516716544, 1630767104, 2, 0, + (long *)_vq_quantlist__44p5_l1_0, + 0 +}; + +static const char _huff_lengthlist__44p5_lfe[] = { + 1, 3, 2, 3, +}; + +static const static_codebook _huff_book__44p5_lfe = { + 2, 4, + (char *)_huff_lengthlist__44p5_lfe, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44p5_long[] = { + 3, 7,12,14,14,16,18,19, 6, 2, 4, 6, 8, 9,12,14, + 12, 3, 3, 5, 7, 8,11,13,13, 6, 4, 5, 7, 8,10,11, + 14, 8, 7, 7, 7, 7, 9,10,15, 9, 8, 7, 7, 6, 8, 9, + 17,11,11,10, 9, 8, 9, 9,19,14,13,11,10, 9, 9, 9, +}; + +static const static_codebook _huff_book__44p5_long = { + 2, 64, + (char *)_huff_lengthlist__44p5_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p5_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p5_p1_0[] = { + 2, 5, 5, 5, 7, 7, 5, 7, 7, 5, 7, 7, 7, 8, 9, 7, + 9, 9, 5, 7, 7, 7, 9, 9, 7, 9, 8, 5, 7, 8, 8, 9, + 10, 8, 9,10, 8, 9,10, 9,10,12,10,11,11, 8,10,10, + 10,11,11, 9,11,11, 5, 8, 7, 8, 9, 9, 8,10, 9, 8, + 10,10, 9,11,11,10,11,11, 8,10, 9,10,11,11, 9,12, + 10, 5, 8, 8, 7, 9,10, 8,10, 9, 7, 9, 9, 9,10,11, + 9,11,11, 8,10, 9,10,11,11,10,11,11, 7, 9, 9, 9, + 10,11, 9,11,11, 9, 9,11,10,10,13,11,11,12, 9,11, + 11,11,12,13,11,13,12, 7, 9, 9, 9,11,11, 9,11,10, + 9,11,10,10,11,12,11,13,12, 9,11,11,11,12,13,11, + 13,11, 5, 8, 8, 8, 9,10, 7,10, 9, 8, 9,10,10,11, + 11,10,11,11, 7, 9, 9, 9,11,11, 9,11,10, 7, 9, 9, + 9,10,11, 9,11,11, 9,11,11,11,11,13,11,13,12, 9, + 10,11,11,12,13,10,12,11, 7, 9, 9, 9,11,11, 9,11, + 10, 9,11,11,11,12,13,11,13,12, 9,11, 9,11,12,11, + 10,13,10, +}; + +static const static_codebook _44p5_p1_0 = { + 5, 243, + (char *)_vq_lengthlist__44p5_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p5_p1_0, + 0 +}; + +static const long _vq_quantlist__44p5_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p5_p2_0[] = { + 4, 6, 6, 9, 9, 6, 7, 8,10,10, 6, 8, 7,10,10, 8, + 10,10,12,13, 8,10,10,13,12, 6, 7, 8,10,10, 7, 8, + 9,10,11, 8, 9, 9,11,11,10,10,11,12,14,10,11,11, + 14,13, 6, 8, 7,10,10, 8, 9, 9,11,11, 7, 9, 8,11, + 10,10,11,11,13,14,10,11,10,14,12, 9,10,10,12,12, + 10,10,11,12,13,10,11,11,13,13,12,12,13,12,15,13, + 14,13,15,14, 9,10,10,12,12,10,11,11,13,13,10,11, + 10,13,12,13,13,14,14,15,12,13,12,15,12, 6, 7, 8, + 10,11, 8, 9,10,11,12, 8, 9, 9,11,12,10,11,12,13, + 14,10,11,11,14,13, 8, 9,10,11,12, 9,10,11,12,13, + 9,10,11,12,13,11,12,13,13,15,12,12,13,15,14, 8, + 9, 9,12,12, 9,10,11,12,13, 9,10,10,13,12,12,12, + 13,14,15,11,12,12,14,14,11,11,12,13,14,11,12,13, + 13,15,12,13,13,14,15,14,13,15,14,16,14,15,15,16, + 16,11,12,11,14,13,12,13,13,15,14,11,13,12,14,13, + 14,15,15,15,16,13,14,14,16,14, 6, 8, 7,11,10, 8, + 9, 9,11,12, 8,10, 9,12,11,10,11,11,13,14,10,12, + 11,14,13, 8, 9, 9,12,12, 9,10,10,12,13, 9,11,10, + 13,12,11,12,12,13,14,12,13,12,15,14, 8,10, 9,12, + 11, 9,11,10,13,12, 9,11,10,13,12,12,13,12,14,15, + 11,13,12,15,13,11,11,12,13,14,11,12,13,13,15,12, + 13,13,14,15,13,14,14,14,16,14,15,15,16,16,11,12, + 11,14,13,12,13,13,15,14,11,13,12,15,13,14,15,15, + 16,16,13,15,13,16,14, 9,10,11,12,14,11,11,12,13, + 15,11,12,12,13,14,13,14,15,15,17,13,14,14,15,16, + 11,11,12,13,15,12,12,13,14,16,12,13,13,14,15,14, + 14,16,15,17,15,15,15,16,17,11,12,12,14,14,12,13, + 13,15,16,12,13,13,15,15,15,15,15,16,17,14,15,15, + 16,16,14,14,15,15,17,14,15,15,15,17,15,15,16,16, + 17,16,16,17,16,18,17,17,17,18,18,14,15,14,16,16, + 15,15,16,17,17,14,15,15,17,16,17,17,17,18,18,16, + 16,16,17,17, 9,11,10,14,12,11,12,12,14,13,11,12, + 11,15,13,13,14,14,16,15,13,15,14,17,15,11,12,12, + 15,14,12,13,13,15,15,12,13,13,15,15,14,15,15,16, + 16,15,15,15,17,16,11,12,11,15,13,12,13,13,15,14, + 12,13,12,16,14,15,15,15,17,16,14,15,14,17,15,14, + 14,15,16,16,14,15,15,16,16,15,16,15,17,17,16,16, + 16,17,17,17,17,17,18,17,14,15,14,16,15,15,15,15, + 17,16,15,15,15,17,15,17,17,17,18,18,16,17,16,18, + 16, 6, 8, 8,11,11, 8, 9, 9,11,12, 8, 9, 9,12,11, + 10,11,11,13,14,10,12,11,14,13, 7, 9, 9,11,12, 9, + 10,10,12,13, 9,10,10,13,13,11,11,12,13,15,11,12, + 12,15,14, 8, 9, 9,12,11, 9,11,10,13,13, 9,11,10, + 13,12,12,13,12,14,15,11,13,12,15,13,10,11,12,13, + 14,11,12,12,13,15,12,12,13,14,15,13,13,14,14,16, + 14,15,15,16,16,11,12,11,14,13,12,13,13,15,14,11, + 13,12,15,13,14,15,15,15,16,13,14,14,16,14, 7, 9, + 9,11,12, 9,10,11,12,13, 9,10,10,13,12,11,12,12, + 14,15,11,12,12,15,14, 9, 9,11,11,13,10,10,12,12, + 14,10,11,12,13,14,12,12,13,14,16,12,13,13,15,15, + 9,11,10,13,13,10,12,12,13,14,10,12,11,14,13,12, + 13,13,15,16,12,13,13,15,14,11,11,13,13,15,12,12, + 14,13,16,13,13,13,14,15,14,14,15,14,17,15,15,15, + 16,16,12,13,12,15,14,13,14,14,15,15,12,14,13,16, + 14,15,15,16,16,17,14,15,14,17,15, 7, 9, 9,12,11, + 9,10,10,12,13, 9,11,10,13,12,11,12,12,14,14,11, + 13,12,15,14, 9,10,10,13,12,10,10,11,12,13,10,12, + 11,14,13,12,12,13,13,15,12,14,13,16,15, 9,10,10, + 13,12,11,11,12,13,13,10,12,10,14,12,13,13,13,15, + 15,12,13,12,15,13,11,12,12,14,14,12,12,13,14,15, + 13,14,13,15,15,14,13,15,13,16,15,16,15,17,16,12, + 13,12,14,14,13,14,14,15,15,12,13,12,15,14,15,15, + 16,16,17,14,15,13,16,13,10,11,12,13,14,11,12,13, + 14,15,12,13,13,15,15,14,14,15,15,17,14,15,15,16, + 16,12,12,13,12,15,12,12,14,13,16,13,13,14,14,16, + 14,14,16,15,17,15,15,16,16,17,12,13,13,15,15,13, + 14,14,16,16,13,14,13,16,15,15,16,16,17,17,14,15, + 15,17,16,14,14,15,14,17,15,15,16,15,17,15,15,16, + 15,17,16,16,17,16,18,17,17,17,17,18,14,15,15,17, + 16,15,16,16,17,17,15,16,15,17,16,17,17,17,18,18, + 16,17,16,18,17,10,12,11,14,14,12,13,13,15,15,12, + 13,12,15,14,14,15,15,16,16,14,15,15,17,16,11,13, + 12,15,14,12,13,13,15,15,13,14,13,16,14,15,15,15, + 16,16,15,16,15,17,16,12,13,13,15,15,13,14,14,16, + 16,12,14,13,16,15,15,16,16,17,17,15,16,15,17,16, + 14,15,15,16,16,14,15,15,16,16,15,16,16,17,16,16, + 16,16,16,17,17,18,17,18,17,14,15,15,17,16,15,16, + 16,17,17,15,16,15,17,16,17,17,18,18,18,16,17,16, + 18,16, 6, 8, 8,11,11, 8, 9, 9,11,12, 8, 9, 9,12, + 11,10,11,12,13,14,10,11,11,14,13, 8, 9, 9,11,12, + 9,10,11,12,13, 9,10,11,13,13,11,12,13,13,15,12, + 12,12,15,14, 7, 9, 9,12,11, 9,10,10,13,13, 9,10, + 10,13,12,11,12,12,14,15,11,12,11,15,13,11,11,12, + 13,14,11,12,13,13,15,12,13,13,14,15,13,14,14,14, + 16,14,15,15,16,16,10,12,11,14,13,12,13,12,14,14, + 11,12,12,15,13,14,15,15,16,16,13,14,13,16,14, 7, + 9, 9,11,12, 9,10,11,12,13, 9,10,10,13,12,11,12, + 13,14,15,11,12,12,14,14, 9,10,10,12,13,10,10,12, + 12,14,11,12,11,13,13,12,12,14,13,15,13,13,13,15, + 15, 9,10,10,12,13,10,11,12,13,14,10,11,10,13,12, + 13,13,14,15,16,12,13,12,15,13,12,13,13,14,14,12, + 12,13,14,15,13,14,14,15,15,14,13,15,13,16,15,16, + 15,17,16,11,12,12,14,14,13,13,14,15,15,12,13,12, + 15,14,15,15,16,16,17,14,14,13,16,13, 7, 9, 9,12, + 11, 9,10,10,12,13, 9,11,10,13,12,11,12,12,14,15, + 11,12,12,15,14, 9,10,11,13,13,10,11,12,13,14,10, + 12,12,14,13,12,13,13,14,16,12,13,13,16,15, 9,11, + 9,13,11,10,12,11,13,13,10,12,10,14,12,12,13,13, + 15,15,12,13,12,16,14,12,12,13,14,15,12,13,14,14, + 15,13,14,14,15,15,14,14,15,15,17,15,16,15,17,16, + 11,13,11,15,13,13,14,13,15,14,12,14,12,16,13,15, + 15,15,16,16,14,15,14,17,14,10,11,12,14,14,12,12, + 13,14,15,12,13,13,15,15,14,15,15,16,17,14,15,15, + 16,16,12,12,13,15,15,13,13,14,15,16,13,14,14,16, + 16,15,15,16,16,17,15,16,16,17,17,11,12,13,14,15, + 13,13,14,15,16,12,13,13,15,15,15,15,16,16,17,15, + 15,15,16,16,14,15,15,16,17,15,15,16,16,17,15,16, + 16,17,17,16,16,17,16,18,17,17,17,18,18,14,15,15, + 16,16,15,16,16,16,17,15,15,15,16,16,17,17,17,18, + 18,16,16,16,17,16,10,12,11,14,13,12,13,13,15,15, + 11,13,12,15,14,14,15,15,16,16,14,15,14,17,15,12, + 13,13,15,15,13,13,14,16,16,13,14,14,16,16,15,15, + 15,16,17,15,16,16,17,17,12,13,12,15,12,13,14,13, + 16,14,12,14,12,16,13,15,16,15,17,16,14,16,14,17, + 15,14,15,15,16,17,15,15,16,17,17,15,16,16,17,17, + 16,16,17,17,18,17,18,17,18,18,14,15,14,17,14,15, + 16,15,17,15,15,16,15,17,15,17,17,17,18,17,16,17, + 16,18,16, 9,11,11,14,14,11,12,12,14,14,11,12,12, + 15,14,13,14,14,16,16,13,15,14,16,16,10,11,12,14, + 14,11,12,13,15,15,12,13,13,15,15,13,14,15,16,17, + 14,15,15,17,16,11,12,12,15,14,12,13,13,15,15,12, + 13,13,15,15,14,15,15,16,16,14,15,15,17,16,12,13, + 14,15,16,13,14,14,15,16,13,14,15,16,16,15,15,16, + 16,18,16,16,16,18,17,14,14,14,16,15,15,15,15,17, + 16,14,15,15,17,16,16,17,17,18,17,16,16,16,18,16, + 10,12,12,14,14,11,12,13,15,15,12,13,13,15,15,13, + 14,15,16,17,14,15,15,17,16,11,12,13,14,15,12,12, + 14,15,16,13,13,14,15,16,14,14,15,16,17,15,15,16, + 17,17,12,13,13,15,15,13,14,14,16,16,13,14,13,16, + 15,15,16,15,17,17,15,16,15,17,16,13,13,15,14,17, + 14,13,16,15,17,15,14,16,15,17,15,15,17,16,18,16, + 16,17,17,18,14,15,15,17,16,15,16,16,17,17,15,16, + 15,17,16,17,17,17,18,18,16,17,16,18,17,10,12,11, + 14,14,11,12,13,15,15,12,13,12,15,15,14,15,15,16, + 16,14,15,15,17,16,11,12,12,15,15,12,13,13,15,15, + 13,14,13,16,15,14,15,15,16,16,15,16,15,17,16,11, + 13,13,15,15,13,14,14,15,15,12,14,13,16,15,15,16, + 15,17,17,15,16,15,17,16,13,15,14,16,16,14,15,14, + 16,16,15,16,15,17,16,15,16,16,16,17,16,17,16,18, + 17,14,15,15,16,16,15,16,16,17,17,15,15,15,17,16, + 17,17,17,18,18,16,16,16,18,16,12,13,13,15,16,13, + 14,14,15,16,13,14,14,16,16,15,15,16,16,18,15,16, + 16,17,17,13,13,14,15,16,14,14,15,15,17,14,15,15, + 16,17,15,15,17,16,18,16,16,17,17,17,13,14,14,16, + 16,14,15,15,17,17,14,15,14,17,16,16,17,16,17,18, + 16,17,16,18,17,15,15,16,14,17,16,15,17,14,18,16, + 16,16,15,18,16,16,18,15,19,18,18,18,17,19,15,16, + 16,18,17,16,17,17,18,17,16,17,16,18,17,18,18,18, + 19,19,17,18,16,18,17,11,12,12,15,15,13,13,14,15, + 16,13,14,13,16,15,15,16,16,16,17,15,16,16,17,16, + 12,14,13,16,15,13,13,14,15,16,14,15,14,17,15,15, + 15,16,16,17,16,17,16,18,17,12,13,14,15,16,14,15, + 15,16,16,13,14,13,16,15,16,16,16,17,17,15,16,15, + 17,15,15,16,15,17,16,15,15,15,16,16,16,17,16,18, + 16,16,15,16,15,17,17,18,17,18,17,15,15,16,17,17, + 16,16,17,17,17,15,16,15,17,16,18,18,18,18,18,16, + 17,16,18,15, 9,11,11,14,14,11,12,12,14,15,10,12, + 12,15,14,13,14,15,16,16,13,14,14,16,16,11,12,12, + 14,15,12,12,13,15,15,12,13,13,15,15,14,15,15,16, + 17,14,15,15,16,16,10,12,12,14,14,12,13,13,15,15, + 11,13,12,15,15,14,15,15,16,17,13,15,14,16,16,14, + 14,14,15,16,14,15,15,16,17,14,15,15,16,17,16,16, + 17,16,18,16,17,17,17,17,12,14,13,16,15,13,15,14, + 16,16,13,14,14,16,15,16,16,16,17,17,15,16,15,17, + 16,10,11,11,14,14,12,12,13,14,15,11,13,12,15,14, + 14,15,15,16,17,14,15,15,16,16,12,13,13,15,15,12, + 13,14,15,16,13,14,14,15,15,15,15,16,16,17,15,15, + 16,17,17,11,12,12,15,15,13,13,14,15,16,12,13,13, + 15,15,15,15,16,16,17,14,15,15,16,16,14,15,15,16, + 16,15,15,15,16,17,15,16,16,17,17,16,16,17,16,18, + 17,17,17,17,18,13,14,15,16,16,15,15,16,16,17,14, + 14,14,16,16,16,16,17,17,18,16,16,16,17,16,10,12, + 12,14,14,12,13,13,15,15,11,13,12,15,15,14,15,15, + 16,17,13,15,14,17,16,12,13,13,15,15,13,13,14,15, + 16,13,14,14,16,16,15,15,16,16,17,15,15,16,17,17, + 11,13,12,15,14,13,14,13,16,15,12,14,12,16,15,15, + 16,15,17,17,14,15,14,17,16,14,15,15,16,17,15,15, + 16,16,17,15,16,16,17,17,16,16,17,17,18,17,17,17, + 18,18,13,15,13,17,14,14,16,14,17,16,14,15,13,17, + 15,16,17,16,18,17,15,17,15,18,16,11,12,12,15,15, + 13,13,14,15,16,13,14,13,16,15,15,16,16,16,17,15, + 16,16,17,16,12,14,13,16,15,13,13,14,15,16,14,15, + 15,16,16,16,15,16,16,17,16,16,16,17,17,12,13,14, + 15,16,14,14,15,15,17,13,14,13,16,15,16,16,17,17, + 18,15,16,15,17,15,15,16,15,17,17,15,15,16,16,17, + 16,17,16,17,17,16,15,17,15,18,17,18,17,18,18,15, + 15,16,16,17,16,16,17,16,18,15,15,15,16,16,17,17, + 18,17,18,16,16,15,17,15,12,13,13,15,15,13,14,14, + 16,16,13,14,14,16,16,15,16,16,17,18,15,16,15,18, + 16,13,14,14,16,16,14,14,15,16,17,14,15,15,17,17, + 16,16,17,17,18,16,16,17,18,17,13,14,13,16,14,14, + 15,15,17,16,14,15,14,17,15,16,17,17,18,17,15,17, + 15,18,16,15,16,16,17,17,16,16,17,17,18,16,17,17, + 18,18,17,16,18,17,19,18,18,18,18,18,15,16,15,17, + 14,16,16,16,18,15,16,17,15,18,14,18,18,18,18,17, + 17,18,16,19,15, +}; + +static const static_codebook _44p5_p2_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p5_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p5_p2_0, + 0 +}; + +static const long _vq_quantlist__44p5_p3_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p5_p3_0[] = { + 1, 5, 6, 5, 7, 8, 5, 8, 7, 5, 7, 8, 7, 8,10, 8, + 10,10, 5, 8, 7, 8,10,10, 7,10, 8, 6, 8, 9, 8,10, + 11, 9,10,10, 9,10,11,10,11,12,11,12,12, 9,11,10, + 11,12,12,10,12,11, 6, 9, 8, 9,10,10, 8,11,10, 9, + 10,11,10,11,12,11,12,12, 9,11,10,11,12,12,10,12, + 11, 6, 9, 9, 8,10,11, 9,11,10, 8,10,10,10,10,12, + 11,12,12, 9,11,10,11,12,12,10,12,11, 8,10,10,10, + 11,12,10,12,11,10,10,12,11,11,13,12,13,13,10,12, + 11,12,13,13,11,13,11, 7,10,10,10,11,12,10,12,11, + 10,12,11,11,11,12,12,14,13,10,12,12,12,14,14,11, + 13,11, 6, 9, 9, 9,10,11, 8,11,10, 9,10,11,10,11, + 12,11,12,12, 8,11,10,11,12,12,10,12,10, 7,10,10, + 10,11,12,10,12,11,10,12,12,11,11,13,12,13,13,10, + 11,12,12,13,14,11,12,11, 8,10,10,10,11,12,10,12, + 11,10,11,12,11,11,13,12,13,13,10,12,10,12,13,13, + 11,13,11, +}; + +static const static_codebook _44p5_p3_0 = { + 5, 243, + (char *)_vq_lengthlist__44p5_p3_0, + 1, -533200896, 1614282752, 2, 0, + (long *)_vq_quantlist__44p5_p3_0, + 0 +}; + +static const long _vq_quantlist__44p5_p3_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p5_p3_1[] = { + 5, 6, 6, 6, 7, 7, 6, 7, 7, 6, 7, 7, 7, 7, 8, 7, + 8, 8, 6, 7, 7, 7, 8, 8, 7, 8, 7, 7, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 9, 9, 8, 8, 8, + 8, 9, 9, 8, 9, 9, 7, 8, 7, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 9, 9, 8, 9, 9, 8, 8, 8, 8, 9, 9, 8, 9, + 8, 6, 8, 8, 7, 8, 8, 7, 8, 8, 7, 8, 8, 8, 8, 9, + 8, 9, 9, 8, 8, 8, 8, 9, 9, 8, 9, 8, 7, 8, 8, 8, + 9, 9, 8, 9, 9, 8, 8, 9, 9, 9, 9, 9, 9, 9, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 7, 8, 8, 8, 8, 9, 8, 9, 8, + 8, 8, 8, 8, 9, 9, 9, 9, 9, 8, 9, 8, 9, 9, 9, 8, + 9, 9, 6, 8, 8, 7, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, + 9, 8, 9, 9, 7, 8, 8, 8, 9, 9, 8, 9, 8, 7, 8, 8, + 8, 8, 9, 8, 9, 8, 8, 8, 9, 8, 9, 9, 9, 9, 9, 8, + 8, 8, 9, 9, 9, 8, 9, 9, 7, 8, 8, 8, 9, 9, 8, 9, + 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 8, 9, 9, 9, + 9, 9, 9, +}; + +static const static_codebook _44p5_p3_1 = { + 5, 243, + (char *)_vq_lengthlist__44p5_p3_1, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p5_p3_1, + 0 +}; + +static const long _vq_quantlist__44p5_p4_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p5_p4_0[] = { + 1, 5, 5, 5, 7, 9, 5, 9, 7, 5, 7, 8, 7, 7,10, 9, + 10,10, 5, 8, 7, 9,10,10, 7,10, 7, 6, 8, 9, 9,10, + 12, 9,11,11, 9,10,11,11,11,13,12,13,13, 9,11,11, + 11,12,13,11,13,11, 6, 9, 8, 9,11,11, 9,12,10, 9, + 11,11,11,11,13,11,13,12, 9,11,10,12,13,13,11,13, + 11, 6, 9, 9, 8,10,11, 9,12,11, 9,10,11,10,10,12, + 11,13,13, 9,11,11,11,13,12,11,13,11, 8,10,10, 9, + 10,12,10,12,11,10,10,12,10,10,13,12,13,13,10,12, + 11,12,13,13,10,13,10, 7,10,10,11,11,13,11,14,11, + 10,12,11,11,11,13,13,14,13,10,12,12,14,14,14,11, + 14,11, 6, 9, 9, 9,11,12, 8,11,10, 9,11,11,11,11, + 13,11,12,13, 8,11,10,11,13,13,10,12,10, 7,10,10, + 11,11,14,11,13,11,10,12,12,11,11,14,14,14,14,10, + 11,12,13,13,14,11,13,11, 8,10,10,10,11,12, 9,12, + 10,10,11,12,11,10,13,12,13,13,10,12,10,12,13,13, + 11,13,10, +}; + +static const static_codebook _44p5_p4_0 = { + 5, 243, + (char *)_vq_lengthlist__44p5_p4_0, + 1, -531365888, 1616117760, 2, 0, + (long *)_vq_quantlist__44p5_p4_0, + 0 +}; + +static const long _vq_quantlist__44p5_p4_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p5_p4_1[] = { + 5, 7, 7,10,10, 7, 8, 9,10,11, 7, 9, 8,11,10, 9, + 10,10,11,11, 9,10,10,11,11, 7, 9, 9,10,10, 8, 9, + 10,10,11, 9,10,10,11,11,10,10,11,11,11,10,11,11, + 12,12, 7, 9, 9,10,10, 9,10,10,11,11, 8,10, 9,11, + 10,10,11,11,11,11,10,11,10,11,11,10,10,10,11,11, + 10,10,11,11,11,11,11,11,11,11,11,11,12,11,12,11, + 12,11,12,12,10,10,10,11,11,10,11,11,11,11,10,11, + 10,11,11,11,12,11,12,12,11,12,11,12,11, 8, 9, 9, + 11,11, 9,10,10,11,12, 9,10,10,11,11,10,11,11,12, + 12,10,11,11,12,12, 9,10,10,11,11,10,10,11,11,12, + 10,11,11,12,12,11,11,12,12,12,11,12,12,12,12, 9, + 10,10,11,11,10,11,11,12,12,10,11,10,12,12,11,12, + 12,12,12,11,12,12,12,12,11,11,11,12,12,11,11,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,11,11,11,12,12,11,12,12,12,12,11,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12, 8, 9, 9,11,11, 9, + 10,10,11,11, 9,10,10,11,11,10,11,11,12,12,10,11, + 11,12,12, 9,10,10,11,11,10,10,11,12,12,10,11,11, + 12,12,11,12,12,12,12,11,12,12,12,12, 9,10,10,11, + 11,10,11,11,12,12,10,11,10,12,11,11,12,12,12,12, + 11,12,11,12,12,11,11,11,12,12,11,12,12,12,12,11, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,11,11, + 11,12,12,11,12,12,12,12,11,12,11,12,12,12,12,12, + 12,12,12,12,12,12,12,10,11,11,12,12,11,12,12,12, + 12,11,12,12,12,12,12,12,13,13,13,12,12,12,13,13, + 11,12,12,12,12,12,12,12,12,13,12,12,12,13,13,12, + 12,13,13,13,12,13,13,13,13,11,12,12,12,12,12,12, + 12,13,13,12,12,12,13,13,12,13,13,13,13,12,13,13, + 13,13,12,12,12,12,13,12,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,12,12,12,13,12, + 13,13,13,13,13,12,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,10,11,11,12,12,11,12,12,12,12,11,12, + 11,12,12,12,12,12,13,12,12,12,12,13,13,11,12,12, + 12,12,12,12,12,13,13,12,12,12,13,13,12,13,13,13, + 13,12,13,13,13,13,11,12,12,12,12,12,12,12,13,13, + 12,12,12,13,12,12,13,13,13,13,12,13,12,13,13,12, + 12,12,12,13,12,13,13,13,13,12,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,12,12,12,13,12,13,13,13, + 13,13,12,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13, 8, 9, 9,11,11, 9,10,10,11,11, 9,10,10,12,11, + 10,11,11,12,12,10,11,11,12,12, 9,10,10,11,11,10, + 10,11,11,12,10,11,11,12,12,11,11,12,12,12,11,12, + 12,12,12, 9,10,10,11,11,10,11,11,12,12,10,11,10, + 12,12,11,12,12,12,12,11,12,12,12,12,11,11,11,12, + 12,11,11,12,12,12,11,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,11,11,11,12,12,11,12,12,12,12,11, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12, 9,10, + 10,11,11,10,10,11,12,12,10,11,11,12,12,11,11,12, + 12,12,11,12,12,12,12,10,10,11,11,12,11,11,12,12, + 12,11,11,12,12,12,11,11,12,12,13,12,12,12,12,12, + 10,11,11,12,12,11,12,11,12,12,11,12,11,12,12,12, + 12,12,12,12,12,12,12,12,12,11,11,12,12,12,12,12, + 12,12,12,12,12,12,12,13,12,12,13,12,13,12,12,13, + 13,13,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,13,12,12,12,12,13,12, 8,10,10,11,11, + 10,11,11,12,12,10,11,10,12,12,11,12,12,12,12,11, + 12,12,12,12,10,11,10,12,12,10,10,11,12,12,11,12, + 12,12,12,12,12,12,12,13,12,12,12,13,13,10,11,11, + 12,12,11,12,12,12,12,10,12,11,12,12,12,12,12,13, + 13,12,13,12,13,12,11,12,12,12,12,11,12,12,12,13, + 12,12,12,13,13,12,12,13,12,13,12,13,13,13,13,11, + 12,12,12,12,12,12,12,13,13,12,12,12,13,12,12,13, + 13,13,13,12,13,12,13,12,11,11,11,12,12,11,12,12, + 12,13,11,12,12,12,12,12,12,12,13,13,12,12,13,13, + 13,11,12,12,12,12,12,12,12,12,13,12,12,13,13,13, + 12,12,13,13,13,13,13,13,13,13,11,12,12,12,12,12, + 13,12,13,13,12,12,12,13,13,12,13,13,13,13,12,13, + 13,13,13,12,12,12,12,13,12,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,12,12,12,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,10,11,11,12,12,11,12,12,12,13,11, + 12,12,13,12,12,13,13,13,13,12,13,13,13,13,11,12, + 12,12,12,12,12,12,13,13,12,13,12,13,13,13,13,13, + 13,13,13,13,13,13,13,11,12,12,13,12,12,13,12,13, + 13,12,13,12,13,13,13,13,13,13,13,13,13,13,13,13, + 12,13,13,13,13,12,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,12,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13, 8, 9, 9,11,11, 9,10,10,11,12, 9,10,10,11, + 11,10,11,11,12,12,10,11,11,12,12, 9,10,10,11,11, + 10,10,11,12,12,10,11,11,12,12,11,11,12,12,12,11, + 12,12,12,12, 9,10,10,11,11,10,11,11,12,12,10,11, + 10,12,12,11,12,12,12,12,11,12,11,12,12,11,11,11, + 12,12,11,11,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,11,11,11,12,12,11,12,12,12,12, + 11,12,11,12,12,12,12,12,12,12,12,12,12,12,12, 8, + 10,10,11,11,10,10,11,12,12,10,11,11,12,12,11,12, + 12,12,12,11,12,12,12,12,10,11,11,12,12,10,11,12, + 12,12,11,12,12,12,12,12,12,12,12,13,12,12,12,13, + 13,10,10,11,12,12,11,12,12,12,12,10,11,10,12,12, + 12,12,12,13,13,12,12,12,13,12,11,12,12,12,12,11, + 12,12,12,13,12,12,12,13,13,12,12,13,12,13,12,13, + 13,13,13,11,12,12,12,12,12,12,12,13,13,11,12,12, + 13,12,12,13,13,13,13,12,13,12,13,12, 9,10,10,11, + 11,10,11,11,12,12,10,11,11,12,12,11,12,12,12,12, + 11,12,11,12,12,10,11,11,12,12,11,11,12,12,12,11, + 11,12,12,12,12,12,12,12,13,12,12,12,13,12,10,11, + 10,12,11,11,12,11,12,12,11,12,11,12,12,12,12,12, + 12,12,12,12,11,12,12,11,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,13,12,13,12,13,13,13,13, + 11,12,11,12,12,12,12,12,13,12,12,12,12,12,12,12, + 13,12,13,13,12,12,12,13,12,10,11,11,12,12,11,12, + 12,12,13,11,12,12,13,12,12,12,13,13,13,12,13,13, + 13,13,11,12,12,12,13,12,12,13,13,13,12,12,13,13, + 13,13,13,13,13,13,13,13,13,13,13,11,12,12,12,12, + 12,12,13,13,13,12,13,12,13,13,13,13,13,13,13,13, + 13,13,13,13,12,13,13,13,13,12,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,12,12,13, + 13,13,13,13,13,13,13,12,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,11,11,11,12,12,11,12,12,12,12, + 11,12,12,12,12,12,12,13,13,13,12,13,12,13,13,11, + 12,12,12,12,12,12,13,13,13,12,12,13,13,13,12,13, + 13,13,13,12,13,13,13,13,11,12,12,12,12,12,13,12, + 13,13,12,12,12,13,12,13,13,13,13,13,12,13,12,13, + 13,12,12,12,13,13,12,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,12,12,12,13,12,13, + 13,13,13,13,12,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,10,11,11,12,12,11,12,12,12,12,11,12,12, + 12,12,12,12,12,13,13,12,12,12,13,13,11,12,12,12, + 12,11,12,12,13,13,12,12,12,13,13,12,12,13,13,13, + 12,13,13,13,13,11,12,12,12,12,12,12,12,13,13,12, + 12,12,13,12,12,13,13,13,13,12,13,12,13,13,12,12, + 12,12,12,12,12,13,13,13,12,13,13,13,13,12,13,13, + 13,13,13,13,13,13,13,12,12,12,13,12,12,13,13,13, + 13,12,13,12,13,13,13,13,13,13,13,13,13,13,13,13, + 10,11,11,12,12,11,12,12,12,13,11,12,12,13,12,12, + 12,12,13,13,12,12,12,13,13,11,12,12,12,12,12,12, + 13,13,13,12,12,12,13,13,12,12,13,13,13,12,13,13, + 13,13,11,12,12,12,12,12,12,12,13,13,12,12,12,13, + 13,12,13,13,13,13,12,13,13,13,13,12,12,12,12,13, + 12,12,13,13,13,12,13,13,13,13,12,13,13,13,13,13, + 13,13,13,13,12,12,12,13,13,13,13,13,13,13,12,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,10,11,11, + 12,12,11,12,12,12,13,11,12,12,13,12,12,13,13,13, + 13,12,13,12,13,13,11,12,12,13,13,12,12,12,13,13, + 12,12,13,13,13,12,13,13,13,13,13,13,13,13,13,11, + 12,12,13,12,12,13,12,13,13,12,13,12,13,13,13,13, + 13,13,13,12,13,13,13,13,12,12,12,13,13,12,13,13, + 13,13,12,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,12,12,12,13,13,12,13,13,13,13,12,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,11,11,11,12,12,11, + 12,12,12,12,11,12,12,12,12,12,12,12,13,13,12,12, + 12,13,13,11,12,12,12,12,12,12,12,12,13,12,12,12, + 13,13,12,12,13,13,13,12,13,13,13,13,11,12,12,12, + 12,12,12,12,13,13,12,12,12,13,12,12,13,13,13,13, + 12,13,12,13,13,12,12,12,12,12,12,12,13,12,13,12, + 13,13,13,13,12,13,13,12,13,13,13,13,13,13,12,12, + 12,12,12,12,13,13,13,13,12,13,12,13,13,13,13,13, + 13,13,12,13,13,13,12,10,11,11,12,12,11,12,12,12, + 12,11,12,12,12,12,12,12,12,13,13,12,13,12,13,13, + 11,12,12,12,12,12,12,12,13,13,12,12,12,13,13,12, + 12,13,13,13,13,13,13,13,13,11,12,12,12,12,12,13, + 12,13,13,12,13,12,13,13,12,13,13,13,13,12,13,12, + 13,13,12,12,12,12,12,12,13,13,13,13,12,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,12,12,12,13,12, + 12,13,13,13,13,12,13,12,13,13,13,13,13,13,13,13, + 13,13,13,13,10,11,11,12,12,11,12,12,12,12,11,12, + 12,12,12,12,12,12,13,13,12,12,12,13,13,11,12,12, + 12,12,12,12,12,13,13,12,12,12,13,13,12,12,13,13, + 13,12,12,13,13,13,11,12,11,12,12,12,12,12,13,13, + 11,12,12,13,13,12,13,13,13,13,12,13,12,13,13,12, + 12,12,12,12,12,13,13,13,13,12,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,12,12,12,13,12,12,13,13, + 13,13,12,13,12,13,13,13,13,13,13,13,12,13,13,13, + 13,10,11,11,12,12,11,12,12,12,13,11,12,12,13,12, + 12,12,13,13,13,12,13,13,13,13,11,12,12,13,13,12, + 12,13,13,13,12,12,13,13,13,12,13,13,13,13,13,13, + 13,13,13,11,12,12,13,12,12,13,12,13,13,12,12,12, + 13,13,12,13,13,13,13,13,13,13,13,13,12,12,13,13, + 13,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,12,12,12,13,13,13,13,13,13,13,12, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,10,12, + 11,12,12,11,12,12,12,13,11,12,12,12,12,12,12,12, + 13,13,12,12,12,13,13,11,12,12,12,13,12,12,12,13, + 13,12,12,12,13,13,12,13,13,13,13,12,13,13,13,13, + 11,12,12,13,12,12,12,12,13,13,12,12,12,13,13,12, + 13,13,13,13,12,13,12,13,13,12,13,12,13,13,12,13, + 13,13,13,12,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,12,12,12,13,12,13,13,13,13,13,12,13,12,13, + 13,13,13,13,13,13,12,13,13,13,13,10,11,11,12,12, + 11,12,12,12,13,11,12,12,12,12,12,12,12,13,13,12, + 12,12,13,13,11,12,12,12,12,12,12,13,13,13,12,13, + 13,13,13,12,12,13,13,13,13,13,13,13,13,11,12,12, + 12,12,12,13,12,13,13,12,12,12,13,13,12,13,13,13, + 13,12,13,12,13,13,12,12,12,12,13,12,13,13,13,13, + 12,13,13,13,13,12,13,13,13,13,13,13,13,13,13,12, + 12,12,12,12,12,13,13,13,13,12,13,13,13,13,13,13, + 13,13,13,12,13,13,13,13,11,12,11,12,12,11,12,12, + 12,12,11,12,12,12,12,12,12,12,12,13,12,12,12,13, + 12,11,12,12,12,12,12,12,12,12,13,12,12,12,13,13, + 12,12,13,13,13,12,13,13,13,13,11,12,12,12,12,12, + 12,12,13,13,12,12,12,13,12,12,13,13,13,13,12,13, + 12,13,13,12,12,12,12,12,12,12,13,13,13,12,13,13, + 13,13,13,13,13,12,13,13,13,13,13,13,12,12,12,12, + 12,12,13,13,13,13,12,13,12,13,12,13,13,13,13,13, + 13,13,13,13,12, +}; + +static const static_codebook _44p5_p4_1 = { + 5, 3125, + (char *)_vq_lengthlist__44p5_p4_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p5_p4_1, + 0 +}; + +static const long _vq_quantlist__44p5_p5_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p5_p5_0[] = { + 1, 6, 6,10,10, 6, 7, 9,11,13, 5, 9, 7,13,11, 8, + 11,12,13,15, 8,12,11,15,13, 6, 7, 8,11,11, 7, 8, + 10,11,13, 9,10,10,13,13,11,11,13,12,16,12,13,13, + 16,15, 6, 8, 7,11,11, 9,10,10,13,13, 7,10, 7,13, + 11,12,13,13,15,16,11,13,11,16,12,10,11,11,11,13, + 11,11,13,12,15,13,13,13,14,15,13,12,15,12,17,15, + 16,16,16,16,10,11,11,14,11,13,13,13,15,14,11,13, + 11,15,12,15,15,16,16,16,13,15,12,17,12, 6, 8, 9, + 12,12, 9,10,12,13,15, 9,11,11,15,14,12,13,15,16, + 18,13,14,14,17,16, 9,10,11,13,14,11,10,13,14,16, + 11,12,12,15,15,14,13,16,15,18,14,15,15,17,17, 9, + 11,11,14,14,11,12,13,15,16,11,13,11,15,14,15,15, + 15,17,18,14,15,14,17,15,13,14,14,15,16,14,14,15, + 15,17,15,16,15,17,17,16,16,17,15,19,17,18,18,19, + 18,13,14,14,16,15,15,15,16,17,17,14,15,14,18,15, + 17,17,17,19,19,16,17,15,19,16, 6, 9, 8,13,12, 9, + 11,11,14,15, 9,12,10,15,13,13,14,14,16,17,12,15, + 13,18,16, 9,11,11,14,14,11,11,13,14,15,11,13,12, + 16,15,14,14,15,15,18,14,15,15,18,17, 9,11,10,14, + 13,11,12,12,15,15,11,13,10,16,14,14,15,15,16,18, + 14,16,13,18,15,13,14,14,16,16,14,14,15,15,17,15, + 16,15,17,17,16,16,17,16,19,17,18,17,18,19,13,14, + 14,16,15,15,15,15,17,17,14,15,14,17,15,17,17,17, + 18,19,16,17,15,19,15,11,13,13,15,16,13,14,15,16, + 18,14,15,15,17,17,16,16,18,18,20,17,18,17,19,20, + 13,14,14,16,17,15,15,16,17,18,15,16,16,17,17,18, + 17,19,18,19,18,18,18,19,21,14,14,15,16,17,15,15, + 16,18,18,15,16,16,17,18,18,18,19,19,21,18,19,19, + 22,20,16,16,17,17,19,17,17,17,18,20,17,18,18,20, + 19,19,19,20,19, 0,19,19,20,20,21,17,17,17,19,18, + 18,18,20,19,19,18,18,18,20,20,19,19,20,20,20,20, + 21,20,21,19,11,13,13,16,15,14,15,15,17,17,14,15, + 14,18,16,16,18,18,20,19,16,19,17,21,18,13,14,15, + 16,17,15,15,16,18,18,15,16,15,19,18,18,18,18,19, + 19,18,18,18,22,20,13,14,14,16,16,15,16,16,18,17, + 15,16,15,18,17,18,18,18,19,19,17,18,17,21,18,16, + 17,17,18,18,17,18,19,19,19,18,20,18,19,19,19,20, + 21,19,21,20,20,20, 0,21,16,17,17,19,19,18,18,18, + 19,21,17,18,18,19,18,20,19,21,20,21,19,20,20,22, + 19, 7, 9, 9,13,13, 8,10,11,14,15, 9,12,11,15,14, + 11,13,14,16,17,13,15,14,17,16, 8,10,11,14,14,10, + 10,12,14,16,11,12,12,16,15,13,12,15,15,18,14,15, + 15,19,17, 9,11,11,14,14,11,12,12,15,15,11,13,11, + 16,14,14,15,14,17,17,14,16,14,18,15,12,13,14,15, + 16,13,13,15,14,17,15,15,15,17,17,15,14,17,14,19, + 17,18,18,19,18,13,14,14,16,16,15,15,15,17,17,14, + 15,14,18,15,17,18,17,18,17,16,18,16,19,15, 7,10, + 10,13,13, 9,10,12,14,15,10,12,11,15,14,12,13,14, + 16,17,13,15,14,18,16,10,10,12,13,14,10,10,13,13, + 16,12,12,13,15,15,13,12,15,15,18,15,15,16,18,17, + 10,11,11,14,14,12,13,13,15,16,10,13,10,16,14,14, + 15,15,17,17,14,15,13,17,15,13,13,14,15,16,14,13, + 15,14,18,15,15,16,16,17,16,15,18,15,18,17,18,18, + 18,18,13,15,14,17,16,15,16,16,17,17,14,15,13,17, + 15,17,17,18,18,18,16,17,14,20,14, 8,10,10,14,14, + 11,11,13,14,16,11,13,11,16,14,14,15,16,16,18,14, + 16,15,18,16,10,12,11,15,14,11,11,13,14,16,13,14, + 13,16,15,15,14,16,15,19,16,17,16,20,18,10,11,12, + 14,15,13,13,14,16,16,11,14,11,16,14,16,16,17,18, + 19,15,17,14,20,15,14,15,14,17,16,13,14,15,15,18, + 16,17,16,19,18,16,15,18,15,19,18,19,18,21,21,14, + 14,15,16,17,16,16,17,18,18,13,15,14,17,15,18,18, + 19,18,22,16,18,15,21,15,12,13,14,16,16,14,14,16, + 16,18,14,15,15,17,18,16,16,18,18,20,18,18,17,20, + 20,13,14,15,15,17,15,14,16,16,18,16,16,16,17,19, + 17,15,18,17,21,18,18,18,19,19,14,15,15,18,17,15, + 16,16,18,19,15,16,15,18,18,17,18,18,20,21,17,19, + 17,20,19,16,16,17,16,19,17,17,18,17,20,18,18,18, + 18,19,19,18,20,17,22,20,20,19,20,20,17,17,18,18, + 19,18,18,20,21,20,17,18,17,20,20,21,21,21,21,21, + 19,21,18,22,20,11,13,13,17,16,14,14,16,16,18,14, + 16,14,18,16,17,18,19,19,20,18,19,18,21,19,14,15, + 14,17,16,14,14,16,18,18,16,17,16,18,17,18,17,19, + 18,20,19,19,18,20,20,13,14,15,16,17,16,16,17,18, + 19,14,16,14,19,17,18,19,18,20,20,18,20,17,21,18, + 17,17,17,19,18,16,17,18,18,19,18,19,18,21,21,18, + 18,20,17,21,19,20,20,22,21,16,17,18,18,19,18,18, + 19,21,20,16,17,17,20,18,21,21,22,21,22,18,21,18, + 0,18, 7, 9, 9,13,13, 9,11,12,14,15, 8,11,10,15, + 14,13,14,15,16,18,11,14,13,17,15, 9,11,11,14,14, + 11,11,13,14,16,11,12,12,15,15,14,14,16,15,18,14, + 14,15,17,17, 8,11,10,14,14,11,12,12,15,15,10,12, + 10,16,14,14,15,15,17,18,13,15,12,18,15,13,14,14, + 16,16,14,14,15,15,17,15,15,15,16,17,16,15,17,15, + 19,17,17,17,18,18,12,14,13,16,15,15,15,15,17,17, + 13,15,13,17,14,17,18,18,18,19,15,17,14,19,14, 8, + 10,10,14,14,11,11,13,14,16,11,13,11,16,14,14,15, + 16,17,19,14,16,15,18,17,10,12,11,15,14,11,11,14, + 14,17,13,14,13,17,15,15,14,17,15,19,16,17,16,19, + 17,10,11,12,14,15,13,13,14,15,17,11,13,11,17,14, + 16,16,17,18,19,15,16,14,18,15,14,15,14,16,16,13, + 14,15,15,18,16,16,16,18,18,16,15,18,15,20,18,19, + 18,21,18,14,14,15,16,17,16,16,17,17,18,13,15,14, + 17,16,19,19,19,19,19,15,18,15,20,15, 7,10,10,13, + 13,10,11,12,14,15, 9,12,10,15,14,13,14,15,16,17, + 12,15,13,17,16,10,11,11,14,14,10,10,13,14,16,12, + 13,13,16,15,14,13,16,15,18,15,15,16,17,17,10,12, + 10,14,13,12,13,12,15,15,10,13,10,16,13,15,16,15, + 17,18,13,16,12,18,15,13,14,14,16,17,14,13,15,15, + 18,15,16,15,17,17,16,14,17,15,19,17,18,18,19,19, + 13,15,13,17,14,15,15,15,18,17,14,15,13,17,14,18, + 17,18,18,19,15,17,15,19,15,11,13,13,16,17,14,14, + 16,16,18,14,16,15,18,17,17,18,19,18,21,18,18,17, + 20,18,13,15,14,17,16,14,14,16,17,18,16,17,16,19, + 17,18,17,19,18,22,18,19,19,21,21,13,14,15,16,18, + 16,16,17,17,20,14,16,14,18,17,18,18,19,19,21,17, + 18,17,21,18,17,18,17,19,18,16,17,17,18,19,18,18, + 18,22,22,18,17,19,17, 0,20,21,19,21,20,17,17,18, + 18,21,18,18,18,19,21,17,17,17,19,19,20,20,22,21, + 21,19,20,18,20,17,12,14,13,17,16,14,15,15,17,18, + 14,16,14,18,16,17,18,18,21,20,16,18,16,21,18,14, + 15,15,17,17,15,15,16,18,18,15,17,16,18,18,17,17, + 19,19,20,18,19,18,20,19,14,15,14,17,15,15,16,16, + 18,17,15,16,14,19,15,18,18,18,19,20,17,20,15,21, + 17,16,17,18,18,19,17,17,18,18,20,18,19,18,19,21, + 19,18,19,19,21,20, 0,19,21,20,16,17,16,19,16,18, + 18,18,19,19,17,18,17,20,17,19,20,20,22, 0,19,20, + 17,21,17,11,13,14,16,17,14,15,15,17,18,14,15,15, + 18,18,16,17,17,19,20,16,18,17,19,21,13,14,15,17, + 17,14,15,16,17,19,15,16,16,18,19,16,17,18,19,21, + 17,18,20,21,21,13,15,15,17,17,15,16,16,18,19,15, + 16,16,18,19,17,17,18,19,22,17,19,18,22,19,15,16, + 17,19,19,16,17,18,18,20,17,18,18,19,20,19,18,20, + 18,22,20,19,19,22,21,16,17,17,18,19,18,18,18,19, + 20,17,18,18,20,19,20,19,20,22,20,19,20,21,21,20, + 12,14,14,16,16,13,14,16,17,18,14,16,15,18,18,15, + 17,17,19,19,17,18,18,19,19,13,14,15,16,17,14,14, + 16,16,20,15,16,16,17,19,16,15,18,17,20,18,17,19, + 19,19,14,15,15,17,17,16,16,16,18,18,15,16,15,19, + 18,17,18,18,20,21,17,18,17,21,18,16,15,17,17,19, + 17,15,18,17,20,19,17,18,19,20,18,16,19,17,22,20, + 19,20,19,20,17,17,18,19,19,18,18,19,20,20,17,18, + 17,18,18,21,21,20,20,21,18,20,17,21,19,11,14,14, + 16,17,15,14,16,17,19,14,16,14,18,17,18,18,19,19, + 21,17,19,18,20,20,13,15,14,17,17,14,14,16,17,18, + 16,17,16,19,18,18,17,19,18,20,18,21,18,20,20,13, + 15,15,16,17,16,16,17,18,19,14,16,15,19,18,19,19, + 19,21,20,18,19,17,20,18,16,17,16,19,18,16,17,17, + 19,20,17,19,18,20,19,18,17,21,18, 0,21,20,20, 0, + 20,17,17,18,18,19,18,19,19,20,22,16,17,17,20,18, + 21,22,20,20,22,18,22,18,22,18,12,14,14,17,17,14, + 15,16,17,19,14,16,15,17,17,17,17,18,18,21,17,19, + 17,20,19,14,15,15,16,18,15,14,16,16,19,16,17,16, + 19,18,17,16,20,17,20,18,20,19,19,20,14,15,15,18, + 17,16,16,17,18,19,14,16,15,19,17,18,21,18,19,21, + 17,18,17,19,18,17,17,18,17,20,17,16,18,17,21,18, + 19,19,19,19,18,17,19,17,20,20,21,20,21,20,17,17, + 17,19,19,19,18,18,20,21,16,18,16,19,18,20,20,21, + 21,20,18,19,16, 0,17,12,14,14,17,17,15,15,18,17, + 19,15,18,15,20,16,20,19,21,18,22,20,20,20,22,19, + 14,16,14,20,17,14,15,17,17,20,18,18,17,20,18,18, + 17,19,17,21,20,21,20, 0,21,14,15,16,17,19,18,17, + 19,18,21,14,18,15,21,17,21,20,21,20, 0,18,21,17, + 21,17,18,19,17,20,18,16,17,17,19,19,19,21,20, 0, + 20,18,17,21,17, 0,22, 0,21, 0,22,17,17,19,18,20, + 20,20,21,19,22,16,17,18,20,18,22,22, 0,22, 0,17, + 21,17,22,17,11,14,13,16,16,14,15,15,17,18,14,15, + 14,18,17,17,18,18,19,20,16,17,17,21,19,13,14,15, + 17,17,15,16,16,18,18,15,16,16,19,18,18,18,18,19, + 20,17,18,18,20,19,13,15,14,17,17,15,16,16,17,18, + 14,16,15,19,17,17,18,19,21,21,17,18,17,20,18,16, + 17,17,19,19,17,18,19,19,20,18,19,18,21,21,21,20, + 19,21,22,20,20,19,21,20,15,17,16,19,19,17,18,18, + 20,21,16,18,17,20,18,19,19,21,21,21,19,19,19,20, + 18,11,14,13,17,16,14,14,16,16,19,14,16,15,19,16, + 18,18,18,19,22,17,18,17,20,19,13,15,14,17,17,15, + 15,16,17,19,16,17,16,20,18,18,17,19,18,21,19,19, + 18,22, 0,13,14,15,17,18,16,16,17,17,19,14,16,15, + 19,18,18,19,19,20,21,18,18,17,20,18,17,18,17,20, + 18,16,17,17,18,20,18,19,18,20,20,18,18,21,17,21, + 20,21,21, 0,19,16,16,18,18,19,19,18,20,19,20,16, + 17,17,20,18,21,20,21,22,22,18,20,17,21,17,12,14, + 14,17,16,14,15,16,18,18,13,15,14,18,17,17,18,18, + 19,19,15,17,16,19,19,14,15,15,17,17,15,15,16,18, + 19,15,16,16,19,18,17,17,18,18,20,18,18,18,21,20, + 13,15,14,17,16,15,16,15,18,18,14,16,14,18,17,18, + 18,18,19,21,16,18,16,20,17,17,18,17,18,19,17,17, + 18,18,19,18,19,19,21,19,19,18,20,18,21,21,20,20, + 21,20,16,17,15,20,17,17,19,17,19,19,17,18,15,20, + 17,19,20,19,21,22,17,20,16, 0,17,12,14,14,17,18, + 16,15,18,16,20,16,18,15,21,17,20,18,21,19,22,19, + 21,19, 0,19,14,16,15,19,17,14,15,17,16,21,18,19, + 18,21,17,19,17,21,17,22,20,21,21, 0,21,14,15,16, + 17,19,18,17,19,18,21,14,17,15,20,17,21,22,21,20, + 22,18,21,17,21,17,17,19,17,21,18,16,17,17,19,20, + 19,21,20,21,20,17,18,20,17,21, 0,22,20,21,22,17, + 17,20,18,21,21,20,22,20,21,16,17,17,21,19, 0,22, + 0,21,21,18,22,17,21,17,12,14,14,17,16,14,15,16, + 17,18,14,16,15,18,17,17,17,20,19,20,16,18,17,21, + 18,14,15,15,17,17,14,15,16,17,19,16,17,16,18,18, + 17,16,19,18,19,18,19,18,21,20,14,15,15,18,17,16, + 16,16,19,18,15,16,14,20,16,18,18,19,19,20,16,19, + 16,21,17,17,17,18,19,19,16,16,18,18,19,19,19,18, + 20,20,18,16,19,18,20,22,21,20,19,20,16,18,17,20, + 16,18,19,18,19,18,16,18,16,20,17,21,20,21,20,20, + 18,19,17,21,16, +}; + +static const static_codebook _44p5_p5_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p5_p5_0, + 1, -528744448, 1616642048, 3, 0, + (long *)_vq_quantlist__44p5_p5_0, + 0 +}; + +static const long _vq_quantlist__44p5_p5_1[] = { + 3, + 2, + 4, + 1, + 5, + 0, + 6, +}; + +static const char _vq_lengthlist__44p5_p5_1[] = { + 2, 3, 3, 3, 3, 3, 3, +}; + +static const static_codebook _44p5_p5_1 = { + 1, 7, + (char *)_vq_lengthlist__44p5_p5_1, + 1, -533200896, 1611661312, 3, 0, + (long *)_vq_quantlist__44p5_p5_1, + 0 +}; + +static const long _vq_quantlist__44p5_p6_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p5_p6_0[] = { + 1, 5, 5, 5, 7, 9, 5, 9, 7, 5, 7, 8, 7, 7,10, 9, + 9,10, 5, 8, 7, 9,10, 9, 7,10, 7, 6, 9, 9, 9,10, + 12,10,12,11, 9,10,11,11,10,13,12,12,13,10,11,11, + 12,13,13,11,13,11, 6, 9, 9,10,11,12, 9,12,11,10, + 11,11,11,11,13,12,13,13, 9,11,10,12,13,13,11,13, + 10, 6, 9,10, 9,11,12,10,12,11, 9,10,11,10,10,13, + 11,13,13,10,11,11,12,13,12,11,13,11, 7, 9,10, 9, + 10,12,10,11,11,10,10,11,10,10,12,12,11,12,10,11, + 10,12,12,12,10,12,10, 7,10,10,11,11,13,11,13,11, + 10,12,11,11,10,13,13,14,13,10,11,12,13,13,14,11, + 13,10, 6,10, 9,10,11,12, 9,12,11, 9,11,11,11,11, + 13,12,12,13, 9,11,10,12,13,13,10,13,10, 7,10,10, + 11,11,14,11,13,11,10,12,11,11,10,14,13,14,13,10, + 11,12,13,13,14,11,13,10, 7,10, 9,10,10,12, 9,12, + 10,10,11,11,10,10,12,12,12,12, 9,11,10,11,12,12, + 10,12, 9, +}; + +static const static_codebook _44p5_p6_0 = { + 5, 243, + (char *)_vq_lengthlist__44p5_p6_0, + 1, -527106048, 1620377600, 2, 0, + (long *)_vq_quantlist__44p5_p6_0, + 0 +}; + +static const long _vq_quantlist__44p5_p6_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p5_p6_1[] = { + 2, 6, 6, 5, 7, 8, 5, 8, 7, 6, 7, 7, 7, 7, 8, 8, + 8, 8, 6, 7, 7, 7, 8, 8, 7, 8, 7, 6, 8, 8, 8, 9, + 10, 8, 9, 9, 8, 9, 9, 9, 9,10,10,10,10, 8, 9, 9, + 10,10,10, 9,10,10, 6, 8, 8, 8, 9, 9, 8,10, 9, 9, + 9, 9, 9, 9,10,10,10,10, 8, 9, 9,10,10,10, 9,10, + 9, 6, 8, 9, 8, 9, 9, 8, 9, 9, 8, 9, 9, 9, 9,10, + 9,10,10, 8, 9, 9, 9,10,10, 9,10, 9, 7, 8, 9, 8, + 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 7, 9, 9, 9,10,10, 9,10,10, + 9,10, 9, 9, 9,10,10,10,10, 9,10, 9,10,10,10, 9, + 10, 9, 6, 8, 8, 8, 9, 9, 8, 9, 9, 8, 9, 9, 9, 9, + 10, 9,10,10, 8, 9, 9, 9,10,10, 9,10, 9, 7, 9, 9, + 9,10,10, 9,10, 9, 9, 9,10,10, 9,10,10,10,10, 9, + 9, 9,10,10,10, 9,10, 9, 7, 9, 8, 8, 9, 9, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 8, 9, 9, 9, + 9, 9, 9, +}; + +static const static_codebook _44p5_p6_1 = { + 5, 243, + (char *)_vq_lengthlist__44p5_p6_1, + 1, -530841600, 1616642048, 2, 0, + (long *)_vq_quantlist__44p5_p6_1, + 0 +}; + +static const long _vq_quantlist__44p5_p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p5_p7_0[] = { + 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, +}; + +static const static_codebook _44p5_p7_0 = { + 5, 243, + (char *)_vq_lengthlist__44p5_p7_0, + 1, -513979392, 1633504256, 2, 0, + (long *)_vq_quantlist__44p5_p7_0, + 0 +}; + +static const long _vq_quantlist__44p5_p7_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p5_p7_1[] = { + 1, 7, 7, 6, 9, 9, 7, 9, 9, 6, 9, 9, 9, 9, 9, 9, + 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10, +}; + +static const static_codebook _44p5_p7_1 = { + 5, 243, + (char *)_vq_lengthlist__44p5_p7_1, + 1, -516716544, 1630767104, 2, 0, + (long *)_vq_quantlist__44p5_p7_1, + 0 +}; + +static const long _vq_quantlist__44p5_p7_2[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p5_p7_2[] = { + 1, 2, 3, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11, + 11,12,12,13,13,14,14,14,14, +}; + +static const static_codebook _44p5_p7_2 = { + 1, 25, + (char *)_vq_lengthlist__44p5_p7_2, + 1, -518864896, 1620639744, 5, 0, + (long *)_vq_quantlist__44p5_p7_2, + 0 +}; + +static const long _vq_quantlist__44p5_p7_3[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p5_p7_3[] = { + 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44p5_p7_3 = { + 1, 25, + (char *)_vq_lengthlist__44p5_p7_3, + 1, -529006592, 1611661312, 5, 0, + (long *)_vq_quantlist__44p5_p7_3, + 0 +}; + +static const char _huff_lengthlist__44p5_short[] = { + 4, 7,12,14,15,18,20,20, 5, 3, 4, 6, 9,11,15,19, + 9, 4, 3, 4, 7, 9,13,18,11, 6, 3, 3, 5, 8,13,19, + 14, 9, 6, 5, 7,10,16,20,16,11, 9, 8,10,10,14,16, + 21,14,13,11, 8, 7,11,14,21,14,13, 9, 6, 5,10,12, +}; + +static const static_codebook _huff_book__44p5_short = { + 2, 64, + (char *)_huff_lengthlist__44p5_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p6_l0_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44p6_l0_0[] = { + 1, 4, 4, 7, 7,10,10,12,12,12,12,13,12, 5, 5, 5, + 8, 6,11, 9,12,12,13,12,12,12, 4, 5, 5, 6, 8, 9, + 11,12,12,13,12,12,12, 7, 7, 8, 9, 9,11, 8,12, 9, + 12,12,12,12, 7, 8, 8, 9, 9, 8,11, 9,12,12,12,11, + 12,10,10,10,11,11,11,11,11,10,11,11,12,11,10,10, + 10,11,11,11,11,10,11,11,11,11,12,11,11,11,12,11, + 12,11,12,11,13,11,13,11,11,11,11,11,12,11,12,10, + 13,11,12,11,13,12,12,12,13,12,13,13,13,12,14,12, + 14,13,12,12,12,12,13,13,13,12,14,12,14,13,14,13, + 14,14,14,14,14,14,14,14,15,14,15,14,13,14,13,14, + 14,14,14,14,15,14,14,14,15, +}; + +static const static_codebook _44p6_l0_0 = { + 2, 169, + (char *)_vq_lengthlist__44p6_l0_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44p6_l0_0, + 0 +}; + +static const long _vq_quantlist__44p6_l0_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p6_l0_1[] = { + 4, 4, 4, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, + 5, 5, 4, 5, 5, 5, 5, 5, 4, +}; + +static const static_codebook _44p6_l0_1 = { + 2, 25, + (char *)_vq_lengthlist__44p6_l0_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p6_l0_1, + 0 +}; + +static const long _vq_quantlist__44p6_l1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p6_l1_0[] = { + 1, 3, 2, 5, 5, 6, 6, 6, 6, +}; + +static const static_codebook _44p6_l1_0 = { + 2, 9, + (char *)_vq_lengthlist__44p6_l1_0, + 1, -516716544, 1630767104, 2, 0, + (long *)_vq_quantlist__44p6_l1_0, + 0 +}; + +static const char _huff_lengthlist__44p6_lfe[] = { + 2, 3, 1, 3, +}; + +static const static_codebook _huff_book__44p6_lfe = { + 2, 4, + (char *)_huff_lengthlist__44p6_lfe, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44p6_long[] = { + 2, 7,13,15,16,17,19,20, 6, 3, 4, 7, 9,10,12,15, + 13, 4, 3, 4, 7, 8,11,13,14, 7, 4, 4, 6, 7,10,11, + 16, 9, 7, 6, 7, 8, 9,10,16, 9, 8, 7, 7, 6, 8, 8, + 18,12,10,10, 9, 8, 8, 9,20,14,13,12,11, 8, 9, 9, +}; + +static const static_codebook _huff_book__44p6_long = { + 2, 64, + (char *)_huff_lengthlist__44p6_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p6_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p6_p1_0[] = { + 2, 5, 5, 5, 7, 7, 5, 7, 7, 5, 7, 7, 7, 8, 9, 7, + 9, 9, 5, 7, 7, 7, 9, 9, 7, 9, 8, 5, 7, 8, 8, 9, + 10, 8, 9, 9, 8, 9,10, 9,10,12,10,11,11, 8, 9,10, + 10,11,11, 9,11,11, 5, 8, 7, 8, 9, 9, 8,10, 9, 8, + 10, 9, 9,11,11,10,11,11, 8,10, 9,10,11,11, 9,12, + 10, 5, 8, 8, 7, 9,10, 8,10, 9, 7, 9, 9, 9,10,11, + 9,11,11, 8,10,10,10,11,11,10,12,11, 7, 9, 9, 9, + 10,11, 9,11,11, 9, 9,11,10,10,13,11,11,12, 9,11, + 11,11,12,13,11,13,12, 7, 9, 9, 9,11,11, 9,12,10, + 9,11,10,10,11,12,11,13,12, 9,11,11,11,13,13,11, + 13,11, 5, 8, 8, 8, 9,10, 7,10, 9, 8,10,10,10,11, + 11,10,11,11, 7, 9, 9, 9,11,11, 9,11,10, 7, 9, 9, + 9,10,12, 9,11,11, 9,11,11,11,11,13,11,13,13, 9, + 10,11,11,12,13,10,12,11, 7, 9, 9, 9,11,11, 9,11, + 10, 9,11,11,11,12,13,11,13,12, 9,11, 9,11,12,11, + 10,13,10, +}; + +static const static_codebook _44p6_p1_0 = { + 5, 243, + (char *)_vq_lengthlist__44p6_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p6_p1_0, + 0 +}; + +static const long _vq_quantlist__44p6_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p6_p2_0[] = { + 4, 6, 6, 9, 9, 6, 7, 8,10,10, 6, 8, 7,10,10, 8, + 10,10,12,13, 8,10,10,13,12, 6, 8, 8,10,10, 7, 8, + 9,10,11, 8, 9, 9,11,11,10,10,11,12,13,10,11,11, + 14,13, 6, 8, 8,10,10, 8, 9, 9,11,11, 7, 9, 8,11, + 10,10,11,11,13,14,10,11,10,13,12, 9,10,10,12,12, + 10,10,11,12,13,10,11,11,13,13,12,12,13,12,15,13, + 14,13,15,14, 9,10,10,13,12,10,11,11,13,13,10,11, + 10,13,12,13,13,14,14,15,12,13,12,15,12, 6, 8, 8, + 10,11, 8, 9,10,11,12, 8, 9, 9,11,11,10,11,12,13, + 14,10,11,11,14,13, 8, 9, 9,11,12, 9,10,11,12,13, + 9,10,11,12,13,11,11,13,13,15,11,12,12,14,14, 8, + 9, 9,12,12, 9,10,11,12,13, 9,10,10,13,12,11,12, + 13,14,15,11,12,12,14,14,11,11,12,13,14,11,12,13, + 13,15,12,13,13,14,15,13,13,14,14,16,14,15,15,16, + 16,11,12,11,14,13,12,13,13,14,14,11,13,12,14,13, + 14,15,15,16,16,13,14,14,16,14, 6, 8, 8,11,10, 8, + 9, 9,12,11, 8,10, 9,12,11,10,11,11,13,13,10,12, + 11,14,13, 8, 9, 9,12,12, 9,10,10,12,13, 9,11,10, + 13,12,11,12,12,14,14,11,13,12,15,14, 8, 9, 9,12, + 11, 9,10,10,13,12, 9,11,10,13,12,12,12,12,14,14, + 11,13,12,15,13,11,11,12,13,14,11,12,13,13,14,12, + 13,13,14,15,13,13,14,14,16,14,15,15,16,16,11,12, + 11,14,13,12,13,13,15,14,11,13,12,15,13,14,15,15, + 16,16,13,15,13,16,14, 9,10,11,12,13,11,11,12,13, + 14,11,12,12,13,14,13,13,14,14,16,13,14,14,15,16, + 11,11,12,13,14,12,12,13,14,15,12,13,13,14,15,14, + 14,15,15,17,14,15,15,16,17,11,12,12,14,14,12,13, + 13,14,15,12,13,12,15,15,14,15,15,16,17,14,15,15, + 16,16,13,14,14,15,16,14,14,15,15,17,15,15,15,16, + 17,16,16,17,16,18,16,17,17,18,18,13,14,14,16,15, + 14,15,15,17,16,14,15,15,16,16,16,17,17,18,18,16, + 16,16,17,16, 9,11,10,13,12,11,12,12,14,13,11,12, + 11,15,13,13,14,14,16,15,13,14,13,17,14,11,12,12, + 14,14,12,12,13,15,15,12,13,13,15,14,14,14,15,16, + 16,14,15,15,17,16,11,12,11,14,13,12,13,13,15,14, + 12,13,12,15,13,14,15,15,16,16,14,15,14,17,15,13, + 14,14,15,16,14,15,15,16,17,14,15,15,16,17,16,16, + 16,17,17,16,17,17,18,18,13,15,14,16,15,15,15,15, + 17,16,14,15,14,17,15,16,17,17,18,18,16,17,16,18, + 16, 6, 8, 8,11,11, 8, 9, 9,11,12, 8, 9, 9,12,11, + 10,11,11,13,14,10,12,11,14,13, 7, 9, 9,11,12, 9, + 10,10,12,13, 9,10,10,13,12,11,11,12,13,15,11,12, + 12,15,14, 8, 9, 9,12,11, 9,10,10,13,13, 9,11,10, + 13,12,12,12,12,14,15,11,13,12,15,13,10,11,11,13, + 14,11,12,12,13,15,11,12,12,14,14,13,13,14,14,16, + 14,15,14,16,16,11,12,11,14,13,12,13,13,15,14,11, + 13,12,15,13,14,15,15,16,16,13,14,14,16,14, 8, 9, + 9,11,12, 9,10,11,12,13, 9,10,10,13,12,11,12,13, + 14,15,11,12,12,15,14, 9, 9,11,11,13,10,10,12,12, + 14,10,10,11,13,14,12,12,13,14,16,12,13,13,15,15, + 9,11,10,13,12,10,11,11,13,14,10,12,11,14,13,12, + 13,13,15,16,12,13,13,15,15,11,11,13,13,15,12,12, + 14,13,15,13,13,14,14,15,14,14,15,14,17,15,15,15, + 16,16,12,13,12,15,14,13,14,14,15,15,12,14,13,15, + 14,15,15,15,17,17,14,15,14,17,15, 7, 9, 9,12,11, + 9,10,10,12,12, 9,11,10,13,12,11,12,12,14,14,11, + 13,12,15,14, 9,10,10,12,12,10,10,11,12,13,10,11, + 11,14,13,12,12,13,14,15,12,13,13,16,15, 9,10,10, + 13,12,10,11,11,13,13,10,11,10,14,12,13,13,13,15, + 15,12,13,12,15,14,11,12,12,14,14,12,12,13,14,15, + 13,14,13,15,15,14,13,15,14,16,15,16,15,17,16,12, + 12,12,14,14,13,13,14,15,15,12,13,12,15,14,15,15, + 16,16,17,14,15,14,17,14,10,11,12,13,14,11,12,13, + 14,15,11,12,13,14,15,13,14,15,15,17,14,15,15,16, + 16,11,12,13,12,15,12,12,14,13,16,13,13,14,13,16, + 14,14,16,14,18,15,15,16,16,17,12,13,12,15,15,13, + 14,14,15,16,13,14,13,16,15,15,15,16,17,18,15,15, + 15,17,16,14,14,15,14,17,15,14,16,14,17,15,15,16, + 15,18,16,16,17,16,19,17,17,17,17,18,14,15,15,17, + 16,15,16,16,17,17,15,16,15,18,16,17,17,18,18,18, + 16,17,16,18,17,10,11,11,14,13,11,12,12,15,14,11, + 13,12,15,14,14,15,15,16,16,14,15,15,17,16,11,12, + 12,15,14,12,13,13,15,14,13,14,13,16,14,14,15,15, + 16,16,15,16,15,18,16,11,13,12,15,15,13,14,14,15, + 15,12,14,13,16,15,15,16,16,17,17,15,16,15,17,16, + 14,15,14,16,16,14,15,15,16,16,15,16,15,17,16,16, + 16,17,16,17,17,18,17,19,18,14,15,15,17,16,15,16, + 16,17,17,15,15,15,18,16,17,18,18,18,18,16,17,16, + 19,16, 6, 8, 8,11,11, 8, 9, 9,11,12, 8, 9, 9,12, + 11,10,11,12,13,14,10,11,11,14,13, 8, 9, 9,11,12, + 9,10,11,12,13, 9,10,10,13,13,11,12,13,13,15,11, + 12,12,15,14, 7, 9, 9,12,11, 9,10,10,12,13, 9,10, + 10,13,12,11,12,12,14,15,11,12,11,14,13,11,11,12, + 13,14,11,12,13,13,15,12,13,13,14,15,13,14,14,14, + 16,14,15,15,16,16,10,11,11,14,13,11,12,12,14,14, + 11,12,12,15,13,14,14,14,16,16,13,14,13,16,14, 7, + 9, 9,11,12, 9,10,10,12,13, 9,10,10,12,12,11,12, + 13,14,15,11,12,12,14,14, 9,10,10,12,13,10,10,11, + 12,14,10,11,11,13,13,12,12,13,14,15,13,13,13,15, + 15, 9,10,10,12,12,10,11,11,13,14,10,11,10,13,12, + 12,13,13,15,16,12,13,12,15,14,11,12,13,14,14,12, + 12,13,14,15,13,14,13,15,15,14,14,15,14,17,15,16, + 15,17,16,11,12,12,14,14,13,13,13,15,15,12,13,12, + 15,14,15,15,15,16,17,14,15,14,16,14, 8, 9, 9,12, + 11, 9,10,10,12,13, 9,11,10,13,12,11,12,12,14,15, + 11,12,12,15,14, 9,10,11,13,13,10,11,12,13,14,10, + 11,11,14,13,12,13,13,15,15,12,13,13,16,15, 9,11, + 9,13,11,10,11,10,14,13,10,12,10,14,12,12,13,13, + 15,15,12,13,12,16,14,12,12,13,14,15,12,13,14,14, + 16,13,14,14,15,15,14,14,15,15,17,15,16,15,17,16, + 11,13,11,15,13,13,14,13,15,14,12,14,12,16,13,15, + 15,15,16,16,14,15,14,17,14,10,11,11,13,14,11,12, + 13,14,15,11,12,12,14,15,14,14,15,16,17,14,15,15, + 16,16,11,12,13,14,15,12,13,14,15,16,13,14,14,15, + 16,15,15,16,16,18,15,16,16,17,17,11,12,12,14,15, + 13,13,14,14,16,12,13,13,15,15,15,15,16,16,18,14, + 15,15,16,16,14,15,15,16,17,15,15,16,16,17,15,16, + 16,17,17,16,16,17,16,19,17,18,17,18,18,14,14,15, + 16,16,15,15,16,16,17,14,15,15,16,16,17,17,18,18, + 19,16,17,16,17,16,10,12,11,14,13,11,13,12,15,14, + 11,13,12,15,14,14,15,15,16,16,13,15,14,17,15,12, + 13,13,15,15,13,13,14,15,16,13,14,14,16,16,14,15, + 15,17,17,15,16,16,17,17,11,13,12,15,12,13,14,13, + 16,13,12,14,12,16,13,15,16,15,17,16,14,16,14,18, + 14,14,15,15,16,17,15,15,16,16,17,15,16,16,17,17, + 16,16,17,17,18,17,18,17,18,18,14,15,14,17,14,15, + 16,15,18,15,15,16,15,18,14,17,17,17,18,17,16,17, + 16,19,16, 9,11,11,13,13,10,12,12,14,14,11,12,12, + 15,14,13,14,14,16,16,13,14,14,16,16,10,11,12,14, + 14,11,12,13,14,15,12,13,13,15,15,13,14,15,16,16, + 14,15,15,17,16,11,12,12,15,14,12,13,13,15,15,12, + 13,12,15,15,14,15,15,16,17,14,15,14,17,16,12,13, + 14,15,16,13,13,14,15,16,13,14,15,16,16,14,15,16, + 16,18,15,16,16,18,18,13,14,14,16,15,14,15,15,17, + 16,14,15,15,17,16,16,17,17,18,18,16,17,16,18,17, + 10,12,12,14,14,11,12,13,15,15,12,13,13,15,15,13, + 14,15,16,17,14,15,15,17,16,11,11,13,14,15,12,12, + 14,15,16,13,13,14,15,16,14,14,15,16,17,15,15,16, + 17,17,12,13,12,15,15,13,14,14,16,16,13,14,13,16, + 15,15,16,15,17,17,15,16,15,18,16,13,12,15,14,17, + 14,13,16,14,17,14,14,16,15,18,15,14,17,16,18,16, + 16,17,17,18,14,15,15,17,16,15,16,16,17,17,15,16, + 15,18,16,17,17,17,18,18,16,17,16,19,17,10,11,11, + 14,14,11,12,12,15,15,11,13,12,15,15,14,15,14,16, + 16,14,15,15,17,16,11,12,12,15,14,12,12,13,15,15, + 13,14,13,16,15,14,15,15,16,16,15,16,15,18,17,11, + 13,12,15,15,13,14,13,15,15,12,14,13,16,15,15,16, + 15,17,17,15,16,15,18,16,13,14,13,16,16,14,15,14, + 16,16,14,15,15,17,16,16,16,16,16,18,16,18,17,19, + 18,14,15,15,17,16,15,16,16,17,17,15,15,15,17,16, + 17,17,18,18,19,16,17,16,18,16,12,13,13,15,16,13, + 14,14,16,17,13,14,14,16,16,15,15,16,17,18,15,16, + 16,18,17,13,13,14,14,17,14,14,15,15,17,14,14,15, + 16,17,15,15,17,16,18,16,17,17,18,18,13,14,14,17, + 16,14,15,15,17,17,14,15,14,17,16,16,17,17,18,18, + 16,17,16,18,17,15,14,16,13,18,16,15,17,14,19,16, + 16,17,15,18,17,16,18,15,19,18,18,18,17,19,15,16, + 16,18,17,16,17,17,18,18,16,17,16,19,17,18,19,18, + 19,19,17,18,17,20,18,11,12,12,15,15,13,13,14,15, + 16,13,14,13,16,15,15,16,16,17,17,15,16,16,18,17, + 12,14,13,16,15,13,13,14,15,16,14,15,14,17,16,16, + 16,16,16,17,16,17,17,19,17,12,13,14,16,16,14,15, + 15,16,17,13,15,13,17,15,16,17,17,18,18,16,17,16, + 18,16,15,16,15,17,16,15,15,15,17,17,16,17,16,18, + 17,17,16,17,16,18,18,19,18,20,18,15,16,16,17,17, + 16,17,17,18,18,15,16,15,18,17,18,18,19,19,19,17, + 18,16,19,16, 9,11,11,13,13,11,12,12,14,15,10,12, + 12,14,14,13,14,14,16,16,13,14,14,16,16,11,12,12, + 14,14,12,12,13,15,15,12,13,13,15,15,14,15,15,16, + 17,14,15,15,16,16,10,12,11,14,14,12,13,13,15,15, + 11,13,12,15,14,14,15,15,16,17,13,15,14,17,16,13, + 14,14,15,16,14,15,15,16,17,14,15,15,16,17,16,16, + 17,17,18,16,17,17,18,18,12,14,13,16,15,13,15,14, + 17,16,13,14,13,17,15,15,16,16,18,18,15,16,15,18, + 16,10,11,11,14,14,11,12,13,14,15,11,12,12,15,15, + 14,15,15,16,17,14,15,15,16,16,11,12,13,15,15,12, + 13,14,15,16,13,14,14,15,16,15,15,16,16,18,15,15, + 16,17,17,11,12,12,14,15,13,13,14,15,16,12,13,13, + 15,15,15,15,16,17,18,14,15,15,17,16,14,15,15,16, + 17,15,15,16,16,17,15,16,16,17,17,16,16,17,16,19, + 17,17,18,19,18,13,13,14,16,16,14,15,16,17,17,14, + 14,15,16,16,16,16,17,18,18,16,16,16,18,16,10,12, + 12,14,14,12,13,13,15,15,11,13,12,15,15,14,15,15, + 16,17,13,15,14,17,16,12,13,13,15,15,13,13,14,15, + 16,13,14,14,16,16,15,15,16,17,18,15,15,16,17,17, + 11,13,12,15,14,13,14,13,16,15,12,14,12,16,14,15, + 16,15,17,17,14,16,14,17,16,14,15,15,16,17,15,15, + 16,16,18,15,16,16,17,17,16,17,17,17,19,17,17,17, + 18,18,13,15,12,17,14,14,16,14,17,15,14,15,13,17, + 14,16,17,16,18,17,15,17,14,19,15,11,12,12,15,15, + 13,13,14,15,16,13,14,13,16,15,15,16,16,17,18,15, + 16,16,17,17,12,14,13,16,16,13,13,15,15,17,14,15, + 15,17,16,16,16,17,16,19,16,17,17,18,18,12,13,14, + 15,16,14,14,15,16,17,13,14,13,16,15,16,17,17,18, + 19,15,16,16,17,16,15,16,16,18,17,15,15,16,17,18, + 16,17,17,18,18,16,16,18,16,19,18,19,19,20,19,15, + 15,16,16,17,16,16,17,17,18,15,15,15,17,16,18,18, + 19,18,20,17,17,16,18,16,12,13,13,16,15,13,14,14, + 16,16,13,14,14,16,16,15,16,16,17,18,15,16,15,18, + 17,13,14,14,16,16,14,15,15,16,17,14,15,15,17,17, + 16,17,17,18,18,16,17,17,18,18,13,14,13,17,14,14, + 15,14,17,16,14,15,14,17,15,16,17,17,18,18,15,17, + 15,19,15,16,16,16,17,18,16,16,17,17,19,16,17,17, + 18,19,17,17,18,18,20,18,18,18,19,19,15,16,14,18, + 13,16,17,16,19,15,16,17,15,19,14,18,18,18,19,17, + 17,18,16,20,15, +}; + +static const static_codebook _44p6_p2_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p6_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p6_p2_0, + 0 +}; + +static const long _vq_quantlist__44p6_p3_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p6_p3_0[] = { + 1, 5, 5, 5, 7, 8, 5, 8, 7, 5, 7, 8, 8, 8,10, 8, + 10,10, 5, 8, 7, 8,10,10, 8,10, 8, 6, 8, 9, 8,10, + 12, 9,11,11, 9,10,11,11,11,13,12,13,13, 9,11,11, + 11,13,13,11,13,12, 6, 9, 8, 9,11,11, 8,12,10, 9, + 11,11,11,12,13,11,13,13, 9,11,10,11,13,13,11,13, + 11, 5, 9, 9, 8,11,11, 9,12,11, 8,10,11,10,11,13, + 11,13,13, 9,11,11,11,13,13,11,13,12, 8,10,11,10, + 12,13,10,13,12,10,10,13,11,11,14,12,13,14,11,13, + 12,13,14,14,12,14,12, 8,11,10,11,12,13,11,14,12, + 10,13,12,12,12,13,13,15,14,11,12,13,13,14,15,12, + 14,12, 5, 9, 9, 9,11,12, 8,11,11, 9,11,11,11,12, + 13,11,13,13, 8,11,10,11,13,13,10,13,11, 8,10,11, + 11,12,14,11,13,12,11,13,12,12,12,14,13,15,14,10, + 12,13,13,14,15,12,13,12, 8,11,10,10,12,13,10,13, + 12,11,12,13,12,12,14,13,14,14,10,13,10,12,14,13, + 11,14,11, +}; + +static const static_codebook _44p6_p3_0 = { + 5, 243, + (char *)_vq_lengthlist__44p6_p3_0, + 1, -533200896, 1614282752, 2, 0, + (long *)_vq_quantlist__44p6_p3_0, + 0 +}; + +static const long _vq_quantlist__44p6_p3_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p6_p3_1[] = { + 5, 7, 7, 6, 7, 7, 6, 7, 7, 6, 7, 7, 7, 8, 8, 7, + 8, 8, 6, 7, 7, 7, 8, 8, 7, 8, 8, 7, 7, 8, 7, 8, + 8, 7, 8, 8, 8, 8, 8, 8, 8, 9, 8, 9, 9, 8, 8, 8, + 8, 9, 9, 8, 9, 8, 7, 8, 7, 7, 8, 8, 7, 8, 8, 8, + 8, 8, 8, 8, 9, 8, 9, 9, 8, 8, 8, 8, 9, 9, 8, 9, + 8, 6, 8, 8, 7, 8, 8, 7, 8, 8, 7, 8, 8, 8, 8, 9, + 8, 9, 9, 8, 8, 8, 8, 9, 9, 8, 9, 8, 7, 8, 8, 8, + 8, 9, 8, 9, 9, 8, 8, 9, 8, 9, 9, 9, 9, 9, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 7, 8, 8, 8, 9, 9, 8, 9, 8, + 8, 8, 8, 8, 9, 9, 9, 9, 9, 8, 9, 8, 9, 9, 9, 9, + 9, 9, 6, 8, 8, 7, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, + 9, 8, 9, 9, 7, 8, 8, 8, 9, 9, 8, 9, 8, 7, 8, 8, + 8, 8, 9, 8, 9, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 8, + 8, 8, 9, 9, 9, 8, 9, 9, 7, 8, 8, 8, 9, 9, 8, 9, + 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 8, 9, 9, 9, + 9, 9, 9, +}; + +static const static_codebook _44p6_p3_1 = { + 5, 243, + (char *)_vq_lengthlist__44p6_p3_1, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p6_p3_1, + 0 +}; + +static const long _vq_quantlist__44p6_p4_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p6_p4_0[] = { + 2, 5, 5, 5, 7, 8, 5, 8, 7, 5, 7, 7, 7, 7, 9, 7, + 9, 9, 5, 7, 7, 8, 9, 9, 7, 9, 7, 6, 8, 8, 8, 9, + 10, 8, 9, 9, 8, 9,10, 9, 9,11,10,11,11, 8, 9, 9, + 10,11,11, 9,11,10, 6, 8, 8, 8, 9, 9, 8,10, 9, 8, + 9, 9, 9,10,11,10,11,10, 8,10, 9,10,11,11, 9,11, + 9, 6, 8, 8, 7, 9, 9, 8,10, 9, 7, 9, 9, 9, 9,10, + 9,10,10, 8, 9, 9, 9,10,10, 9,11,10, 7, 9, 9, 8, + 10,10, 9,10,10, 9, 9,10,10,10,11,10,11,11, 9,10, + 10,10,11,11,10,11,10, 7, 9, 9, 9, 9,10, 9,10, 9, + 8,10, 9, 9, 9,11,10,11,11, 9,10,10,10,11,11, 9, + 11, 9, 6, 8, 8, 8, 9,10, 7, 9, 9, 8, 9, 9, 9,10, + 10, 9,10,10, 7, 9, 9, 9,10,10, 9,10, 9, 7, 9, 9, + 9, 9,10, 9,10, 9, 9,10,10, 9, 9,11,10,11,11, 8, + 9,10,10,11,11, 9,11, 9, 7, 9, 9, 9,10,10, 8,10, + 10, 9,10,10,10,10,11,10,11,11, 9,10, 9,10,11,11, + 10,11,10, +}; + +static const static_codebook _44p6_p4_0 = { + 5, 243, + (char *)_vq_lengthlist__44p6_p4_0, + 1, -531365888, 1616117760, 2, 0, + (long *)_vq_quantlist__44p6_p4_0, + 0 +}; + +static const long _vq_quantlist__44p6_p4_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p6_p4_1[] = { + 6, 8, 8,10,10, 8, 9, 9,10,11, 8,10, 9,11,10, 9, + 10,10,11,11, 9,10,10,11,11, 8, 9, 9,10,10, 9, 9, + 10,11,11,10,10,10,11,11,10,11,11,11,11,10,11,11, + 11,11, 8, 9, 9,11,10,10,10,10,11,11, 9,10, 9,11, + 11,10,11,11,11,11,10,11,10,11,11,10,10,11,11,11, + 10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,10,11,10,11,11,11,11,11,11,11,10,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11, 8, 9,10, + 11,11,10,10,11,11,11,10,10,10,11,11,10,11,11,12, + 12,10,11,11,12,12,10,10,11,11,11,10,10,11,11,12, + 11,11,11,12,12,11,11,12,12,12,11,11,12,12,12,10, + 10,10,11,11,11,11,11,12,12,10,11,11,12,12,11,12, + 12,12,12,11,12,11,12,12,11,11,11,11,12,11,11,12, + 12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,11,11,11,12,11,11,12,12,12,12,11,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12, 8,10, 9,11,11,10, + 10,10,11,11,10,11,10,11,11,10,11,11,12,12,10,11, + 11,12,12,10,10,10,11,11,10,11,11,12,12,11,11,11, + 12,12,11,11,12,12,12,11,12,12,12,12,10,11,10,11, + 11,11,11,11,12,12,10,11,10,12,11,11,12,11,12,12, + 11,12,11,12,12,11,11,11,12,12,11,11,12,12,12,11, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,11,11, + 11,12,11,11,12,12,12,12,11,12,11,12,12,12,12,12, + 12,12,12,12,12,12,12,10,11,11,11,12,11,11,12,12, + 12,11,11,11,12,12,11,12,12,12,12,11,12,12,12,12, + 11,11,12,12,12,11,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,13,11,12,11,12,12,12,12, + 12,12,12,11,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,13,12,13,12,12,12,12,13,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,12, + 12,12,13,12,10,11,11,12,11,11,11,12,12,12,11,12, + 11,12,12,11,12,12,12,12,11,12,12,12,12,11,11,12, + 12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,11,12,11,12,12,12,12,12,12,12, + 11,12,12,12,12,12,12,12,12,12,12,12,12,13,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,13,12,12,12,12,13,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,13,13,12,13,12,13, + 12, 8,10,10,11,11,10,10,11,11,11,10,11,10,11,11, + 10,11,11,12,12,10,11,11,12,12, 9,10,11,11,11,10, + 10,11,12,12,10,11,11,12,12,11,11,12,12,12,11,12, + 12,12,12,10,11,10,11,11,11,11,11,12,12,10,11,11, + 12,12,11,12,12,12,12,11,12,11,12,12,11,11,11,12, + 12,11,11,12,12,12,11,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,11,11,11,12,12,11,12,12,12,12,11, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12, 9,10, + 10,11,11,10,11,11,12,12,10,11,11,12,12,11,11,12, + 12,12,11,12,12,12,12,10,11,11,12,12,11,11,12,12, + 12,11,11,12,12,12,11,11,12,12,12,12,12,12,12,12, + 10,11,11,12,12,11,12,12,12,12,11,12,11,12,12,12, + 12,12,12,12,12,12,12,12,12,11,11,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12, 9,10,10,11,11, + 10,11,11,12,12,10,11,11,12,11,11,12,12,12,12,11, + 12,12,12,12,10,11,11,12,12,11,11,11,12,12,11,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,10,11,11, + 12,12,11,12,12,12,12,11,12,11,12,12,12,12,12,12, + 12,12,12,12,12,12,11,12,12,12,12,11,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,11, + 12,12,12,12,12,12,12,12,12,11,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,11,11,11,12,12,11,12,12, + 12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 13,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,13,12,13,12,12,13,13,13,11,12,12,12,12,12, + 12,12,13,13,12,12,12,13,12,12,12,12,13,13,12,13, + 12,13,13,12,12,12,12,12,12,12,12,12,13,12,13,13, + 13,13,12,13,13,13,13,13,13,13,13,13,12,12,12,12, + 12,12,12,13,13,13,12,13,12,13,13,12,13,13,13,13, + 12,13,13,13,13,11,11,11,12,12,11,12,12,12,12,11, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,11,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, + 12,13,12,12,12,13,13,11,12,12,12,12,12,12,12,12, + 13,12,12,12,13,12,12,13,12,13,13,12,13,12,13,13, + 12,12,12,12,12,12,12,13,13,13,12,12,13,13,13,12, + 13,13,12,13,13,13,13,13,13,12,12,12,12,12,12,13, + 12,13,13,12,13,12,13,12,12,13,13,13,13,12,13,13, + 13,13, 8,10,10,11,11,10,10,11,11,11, 9,11,10,11, + 11,10,11,11,12,12,10,11,11,12,12,10,10,11,11,11, + 10,11,11,12,12,11,11,11,12,12,11,11,12,12,12,11, + 12,12,12,12, 9,11,10,11,11,10,11,11,12,12,10,11, + 10,12,12,11,12,12,12,12,11,12,11,12,12,11,11,11, + 12,12,11,12,12,12,12,11,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,11,11,11,12,12,11,12,12,12,12, + 11,12,11,12,12,12,12,12,12,12,12,12,12,12,12, 9, + 10,10,11,11,10,11,11,12,12,10,11,11,12,12,11,12, + 12,12,12,11,12,12,12,12,10,11,11,12,12,11,11,12, + 12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,10,11,11,12,12,11,11,12,12,12,11,11,11,12,12, + 12,12,12,12,12,11,12,12,12,12,11,12,12,12,12,11, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,11,12,12,12,12,12,12,12,12,12,11,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12, 9,10,10,11, + 11,10,11,11,12,12,10,11,11,12,12,11,12,12,12,12, + 11,12,11,12,12,10,11,11,12,12,11,11,12,12,12,11, + 11,12,12,12,12,12,12,12,12,12,12,12,12,12,10,11, + 11,12,12,11,12,11,12,12,11,12,11,12,12,12,12,12, + 12,12,11,12,11,12,12,11,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 11,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,11,11,11,12,12,11,12, + 12,12,12,11,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,13, + 13,12,12,12,13,13,12,12,13,13,13,11,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,13,12,13,13,12, + 12,12,13,12,12,12,12,12,12,12,12,13,13,13,12,12, + 13,13,13,12,13,13,12,13,12,13,13,13,13,12,12,12, + 12,12,12,12,13,13,13,12,12,12,13,12,12,13,13,13, + 13,12,13,13,13,13,11,11,11,12,12,11,12,12,12,12, + 11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,11, + 12,12,12,12,12,12,12,12,12,12,12,12,13,12,12,12, + 13,13,13,12,12,12,13,13,11,12,12,12,12,12,12,12, + 13,12,12,12,12,13,12,12,13,12,13,13,12,13,12,13, + 12,12,12,12,12,12,12,12,13,13,13,12,13,13,13,13, + 12,13,13,13,13,13,13,13,13,13,12,12,12,12,12,12, + 13,12,13,12,12,13,12,13,12,13,13,13,13,13,12,13, + 13,13,13,10,11,11,12,12,11,12,12,12,12,11,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,11,11,12,12, + 12,11,12,12,12,12,12,12,12,12,12,12,12,12,13,13, + 12,12,12,13,13,11,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,13,13,12,12,12,13,12,12,12, + 12,12,12,12,12,12,12,13,12,12,12,12,13,12,12,13, + 12,13,12,13,13,13,13,12,12,12,12,12,12,12,12,13, + 12,12,12,12,13,12,12,13,13,13,13,12,13,12,13,13, + 11,11,11,12,12,11,12,12,12,12,11,12,12,12,12,12, + 12,12,12,13,12,12,12,13,12,11,12,12,12,12,12,12, + 12,12,13,12,12,12,12,13,12,12,13,13,13,12,12,13, + 13,13,11,12,12,12,12,12,12,12,12,13,12,12,12,13, + 12,12,13,12,13,13,12,13,12,13,13,12,12,12,12,12, + 12,12,13,12,13,12,12,13,13,13,12,12,13,13,13,13, + 13,13,13,13,12,12,12,12,12,12,13,13,13,13,12,13, + 12,13,12,12,13,13,13,13,12,13,13,13,13,11,11,11, + 12,12,11,12,12,12,12,11,12,12,12,12,12,12,12,12, + 12,12,12,12,12,13,11,12,12,12,12,12,12,12,12,13, + 12,12,12,13,13,12,12,13,13,13,12,12,13,13,13,11, + 12,12,12,12,12,12,12,13,13,12,12,12,13,12,12,13, + 12,13,13,12,13,12,13,13,12,12,12,12,12,12,12,12, + 12,13,12,13,12,13,13,12,13,13,13,13,12,13,13,13, + 13,12,12,12,12,12,12,13,12,13,13,12,12,12,13,13, + 12,13,13,13,13,12,13,12,13,13,11,12,12,12,12,11, + 12,12,12,12,11,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,11,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,13,12,13,12,12,12,13,13,11,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13, + 12,13,12,13,13,12,12,12,12,12,12,12,13,12,13,12, + 12,13,12,13,12,12,13,12,13,12,13,13,13,13,12,12, + 12,12,12,12,12,12,12,12,12,12,12,13,12,12,13,13, + 13,13,12,13,12,13,12,11,11,11,12,12,11,12,12,12, + 12,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,13,13,11,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,13,13,12,12,12, + 13,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,13,12,12,12,13,12,12,12,12,12,12,12,12, + 12,12,12,13,12,12,12,12,13,12,12,13,12,13,12,12, + 13,12,13,12,10,11,11,12,12,11,12,12,12,12,11,12, + 11,12,12,11,12,12,12,12,11,12,12,12,12,11,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 13,12,12,12,13,13,11,12,11,12,12,12,12,12,12,12, + 11,12,12,12,12,12,12,12,13,13,12,12,12,13,12,12, + 12,12,12,12,12,12,12,12,13,12,12,12,12,13,12,13, + 13,12,13,12,13,13,13,13,12,12,12,12,12,12,12,12, + 13,13,12,12,12,13,12,12,13,13,13,13,12,13,12,13, + 12,11,11,11,12,12,11,12,12,12,12,11,12,12,12,12, + 12,12,12,13,13,12,12,12,13,12,11,12,12,12,12,12, + 12,12,12,13,12,12,12,13,13,12,12,13,13,13,12,12, + 13,13,13,11,12,12,12,12,12,12,12,13,13,12,12,12, + 13,12,12,13,12,13,13,12,12,12,13,13,12,12,12,12, + 12,12,12,13,13,13,12,12,13,13,13,12,12,13,13,13, + 12,13,13,13,13,12,12,12,12,12,12,12,13,13,13,12, + 12,12,13,12,12,13,13,13,13,12,13,13,13,13,11,11, + 11,12,12,11,12,12,12,12,11,12,12,12,12,12,12,12, + 12,13,12,12,12,13,13,11,12,12,12,12,12,12,12,12, + 13,12,12,12,13,13,12,12,13,13,13,12,12,13,13,13, + 11,12,12,12,12,12,12,12,13,12,12,12,12,13,12,12, + 13,12,13,13,12,13,12,13,13,12,12,12,12,12,12,12, + 12,13,13,12,13,12,13,13,12,13,13,13,13,13,13,13, + 13,13,12,12,12,12,12,12,13,12,13,13,12,13,12,13, + 12,12,13,13,13,13,12,13,12,13,13,11,11,11,12,12, + 11,12,12,12,12,11,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,11,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,13,12,12,12,13,13,11,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, + 13,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, + 12,12,12,12,13,12,12,12,12,13,12,12,13,12,13,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 13,12,12,12,13,12,12,12,11,12,11,12,12,11,12,12, + 12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,11,12,12,12,12,12,12,12,12,13,12,12,12,12,12, + 12,12,12,13,13,12,12,12,13,13,11,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,13,12,13,13,12,12, + 12,13,12,12,12,12,12,12,12,12,12,12,13,12,12,12, + 13,13,12,12,13,12,13,12,13,13,13,13,12,12,12,12, + 12,12,12,12,13,12,12,12,12,13,12,12,13,12,13,13, + 12,13,12,13,12, +}; + +static const static_codebook _44p6_p4_1 = { + 5, 3125, + (char *)_vq_lengthlist__44p6_p4_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p6_p4_1, + 0 +}; + +static const long _vq_quantlist__44p6_p5_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p6_p5_0[] = { + 2, 6, 6,10,10, 5, 7, 8,11,12, 5, 8, 7,12,11, 9, + 11,11,13,15, 9,11,11,15,13, 6, 7, 8,11,11, 7, 7, + 9,11,13, 8, 9, 9,13,12,11,11,12,12,15,11,12,12, + 15,14, 6, 8, 7,11,11, 8, 9, 9,12,13, 7, 9, 7,13, + 11,11,12,12,14,15,11,12,11,15,12,10,11,11,12,14, + 10,11,12,12,15,12,13,13,14,15,13,12,14,12,16,15, + 15,15,16,16,10,11,11,14,12,12,13,13,15,14,10,12, + 11,15,12,15,15,15,16,17,13,14,12,17,12, 6, 8, 8, + 12,12, 8, 9,10,13,13, 8, 9, 9,13,13,12,12,13,15, + 16,12,13,13,16,15, 8, 9,10,12,13, 9, 9,11,13,14, + 10,11,11,14,14,13,13,14,15,16,13,14,14,16,16, 8, + 10, 9,13,13,10,11,11,14,14, 9,10,10,14,13,13,14, + 14,16,17,13,13,13,16,15,12,13,13,14,16,13,13,14, + 14,16,14,14,14,16,16,15,15,16,15,18,16,17,17,18, + 18,12,13,13,15,15,14,14,14,16,16,13,14,13,16,15, + 16,16,17,18,18,15,16,15,18,15, 6, 8, 8,12,12, 8, + 9, 9,13,13, 8,10, 9,13,13,12,13,13,15,16,12,13, + 12,16,15, 8, 9,10,13,13, 9,10,10,13,14,10,11,11, + 14,14,13,13,13,15,16,13,14,14,17,16, 8,10, 9,13, + 13,10,11,11,14,14, 9,11, 9,14,13,13,14,14,16,16, + 13,14,13,16,14,12,13,13,15,16,13,13,14,15,16,14, + 14,14,16,16,15,15,16,15,18,17,17,17,18,18,12,13, + 13,16,14,14,14,14,16,16,13,14,13,16,14,16,17,17, + 18,18,15,16,15,18,15,11,12,13,14,16,13,13,14,15, + 17,13,14,14,16,17,16,16,17,17,19,16,17,17,18,19, + 13,13,14,16,16,14,14,15,16,17,14,15,15,17,17,17, + 16,17,17,19,17,17,18,19,19,13,14,14,16,16,14,14, + 15,17,18,14,15,14,17,17,17,17,18,18,19,17,17,17, + 18,19,16,16,16,17,18,17,17,17,18,19,17,17,17,18, + 19,18,18,19,18,20,19,20,19,21,20,16,17,17,18,18, + 17,17,18,19,19,17,17,17,19,18,19,19,19,19,20,19, + 19,19,20,19,11,13,12,16,14,13,14,14,17,16,13,14, + 13,17,15,16,17,17,18,18,16,17,16,19,17,13,14,14, + 16,16,14,14,14,17,17,14,15,15,17,16,17,17,17,19, + 19,17,18,17,19,18,13,14,13,17,16,14,15,15,17,17, + 14,15,14,18,16,17,17,17,19,19,17,17,16,19,17,16, + 17,17,18,19,17,17,17,18,18,17,18,17,19,18,18,19, + 18,19,19,19,20,19,20,20,16,17,16,18,17,17,17,17, + 18,18,17,18,17,19,17,19,19,19,19,20,18,19,19,20, + 18, 6, 8, 8,12,12, 8, 9, 9,13,13, 8,10, 9,13,13, + 11,13,13,15,16,12,13,13,16,15, 8, 9, 9,13,13, 9, + 9,10,13,14,10,11,11,14,14,12,12,13,14,16,13,14, + 14,17,16, 8,10, 9,13,13,10,11,11,14,14, 9,11,10, + 14,13,13,14,14,16,16,13,14,13,16,15,12,13,13,14, + 16,12,13,14,14,16,13,14,14,16,16,15,14,16,15,18, + 16,17,17,18,17,12,13,13,16,15,14,14,14,16,16,13, + 14,13,16,15,16,16,17,17,17,15,16,15,18,15, 7, 9, + 9,13,13, 9, 9,11,13,14, 9,10,10,14,13,12,13,14, + 15,16,12,14,13,17,15, 9, 9,10,13,14,10, 9,11,13, + 15,11,11,11,14,14,13,12,14,14,17,14,14,14,17,16, + 9,10,10,14,13,11,11,11,14,14,10,11,10,15,13,14, + 14,14,16,17,13,14,13,17,14,13,13,14,14,16,13,13, + 14,14,17,14,14,14,16,16,15,14,16,15,18,17,17,17, + 18,18,13,14,13,16,15,14,14,15,17,16,13,14,13,17, + 15,17,16,17,17,17,15,16,14,18,14, 7, 9, 9,13,13, + 9,10,10,13,14, 9,11,10,14,13,13,14,14,16,16,13, + 14,14,17,15, 9,10,10,14,13, 9,10,11,13,14,11,12, + 11,15,14,13,13,14,14,16,14,15,15,17,17, 9,10,10, + 14,14,11,12,12,14,15,10,11,10,15,13,14,15,15,17, + 17,14,15,13,17,14,13,14,13,16,16,13,13,14,15,16, + 14,15,15,17,17,15,14,16,15,18,17,18,17,20,18,13, + 14,14,16,16,15,15,15,17,17,13,14,13,17,15,17,17, + 18,18,18,15,16,14,19,14,12,13,13,15,16,13,13,15, + 16,17,13,14,14,16,16,15,15,17,17,19,16,17,17,19, + 18,13,13,14,15,17,14,13,15,15,17,14,15,15,16,17, + 16,15,18,16,19,17,17,17,18,19,13,14,14,17,16,14, + 15,15,17,17,14,15,14,17,16,17,17,17,18,19,16,17, + 16,19,17,16,16,17,16,18,16,16,17,16,19,17,17,18, + 18,19,18,17,18,17,21,19,19,19,20,19,16,17,17,18, + 18,17,17,18,18,19,16,17,16,18,18,19,19,19,19,20, + 18,18,17,20,18,11,13,13,16,15,13,14,14,16,17,13, + 15,14,17,16,16,17,17,18,18,17,17,17,19,18,13,14, + 13,17,16,14,13,14,16,17,15,16,15,18,16,17,16,17, + 17,19,18,18,18,20,18,13,14,14,16,17,15,15,15,17, + 18,14,15,14,18,16,18,18,18,19,20,17,18,16,20,17, + 16,17,16,18,18,16,16,17,18,18,17,18,18,19,18,18, + 17,19,17,20,19,20,19,22,20,16,16,17,18,18,18,17, + 17,19,19,16,17,16,18,17,19,20,19,22,21,18,19,18, + 21,17, 6, 8, 8,12,12, 8, 9,10,13,13, 8, 9, 9,13, + 13,12,13,13,15,16,11,13,13,16,15, 8, 9,10,13,13, + 9,10,11,13,14,10,11,11,14,14,13,13,14,15,16,13, + 14,14,16,16, 8, 9, 9,13,13,10,11,11,14,14, 9,10, + 9,14,13,13,14,14,16,17,12,14,12,16,14,12,13,13, + 15,16,13,13,14,15,16,13,14,14,15,17,15,15,16,15, + 18,16,16,17,17,17,12,13,13,16,14,13,14,14,16,16, + 12,14,13,16,14,16,17,17,18,18,15,15,14,18,14, 7, + 9, 9,13,13, 9,10,11,13,14, 9,10,10,14,13,13,14, + 14,15,17,13,14,14,16,15, 9,10,10,14,14,10,10,11, + 13,15,11,12,12,15,14,14,13,15,14,17,14,15,15,17, + 17, 9,10,10,13,14,11,11,12,14,15, 9,11,10,14,13, + 14,15,15,16,18,13,14,13,16,14,13,14,14,16,16,13, + 13,14,15,17,15,15,15,16,17,15,14,16,15,18,17,17, + 18,19,18,13,14,14,16,16,14,15,15,17,17,13,14,13, + 16,15,17,17,18,18,18,15,16,14,18,15, 7, 9, 9,13, + 13, 9,10,10,13,14, 9,11,10,14,13,12,13,14,15,16, + 12,14,13,16,15, 9,10,10,13,14,10,10,11,13,14,11, + 11,11,15,14,13,13,14,14,16,14,14,14,17,16, 9,10, + 9,14,13,11,11,11,14,14,10,11, 9,15,13,14,14,14, + 16,16,13,14,12,17,14,13,13,14,15,16,13,13,14,15, + 16,14,15,14,16,17,15,14,16,14,18,16,17,17,18,18, + 13,14,13,16,14,14,14,14,16,16,13,14,13,17,14,17, + 17,17,18,18,15,16,14,18,15,11,13,13,16,16,13,14, + 15,16,17,13,14,14,17,16,16,17,17,18,19,17,17,17, + 19,18,13,14,14,17,17,13,13,15,16,18,15,15,15,17, + 17,17,16,18,17,20,18,17,18,19,19,13,14,14,16,17, + 15,15,16,16,18,14,15,14,16,16,17,17,18,18,20,17, + 18,16,18,17,16,17,16,19,18,16,16,17,18,19,18,18, + 18,19,19,18,17,18,17,21,20,19,19,21,21,16,16,17, + 18,18,17,17,18,19,19,16,17,16,19,18,20,20,20,19, + 21,18,18,17,20,18,12,13,13,16,15,13,14,14,16,16, + 13,14,13,17,16,16,17,17,18,18,15,17,15,19,17,13, + 14,14,16,17,14,14,15,16,17,14,15,15,17,17,16,16, + 17,17,18,17,17,17,19,19,13,14,13,17,15,14,15,15, + 17,16,14,15,13,17,15,17,18,17,19,18,16,17,15,20, + 16,16,17,17,18,18,16,16,17,18,18,17,18,17,19,18, + 17,17,18,18,20,19,20,19,20,19,16,16,16,19,16,17, + 17,17,19,18,16,17,16,19,16,19,19,19,19,19,18,19, + 17,19,17,11,13,13,16,16,13,14,14,17,17,13,14,14, + 17,17,15,17,17,19,19,16,18,17,20,19,12,14,14,17, + 17,13,14,15,17,18,14,15,15,17,18,16,16,17,18,20, + 17,18,18,20,18,13,14,14,17,17,14,15,15,17,18,14, + 15,15,17,17,17,18,17,19,19,17,18,17,19,19,15,16, + 16,18,18,15,16,17,18,19,16,17,17,19,19,17,17,18, + 18,21,18,19,19,21,19,16,17,17,18,18,17,17,18,19, + 19,17,18,17,19,19,19,19,19,20,20,18,19,18,21,19, + 12,13,13,16,16,13,14,14,16,17,13,15,14,17,16,15, + 16,17,17,19,16,17,17,19,18,13,13,14,16,17,14,13, + 15,16,17,14,15,15,17,17,15,15,17,17,20,17,17,18, + 19,18,13,14,14,17,16,15,15,15,17,18,14,15,14,17, + 16,17,17,17,18,18,16,17,16,19,17,16,15,17,17,19, + 16,15,17,16,19,17,16,17,18,19,17,16,19,16,20,19, + 18,19,19,19,16,17,17,18,18,17,17,17,18,19,16,17, + 16,19,18,20,19,19,20,19,18,18,17,20,17,11,13,13, + 16,16,13,14,15,16,17,14,15,14,18,16,17,17,17,18, + 21,17,18,17,20,19,13,14,14,17,16,13,14,15,16,18, + 15,16,15,18,17,17,16,17,17,19,17,18,18,20,19,13, + 14,14,16,17,15,15,16,17,18,14,15,14,18,17,17,18, + 18,19,20,17,18,16,19,17,16,17,15,19,18,16,16,16, + 18,18,17,18,17,20,19,18,17,18,17,20,20,20,19,22, + 20,16,17,17,18,19,18,18,18,19,20,16,17,16,19,18, + 20,19,19,20,20,18,19,17,20,17,13,14,14,16,17,14, + 14,16,16,18,14,16,15,17,16,16,16,17,17,18,17,17, + 16,19,18,14,14,15,16,17,14,14,16,16,18,16,16,16, + 17,17,16,15,17,16,19,18,18,18,19,19,14,15,15,17, + 17,15,16,16,17,18,14,16,14,18,16,17,17,18,18,19, + 16,17,16,19,17,16,16,17,16,18,16,16,17,16,19,18, + 18,18,17,18,17,16,18,16,20,19,19,19,19,19,16,17, + 17,18,18,17,17,18,19,19,16,17,16,19,17,18,19,19, + 19,20,17,18,16,20,16,11,14,13,17,17,14,14,16,16, + 18,14,16,14,19,16,18,18,19,18,19,18,19,18,21,18, + 13,15,14,18,16,14,14,16,16,18,16,17,16,19,17,18, + 16,19,17,20,19,19,19,21,19,13,14,15,17,18,17,16, + 17,17,19,14,16,14,18,16,20,19,19,20,21,18,19,16, + 21,17,17,18,16,19,17,16,16,17,18,18,19,19,18,21, + 18,17,17,18,17,20,20,20,20,22,20,17,17,18,18,20, + 19,19,19,18,20,16,17,17,19,19,21,21,21,20,21,17, + 19,17,23,17,11,13,13,16,16,13,14,14,17,17,13,14, + 14,17,17,16,17,17,19,20,15,16,16,19,19,13,14,14, + 16,17,14,15,15,17,18,14,15,15,17,17,17,17,18,19, + 19,17,17,18,19,19,13,14,14,17,16,14,15,15,17,17, + 13,15,14,18,17,17,18,18,19,20,16,17,16,19,18,16, + 16,17,18,18,17,17,17,18,19,17,18,17,19,19,19,19, + 19,19,20,19,20,19,20,20,15,16,16,18,17,16,17,17, + 20,18,15,16,16,19,17,19,19,19,20,20,17,18,17,21, + 17,11,13,13,16,16,13,14,15,16,17,13,15,14,17,16, + 17,17,18,18,20,17,17,17,19,19,13,14,14,17,17,14, + 14,15,17,18,15,15,15,18,17,17,17,18,17,20,18,18, + 17,20,18,13,14,14,16,17,15,15,16,17,18,14,15,13, + 17,17,17,18,18,19,20,17,17,16,19,17,16,17,17,18, + 18,16,16,17,18,18,18,18,18,19,19,18,17,19,18,21, + 19,20,20,20,20,16,15,17,18,18,17,17,18,18,20,16, + 16,16,18,17,20,19,20,21,22,17,18,17,20,17,12,13, + 13,16,16,13,14,15,16,17,13,14,14,17,16,16,17,18, + 18,19,15,16,16,19,18,13,14,14,16,17,14,14,15,16, + 17,14,15,15,17,17,16,16,17,17,19,17,17,17,19,18, + 13,14,13,17,16,14,15,15,17,17,13,15,13,17,16,17, + 17,17,19,19,15,17,15,19,17,16,17,17,18,18,16,16, + 17,17,19,17,18,17,19,19,18,17,19,17,19,19,19,19, + 20,19,15,17,15,19,16,17,17,16,19,18,16,17,15,18, + 16,19,19,19,20,19,17,19,16,19,16,11,14,14,17,17, + 15,14,16,16,18,15,16,14,18,16,18,18,19,18,21,18, + 19,18,20,18,13,15,14,18,17,14,14,16,16,18,16,17, + 16,19,17,17,17,19,17,22,19,19,19,21,19,13,14,15, + 17,18,17,16,17,17,19,14,16,14,18,16,19,19,19,20, + 21,18,18,16,20,17,17,18,16,19,18,15,17,17,19,19, + 19,19,18,21,19,18,17,20,17,21,22,21,20,21,21,17, + 16,19,18,20,19,18,19,18,20,16,17,16,19,18,21,20, + 21,19,23,18,19,16,20,17,13,14,14,17,16,14,14,15, + 16,18,14,16,14,17,16,16,16,17,17,19,16,17,16,19, + 17,14,15,15,17,17,14,14,16,16,17,15,16,16,18,17, + 16,16,17,17,19,17,18,17,19,18,14,15,14,17,16,16, + 16,16,17,17,14,16,14,17,16,18,18,18,18,19,16,17, + 15,19,16,17,17,17,18,18,16,15,17,17,18,18,18,18, + 19,19,17,16,18,16,19,19,19,19,19,19,16,17,16,19, + 16,18,18,17,19,18,16,17,16,19,16,19,19,20,19,19, + 17,18,16,20,16, +}; + +static const static_codebook _44p6_p5_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p6_p5_0, + 1, -528744448, 1616642048, 3, 0, + (long *)_vq_quantlist__44p6_p5_0, + 0 +}; + +static const long _vq_quantlist__44p6_p5_1[] = { + 3, + 2, + 4, + 1, + 5, + 0, + 6, +}; + +static const char _vq_lengthlist__44p6_p5_1[] = { + 2, 3, 3, 3, 3, 3, 3, +}; + +static const static_codebook _44p6_p5_1 = { + 1, 7, + (char *)_vq_lengthlist__44p6_p5_1, + 1, -533200896, 1611661312, 3, 0, + (long *)_vq_quantlist__44p6_p5_1, + 0 +}; + +static const long _vq_quantlist__44p6_p6_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p6_p6_0[] = { + 1, 5, 5, 5, 7, 9, 5, 9, 7, 5, 7, 8, 7, 7,10, 9, + 10,10, 5, 8, 7, 9,10,10, 7,10, 7, 6, 9, 9, 9,10, + 12, 9,11,11, 9,10,11,11,11,13,12,13,13, 9,11,11, + 12,13,13,11,13,11, 6, 9, 9, 9,11,11, 9,12,10, 9, + 11,11,11,11,13,12,13,13, 9,11,10,12,13,13,11,13, + 11, 6, 9, 9, 9,11,12, 9,12,11, 9,10,11,10,10,13, + 12,13,13, 9,11,11,12,13,12,11,13,11, 7, 9,10, 9, + 10,12,10,12,11,10,10,12,10,10,12,12,12,13,10,11, + 11,12,12,13,10,12,10, 7,10,10,11,11,14,11,14,11, + 10,12,11,11,11,14,14,14,14,10,11,12,14,14,14,11, + 14,11, 6, 9, 9, 9,11,12, 9,12,11, 9,11,11,11,11, + 13,12,12,13, 9,11,10,12,13,13,10,13,10, 7,10,10, + 11,11,14,11,14,11,10,12,11,11,11,14,14,15,14,10, + 11,12,13,14,15,11,14,11, 7,10, 9,10,11,12, 9,12, + 10,10,11,11,10,10,12,12,13,12, 9,12,10,12,13,12, + 10,12,10, +}; + +static const static_codebook _44p6_p6_0 = { + 5, 243, + (char *)_vq_lengthlist__44p6_p6_0, + 1, -527106048, 1620377600, 2, 0, + (long *)_vq_quantlist__44p6_p6_0, + 0 +}; + +static const long _vq_quantlist__44p6_p6_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p6_p6_1[] = { + 2, 6, 6, 6, 7, 8, 6, 8, 7, 6, 7, 7, 7, 7, 8, 7, + 8, 8, 6, 7, 7, 7, 8, 8, 7, 8, 7, 6, 8, 8, 8, 9, + 9, 8, 9, 9, 8, 9, 9, 9, 9,10, 9,10,10, 8, 9, 9, + 9,10,10, 9,10, 9, 6, 8, 8, 8, 9, 9, 8, 9, 9, 8, + 9, 9, 9, 9,10, 9,10,10, 8, 9, 9, 9,10, 9, 9,10, + 9, 6, 8, 8, 8, 9, 9, 8, 9, 9, 8, 9, 9, 9, 9,10, + 9, 9,10, 8, 9, 9, 9,10, 9, 9,10, 9, 7, 8, 8, 8, + 9, 9, 8, 9, 9, 8, 8, 9, 9, 9, 9, 9, 9, 9, 8, 9, + 9, 9,10, 9, 9, 9, 9, 7, 9, 9, 9, 9,10, 9,10, 9, + 9, 9, 9, 9, 9,10,10,10,10, 9, 9, 9,10,10,10, 9, + 10, 9, 6, 8, 8, 8, 9, 9, 8, 9, 9, 8, 9, 9, 9, 9, + 10, 9,10,10, 8, 9, 9, 9,10, 9, 9,10, 9, 7, 9, 9, + 9, 9,10, 9,10, 9, 9, 9, 9, 9, 9,10,10,10,10, 9, + 9, 9,10,10,10, 9,10, 9, 7, 8, 8, 8, 9, 9, 8, 9, + 9, 8, 9, 9, 9, 9,10, 9, 9,10, 8, 9, 8, 9, 9, 9, + 9,10, 9, +}; + +static const static_codebook _44p6_p6_1 = { + 5, 243, + (char *)_vq_lengthlist__44p6_p6_1, + 1, -530841600, 1616642048, 2, 0, + (long *)_vq_quantlist__44p6_p6_1, + 0 +}; + +static const long _vq_quantlist__44p6_p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p6_p7_0[] = { + 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, +}; + +static const static_codebook _44p6_p7_0 = { + 5, 243, + (char *)_vq_lengthlist__44p6_p7_0, + 1, -513979392, 1633504256, 2, 0, + (long *)_vq_quantlist__44p6_p7_0, + 0 +}; + +static const long _vq_quantlist__44p6_p7_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p6_p7_1[] = { + 1, 4, 5, 5,10,10, 5,10,10, 5,10,10,10,10,10,10, + 10,10, 5,10,10,10,10,10,10,10,10, 7,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10, 6,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10, 6,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10, 9,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10, 9,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10, 6,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10, 9,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10, 9,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11, + 11,11,11, +}; + +static const static_codebook _44p6_p7_1 = { + 5, 243, + (char *)_vq_lengthlist__44p6_p7_1, + 1, -516716544, 1630767104, 2, 0, + (long *)_vq_quantlist__44p6_p7_1, + 0 +}; + +static const long _vq_quantlist__44p6_p7_2[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p6_p7_2[] = { + 1, 2, 3, 4, 5, 7, 7, 8, 8, 9, 9,10,10,11,11,12, + 12,13,13,14,14,15,15,15,15, +}; + +static const static_codebook _44p6_p7_2 = { + 1, 25, + (char *)_vq_lengthlist__44p6_p7_2, + 1, -518864896, 1620639744, 5, 0, + (long *)_vq_quantlist__44p6_p7_2, + 0 +}; + +static const long _vq_quantlist__44p6_p7_3[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p6_p7_3[] = { + 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44p6_p7_3 = { + 1, 25, + (char *)_vq_lengthlist__44p6_p7_3, + 1, -529006592, 1611661312, 5, 0, + (long *)_vq_quantlist__44p6_p7_3, + 0 +}; + +static const char _huff_lengthlist__44p6_short[] = { + 2, 8,13,15,16,18,21,22, 5, 4, 6, 8,10,12,17,21, + 9, 5, 5, 6, 8,11,15,19,11, 6, 5, 5, 6, 7,12,14, + 14, 8, 7, 5, 4, 4, 9,11,16,11, 9, 7, 4, 3, 7,10, + 22,15,14,12, 8, 7, 9,11,21,16,15,12, 9, 5, 6, 8, +}; + +static const static_codebook _huff_book__44p6_short = { + 2, 64, + (char *)_huff_lengthlist__44p6_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p7_l0_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44p7_l0_0[] = { + 2, 4, 4, 7, 7, 8, 8,10,10,11,11,12,12, 4, 5, 5, + 7, 7, 9, 9,11, 9,12,11,12,12, 4, 5, 5, 7, 7, 9, + 9, 9,10,10,11,12,12, 7, 7, 7, 7, 8, 9, 8,11, 5, + 12, 6,12,10, 7, 7, 7, 8, 7, 8, 9, 5,11, 6,12,10, + 12, 8, 9, 9, 9, 9,10,10,11, 7,11, 7,12, 9, 8, 9, + 8, 9, 9,10,10, 7,11, 7,11, 9,11,10,10,10,10,10, + 10,10,11,10,11, 8,11, 9,10,10,10,10,10,10,10,10, + 11, 8,10, 9,11,10,11,11,11,11,11,10,11,10,12,10, + 12,11,10,11,11,11,11,10,11,10,11,10,12,11,12,11, + 12,12,12,12,12,12,12,12,12,12,13,12,11,12,11,12, + 12,12,12,12,11,12,11,12,13, +}; + +static const static_codebook _44p7_l0_0 = { + 2, 169, + (char *)_vq_lengthlist__44p7_l0_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44p7_l0_0, + 0 +}; + +static const long _vq_quantlist__44p7_l0_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p7_l0_1[] = { + 4, 4, 4, 5, 5, 4, 4, 5, 5, 5, 4, 5, 4, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44p7_l0_1 = { + 2, 25, + (char *)_vq_lengthlist__44p7_l0_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p7_l0_1, + 0 +}; + +static const long _vq_quantlist__44p7_l1_0[] = { + 54, + 29, + 79, + 0, + 108, +}; + +static const char _vq_lengthlist__44p7_l1_0[] = { + 1, 2, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, +}; + +static const static_codebook _44p7_l1_0 = { + 2, 25, + (char *)_vq_lengthlist__44p7_l1_0, + 1, -514516992, 1620639744, 7, 0, + (long *)_vq_quantlist__44p7_l1_0, + 0 +}; + +static const char _huff_lengthlist__44p7_lfe[] = { + 2, 3, 1, 3, +}; + +static const static_codebook _huff_book__44p7_lfe = { + 2, 4, + (char *)_huff_lengthlist__44p7_lfe, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44p7_long[] = { + 2, 7,14,16,17,17,18,20, 6, 3, 5, 8,10,11,13,15, + 13, 5, 3, 5, 8, 9,11,12,15, 7, 4, 3, 5, 7, 9,11, + 16,10, 7, 5, 6, 7, 9,10,17,11, 8, 7, 7, 6, 8, 8, + 19,13,11, 9, 9, 8, 8, 9,20,14,13,11,10, 8, 9, 9, +}; + +static const static_codebook _huff_book__44p7_long = { + 2, 64, + (char *)_huff_lengthlist__44p7_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p7_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p7_p1_0[] = { + 2, 5, 5, 4, 7, 7, 4, 7, 7, 5, 7, 7, 7, 8, 9, 7, + 9, 9, 5, 7, 7, 7, 9, 9, 7, 9, 8, 6, 7, 8, 8, 9, + 10, 8, 9,10, 8, 9,10,10,10,12,10,11,11, 8,10,10, + 10,11,12,10,11,11, 6, 8, 7, 8,10, 9, 8,10, 9, 8, + 10,10,10,11,11,10,12,11, 8,10, 9,10,11,11,10,12, + 10, 5, 8, 8, 8,10,10, 8,10,10, 7, 9,10, 9,10,11, + 9,11,11, 8,10,10,10,11,12,10,12,11, 7, 9, 9, 9, + 10,11, 9,11,11, 9, 9,11,10,11,12,11,11,12, 9,11, + 11,11,12,12,11,12,12, 7, 9, 9,10,11,11,10,12,11, + 9,11,10,11,11,12,11,13,12,10,11,11,12,13,13,11, + 13,11, 5, 8, 8, 8,10,10, 8,10,10, 8,10,10,10,11, + 12,10,12,11, 7,10, 9, 9,11,11, 9,11,10, 7, 9, 9, + 10,11,12,10,11,11,10,11,11,11,11,13,12,13,13, 9, + 10,11,11,12,13,11,12,11, 7, 9, 9, 9,11,11, 9,11, + 10, 9,11,11,11,12,12,11,12,12, 9,11, 9,11,12,11, + 10,12,11, +}; + +static const static_codebook _44p7_p1_0 = { + 5, 243, + (char *)_vq_lengthlist__44p7_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p7_p1_0, + 0 +}; + +static const long _vq_quantlist__44p7_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p7_p2_0[] = { + 4, 6, 6, 9, 9, 6, 8, 8,10,10, 6, 8, 8,10,10, 8, + 10,10,12,13, 8,10,10,13,12, 6, 8, 8,10,10, 8, 8, + 9,10,11, 8, 9, 9,11,11,10,10,11,12,13,10,11,11, + 13,13, 6, 8, 8,10,10, 8, 9, 9,11,11, 8, 9, 8,11, + 10,10,11,11,13,13,10,11,10,13,12, 9,10,10,12,12, + 10,10,11,12,13,10,11,11,13,13,12,12,13,12,15,13, + 13,13,15,14, 9,10,10,12,12,10,11,11,13,13,10,11, + 10,13,12,12,13,13,14,15,12,13,12,15,12, 6, 8, 8, + 10,11, 8, 9,10,11,12, 8, 9, 9,11,11,10,11,12,13, + 14,10,11,11,13,13, 8, 9, 9,11,12, 9,10,11,12,13, + 9,10,10,12,13,11,12,13,13,15,11,12,12,14,14, 8, + 9, 9,11,12, 9,10,11,12,13, 9,10,10,13,12,11,12, + 13,14,15,11,12,12,14,13,10,11,12,13,14,11,12,13, + 13,15,12,13,13,14,14,13,13,14,14,16,14,15,14,16, + 15,10,12,11,14,13,12,12,13,14,14,11,12,12,14,14, + 14,14,15,15,16,13,14,14,16,14, 6, 8, 8,11,10, 8, + 9, 9,11,11, 8,10, 9,12,11,10,11,11,13,13,10,12, + 11,14,13, 8, 9, 9,12,11, 9,10,10,12,13, 9,11,10, + 13,12,11,12,12,14,14,11,13,12,15,14, 8, 9, 9,12, + 11, 9,10,10,13,12, 9,11,10,13,12,11,12,12,14,14, + 11,13,12,15,13,10,11,12,13,14,11,12,13,13,14,12, + 13,12,14,14,13,13,14,14,16,14,15,14,16,16,10,12, + 11,14,13,12,13,13,14,14,11,13,12,15,13,14,14,15, + 16,16,13,14,13,16,14, 9,10,11,12,13,11,11,12,13, + 14,11,11,12,13,14,13,13,14,14,16,13,14,14,15,15, + 11,11,12,13,14,12,12,13,13,15,12,13,13,14,15,14, + 14,15,15,17,14,14,15,16,16,11,12,12,13,14,12,12, + 13,14,15,12,13,12,14,15,14,14,15,15,17,14,15,14, + 16,16,13,14,14,15,16,14,14,15,15,17,14,15,15,16, + 16,15,16,17,16,18,16,17,16,17,17,13,14,14,16,15, + 14,15,15,16,16,14,15,14,16,15,16,16,17,17,18,16, + 16,16,17,16, 9,11,10,13,12,11,12,11,14,13,11,12, + 11,14,13,13,14,14,16,15,13,14,13,16,14,11,12,12, + 14,13,12,12,13,14,14,12,13,13,15,14,14,14,15,16, + 16,14,15,14,17,15,11,12,11,14,13,12,13,13,15,14, + 12,13,12,15,13,14,15,14,16,16,14,15,14,17,15,13, + 14,14,15,16,14,14,15,16,16,14,15,15,16,16,15,16, + 16,16,17,16,16,16,17,17,13,14,14,16,15,14,15,15, + 17,16,14,15,14,17,15,16,17,17,17,17,16,16,16,18, + 16, 6, 8, 8,11,11, 8, 9, 9,11,12, 8, 9, 9,12,11, + 10,11,11,13,14,10,11,11,14,13, 8, 9, 9,11,12, 9, + 10,10,12,13, 9,10,10,13,12,11,11,12,13,15,11,12, + 12,15,14, 8, 9, 9,12,11, 9,10,11,12,13, 9,11,10, + 13,12,11,12,12,14,15,11,13,12,15,14,10,11,11,13, + 14,11,12,12,13,14,11,12,12,14,14,13,13,14,14,16, + 13,14,14,16,15,11,12,11,14,13,12,13,13,14,14,11, + 13,12,14,13,14,14,15,16,16,13,14,14,16,14, 8, 9, + 9,11,12, 9,10,10,12,13, 9,10,10,13,12,11,12,12, + 14,15,11,12,12,14,14, 9, 9,10,11,13,10,10,12,12, + 14,10,10,11,13,13,12,12,13,14,16,12,12,13,15,15, + 9,10,10,13,12,10,11,11,13,14,10,12,11,14,13,12, + 13,13,15,15,12,13,13,15,15,11,11,12,13,15,12,12, + 13,13,15,12,13,13,14,15,14,14,15,15,17,14,15,15, + 16,16,11,13,12,15,14,13,13,13,15,15,12,14,13,15, + 14,15,15,15,16,16,14,15,15,17,15, 7, 9, 9,12,11, + 9,10,10,12,12, 9,11,10,13,12,11,12,12,14,14,11, + 13,12,15,14, 9,10,10,12,12,10,10,11,12,13,10,11, + 11,14,13,12,12,13,14,15,12,13,13,15,14, 9,10,10, + 12,12,10,11,11,13,13,10,11,10,14,12,12,13,13,15, + 15,12,13,12,15,13,11,12,12,14,14,12,12,13,14,15, + 12,13,13,15,15,14,13,14,13,16,14,15,15,16,16,11, + 12,12,14,14,13,13,14,15,15,12,13,12,15,14,15,15, + 15,16,16,14,15,14,17,14,10,11,12,13,14,11,12,13, + 14,15,11,12,12,14,15,13,14,15,15,17,14,14,14,16, + 16,11,12,13,12,15,12,12,14,13,16,13,13,14,13,16, + 14,14,15,14,17,15,15,15,15,17,11,13,12,15,15,13, + 13,14,15,16,12,14,13,16,15,15,15,15,17,17,15,15, + 15,17,16,14,14,15,14,16,14,14,16,14,17,15,15,15, + 14,17,16,16,17,15,18,17,17,17,16,18,14,15,15,17, + 16,15,16,16,17,17,15,16,15,17,16,17,17,17,18,18, + 16,17,16,18,17,10,11,11,14,13,11,12,12,14,14,11, + 13,12,15,14,14,14,14,16,16,14,15,14,16,15,11,12, + 12,15,13,12,13,13,15,14,13,14,13,16,14,14,15,15, + 16,16,15,16,15,17,16,11,13,12,15,14,13,13,14,15, + 15,12,14,13,16,14,15,15,15,17,17,14,16,15,17,16, + 14,14,14,16,15,14,15,15,16,16,15,16,15,17,16,16, + 16,16,16,17,16,17,17,18,17,14,15,15,16,16,15,15, + 16,17,16,14,15,15,17,16,17,17,17,18,18,16,17,16, + 18,16, 6, 8, 8,11,11, 8, 9, 9,11,12, 8, 9, 9,12, + 11,10,11,12,13,14,10,11,11,14,13, 8, 9, 9,11,12, + 9,10,11,12,13, 9,11,10,13,12,11,12,13,14,15,11, + 12,12,15,14, 8, 9, 9,12,11, 9,10,10,12,13, 9,10, + 10,13,12,11,12,12,14,15,11,12,12,14,13,11,11,12, + 13,14,11,12,13,13,15,12,13,13,14,14,13,14,14,14, + 16,14,15,14,16,16,10,11,11,14,13,11,12,12,14,14, + 11,12,12,14,13,13,14,14,15,16,13,14,13,16,14, 7, + 9, 9,11,11, 9,10,11,12,13, 9,10,10,12,12,11,12, + 13,14,15,11,12,12,14,14, 9,10,10,12,12,10,10,11, + 12,13,10,11,11,13,13,12,12,13,13,15,12,13,13,15, + 15, 9,10,10,12,12,10,11,11,13,13,10,11,10,13,12, + 12,13,13,14,15,12,13,12,15,13,11,12,12,14,14,12, + 12,13,14,15,13,14,13,15,15,14,13,15,13,16,15,15, + 15,16,16,11,12,12,14,14,12,13,13,14,15,12,13,12, + 15,14,14,15,15,16,17,13,14,13,16,13, 8, 9, 9,12, + 11, 9,10,10,12,13, 9,10,10,13,12,11,12,12,14,15, + 11,12,12,15,14, 9,10,10,12,13,10,11,12,13,14,10, + 11,11,14,13,12,13,13,15,15,12,13,13,15,15, 9,10, + 9,13,11,10,11,10,13,13,10,12,10,14,12,12,13,12, + 15,15,12,13,12,15,14,11,12,13,14,15,12,13,14,14, + 15,13,13,13,15,15,14,15,15,15,17,15,15,15,16,16, + 11,12,11,15,13,12,13,13,15,14,12,13,12,16,13,14, + 15,15,16,16,14,15,14,17,14,10,11,11,13,14,11,12, + 13,14,15,11,12,12,14,14,14,14,15,15,17,14,14,14, + 15,16,11,12,13,14,15,12,13,14,14,16,13,14,13,15, + 15,14,15,16,15,17,15,15,15,17,17,11,12,12,13,15, + 13,13,14,14,16,12,13,13,14,15,15,15,15,16,17,14, + 15,15,16,16,14,15,15,16,16,14,15,15,16,17,15,15, + 16,16,17,16,16,17,16,18,17,17,17,18,18,14,14,15, + 15,16,15,15,15,16,17,14,15,15,16,16,16,17,17,17, + 18,16,16,16,17,16,10,11,11,14,13,11,13,12,15,14, + 11,13,12,15,14,14,15,14,16,16,13,15,14,17,15,11, + 12,13,15,15,12,13,14,15,16,13,14,13,16,15,15,15, + 15,16,17,15,15,15,17,16,11,13,11,15,12,13,14,13, + 16,13,12,14,12,16,13,15,15,15,17,15,14,16,14,17, + 14,14,15,15,16,17,15,15,16,16,17,15,16,15,17,17, + 16,16,17,17,18,16,17,17,18,18,14,15,14,17,13,15, + 16,15,17,15,15,16,15,17,14,16,17,16,18,16,16,17, + 16,18,15, 9,11,11,13,13,10,12,12,14,14,11,12,12, + 14,14,13,14,14,15,16,13,14,14,16,16,10,11,12,14, + 14,11,12,13,14,15,11,13,13,15,15,13,14,14,15,16, + 14,15,15,16,16,11,12,12,14,14,12,13,13,15,15,12, + 13,12,15,14,14,15,15,16,16,14,15,14,17,16,12,13, + 13,15,16,13,13,14,15,16,13,14,14,16,16,14,15,16, + 16,17,15,16,16,17,17,13,14,14,16,15,14,15,15,17, + 16,14,15,14,17,15,16,16,17,17,17,16,16,16,18,16, + 10,11,12,14,14,11,12,13,14,15,11,13,12,15,15,13, + 14,15,16,16,14,15,15,17,16,11,11,13,14,15,12,12, + 14,14,16,12,13,14,15,15,14,14,15,16,17,15,15,15, + 17,17,12,13,12,15,15,13,14,14,16,15,13,14,13,16, + 15,15,16,15,17,17,15,16,15,17,16,13,12,15,14,16, + 14,13,15,14,17,14,13,15,15,17,15,14,17,15,18,16, + 15,17,17,18,14,15,15,17,16,15,16,16,17,17,15,16, + 15,17,16,16,17,17,18,18,16,17,16,18,17,10,11,11, + 14,14,11,12,12,14,15,11,13,12,15,14,13,14,14,16, + 16,14,15,14,16,16,11,12,12,14,14,12,12,13,15,15, + 12,13,13,15,15,14,14,15,16,16,14,15,15,17,16,11, + 12,12,15,15,13,13,13,15,15,12,13,13,15,15,15,15, + 15,17,17,14,15,15,17,16,13,14,13,16,15,14,14,14, + 16,16,14,15,14,17,16,15,15,16,16,17,16,17,16,18, + 17,14,15,15,16,16,15,15,15,17,17,14,15,15,17,16, + 16,17,17,18,18,16,17,16,18,16,12,13,13,15,15,13, + 14,14,16,16,13,14,14,16,16,14,15,16,16,18,15,16, + 16,17,17,13,13,14,14,16,14,14,15,15,17,14,14,15, + 15,17,15,15,17,15,18,16,16,17,17,18,13,14,14,16, + 16,14,15,15,16,17,14,15,15,17,16,16,17,16,17,18, + 16,17,16,18,17,15,14,16,13,18,16,15,17,14,18,16, + 15,17,14,18,17,16,18,15,19,17,17,18,16,19,15,16, + 16,17,17,16,17,17,18,18,16,17,16,18,17,18,18,18, + 19,18,17,18,17,19,17,11,12,12,15,15,13,13,14,15, + 16,13,14,13,16,15,15,15,15,16,17,15,16,15,17,16, + 12,13,13,15,15,13,13,14,15,16,14,15,14,16,15,15, + 15,16,16,17,16,16,16,18,17,12,13,13,15,15,14,14, + 15,16,16,13,14,13,16,15,16,16,16,17,17,15,16,15, + 18,16,15,15,15,17,15,14,15,15,16,16,16,17,16,17, + 16,16,16,17,16,17,17,18,17,19,18,15,15,16,17,17, + 16,16,16,17,17,15,16,15,17,16,17,18,18,18,18,16, + 17,16,18,16, 9,11,11,13,13,11,12,12,14,14,10,12, + 12,14,14,13,14,14,15,16,13,14,14,16,15,11,12,12, + 14,14,12,12,13,14,15,12,13,13,15,15,14,14,15,16, + 17,14,15,15,16,16,10,12,11,14,14,11,13,13,15,15, + 11,13,12,15,14,14,14,15,16,16,13,14,14,16,15,13, + 14,14,15,16,14,14,15,15,17,14,15,15,16,17,16,16, + 16,16,18,16,16,17,17,17,12,13,13,16,15,13,14,14, + 16,16,12,14,13,16,15,15,16,16,17,17,14,16,15,17, + 16,10,11,11,14,14,11,12,13,14,15,11,12,12,15,14, + 14,14,15,16,16,13,14,14,16,16,11,12,12,14,15,12, + 13,14,15,15,13,13,13,15,15,14,15,15,16,17,15,15, + 15,16,17,11,12,12,14,14,12,13,13,15,15,12,13,12, + 15,15,14,15,15,16,17,14,15,14,16,16,14,14,15,16, + 16,14,15,15,16,17,15,16,15,17,17,16,16,17,16,18, + 16,17,17,18,18,13,13,14,15,16,14,14,15,16,17,14, + 14,14,16,15,16,16,17,17,18,15,16,15,17,16,10,12, + 11,14,14,11,13,13,15,15,11,13,12,15,15,14,15,15, + 16,16,13,15,14,16,16,12,12,13,15,15,13,13,14,15, + 16,13,14,14,16,15,15,15,16,16,17,15,15,15,17,17, + 11,13,11,15,14,12,14,13,16,15,12,14,12,16,14,15, + 15,15,17,17,14,15,14,17,15,14,15,15,16,17,15,15, + 16,16,17,15,16,16,17,17,16,16,17,17,18,16,17,17, + 18,18,13,14,12,16,14,14,15,13,17,15,14,15,13,17, + 14,16,17,15,18,17,15,17,14,18,15,11,12,12,14,15, + 13,13,14,15,16,13,14,13,16,15,15,15,16,16,17,15, + 15,15,16,16,12,13,13,15,15,13,13,14,15,16,14,15, + 14,16,16,15,15,16,16,18,16,16,16,18,17,12,13,13, + 15,15,14,14,15,15,16,13,14,13,15,15,16,16,16,17, + 18,15,16,15,17,16,15,16,15,17,16,15,15,16,16,17, + 16,17,16,17,17,16,16,17,16,18,17,18,18,18,18,14, + 15,15,15,17,16,15,17,16,17,14,15,15,16,16,17,17, + 18,18,19,16,16,16,17,16,12,13,13,15,15,13,14,14, + 16,16,13,14,14,16,16,15,16,16,17,17,15,16,15,18, + 16,13,14,14,16,16,14,15,15,16,17,14,15,15,17,16, + 16,16,17,17,18,16,17,16,18,18,13,14,13,16,14,14, + 15,14,17,15,14,15,14,17,14,16,17,16,18,17,15,17, + 15,18,15,15,16,16,17,18,16,16,17,17,18,16,17,17, + 17,18,17,17,18,18,19,17,18,18,19,18,15,16,14,17, + 13,16,17,15,18,14,16,17,15,18,14,18,18,17,19,16, + 17,18,16,19,15, +}; + +static const static_codebook _44p7_p2_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p7_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p7_p2_0, + 0 +}; + +static const long _vq_quantlist__44p7_p3_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p7_p3_0[] = { + 2, 5, 5, 4, 7, 7, 4, 7, 7, 5, 7, 8, 7, 8,10, 8, + 9, 9, 5, 7, 7, 8, 9, 9, 7,10, 8, 5, 7, 8, 8, 9, + 10, 8,10,10, 8, 9,10,10,10,12,10,12,12, 8,10,10, + 10,12,12,10,12,11, 5, 8, 7, 8,10,10, 8,10, 9, 8, + 10,10,10,11,12,10,12,12, 8,10, 9,10,12,12,10,12, + 10, 5, 8, 8, 7,10,10, 8,10,10, 7, 9,10, 9,10,12, + 10,12,12, 8,10,10,10,12,12,10,12,11, 7, 9,10, 9, + 11,12,10,12,11, 9, 9,12,11,10,14,12,12,13,10,12, + 11,12,13,13,11,14,12, 7,10, 9,10,11,11,10,12,11, + 9,11,11,11,11,13,12,14,13,10,12,12,12,14,14,11, + 14,12, 5, 8, 8, 8,10,10, 7,10,10, 8,10,10,10,11, + 12,10,12,12, 7,10, 9,10,12,12, 9,12,10, 7, 9,10, + 10,11,12,10,11,11,10,12,12,11,12,14,12,14,14, 9, + 11,11,12,13,14,11,13,11, 7,10, 9,10,11,12, 9,12, + 11,10,11,12,11,12,14,12,13,13, 9,12, 9,12,13,12, + 11,14,10, +}; + +static const static_codebook _44p7_p3_0 = { + 5, 243, + (char *)_vq_lengthlist__44p7_p3_0, + 1, -533200896, 1614282752, 2, 0, + (long *)_vq_quantlist__44p7_p3_0, + 0 +}; + +static const long _vq_quantlist__44p7_p3_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p7_p3_1[] = { + 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 7, 8, 8, 7, + 8, 8, 7, 8, 7, 7, 8, 8, 7, 8, 8, 7, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, 9, 8, 8, 8, + 8, 8, 8, 8, 9, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 9, 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, 9, + 8, 7, 8, 8, 7, 8, 8, 7, 8, 8, 7, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, 9, 8, 7, 8, 8, 8, + 8, 9, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 9, 9, 8, 8, + 8, 9, 9, 9, 8, 9, 9, 7, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 9, 8, 9, 9, 8, 8, 8, 8, 9, 9, 8, + 9, 8, 7, 8, 8, 7, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, + 9, 8, 8, 9, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 9, 9, 8, + 8, 8, 8, 9, 9, 8, 9, 8, 7, 8, 8, 8, 8, 8, 8, 9, + 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 8, 8, 8, 8, 9, 9, + 8, 9, 8, +}; + +static const static_codebook _44p7_p3_1 = { + 5, 243, + (char *)_vq_lengthlist__44p7_p3_1, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p7_p3_1, + 0 +}; + +static const long _vq_quantlist__44p7_p4_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p7_p4_0[] = { + 1, 5, 5, 5, 7, 8, 5, 8, 7, 5, 7, 8, 7, 8,10, 8, + 10,10, 5, 8, 7, 8,10,10, 7,10, 8, 6, 8, 9, 9,10, + 12, 9,11,11, 9,10,11,11,11,13,11,13,13, 9,11,11, + 11,12,13,11,13,11, 6, 9, 8, 9,11,11, 9,12,10, 9, + 11,11,11,11,13,11,13,13, 9,11,10,11,13,13,11,13, + 11, 6, 9, 9, 8,10,11, 9,12,11, 8,10,11,10,11,13, + 11,13,13, 9,11,11,11,13,12,11,13,11, 8,10,10, 9, + 11,12,10,12,12,10,10,12,11,11,14,12,13,14,10,12, + 12,12,13,13,11,14,11, 8,11,10,11,12,13,11,14,12, + 10,12,11,11,12,14,13,15,14,10,12,12,13,14,15,12, + 14,12, 5, 9, 9, 9,11,12, 8,11,10, 9,11,11,11,11, + 13,11,12,13, 8,11,10,11,13,13,10,13,11, 8,10,11, + 11,12,14,11,13,12,10,12,12,12,12,14,14,15,14,10, + 11,12,13,14,15,11,14,12, 8,10,10,10,12,12, 9,12, + 11,10,12,12,11,11,14,12,13,13,10,12,10,12,14,13, + 11,13,11, +}; + +static const static_codebook _44p7_p4_0 = { + 5, 243, + (char *)_vq_lengthlist__44p7_p4_0, + 1, -531365888, 1616117760, 2, 0, + (long *)_vq_quantlist__44p7_p4_0, + 0 +}; + +static const long _vq_quantlist__44p7_p4_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p7_p4_1[] = { + 7, 8, 8,10,10, 8, 9, 9,10,11, 8, 9, 9,10,10, 9, + 10,10,11,11, 9,10,10,11,11, 8, 9, 9,10,10, 9, 9, + 10,11,11, 9,10,10,11,11,10,10,11,11,11,10,11,11, + 11,11, 8, 9, 9,10,10, 9,10,10,11,11, 9,10, 9,11, + 11,10,11,11,11,11,10,11,10,11,11,10,10,10,11,11, + 10,11,11,11,11,10,11,11,11,11,11,11,11,11,12,11, + 11,11,11,12,10,10,10,11,11,10,11,11,11,11,10,11, + 11,11,11,11,11,11,12,11,11,11,11,12,11, 8, 9,10, + 11,11, 9,10,11,11,11, 9,10,10,11,11,10,11,11,12, + 12,10,11,11,12,12,10,10,10,11,11,10,10,11,11,12, + 10,11,11,12,12,11,11,12,12,12,11,11,12,12,12,10, + 10,10,11,11,10,11,11,12,12,10,11,11,12,11,11,12, + 12,12,12,11,12,11,12,12,11,11,11,11,12,11,11,12, + 12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,11,11,11,12,12,11,12,12,12,12,11,12,11,12,12, + 12,12,12,12,12,12,12,12,12,12, 8,10, 9,11,11, 9, + 10,10,11,11, 9,10,10,11,11,10,11,11,12,12,10,11, + 11,12,12,10,10,10,11,11,10,11,11,12,12,10,11,11, + 12,12,11,11,12,12,12,11,12,12,12,12,10,10,10,11, + 11,10,11,11,12,12,10,11,10,12,11,11,12,11,12,12, + 11,12,11,12,12,11,11,11,12,12,11,12,12,12,12,11, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,11,11, + 11,12,11,11,12,12,12,12,11,12,11,12,12,12,12,12, + 12,12,12,12,12,12,12,10,11,11,11,12,11,11,12,12, + 12,11,11,11,12,12,11,12,12,12,12,11,12,12,12,12, + 11,11,12,12,12,11,12,12,12,12,12,12,12,12,12,12, + 12,13,12,13,12,12,12,13,13,11,12,11,12,12,11,12, + 12,12,12,11,12,12,12,12,12,12,12,13,13,12,12,12, + 13,13,12,12,12,12,12,12,12,12,12,13,12,12,13,13, + 13,12,13,13,13,13,12,13,13,13,13,12,12,12,12,12, + 12,12,13,13,13,12,12,12,13,12,12,13,13,13,13,12, + 13,13,13,13,10,11,11,12,11,11,11,11,12,12,11,12, + 11,12,12,11,12,12,12,12,11,12,12,12,12,11,11,11, + 12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,13, + 13,12,12,12,13,13,11,12,11,12,12,12,12,12,12,12, + 11,12,11,12,12,12,12,12,13,13,12,12,12,13,12,12, + 12,12,12,12,12,12,12,13,13,12,12,12,13,13,12,13, + 13,13,13,12,13,13,13,13,12,12,12,12,12,12,12,12, + 13,13,12,13,12,13,12,12,13,13,13,13,13,13,13,13, + 13, 8,10,10,11,11, 9,10,10,11,11, 9,10,10,11,11, + 10,11,11,12,12,10,11,11,12,12, 9,10,10,11,11,10, + 10,11,11,12,10,11,11,12,12,11,11,12,12,12,11,11, + 12,12,12,10,10,10,11,11,10,11,11,12,12,10,11,10, + 12,11,11,12,11,12,12,11,12,11,12,12,11,11,11,12, + 12,11,11,12,12,12,11,12,12,12,12,11,12,12,12,12, + 12,12,12,12,12,11,11,11,12,11,11,12,12,12,12,11, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12, 9,10, + 10,11,11,10,11,11,11,12,10,11,11,12,12,11,11,11, + 12,12,11,11,11,12,12,10,10,11,11,12,11,11,12,12, + 12,11,11,11,12,12,11,11,12,12,12,11,12,12,12,12, + 10,11,11,12,12,11,11,11,12,12,11,12,11,12,12,11, + 12,12,12,12,11,12,12,12,12,11,11,12,12,12,11,12, + 12,12,12,12,12,12,12,12,12,12,12,12,13,12,12,12, + 12,13,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,13,12, 9,10,10,11,11, + 10,11,11,12,12,10,11,11,12,11,11,12,11,12,12,11, + 12,11,12,12,10,11,11,12,12,11,11,11,12,12,11,12, + 11,12,12,11,12,12,12,12,12,12,12,12,12,10,11,11, + 12,12,11,12,11,12,12,11,12,11,12,12,12,12,12,13, + 12,12,12,12,12,12,11,12,11,12,12,11,12,12,12,12, + 12,12,12,12,12,12,12,12,12,13,12,12,12,12,13,11, + 12,12,12,12,12,12,12,13,12,11,12,12,12,12,12,12, + 12,13,12,12,12,12,13,12,10,11,11,12,12,11,12,12, + 12,12,11,12,12,12,12,12,12,12,12,13,12,12,12,13, + 13,11,11,12,12,12,12,12,12,12,13,12,12,12,12,12, + 12,12,13,12,13,12,12,13,13,13,11,12,12,12,12,12, + 12,12,13,13,12,12,12,13,12,12,13,12,13,13,12,13, + 12,13,13,12,12,12,12,12,12,12,13,12,13,12,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,12,12,12,13, + 13,12,13,13,13,13,12,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,10,11,11,12,12,11,12,12,12,12,11, + 12,12,12,12,12,12,12,13,13,12,12,12,13,13,11,12, + 12,12,12,12,12,12,12,13,12,12,12,13,12,12,12,13, + 13,13,12,13,13,13,13,11,12,12,12,12,12,12,12,13, + 13,12,12,12,13,12,12,13,13,13,13,12,13,12,13,13, + 12,12,12,12,12,12,13,13,13,13,12,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,12,12,12,13,12,12,13, + 13,13,13,12,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13, 8,10,10,11,11, 9,10,10,11,11, 9,10,10,11, + 11,10,11,11,12,12,10,11,11,12,12,10,10,10,11,11, + 10,11,11,11,12,10,11,11,12,12,11,11,12,12,12,11, + 11,12,12,12, 9,10,10,11,11,10,11,11,12,12,10,11, + 10,12,11,11,12,11,12,12,11,12,11,12,12,11,11,11, + 12,12,11,11,12,12,12,11,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,11,11,11,12,11,11,12,12,12,12, + 11,12,11,12,12,12,12,12,12,12,12,12,12,12,12, 9, + 10,10,11,11,10,11,11,12,12,10,11,11,12,12,11,11, + 12,12,12,11,12,12,12,12,10,11,11,12,12,11,11,12, + 12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,10,11,11,12,12,11,11,12,12,12,11,11,11,12,12, + 12,12,12,12,12,11,12,12,12,12,11,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,13,12,13,12,12, + 12,13,12,11,12,12,12,12,12,12,12,12,12,11,12,12, + 12,12,12,12,12,13,12,12,12,12,13,12, 9,10,10,11, + 11,10,11,11,12,12,10,11,11,12,12,11,11,11,12,12, + 11,12,11,12,12,10,11,11,12,12,11,11,12,12,12,11, + 11,11,12,12,11,12,12,12,12,11,12,12,12,12,10,11, + 10,12,11,11,11,11,12,12,11,12,11,12,12,11,12,12, + 12,12,11,12,11,12,12,11,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,13,12,12,12,12,13, + 11,12,11,12,12,12,12,12,12,12,11,12,12,12,12,12, + 12,12,13,12,12,12,12,13,12,10,11,11,12,12,11,12, + 12,12,12,11,12,12,12,12,12,12,12,13,13,12,12,12, + 13,13,11,12,12,12,12,12,12,12,12,13,12,12,12,13, + 13,12,12,13,13,13,12,13,13,13,13,11,12,12,12,12, + 12,12,12,12,13,12,12,12,12,12,12,13,13,13,13,12, + 13,12,13,13,12,12,12,12,13,12,13,13,13,13,12,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,12,12,12, + 12,12,12,13,13,13,13,12,13,12,13,13,13,13,13,13, + 13,13,13,13,13,13,11,11,11,12,12,11,12,12,12,12, + 11,12,12,12,12,12,12,12,13,13,12,12,12,13,12,11, + 12,12,12,12,12,12,12,13,13,12,12,12,13,13,12,12, + 13,13,13,12,13,13,13,13,11,12,11,12,12,12,12,12, + 13,12,12,12,12,13,12,12,13,12,13,13,12,13,12,13, + 12,12,12,12,12,13,12,12,13,13,13,12,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,12,12,12,12,12,12, + 13,13,13,13,12,13,12,13,12,13,13,13,13,13,13,13, + 13,13,13,10,11,11,12,12,10,11,11,12,12,10,11,11, + 12,12,11,12,12,12,12,11,12,12,12,12,11,11,11,12, + 12,11,11,12,12,12,11,12,12,12,12,12,12,12,13,13, + 12,12,12,13,13,11,11,11,12,12,11,12,12,12,12,11, + 12,11,13,12,12,12,12,13,13,12,12,12,13,13,11,12, + 12,12,12,12,12,12,12,13,12,12,12,13,13,12,12,13, + 13,13,12,13,12,13,13,11,12,12,12,12,12,12,12,13, + 12,12,12,12,13,12,12,13,13,13,13,12,13,13,13,13, + 10,11,11,12,12,11,12,12,12,12,11,12,12,12,12,12, + 12,12,13,13,12,12,12,13,13,11,11,12,12,12,11,12, + 12,12,13,12,12,12,13,13,12,12,13,13,13,12,12,13, + 13,13,11,12,12,12,12,12,12,12,13,13,12,12,12,13, + 13,12,13,13,13,13,12,13,12,13,13,12,12,12,12,13, + 12,12,13,12,13,12,12,13,13,13,12,12,13,13,13,12, + 13,13,13,13,12,12,12,12,13,12,12,13,13,13,12,12, + 12,13,13,13,13,13,13,13,12,13,13,13,13,10,11,11, + 12,12,11,12,12,12,12,11,12,12,12,12,12,12,12,13, + 13,12,12,12,13,13,11,12,12,12,12,11,12,12,12,13, + 12,12,12,13,13,12,12,13,13,13,12,13,13,13,13,11, + 12,12,12,12,12,12,12,13,13,12,12,12,13,12,12,13, + 12,13,13,12,13,12,13,13,12,12,12,12,12,12,12,12, + 13,13,12,13,12,13,13,12,13,13,13,13,13,13,13,13, + 13,12,12,12,13,12,12,13,13,13,13,12,13,12,13,13, + 13,13,13,13,13,13,13,13,13,13,11,11,11,12,12,11, + 12,12,12,12,11,12,12,12,12,12,12,12,13,13,12,12, + 12,13,13,11,12,12,12,12,12,12,12,12,13,12,12,12, + 13,13,12,12,13,13,13,12,12,13,13,13,11,12,12,12, + 12,12,12,12,13,13,12,12,12,13,13,12,13,13,13,13, + 12,13,12,13,13,12,12,12,12,12,12,12,13,12,13,12, + 13,13,13,13,12,13,13,12,13,13,13,13,13,13,12,12, + 12,12,12,12,13,13,13,13,12,13,12,13,13,13,13,13, + 13,13,13,13,13,13,13,10,11,11,12,12,11,12,12,12, + 13,11,12,12,13,12,12,12,12,13,13,12,12,12,13,13, + 11,12,12,12,12,12,12,12,13,13,12,13,12,13,13,12, + 12,13,13,13,12,13,13,13,13,11,12,12,12,13,12,12, + 12,13,13,12,12,12,13,12,12,13,13,13,13,12,13,12, + 13,13,12,12,12,12,12,12,12,13,13,13,12,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,12,12,12,13,12, + 12,13,13,13,13,12,13,12,13,13,13,13,13,13,13,13, + 13,13,13,13,10,11,11,12,12,10,11,11,12,12,10,11, + 11,12,12,11,12,12,12,12,11,12,12,12,12,11,11,11, + 12,12,11,11,12,12,13,11,12,12,12,12,12,12,12,13, + 13,12,12,12,13,13,10,11,11,12,12,11,12,12,12,12, + 11,12,11,12,12,12,12,12,13,13,12,12,12,13,12,11, + 12,12,12,12,12,12,12,12,13,12,12,12,13,13,12,12, + 13,13,13,12,13,13,13,13,11,12,12,12,12,12,12,12, + 13,13,12,12,12,13,12,12,13,13,13,13,12,13,12,13, + 13,10,11,11,12,12,11,12,12,12,12,11,12,12,12,12, + 12,12,12,13,13,12,12,12,13,13,11,12,12,12,12,12, + 12,12,12,13,12,12,12,13,13,12,12,13,13,13,12,12, + 13,13,13,11,12,12,12,12,12,12,12,13,13,11,12,12, + 13,12,12,13,13,13,13,12,13,12,13,13,12,12,12,12, + 13,12,12,13,13,13,12,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,12,12,12,13,12,12,12,13,13,13,12, + 12,12,13,13,13,13,13,13,13,12,13,13,13,13,10,11, + 11,12,12,11,12,12,12,12,11,12,12,12,12,12,12,12, + 13,13,12,12,12,13,13,11,12,12,12,12,12,12,12,12, + 13,12,12,12,13,13,12,12,13,13,13,12,12,13,13,13, + 11,12,11,12,12,12,12,12,13,13,11,12,12,13,12,12, + 13,12,13,13,12,13,12,13,13,12,12,12,12,12,12,12, + 13,13,13,12,13,12,13,13,12,13,13,13,13,13,13,13, + 13,13,12,12,12,13,12,12,13,12,13,13,12,13,12,13, + 13,13,13,13,13,13,12,13,12,13,13,10,11,11,12,12, + 11,12,12,12,12,11,12,12,13,12,12,12,12,13,13,12, + 12,12,13,13,11,12,12,12,12,12,12,12,12,13,12,12, + 12,13,13,12,12,13,13,13,12,13,13,13,13,11,12,12, + 12,12,12,12,12,13,13,12,12,12,13,12,12,13,13,13, + 13,12,13,12,13,13,12,12,12,12,13,12,12,13,13,13, + 12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,12, + 12,12,12,12,12,13,13,13,13,12,13,12,13,13,13,13, + 13,13,13,13,13,13,13,13,11,11,11,12,12,11,12,12, + 12,12,11,12,12,12,12,12,12,12,13,13,12,12,12,13, + 13,11,12,12,12,12,12,12,12,13,13,12,12,12,13,13, + 12,12,13,13,13,12,13,13,13,13,11,12,12,12,12,12, + 12,12,13,13,12,12,12,13,12,12,13,12,13,13,12,13, + 12,13,13,12,12,12,12,12,12,13,13,13,13,12,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,12,12,12,12, + 12,12,13,13,13,13,12,13,12,13,12,13,13,13,13,13, + 13,13,13,13,12, +}; + +static const static_codebook _44p7_p4_1 = { + 5, 3125, + (char *)_vq_lengthlist__44p7_p4_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p7_p4_1, + 0 +}; + +static const long _vq_quantlist__44p7_p5_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p7_p5_0[] = { + 2, 6, 6, 9, 9, 5, 7, 8,10,11, 5, 8, 7,11,10, 8, + 10,11,12,13, 8,11,10,13,12, 6, 7, 8,10,11, 7, 8, + 10,10,12, 8, 9, 9,12,11,10,10,12,11,14,10,11,12, + 14,13, 6, 8, 7,11,10, 8, 9, 9,11,12, 7,10, 8,12, + 10,10,12,12,13,14,10,12,10,14,11, 9,10,11,11,12, + 10,10,11,11,13,11,12,12,13,13,12,11,13,11,15,13, + 14,13,14,14, 9,11,10,12,11,11,12,12,13,13,10,11, + 10,13,11,13,13,14,14,14,12,13,11,14,11, 7, 8, 9, + 11,12, 9, 9,11,12,13, 9,10,10,13,12,11,12,13,13, + 15,11,12,12,14,14, 9,10,10,12,13,10,10,12,12,14, + 11,11,11,13,13,12,12,13,13,15,12,13,13,15,14, 9, + 10,10,12,13,10,11,11,13,14,10,12,11,14,13,12,13, + 13,14,15,12,13,13,15,14,12,12,13,13,14,12,13,13, + 13,15,13,14,14,14,15,14,14,15,14,16,14,15,15,16, + 16,12,13,13,14,14,13,13,14,15,14,12,13,13,15,14, + 14,15,15,15,16,14,15,14,16,14, 7, 9, 8,12,11, 9, + 10,10,12,13, 9,11, 9,13,12,11,12,12,14,14,11,13, + 12,15,13, 9,10,10,13,12,10,11,12,13,14,10,12,11, + 14,13,12,13,13,14,15,13,13,13,15,14, 9,10,10,13, + 12,11,11,11,13,13,10,12,10,14,12,13,13,13,14,15, + 12,13,12,15,13,12,13,13,14,14,12,13,13,14,15,13, + 14,13,15,15,14,14,15,14,16,14,15,15,16,15,12,13, + 12,14,13,13,13,13,15,14,12,13,13,15,13,14,15,15, + 16,15,14,15,14,16,14,11,12,12,13,14,12,13,14,14, + 15,12,13,13,14,15,14,14,15,15,16,14,15,15,16,16, + 12,13,13,14,15,13,13,14,14,16,13,14,14,15,15,15, + 15,16,15,17,15,15,15,16,16,12,13,13,14,15,13,14, + 14,15,16,13,14,14,15,15,15,15,16,16,17,15,15,15, + 17,16,14,15,15,16,16,15,15,16,15,16,15,16,16,16, + 17,16,16,17,16,18,16,16,17,18,17,14,15,15,16,16, + 15,16,16,16,17,15,16,15,17,16,16,17,17,17,18,16, + 16,16,17,16,11,12,12,14,13,12,13,13,15,14,12,14, + 13,15,14,14,15,15,16,16,14,15,14,16,15,12,13,13, + 15,14,13,14,14,15,15,13,14,14,16,15,15,15,15,16, + 16,15,16,15,17,16,12,13,13,15,14,13,14,14,15,15, + 13,14,13,16,14,15,15,15,16,16,15,15,15,17,15,14, + 15,15,16,16,15,15,15,16,16,15,16,16,17,17,16,16, + 17,17,17,16,17,17,18,17,14,15,15,16,15,15,15,16, + 16,16,15,15,15,17,15,17,17,17,18,17,16,17,16,18, + 16, 6, 9, 9,12,12, 8,10,10,12,13, 9,11,10,13,12, + 10,12,12,14,14,11,13,12,14,14, 8,10,10,12,12, 9, + 10,11,12,14,10,11,11,13,13,12,12,13,13,15,12,13, + 13,15,14, 9,10,10,13,13,10,11,11,13,13,10,12,10, + 14,13,12,13,13,14,15,12,13,13,15,14,11,12,12,13, + 14,12,12,13,13,15,12,13,13,14,14,13,13,14,13,16, + 14,15,15,16,15,11,12,12,14,14,13,13,13,15,14,12, + 13,13,15,14,14,15,15,16,15,14,14,14,16,14, 7, 9, + 10,12,12, 9,10,11,13,13, 9,11,10,13,13,11,12,13, + 14,15,12,13,13,15,14, 9,10,11,12,13,10,10,12,13, + 14,11,11,12,14,14,12,12,14,14,15,13,13,13,15,15, + 9,11,11,13,13,11,12,12,14,14,10,12,10,14,13,13, + 14,13,15,15,12,14,13,15,14,12,12,13,13,15,12,12, + 14,13,15,13,14,14,15,15,14,14,15,14,17,14,15,15, + 16,16,12,13,13,15,14,13,14,14,15,15,12,14,13,15, + 14,14,15,15,16,16,14,15,14,16,14, 7,10,10,12,12, + 10,11,11,12,13,10,12,10,14,12,12,13,13,14,15,12, + 13,13,15,14, 9,11,10,13,12,10,10,12,12,14,11,13, + 12,14,13,13,13,14,13,15,13,14,14,15,14,10,11,11, + 13,13,12,12,12,13,14,10,12,10,14,12,13,14,14,15, + 15,13,14,13,15,13,12,13,13,14,14,12,12,13,14,15, + 13,14,14,15,15,13,13,14,13,15,14,15,15,16,16,12, + 13,13,14,14,13,14,14,15,15,12,13,13,15,13,15,15, + 15,16,16,13,14,13,16,13,11,12,13,14,14,12,13,14, + 14,15,12,13,13,15,15,14,14,15,15,17,14,15,15,16, + 16,12,13,14,14,15,13,13,14,14,16,13,14,14,15,16, + 14,14,16,15,17,15,15,16,16,16,12,13,13,15,15,13, + 14,14,15,16,13,14,14,15,16,15,15,16,17,17,15,16, + 15,17,16,14,15,15,15,16,15,15,16,15,17,15,15,16, + 16,17,16,16,16,16,18,16,16,17,17,17,14,15,15,16, + 16,15,16,16,16,17,15,16,15,17,16,16,17,17,17,17, + 16,17,16,18,17,11,12,12,14,14,13,13,14,14,15,13, + 14,13,15,14,14,15,15,15,16,14,15,15,17,15,12,13, + 13,15,14,13,13,14,15,15,14,15,14,16,15,15,15,15, + 15,16,15,16,15,17,16,12,13,13,15,15,14,14,14,15, + 16,13,14,13,16,15,15,15,16,16,17,15,16,15,17,15, + 14,15,15,16,16,14,15,15,16,16,15,16,16,17,16,15, + 15,16,15,17,16,17,17,18,17,14,15,15,16,16,15,16, + 16,16,17,14,15,15,17,16,17,17,17,17,18,15,16,16, + 18,15, 6, 9, 9,12,12, 9,10,11,12,13, 8,10,10,13, + 12,11,12,13,14,14,10,12,12,14,13, 9,10,10,12,13, + 10,10,12,13,14,10,11,11,13,13,12,13,13,14,15,12, + 13,13,15,14, 8,10,10,12,12,10,11,11,13,13, 9,11, + 10,13,13,12,13,13,14,15,12,13,12,15,13,11,12,12, + 14,14,12,13,13,13,15,13,13,13,14,15,14,14,15,14, + 16,14,15,15,15,15,11,12,12,14,13,12,13,13,15,14, + 12,13,12,15,13,14,14,15,16,16,13,14,13,16,13, 7, + 10,10,12,12,10,10,12,12,14,10,11,11,13,12,12,13, + 13,13,15,12,13,13,15,14,10,11,11,13,13,10,10,12, + 12,14,12,12,12,14,13,13,13,14,13,15,13,14,14,15, + 14, 9,10,11,13,13,11,12,12,13,14,10,12,10,14,12, + 13,13,14,14,15,13,13,12,15,13,12,13,13,14,14,12, + 13,13,14,15,13,14,14,15,15,13,13,15,13,16,15,15, + 15,16,16,12,13,13,14,14,13,14,14,15,15,12,13,12, + 15,14,15,15,15,16,16,13,14,13,15,13, 7,10, 9,12, + 12, 9,10,11,13,13, 9,11,10,13,13,11,13,13,14,15, + 11,13,12,15,14, 9,11,11,13,13,10,10,12,13,14,11, + 12,12,14,14,12,13,14,14,15,13,13,13,15,15, 9,11, + 10,13,12,11,12,11,14,14,10,12,10,14,13,13,14,13, + 15,15,12,14,12,15,14,12,13,13,14,15,13,13,14,14, + 15,13,14,14,15,15,14,14,15,14,17,14,15,15,16,16, + 12,13,12,15,13,13,14,14,15,15,12,14,13,15,13,14, + 15,15,16,16,14,15,14,16,14,11,12,12,14,14,13,13, + 14,14,15,13,14,13,15,15,14,15,15,16,17,14,15,15, + 16,15,12,13,13,15,15,13,13,14,15,16,14,14,14,16, + 15,15,15,16,15,17,15,16,15,17,16,12,13,13,14,15, + 14,14,15,15,16,13,14,13,15,15,15,15,16,16,17,15, + 15,15,16,15,14,15,15,16,16,14,15,15,16,17,15,16, + 16,17,17,16,15,16,15,17,16,17,17,17,17,14,15,15, + 15,16,15,15,16,16,17,14,15,15,16,16,16,16,17,17, + 18,15,16,15,17,15,11,13,12,14,14,12,13,13,15,15, + 12,14,13,15,14,14,15,15,16,16,14,15,14,16,15,12, + 13,13,15,15,13,14,14,15,16,13,14,14,16,16,15,15, + 16,16,17,15,16,15,17,16,12,13,13,15,14,13,14,14, + 16,15,13,14,13,16,14,15,16,15,17,16,15,15,14,18, + 15,14,15,15,16,16,15,15,16,16,17,15,16,15,17,16, + 16,16,17,17,18,16,17,17,18,17,14,15,15,16,15,15, + 16,15,17,16,15,15,15,17,15,16,17,17,18,17,16,17, + 16,18,15,10,12,12,14,14,12,13,13,14,14,12,13,13, + 14,14,13,14,14,15,15,13,14,14,16,15,11,12,13,14, + 14,12,13,13,15,15,12,13,13,15,15,13,14,15,15,16, + 14,15,15,16,16,12,13,13,14,14,13,13,14,15,15,13, + 14,13,15,15,14,15,15,16,16,14,15,14,16,15,13,14, + 14,15,15,13,14,14,15,16,14,14,15,16,16,14,15,15, + 15,17,15,16,16,17,17,13,14,14,15,15,14,15,15,16, + 16,14,15,15,16,16,15,16,16,16,17,15,16,15,17,16, + 11,12,12,14,14,12,13,13,14,15,12,13,13,15,14,13, + 14,14,15,16,13,14,14,16,15,12,13,13,14,15,13,13, + 14,15,15,13,14,14,15,15,14,14,15,15,17,14,15,15, + 16,16,12,13,13,15,15,13,14,14,15,15,13,14,13,15, + 15,14,15,15,16,17,14,15,15,16,16,13,13,14,15,16, + 14,14,15,15,16,14,15,15,16,16,15,15,16,15,18,15, + 16,16,17,17,14,15,15,16,16,15,15,15,16,16,14,15, + 15,17,16,16,16,16,17,17,15,16,16,17,16,10,12,12, + 14,14,12,13,13,14,15,12,13,13,15,14,14,14,15,15, + 16,14,15,14,16,15,12,13,13,15,14,13,13,14,15,15, + 13,14,14,15,15,14,14,15,15,16,14,15,15,16,16,12, + 13,13,15,15,13,14,14,15,16,13,14,13,15,14,15,15, + 15,16,16,14,15,15,16,15,13,14,14,16,15,14,14,14, + 15,16,14,15,15,16,16,15,15,16,15,17,16,17,16,17, + 17,14,14,15,15,16,15,15,16,16,16,14,15,14,16,15, + 16,16,16,17,17,15,16,15,17,15,11,13,13,14,15,13, + 13,14,15,15,13,14,13,15,15,14,15,15,15,16,14,15, + 15,17,15,13,13,14,15,15,13,14,15,15,16,14,14,14, + 16,16,15,14,16,15,17,15,16,16,17,16,13,14,14,15, + 15,14,14,14,16,16,13,15,14,16,15,15,15,16,17,17, + 15,16,15,17,16,14,15,15,15,16,15,15,16,15,17,15, + 16,16,16,17,16,16,17,15,18,16,17,17,17,17,14,15, + 15,16,16,15,16,16,17,17,15,16,15,17,16,16,17,17, + 18,18,16,17,15,18,16,10,12,12,14,14,13,13,14,14, + 15,13,14,13,15,14,14,15,15,15,16,15,15,15,16,15, + 12,13,13,15,14,12,12,14,14,15,14,15,14,16,15,15, + 14,15,14,17,15,16,16,17,16,12,13,13,14,15,14,14, + 15,15,16,13,14,12,16,14,15,16,16,16,17,15,16,14, + 17,15,14,15,14,16,15,14,14,15,15,15,15,16,15,17, + 16,15,14,16,14,16,16,17,17,18,17,14,14,15,15,16, + 15,16,16,16,17,14,15,14,16,15,16,16,17,17,17,15, + 16,14,17,14,10,12,12,14,13,12,13,13,14,14,11,13, + 12,14,14,13,14,14,15,16,13,14,14,16,15,12,13,13, + 14,14,13,13,14,15,15,13,14,13,15,15,14,14,15,15, + 16,14,15,15,16,16,11,13,12,14,14,12,13,13,15,15, + 12,13,13,15,15,14,15,15,16,16,13,14,14,16,15,13, + 14,14,15,15,14,15,15,15,16,14,15,15,16,16,15,16, + 16,16,17,16,16,16,17,17,13,14,14,15,15,14,15,15, + 16,16,13,14,14,16,15,15,16,16,17,17,15,15,15,17, + 15,11,12,12,14,14,12,13,13,14,15,12,13,13,15,14, + 14,14,15,15,16,14,14,14,16,15,12,13,13,15,14,13, + 13,14,15,15,13,14,14,16,15,14,15,15,15,16,15,15, + 15,16,16,12,13,13,14,15,13,13,14,15,15,13,14,13, + 15,15,15,15,15,16,16,14,15,14,16,15,14,14,15,16, + 16,14,15,15,15,16,15,16,15,16,16,15,15,16,15,17, + 16,16,16,17,17,13,14,14,15,16,14,15,15,16,16,14, + 14,14,16,16,16,16,16,17,17,15,15,15,17,15,11,12, + 12,14,14,12,13,13,14,15,12,13,13,15,14,14,14,14, + 15,16,13,14,14,16,15,12,13,13,15,15,13,13,14,15, + 16,13,14,14,15,15,14,15,15,16,17,14,15,15,17,16, + 12,13,13,15,14,13,14,14,15,15,13,14,13,15,15,14, + 15,15,16,16,14,15,14,17,15,14,15,15,16,16,14,15, + 15,16,17,15,15,15,17,17,15,16,16,16,17,16,17,16, + 17,17,13,15,14,16,15,14,15,15,16,16,14,15,14,16, + 15,16,16,16,17,17,15,16,15,17,15,10,12,12,14,14, + 13,13,14,14,15,13,14,13,15,14,14,15,15,15,17,14, + 15,15,16,15,12,13,13,15,14,12,12,14,14,15,14,15, + 14,16,15,15,14,16,15,17,15,16,16,17,16,12,13,13, + 14,15,14,14,15,15,16,12,14,12,15,14,15,16,16,16, + 17,15,16,14,17,14,14,15,14,16,16,14,14,15,15,16, + 15,16,16,17,16,15,14,16,14,17,16,17,17,18,17,14, + 14,15,15,16,15,15,16,16,17,14,15,14,16,15,16,17, + 17,17,18,15,16,14,17,14,11,13,13,15,14,13,13,14, + 15,15,12,14,13,15,15,14,15,15,15,17,14,15,14,16, + 15,13,14,14,15,15,13,14,15,15,16,14,15,14,16,16, + 15,15,16,16,17,15,16,16,17,17,13,14,13,15,15,14, + 14,14,16,16,13,15,14,16,15,15,16,16,17,17,15,16, + 14,17,15,15,15,15,16,17,15,15,16,16,17,15,16,16, + 17,17,16,15,17,16,17,17,17,17,18,18,14,15,15,17, + 15,15,16,16,17,16,15,16,15,17,15,16,17,17,17,17, + 16,17,15,18,15, +}; + +static const static_codebook _44p7_p5_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p7_p5_0, + 1, -528744448, 1616642048, 3, 0, + (long *)_vq_quantlist__44p7_p5_0, + 0 +}; + +static const long _vq_quantlist__44p7_p5_1[] = { + 3, + 2, + 4, + 1, + 5, + 0, + 6, +}; + +static const char _vq_lengthlist__44p7_p5_1[] = { + 2, 3, 3, 3, 3, 3, 3, +}; + +static const static_codebook _44p7_p5_1 = { + 1, 7, + (char *)_vq_lengthlist__44p7_p5_1, + 1, -533200896, 1611661312, 3, 0, + (long *)_vq_quantlist__44p7_p5_1, + 0 +}; + +static const long _vq_quantlist__44p7_p6_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p7_p6_0[] = { + 2, 5, 6, 5, 7, 8, 5, 8, 7, 5, 7, 7, 7, 7, 9, 8, + 9, 9, 5, 7, 7, 8, 9, 9, 7, 9, 7, 6, 8, 8, 8, 9, + 10, 8, 9, 9, 8, 9,10, 9, 9,11,10,10,11, 8,10, 9, + 10,10,11, 9,10,10, 6, 8, 8, 8, 9, 9, 8,10, 9, 8, + 9,10, 9,10,10,10,11,10, 8,10, 9,10,11,10, 9,11, + 9, 6, 8, 8, 7, 9, 9, 8, 9, 9, 7, 9, 9, 9, 9,10, + 9,10,10, 8, 9, 9, 9,10,10, 9,10, 9, 7, 9, 9, 9, + 10,10, 9,10,10, 9, 9,10,10, 9,11,10,11,11, 9,10, + 10,10,11,11,10,11,10, 6, 9, 8, 9,10,10, 9,10, 9, + 8,10,10, 9, 9,10,10,11,11, 9,10,10,10,11,11, 9, + 11, 9, 6, 8, 8, 8, 9, 9, 7, 9, 9, 8, 9, 9, 9, 9, + 10, 9,10,10, 7, 9, 9, 9,10,10, 9,10, 9, 6, 8, 9, + 9, 9,10, 9,10,10, 9,10,10, 9, 9,11,10,11,11, 8, + 10,10,10,11,11, 9,10, 9, 7, 9, 9, 9,10,10, 9,10, + 10, 9,10,10,10,10,11,10,11,11, 9,10, 9,10,11,11, + 10,11, 9, +}; + +static const static_codebook _44p7_p6_0 = { + 5, 243, + (char *)_vq_lengthlist__44p7_p6_0, + 1, -527106048, 1620377600, 2, 0, + (long *)_vq_quantlist__44p7_p6_0, + 0 +}; + +static const long _vq_quantlist__44p7_p6_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p7_p6_1[] = { + 4, 7, 7, 6, 7, 8, 6, 8, 7, 7, 7, 8, 7, 7, 8, 8, + 8, 8, 7, 7, 7, 8, 8, 8, 7, 8, 8, 7, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 9, 9, 8, 8, 8, + 8, 9, 9, 8, 9, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 9, 8, 9, 9, 8, 8, 8, 8, 9, 9, 8, 9, + 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, + 8, 9, 9, 8, 8, 8, 8, 9, 9, 8, 9, 8, 7, 8, 8, 8, + 8, 9, 8, 9, 8, 8, 8, 8, 8, 8, 9, 8, 9, 9, 8, 8, + 8, 9, 9, 9, 8, 9, 9, 7, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 9, 8, 9, 9, 8, 8, 8, 8, 9, 9, 8, + 9, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 9, 8, 9, 9, 8, 8, 8, 8, 9, 9, 8, 9, 8, 7, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 9, 9, 8, + 8, 8, 8, 9, 9, 8, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 9, 9, 8, 9, 9, 8, 8, 8, 9, 9, 9, + 8, 9, 8, +}; + +static const static_codebook _44p7_p6_1 = { + 5, 243, + (char *)_vq_lengthlist__44p7_p6_1, + 1, -530841600, 1616642048, 2, 0, + (long *)_vq_quantlist__44p7_p6_1, + 0 +}; + +static const long _vq_quantlist__44p7_p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p7_p7_0[] = { + 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, +}; + +static const static_codebook _44p7_p7_0 = { + 5, 243, + (char *)_vq_lengthlist__44p7_p7_0, + 1, -513979392, 1633504256, 2, 0, + (long *)_vq_quantlist__44p7_p7_0, + 0 +}; + +static const long _vq_quantlist__44p7_p7_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p7_p7_1[] = { + 1, 5, 5, 4,10,10, 5,10,10, 5,10,10,10,10,10,10, + 10,10, 5,10,10,10,10,10, 9,10,10, 6,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10, 7,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10, 6,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10, 6,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,11,11, +}; + +static const static_codebook _44p7_p7_1 = { + 5, 243, + (char *)_vq_lengthlist__44p7_p7_1, + 1, -516716544, 1630767104, 2, 0, + (long *)_vq_quantlist__44p7_p7_1, + 0 +}; + +static const long _vq_quantlist__44p7_p7_2[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p7_p7_2[] = { + 1, 3, 2, 4, 5, 7, 7, 8, 8, 9, 9,10,10,11,11,12, + 12,13,13,14,14,15,15,15,15, +}; + +static const static_codebook _44p7_p7_2 = { + 1, 25, + (char *)_vq_lengthlist__44p7_p7_2, + 1, -518864896, 1620639744, 5, 0, + (long *)_vq_quantlist__44p7_p7_2, + 0 +}; + +static const long _vq_quantlist__44p7_p7_3[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p7_p7_3[] = { + 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44p7_p7_3 = { + 1, 25, + (char *)_vq_lengthlist__44p7_p7_3, + 1, -529006592, 1611661312, 5, 0, + (long *)_vq_quantlist__44p7_p7_3, + 0 +}; + +static const char _huff_lengthlist__44p7_short[] = { + 3, 9,14,16,17,19,22,22, 5, 4, 6, 9,11,13,17,20, + 9, 5, 5, 6, 9,11,15,19,11, 7, 5, 5, 7, 9,13,17, + 14, 9, 7, 6, 6, 7,11,14,16,11, 9, 7, 6, 4, 4, 8, + 19,15,13,11, 9, 4, 3, 4,21,16,16,15,12, 6, 4, 4, +}; + +static const static_codebook _huff_book__44p7_short = { + 2, 64, + (char *)_huff_lengthlist__44p7_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p8_l0_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44p8_l0_0[] = { + 2, 4, 4, 7, 7, 8, 8,10,10,11,11,12,12, 4, 5, 5, + 7, 7, 9, 9,10, 9,12,10,12,12, 4, 5, 5, 7, 7, 9, + 9, 9,10,10,12,12,12, 7, 7, 7, 7, 8, 9, 8,11, 5, + 12, 6,12,10, 7, 7, 7, 8, 7, 8, 9, 5,11, 6,12,10, + 12, 8, 9, 9, 9, 9, 9, 9,11, 7,11, 7,11, 9, 8, 9, + 9, 9, 9, 9, 9, 7,10, 7,11, 9,11,10,10,10,10,10, + 10,10,11,10,11, 8,12, 9,10,10,10,10,10,10,10,10, + 11, 8,11, 9,12,10,11,11,11,11,11,11,11,11,12,10, + 12,11,10,11,11,11,11,11,11,11,11,10,12,11,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,11,12,12,12, + 12,12,12,12,12,12,11,12,12, +}; + +static const static_codebook _44p8_l0_0 = { + 2, 169, + (char *)_vq_lengthlist__44p8_l0_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44p8_l0_0, + 0 +}; + +static const long _vq_quantlist__44p8_l0_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p8_l0_1[] = { + 4, 4, 4, 5, 5, 4, 4, 5, 5, 5, 4, 5, 4, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44p8_l0_1 = { + 2, 25, + (char *)_vq_lengthlist__44p8_l0_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p8_l0_1, + 0 +}; + +static const long _vq_quantlist__44p8_l1_0[] = { + 54, + 29, + 79, + 0, + 108, +}; + +static const char _vq_lengthlist__44p8_l1_0[] = { + 1, 2, 3, 6, 7, 7, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, +}; + +static const static_codebook _44p8_l1_0 = { + 2, 25, + (char *)_vq_lengthlist__44p8_l1_0, + 1, -514516992, 1620639744, 7, 0, + (long *)_vq_quantlist__44p8_l1_0, + 0 +}; + +static const char _huff_lengthlist__44p8_lfe[] = { + 2, 3, 1, 3, +}; + +static const static_codebook _huff_book__44p8_lfe = { + 2, 4, + (char *)_huff_lengthlist__44p8_lfe, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44p8_long[] = { + 2, 7,14,16,17,18,20,21, 7, 4, 6, 8,11,12,14,16, + 13, 5, 4, 4, 8, 9,11,13,15, 8, 4, 3, 5, 7, 9,10, + 17,11, 8, 4, 4, 6, 9, 9,17,11, 9, 7, 6, 5, 7, 8, + 19,13,11, 9, 9, 7, 8, 8,21,15,13,11,10, 8, 8, 7, +}; + +static const static_codebook _huff_book__44p8_long = { + 2, 64, + (char *)_huff_lengthlist__44p8_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p8_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p8_p1_0[] = { + 2, 5, 5, 4, 7, 7, 4, 7, 7, 5, 7, 7, 7, 8, 9, 7, + 9, 9, 5, 7, 7, 7, 9, 9, 7, 9, 8, 6, 7, 8, 8, 9, + 10, 8, 9,10, 8, 9,10,10,10,12,10,11,12, 8,10,10, + 10,11,12,10,11,11, 6, 8, 7, 8,10, 9, 8,10, 9, 8, + 10,10,10,11,11,10,12,11, 8,10, 9,10,12,11,10,12, + 10, 5, 8, 8, 8,10,10, 8,10,10, 7, 9,10, 9,10,11, + 9,11,11, 8,10,10,10,12,12,10,12,11, 7, 9, 9, 9, + 10,11, 9,11,11, 9, 9,11,10,11,12,10,11,12, 9,11, + 11,11,12,12,11,12,12, 7, 9, 9,10,11,11,10,12,11, + 9,11,10,11,11,12,11,13,12,10,11,11,12,13,13,11, + 13,11, 5, 8, 8, 8,10,10, 8,10,10, 8,10,10,10,11, + 12,10,12,11, 7,10, 9, 9,11,11, 9,11,10, 7, 9, 9, + 10,11,12,10,11,11,10,11,11,11,11,13,12,13,13, 9, + 10,11,12,12,13,11,12,11, 7, 9, 9, 9,11,11, 9,11, + 10, 9,11,11,11,12,12,11,12,12, 9,11, 9,10,12,11, + 10,12,11, +}; + +static const static_codebook _44p8_p1_0 = { + 5, 243, + (char *)_vq_lengthlist__44p8_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p8_p1_0, + 0 +}; + +static const long _vq_quantlist__44p8_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p8_p2_0[] = { + 4, 6, 6, 9, 9, 6, 8, 8,10,10, 6, 8, 8,10,10, 8, + 9,10,12,12, 8,10, 9,12,12, 6, 8, 8,10,10, 8, 8, + 9,10,11, 8, 9, 9,11,11, 9,10,11,12,13,10,11,11, + 13,13, 6, 8, 8,10,10, 8, 9, 9,11,11, 8, 9, 8,11, + 10,10,11,11,13,13, 9,11,10,13,12, 9,10,10,12,12, + 10,10,11,12,13,10,11,11,13,13,12,12,13,12,15,12, + 13,13,15,14, 9,10,10,12,12,10,11,11,13,13,10,11, + 10,13,12,12,13,13,14,15,12,13,12,15,12, 7, 8, 8, + 10,11, 8, 9,10,11,12, 8, 9, 9,11,11,10,11,11,13, + 14,10,11,11,13,13, 8, 9, 9,11,12, 9,10,11,11,13, + 9,10,10,12,12,11,11,12,13,15,11,12,12,14,14, 8, + 9, 9,11,11, 9,10,11,12,13, 9,10,10,12,12,11,12, + 12,14,15,11,12,12,14,14,10,11,12,13,13,11,12,12, + 13,14,12,12,12,14,14,13,13,14,14,16,14,14,14,16, + 15,10,11,11,13,13,12,12,12,14,14,11,12,12,14,13, + 14,14,14,15,16,13,14,13,16,14, 7, 8, 8,11,10, 8, + 9, 9,11,11, 8,10, 9,12,11,10,11,11,13,13,10,11, + 11,14,13, 8, 9, 9,12,11, 9,10,10,12,12, 9,11,10, + 13,12,11,12,12,13,14,11,12,12,15,14, 8, 9, 9,12, + 11, 9,10,10,12,12, 9,11,10,13,11,11,12,12,14,14, + 11,12,12,14,13,10,11,11,13,13,11,12,12,13,14,12, + 13,12,14,14,13,13,14,14,16,13,14,14,16,15,10,11, + 11,13,13,12,12,12,14,14,11,12,12,14,13,13,14,14, + 15,15,13,14,13,16,14, 9,10,11,12,13,11,11,12,12, + 14,11,11,12,13,14,13,13,14,14,16,13,13,14,15,15, + 11,11,12,12,14,12,12,13,13,15,12,12,13,13,15,14, + 14,15,15,16,14,14,14,15,16,11,12,12,13,14,12,12, + 13,14,15,12,13,12,14,14,14,14,15,15,16,14,14,14, + 16,16,13,13,14,15,16,14,14,15,15,16,14,15,15,16, + 16,15,15,16,16,18,16,16,16,17,17,13,14,14,15,15, + 14,14,15,16,16,14,15,14,16,16,16,16,16,17,18,15, + 16,16,17,16, 9,11,10,13,12,11,12,11,14,13,11,12, + 11,14,12,13,14,13,15,14,13,14,13,16,14,11,12,12, + 14,13,12,12,13,14,14,12,13,12,15,14,14,14,14,16, + 16,14,15,14,17,15,11,12,11,14,12,12,13,12,15,13, + 12,13,12,15,13,14,14,14,16,15,14,15,14,16,15,13, + 14,14,15,15,14,14,15,16,16,14,15,14,16,16,15,15, + 16,16,17,16,16,16,17,17,13,14,14,16,15,14,15,15, + 16,16,14,15,14,17,15,16,16,16,17,17,15,16,15,18, + 16, 7, 8, 8,10,11, 8, 9, 9,11,12, 8, 9, 9,12,11, + 10,11,11,13,14,10,11,11,14,13, 8, 9, 9,11,11, 9, + 10,10,12,12, 9,10,10,12,12,11,12,12,13,14,11,12, + 12,14,14, 8, 9, 9,12,11, 9,10,11,12,13, 9,11,10, + 13,12,11,12,12,14,14,11,12,12,14,13,10,11,11,13, + 13,11,12,12,13,14,11,12,12,14,14,13,13,14,14,16, + 13,14,14,16,15,10,12,11,13,13,12,12,12,14,14,11, + 12,12,14,13,14,14,14,15,16,13,14,14,16,14, 8, 9, + 9,11,11, 9,10,10,12,12, 9,10,10,12,12,11,11,12, + 13,14,11,12,12,14,14, 9, 9,10,11,12,10,10,11,12, + 13,10,10,11,12,13,12,12,13,14,15,12,12,13,14,15, + 9,10,10,12,12,10,11,11,13,13,10,11,11,13,13,12, + 13,13,15,15,12,13,13,15,14,11,11,12,13,14,12,12, + 13,13,15,12,12,13,14,15,14,14,15,14,16,14,14,15, + 15,16,11,12,12,14,14,12,13,13,15,15,12,13,13,15, + 14,14,15,15,16,16,14,15,14,17,15, 8, 9, 9,11,11, + 9,10,10,12,12, 9,11,10,13,12,11,12,12,14,14,11, + 13,12,15,13, 9,10,10,12,12,10,10,11,12,13,10,12, + 11,13,13,12,12,13,13,15,12,13,13,15,14, 9,10,10, + 12,12,11,11,12,13,13,10,12,10,13,12,12,13,13,15, + 15,12,13,13,15,13,11,12,12,14,14,12,12,13,14,14, + 12,13,13,15,14,13,13,14,13,16,14,15,14,16,16,11, + 12,12,14,14,13,13,13,15,15,12,13,12,15,14,14,15, + 15,16,17,14,15,13,16,13,10,11,11,13,14,11,12,12, + 13,15,11,12,12,14,14,13,14,14,15,16,13,14,14,16, + 16,11,11,12,12,14,12,12,13,13,15,12,13,13,13,15, + 14,14,15,14,17,14,14,15,15,16,11,12,12,14,14,12, + 13,13,15,15,12,13,13,15,15,14,15,15,16,17,14,15, + 15,16,16,13,14,14,14,16,14,14,15,14,17,14,15,15, + 14,17,16,16,17,15,18,16,16,17,16,18,13,14,14,16, + 16,14,15,15,17,16,14,15,15,17,16,16,17,17,18,18, + 16,17,16,18,17,10,11,11,14,13,11,12,12,14,14,11, + 13,12,15,14,14,14,14,16,15,14,15,14,16,15,11,12, + 12,14,13,12,13,13,15,14,13,14,13,15,14,14,15,15, + 16,16,14,15,15,17,15,11,12,12,14,14,13,13,13,15, + 15,12,13,13,15,14,15,15,15,17,17,14,15,15,17,15, + 13,14,14,16,15,14,15,15,16,16,15,15,15,17,16,16, + 16,16,16,17,16,17,16,18,17,14,14,14,16,16,15,15, + 15,16,16,14,15,14,17,16,16,17,17,17,18,16,17,16, + 18,16, 7, 8, 8,11,11, 8, 9, 9,11,12, 8, 9, 9,12, + 11,10,11,11,13,14,10,11,11,14,13, 8, 9, 9,11,12, + 9,10,11,12,13, 9,11,10,13,12,11,12,12,13,14,11, + 12,12,14,14, 8, 9, 9,11,11, 9,10,10,12,12, 9,10, + 10,13,12,11,12,12,14,14,11,12,11,14,13,10,11,12, + 13,13,11,12,12,13,14,12,13,12,14,14,13,13,14,14, + 16,13,14,14,16,15,10,11,11,13,13,11,12,12,14,14, + 11,12,12,14,13,13,14,14,15,16,13,14,13,16,14, 8, + 9, 9,11,11, 9,10,11,12,13, 9,10,10,12,12,11,12, + 13,13,14,11,12,12,14,14, 9,10,10,12,12,10,10,11, + 12,13,11,12,11,13,13,12,12,13,13,15,12,13,13,15, + 15, 9,10,10,12,12,10,11,12,13,14,10,11,10,13,12, + 12,13,13,14,15,12,13,12,15,13,12,12,12,14,14,12, + 12,13,14,15,13,13,13,15,15,14,14,15,13,16,14,15, + 15,16,16,11,12,12,14,14,12,13,13,14,15,12,13,12, + 14,14,14,14,15,16,16,13,14,13,16,14, 8, 9, 9,11, + 11, 9,10,10,12,12, 9,10,10,12,12,11,12,12,14,14, + 11,12,11,14,14, 9,10,10,12,12,10,11,11,13,13,10, + 11,11,13,13,12,13,13,14,15,12,13,13,15,14, 9,10, + 9,12,11,10,11,10,13,12,10,11,10,13,12,12,13,12, + 15,14,12,13,12,15,14,11,12,12,14,14,12,13,13,14, + 15,12,13,13,15,15,14,14,15,15,17,14,15,15,16,16, + 11,12,11,14,13,12,13,12,15,14,12,13,12,15,13,14, + 15,14,16,15,13,15,14,17,14,10,11,11,13,14,11,12, + 13,13,15,11,12,12,14,14,14,14,15,15,17,13,14,14, + 15,16,11,12,12,14,14,12,12,13,14,15,13,13,13,15, + 15,14,15,15,15,17,15,15,15,16,16,11,12,12,13,14, + 13,13,14,14,15,12,13,13,14,15,14,15,15,16,17,14, + 15,15,16,16,14,14,14,16,16,14,14,15,15,17,15,15, + 15,17,16,16,16,17,16,18,16,17,17,18,17,13,14,14, + 15,16,14,15,15,16,17,14,15,15,16,16,16,17,17,17, + 18,16,16,16,17,16,10,11,11,14,13,11,12,12,14,14, + 11,12,12,15,13,13,14,14,16,15,13,14,14,16,15,11, + 12,12,14,14,12,13,13,15,15,12,13,13,15,15,14,15, + 15,16,17,14,15,15,17,16,11,12,11,14,12,12,13,13, + 15,13,12,13,12,15,13,14,15,15,16,15,14,15,14,17, + 14,13,14,14,16,16,14,15,15,16,17,14,15,15,16,17, + 16,16,17,17,18,16,17,17,18,18,13,14,14,16,13,14, + 15,15,17,14,14,15,14,17,14,16,17,16,17,16,16,17, + 16,18,15, 8,11,11,13,13,10,12,12,14,14,11,12,12, + 14,14,13,13,14,15,16,13,14,14,16,15,10,11,11,14, + 14,11,12,12,14,15,11,12,12,15,14,13,14,14,15,16, + 13,14,14,16,16,11,12,12,14,14,12,13,13,15,15,12, + 13,12,15,14,14,14,15,16,16,14,15,14,16,16,12,13, + 13,15,15,12,13,14,15,16,13,14,14,16,16,14,15,15, + 16,17,15,15,16,17,17,13,14,14,16,15,14,15,15,16, + 16,14,15,14,16,16,16,16,16,17,17,15,16,16,18,16, + 10,11,11,13,14,11,12,12,14,15,11,12,12,15,14,13, + 14,14,16,16,13,14,14,16,16,11,11,12,14,14,12,12, + 13,14,15,12,13,13,15,15,14,14,15,15,17,14,14,15, + 16,16,11,12,12,15,14,12,13,13,15,15,12,13,13,15, + 15,14,15,15,17,17,14,15,15,17,16,13,12,14,14,16, + 13,13,15,14,17,14,13,15,15,17,15,14,16,15,18,16, + 15,16,16,18,13,14,14,16,16,14,15,15,17,17,14,15, + 15,17,16,16,17,17,18,18,16,17,16,18,17,10,11,11, + 14,13,11,12,12,14,14,11,13,12,15,14,13,14,14,15, + 16,13,14,14,16,16,11,12,12,14,14,12,13,13,14,15, + 12,13,13,15,15,14,14,15,15,16,14,15,15,17,16,11, + 12,12,14,14,13,13,13,15,15,12,13,13,15,14,14,15, + 15,16,17,14,15,14,17,15,13,14,13,16,15,14,14,14, + 15,16,14,15,14,16,16,15,15,16,16,17,16,16,16,18, + 17,14,14,14,16,16,15,15,15,17,16,14,15,14,17,16, + 16,16,17,17,18,16,17,16,18,16,11,13,13,15,15,12, + 13,14,15,16,12,14,14,15,15,14,15,15,16,17,14,15, + 15,17,17,12,13,14,14,16,13,14,14,14,16,14,14,14, + 15,16,15,15,16,15,18,15,16,16,17,17,13,14,14,16, + 16,14,14,15,16,16,14,15,14,16,16,15,16,16,17,18, + 15,16,16,18,17,14,14,16,13,17,15,15,16,14,18,15, + 15,16,14,18,16,16,18,15,19,17,17,18,16,18,15,16, + 15,17,17,15,16,17,18,18,16,16,16,18,17,17,18,18, + 19,19,17,18,17,19,18,11,12,12,15,14,13,13,14,15, + 16,13,14,13,16,14,15,15,15,16,17,15,16,15,17,16, + 12,13,13,15,14,13,13,14,15,15,14,15,14,16,15,15, + 15,16,16,17,16,16,16,18,17,12,13,13,15,15,14,14, + 15,16,16,13,14,13,16,15,16,16,16,17,18,15,16,15, + 17,16,14,15,14,17,15,14,15,15,16,16,15,16,15,17, + 16,16,15,16,15,17,17,18,17,18,17,15,15,15,16,17, + 16,16,16,17,17,15,16,15,17,16,17,18,18,18,18,16, + 17,16,18,15, 8,11,11,13,13,11,12,12,14,14,10,12, + 12,14,14,13,14,14,15,16,13,14,13,16,15,11,12,12, + 14,14,12,12,13,14,15,12,13,13,15,15,14,14,15,15, + 16,14,14,14,16,16,10,11,11,14,14,11,12,12,14,15, + 11,12,12,15,14,13,14,14,16,16,13,14,14,16,15,13, + 14,14,15,16,14,14,15,16,16,14,15,15,16,16,15,16, + 16,16,18,16,16,16,17,17,12,13,13,15,15,13,14,14, + 16,16,12,14,13,16,15,15,16,15,17,17,14,16,15,17, + 16,10,11,11,13,14,11,12,13,14,15,11,13,12,14,14, + 14,14,15,16,16,13,14,14,16,16,11,12,12,14,14,12, + 13,13,14,15,13,14,13,15,15,14,15,15,16,17,14,15, + 15,17,16,11,12,12,14,14,12,13,13,15,15,12,13,12, + 15,14,14,15,15,16,17,14,15,15,16,16,14,14,14,16, + 16,14,14,15,16,16,15,15,15,16,16,16,16,17,16,18, + 16,17,17,18,18,13,13,14,15,16,14,14,15,16,17,13, + 14,14,16,16,16,16,17,17,18,15,16,15,17,16,10,11, + 11,14,13,11,12,12,14,14,11,12,12,15,14,13,14,14, + 16,16,13,14,14,16,16,11,12,12,14,14,12,13,13,15, + 15,12,13,13,15,15,14,15,15,16,17,14,15,15,17,16, + 11,12,11,14,14,12,13,13,15,15,12,13,12,15,14,14, + 15,14,16,16,14,15,14,17,16,14,14,14,16,16,14,15, + 15,16,17,14,15,15,17,17,16,16,17,17,18,16,17,17, + 18,18,13,14,12,16,14,14,15,13,17,15,13,15,13,17, + 14,16,16,15,18,16,15,17,14,18,15,11,12,12,14,15, + 13,13,14,14,16,13,14,13,15,14,15,15,16,16,17,15, + 16,15,17,16,12,13,13,15,15,13,13,14,15,16,14,15, + 14,16,16,15,15,16,15,18,16,16,16,18,17,12,13,13, + 15,15,14,14,15,15,16,13,14,13,15,15,16,16,16,16, + 18,15,16,15,17,16,15,15,15,17,16,15,15,16,16,17, + 16,16,16,18,17,16,16,17,15,18,17,18,17,19,18,14, + 14,15,15,17,15,15,16,16,17,14,15,15,16,16,17,17, + 18,17,19,16,17,15,17,15,11,13,12,15,15,12,14,14, + 15,15,12,14,13,16,15,15,15,15,17,17,14,15,15,17, + 16,12,14,14,16,16,14,14,15,16,16,14,14,14,16,16, + 15,16,17,17,18,15,16,16,18,17,12,14,13,16,14,13, + 14,14,16,15,13,15,14,16,14,15,16,16,17,17,15,16, + 15,18,15,15,15,16,17,17,15,16,16,17,18,16,16,16, + 18,18,17,17,18,18,19,17,17,18,19,19,14,15,14,17, + 13,15,16,15,18,14,15,16,15,18,14,17,18,17,18,16, + 16,18,16,19,15, +}; + +static const static_codebook _44p8_p2_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p8_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p8_p2_0, + 0 +}; + +static const long _vq_quantlist__44p8_p3_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p8_p3_0[] = { + 2, 5, 5, 5, 7, 7, 5, 7, 7, 5, 7, 7, 7, 8, 9, 7, + 9, 9, 5, 7, 7, 7, 9, 9, 7, 9, 8, 5, 7, 8, 7, 9, + 10, 8, 9, 9, 8, 9,10, 9,10,12,10,11,11, 8,10, 9, + 10,11,12, 9,11,10, 5, 8, 7, 8,10, 9, 7,10, 9, 8, + 9,10, 9,10,11,10,12,11, 8,10, 9,10,11,11, 9,12, + 10, 5, 8, 8, 7, 9,10, 8,10, 9, 7, 9,10, 9,10,11, + 9,11,11, 8,10, 9,10,11,11,10,12,10, 7, 9,10, 9, + 10,12, 9,11,11, 9, 9,12,11,10,13,11,11,13,10,12, + 11,11,13,13,11,13,12, 7, 9, 9, 9,11,11, 9,12,11, + 9,11,10,10,11,12,11,13,12, 9,11,11,12,13,13,11, + 13,11, 5, 8, 8, 8, 9,10, 7,10, 9, 8, 9,10,10,10, + 12,10,11,11, 7,10, 9, 9,11,11, 9,11,10, 7, 9, 9, + 9,11,12, 9,11,11, 9,11,11,11,11,13,12,13,13, 9, + 10,11,11,12,13,10,12,11, 7,10, 9, 9,11,11, 9,12, + 10,10,11,12,11,12,13,12,13,13, 9,12, 9,11,13,11, + 10,13,10, +}; + +static const static_codebook _44p8_p3_0 = { + 5, 243, + (char *)_vq_lengthlist__44p8_p3_0, + 1, -533200896, 1614282752, 2, 0, + (long *)_vq_quantlist__44p8_p3_0, + 0 +}; + +static const long _vq_quantlist__44p8_p3_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p8_p3_1[] = { + 6, 7, 7, 7, 7, 8, 7, 8, 7, 7, 7, 8, 7, 8, 8, 8, + 8, 8, 7, 8, 7, 7, 8, 8, 7, 8, 8, 7, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, 9, 8, 8, + 8, 8, 9, 9, 8, 9, 9, 7, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, 8, 8, 8, 9, 9, 8, + 9, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 9, 9, 8, + 8, 8, 8, 8, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 9, 9, 8, 9, 9, 8, 8, 8, 8, 9, 8, + 8, 9, 8, +}; + +static const static_codebook _44p8_p3_1 = { + 5, 243, + (char *)_vq_lengthlist__44p8_p3_1, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p8_p3_1, + 0 +}; + +static const long _vq_quantlist__44p8_p4_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p8_p4_0[] = { + 2, 5, 5, 4, 7, 8, 4, 8, 7, 5, 7, 8, 7, 7,10, 8, + 9, 9, 5, 7, 7, 8, 9, 9, 7,10, 7, 5, 7, 8, 8, 9, + 11, 8,10,10, 8, 9,10,10,10,12,11,12,12, 8,10,10, + 10,12,12,10,12,11, 5, 8, 7, 8,10,10, 8,11, 9, 8, + 10,10,10,11,12,10,12,12, 8,10, 9,11,12,12,10,12, + 10, 5, 8, 8, 7,10,10, 8,11,10, 7, 9,10, 9,10,12, + 10,12,12, 8,10,10,10,12,12,10,12,11, 7, 9,10, 9, + 11,12,10,12,11, 9, 9,12,10,10,13,12,12,13,10,12, + 11,12,13,13,11,13,11, 7,10, 9,10,11,12,10,13,11, + 9,11,11,11,11,13,12,14,13,10,11,11,12,14,14,11, + 14,11, 5, 8, 8, 8,10,11, 7,10,10, 8,10,10,10,11, + 12,10,12,12, 7,10, 9,10,12,12, 9,12,10, 7, 9,10, + 10,11,13,10,12,11,10,11,11,11,11,14,12,14,14, 9, + 11,11,12,13,14,11,13,11, 7,10, 9,10,11,12, 9,12, + 10,10,11,12,11,11,13,12,13,13, 9,12, 9,12,13,12, + 10,13,10, +}; + +static const static_codebook _44p8_p4_0 = { + 5, 243, + (char *)_vq_lengthlist__44p8_p4_0, + 1, -531365888, 1616117760, 2, 0, + (long *)_vq_quantlist__44p8_p4_0, + 0 +}; + +static const long _vq_quantlist__44p8_p4_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p8_p4_1[] = { + 7, 9, 9,10,10, 9,10,10,10,11, 9,10,10,11,10, 9, + 10,10,11,11, 9,10,10,11,11, 9,10,10,11,11,10,10, + 10,11,11,10,10,10,11,11,10,11,11,11,11,10,11,11, + 11,11, 9,10,10,11,11,10,10,10,11,11, 9,10,10,11, + 11,10,11,11,11,11,10,11,11,11,11,10,11,11,11,11, + 10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,12,10,11,11,11,11,11,11,11,11,11,10,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11, 9,10,10, + 11,11,10,10,11,11,11,10,10,11,11,11,10,11,11,11, + 12,10,11,11,12,12,10,10,11,11,11,10,11,11,11,12, + 11,11,11,12,12,11,11,12,12,12,11,11,12,12,12,10, + 11,11,11,11,11,11,11,12,12,10,11,11,12,12,11,12, + 11,12,12,11,12,11,12,12,11,11,11,11,12,11,11,12, + 12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,11,11,11,12,12,11,12,12,12,12,11,12,11,12,12, + 12,12,12,12,12,12,12,12,12,12, 9,10,10,11,11,10, + 11,10,11,11,10,11,10,11,11,10,11,11,12,12,10,11, + 11,12,11,10,11,11,11,11,10,11,11,11,12,11,11,11, + 12,12,11,11,12,12,12,11,11,11,12,12,10,11,10,11, + 11,11,11,11,12,12,10,11,11,12,11,11,12,11,12,12, + 11,12,11,12,12,11,11,11,12,12,11,11,12,12,12,11, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,11,11, + 11,12,11,11,12,12,12,12,11,12,11,12,12,12,12,12, + 12,12,12,12,12,12,12,10,11,11,11,11,11,11,11,12, + 12,11,11,11,12,12,11,12,12,12,12,11,12,12,12,12, + 11,11,11,12,12,11,11,12,12,12,11,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,11,11,11,12,12,11,12, + 12,12,12,11,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,13,12,13,12,12,12,12,13,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,13,12,10,11,11,11,11,11,11,11,12,12,11,11, + 11,12,12,11,12,12,12,12,11,12,12,12,12,11,11,11, + 12,12,11,12,12,12,12,11,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,11,11,11,12,12,11,12,12,12,12, + 11,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,13,12,12,13,12,13, + 12, 9,10,10,11,11,10,10,11,11,11,10,11,10,11,11, + 10,11,11,12,12,10,11,11,12,12,10,10,11,11,11,10, + 11,11,11,12,10,11,11,12,12,11,11,12,12,12,11,11, + 11,12,12,10,11,10,11,11,11,11,11,12,12,10,11,11, + 12,11,11,12,11,12,12,11,12,11,12,12,11,11,11,11, + 12,11,11,12,12,12,11,12,12,12,12,11,12,12,12,12, + 11,12,12,12,12,11,11,11,12,11,11,12,12,12,12,11, + 12,11,12,12,12,12,12,12,12,12,12,12,12,12,10,10, + 11,11,11,10,11,11,12,12,10,11,11,12,12,11,11,11, + 12,12,11,11,12,12,12,10,11,11,11,12,11,11,12,12, + 12,11,11,12,12,12,11,11,12,12,12,11,12,12,12,12, + 11,11,11,12,12,11,12,12,12,12,11,12,11,12,12,11, + 12,12,12,12,11,12,12,12,12,11,11,12,12,12,11,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12, 9,10,10,11,11, + 10,11,11,11,12,10,11,11,12,11,11,12,11,12,12,11, + 12,11,12,12,10,11,11,12,11,11,11,11,12,12,11,12, + 11,12,12,11,12,12,12,12,11,12,12,12,12,10,11,11, + 12,12,11,12,11,12,12,11,12,11,12,12,12,12,12,12, + 12,11,12,12,12,12,11,12,11,12,12,11,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,11, + 12,12,12,12,12,12,12,12,12,11,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,11,11,11,12,12,11,12,12, + 12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,13,12,12,12,12,12,11,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,13,13,12,12, + 12,13,13,12,12,12,12,12,12,12,12,12,13,12,12,12, + 12,13,12,12,13,12,13,12,13,13,13,13,12,12,12,12, + 12,12,12,12,13,12,12,12,12,13,12,12,13,13,13,13, + 12,13,13,13,13,10,11,11,12,12,11,12,12,12,12,11, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,11,11, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,11,12,12,12,12,12,12,12,12, + 12,12,12,12,13,12,12,12,12,13,13,12,12,12,13,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,12, + 13,13,12,13,12,13,13,13,13,12,12,12,12,12,12,12, + 12,13,12,12,12,12,13,12,12,13,13,13,13,12,13,13, + 13,13, 9,10,10,11,11,10,10,11,11,11,10,11,10,11, + 11,10,11,11,12,12,10,11,11,12,12,10,11,11,11,11, + 10,11,11,12,12,11,11,11,12,12,11,11,12,12,12,11, + 11,12,12,12,10,11,10,11,11,10,11,11,12,12,10,11, + 11,12,11,11,12,11,12,12,11,11,11,12,12,11,11,11, + 11,12,11,11,12,12,12,11,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,11,11,11,12,11,11,12,12,12,12, + 11,12,11,12,12,12,12,12,12,12,11,12,12,12,12, 9, + 10,10,11,11,10,11,11,11,12,10,11,11,12,11,11,11, + 12,12,12,11,11,12,12,12,10,11,11,12,12,11,11,12, + 12,12,11,11,12,12,12,12,12,12,12,12,12,12,12,12, + 12,10,11,11,12,12,11,11,11,12,12,11,11,11,12,12, + 11,12,12,12,12,11,12,12,12,12,11,12,12,12,12,11, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,11,11,12,12,12,12,12,12,12,12,11,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,10,11,10,11, + 11,10,11,11,12,12,10,11,11,12,12,11,11,11,12,12, + 11,12,11,12,12,11,11,11,12,12,11,11,12,12,12,11, + 11,12,12,12,11,12,12,12,12,11,12,12,12,12,10,11, + 11,12,11,11,12,11,12,12,11,12,11,12,12,11,12,12, + 12,12,11,12,11,12,12,11,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 11,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,11,11,11,12,12,11,11, + 12,12,12,11,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,11,12,12,12,12,12,12,12,12,13,12,12,12,12, + 12,12,12,12,13,13,12,12,12,13,13,11,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,12, + 12,12,12,12,12,12,12,12,12,12,12,13,12,13,12,12, + 12,13,13,12,13,13,12,13,12,13,13,13,13,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13, + 13,12,13,12,13,12,11,11,11,12,12,11,12,12,12,12, + 11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,11, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,13,13,12,12,12,13,13,11,12,11,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,13,12,12,12,12,13, + 12,12,12,12,12,12,12,12,12,13,13,12,12,12,12,13, + 12,13,13,13,13,12,13,13,13,13,12,12,12,12,12,12, + 12,12,13,12,12,12,12,13,12,12,13,13,13,13,12,13, + 13,13,12,10,11,11,12,12,11,11,11,12,12,11,11,11, + 12,12,11,12,12,12,12,11,12,12,12,12,11,11,11,12, + 12,11,11,12,12,12,11,12,12,12,12,11,12,12,12,12, + 12,12,12,12,12,11,11,11,12,12,11,12,12,12,12,11, + 12,11,12,12,12,12,12,12,12,12,12,12,12,12,11,12, + 12,12,12,11,12,12,12,12,12,12,12,12,12,12,12,12, + 12,13,12,12,12,12,12,11,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,13,12,12,12,12,12,12, + 11,11,11,12,12,11,12,12,12,12,11,12,12,12,12,12, + 12,12,12,12,11,12,12,12,12,11,11,12,12,12,11,12, + 12,12,12,12,12,12,12,12,12,12,12,12,13,12,12,12, + 13,13,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,13,13,12,12,12,13,13,12,12,12,12,12, + 12,12,12,12,13,12,12,12,12,13,12,12,13,12,13,12, + 12,13,13,13,12,12,12,12,12,12,12,12,12,13,12,12, + 12,13,12,12,13,13,13,13,12,13,13,13,13,10,11,11, + 12,12,11,12,12,12,12,11,12,12,12,12,11,12,12,12, + 12,12,12,12,12,12,11,11,12,12,12,11,12,12,12,12, + 12,12,12,12,12,12,12,12,12,13,12,12,12,13,13,11, + 12,11,12,12,12,12,12,12,12,11,12,12,12,12,12,12, + 12,13,13,12,12,12,13,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,13,12,12,12,12,12,13,12,13,12,13, + 13,12,12,12,12,12,12,12,12,13,12,12,12,12,13,12, + 12,13,12,13,13,12,13,12,13,12,11,11,11,12,12,11, + 12,12,12,12,11,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,11,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,13,12,13,12,12,13,13,13,11,12,12,12, + 12,12,12,12,12,12,12,12,12,13,12,12,12,12,13,13, + 12,12,12,13,12,12,12,12,12,12,12,12,13,12,13,12, + 12,12,12,13,12,12,13,12,13,12,13,13,12,13,12,12, + 12,12,12,12,13,13,13,12,12,12,12,13,12,12,13,13, + 13,13,12,13,13,13,12,11,11,11,12,12,11,12,12,12, + 12,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,13,12,12,13,13,13,11,12,12,12,12,12,12, + 12,12,13,12,12,12,13,12,12,13,12,13,13,12,13,12, + 13,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,13,12,13,12,13,13,13,12,12,12,12,12,12, + 12,13,12,13,12,12,12,12,13,12,12,13,13,13,12,12, + 13,12,13,12,10,11,11,12,12,11,11,11,12,12,11,11, + 11,12,12,11,12,12,12,12,11,12,12,12,12,11,11,11, + 12,12,11,11,12,12,12,11,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,11,11,11,12,12,11,12,12,12,12, + 11,12,11,12,12,12,12,12,12,12,11,12,12,12,12,11, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,13,12,12,12,12,12,11,12,12,12,12,12,12,12, + 12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,10,11,11,12,12,11,11,12,12,12,11,12,12,12,12, + 11,12,12,12,12,12,12,12,12,12,11,11,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,13,12,12, + 12,13,13,11,11,11,12,12,12,12,12,12,12,11,12,12, + 12,12,12,12,12,13,13,12,12,12,13,13,12,12,12,12, + 12,12,12,12,12,13,12,12,12,12,13,12,12,13,12,13, + 12,12,13,13,13,12,12,12,12,12,12,12,12,12,13,12, + 12,12,12,12,12,12,13,13,13,12,12,12,13,12,11,11, + 11,12,12,11,12,12,12,12,11,12,12,12,12,12,12,12, + 12,12,11,12,12,12,12,11,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,13,13,12,12,12,13,13, + 11,12,11,12,12,12,12,12,12,12,11,12,12,12,12,12, + 12,12,13,13,12,12,12,13,12,12,12,12,12,12,12,12, + 12,12,13,12,12,12,13,13,12,13,13,13,13,12,13,13, + 13,13,12,12,12,12,12,12,12,12,13,12,12,12,12,13, + 12,12,13,12,13,13,12,13,12,13,12,11,11,11,12,12, + 11,12,12,12,12,11,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,11,12,12,12,12,12,12,12,12,13,12,12, + 12,13,13,12,12,13,12,13,12,12,13,13,13,11,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, + 13,12,12,12,13,12,12,12,12,12,12,12,12,12,12,13, + 12,12,12,13,13,12,12,13,12,13,12,13,13,13,13,12, + 12,12,12,12,12,12,13,12,13,12,12,12,12,12,12,13, + 13,12,12,12,13,12,12,12,11,11,11,12,12,11,12,12, + 12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,11,12,12,12,12,12,12,12,12,13,12,12,12,12,13, + 12,12,13,13,13,12,12,12,13,13,11,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,13,12,13,13,12,13, + 12,13,12,12,12,12,12,12,12,12,12,12,13,12,13,12, + 13,13,12,13,13,12,13,12,13,13,13,13,12,12,12,12, + 12,12,12,12,13,12,12,13,12,13,12,12,13,12,13,12, + 12,13,12,13,12, +}; + +static const static_codebook _44p8_p4_1 = { + 5, 3125, + (char *)_vq_lengthlist__44p8_p4_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p8_p4_1, + 0 +}; + +static const long _vq_quantlist__44p8_p5_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p8_p5_0[] = { + 2, 6, 6, 9, 9, 5, 7, 8,10,11, 5, 8, 7,11,10, 8, + 10,11,12,13, 8,11,10,13,12, 6, 7, 8,10,11, 7, 8, + 10,10,12, 8, 9, 9,12,12,10,10,12,12,14,10,12,12, + 14,13, 6, 8, 7,11,10, 8, 9, 9,12,12, 7,10, 8,12, + 11,10,12,12,13,14,10,12,10,14,12, 9,10,11,11,13, + 10,10,11,11,13,11,12,12,13,14,12,12,13,11,15,13, + 14,14,15,14, 9,11,10,13,11,11,12,12,13,13,10,11, + 10,13,11,13,14,14,15,15,12,13,12,15,11, 6, 8, 9, + 11,12, 8, 9,11,12,13, 8,10,10,13,13,11,12,13,14, + 15,11,12,13,14,14, 9, 9,10,12,13,10,10,12,12,14, + 10,11,11,13,14,12,12,14,14,15,13,13,14,15,15, 9, + 10,10,13,13,10,11,11,13,14,10,11,10,14,13,13,13, + 14,15,15,12,14,13,15,14,12,12,13,13,14,12,13,14, + 13,15,13,14,14,15,15,14,14,15,14,16,15,15,15,16, + 16,12,13,13,14,14,13,14,14,15,15,12,14,13,15,14, + 14,15,15,16,16,14,15,14,16,14, 6, 9, 8,12,11, 8, + 10,10,13,13, 8,11, 9,13,12,11,12,12,14,14,11,13, + 12,15,14, 9,10,10,13,13,10,10,11,13,14,10,12,11, + 14,13,12,13,14,14,15,13,13,13,15,14, 9,10, 9,13, + 12,10,11,11,14,13,10,12,10,14,12,13,14,13,15,15, + 12,14,12,15,14,12,13,13,14,14,13,13,13,14,15,13, + 14,14,15,15,14,14,15,14,16,14,15,15,16,16,12,13, + 12,14,13,13,14,14,15,15,12,14,13,15,13,15,15,15, + 16,16,14,15,14,16,14,11,12,12,13,14,12,13,14,14, + 16,12,13,13,15,15,14,14,16,15,17,14,15,15,16,16, + 12,13,14,14,15,13,13,15,15,16,14,14,14,15,16,15, + 15,16,16,17,15,15,16,16,17,13,13,13,15,15,14,14, + 15,15,16,13,14,14,15,16,15,15,16,16,17,15,16,15, + 17,16,14,15,15,16,16,15,15,16,16,17,15,16,16,17, + 17,16,16,17,16,18,16,17,17,17,17,15,15,15,16,16, + 15,16,16,17,17,15,16,16,17,16,16,17,17,18,18,16, + 17,16,17,16,11,12,12,15,13,13,13,13,15,15,12,14, + 13,16,14,14,15,15,16,16,14,15,14,17,15,13,13,13, + 15,14,13,14,14,16,15,14,14,14,16,15,15,15,16,16, + 17,15,16,15,17,16,12,14,13,15,14,14,14,14,16,15, + 13,14,13,16,15,15,16,16,17,16,15,16,15,17,16,15, + 15,15,16,16,15,15,16,16,17,15,16,16,17,17,16,16, + 17,17,17,17,17,17,18,17,14,15,15,16,16,15,16,16, + 17,16,15,16,15,17,16,17,17,17,18,17,16,17,16,18, + 16, 6, 9, 9,12,12, 8,10,10,12,13, 8,10,10,13,12, + 10,12,12,14,15,11,13,12,15,14, 8, 9,10,12,13, 9, + 10,11,13,14,10,11,11,14,13,12,12,13,14,15,12,13, + 13,15,15, 8,10,10,13,13,10,11,11,13,14,10,12,10, + 14,13,12,13,13,15,15,12,14,13,15,14,11,12,12,13, + 14,12,12,13,13,15,12,13,13,15,15,14,13,15,14,16, + 14,15,15,16,16,12,13,13,14,14,13,13,14,15,14,12, + 14,13,15,14,14,15,15,16,15,14,15,14,16,14, 7, 9, + 10,12,12, 9,10,11,13,14, 9,11,10,13,13,11,12,13, + 14,15,12,13,13,15,14, 9,10,11,12,13,10,10,12,13, + 14,11,11,12,14,14,12,12,14,14,15,13,13,14,15,15, + 9,11,11,13,13,11,12,12,14,14,10,12,10,14,13,13, + 14,14,15,15,13,14,13,16,14,12,12,13,14,15,13,13, + 14,14,16,13,14,14,15,15,14,14,15,14,17,14,15,15, + 16,16,12,13,13,15,14,13,14,14,15,15,13,14,13,16, + 14,15,15,15,16,16,14,15,14,16,14, 7,10, 9,13,12, + 10,11,12,12,14,10,12,11,14,12,12,13,13,14,15,12, + 14,13,15,14, 9,11,10,13,13,10,11,12,13,14,12,13, + 12,15,13,13,13,14,13,15,13,14,14,16,15,10,11,11, + 13,13,12,12,13,14,14,11,12,11,14,13,14,14,14,15, + 16,13,14,13,16,13,12,13,13,14,14,12,13,13,14,15, + 14,14,14,15,15,14,13,15,13,16,15,15,15,17,16,13, + 13,13,14,14,14,14,14,15,15,12,13,13,15,14,15,16, + 16,16,16,14,15,14,16,13,11,12,13,14,15,12,13,14, + 15,16,13,14,14,15,15,14,14,15,15,17,14,15,15,16, + 16,13,13,14,14,15,13,13,15,14,16,14,14,15,15,16, + 15,14,16,15,17,15,16,16,16,17,13,14,14,15,15,14, + 14,15,16,16,13,15,14,16,16,15,16,16,17,17,15,16, + 15,17,16,14,15,15,15,17,15,15,16,15,17,15,16,16, + 16,17,16,16,17,16,18,17,17,17,17,18,15,15,15,17, + 16,15,16,16,17,17,15,16,16,17,16,16,17,17,18,18, + 16,17,16,18,17,11,13,12,15,14,13,13,14,15,15,13, + 14,13,16,14,15,15,15,16,16,15,16,15,17,16,13,14, + 13,15,14,13,13,14,15,15,14,15,14,16,15,15,15,16, + 16,16,15,16,15,18,16,13,14,14,15,15,14,15,15,15, + 16,13,15,13,16,15,15,16,16,17,17,15,16,15,17,16, + 15,15,15,16,16,15,15,15,16,17,16,16,16,17,16,16, + 16,17,16,17,17,17,17,18,17,15,15,15,16,16,16,16, + 16,17,17,15,16,15,17,16,17,17,17,18,18,16,17,16, + 17,15, 6, 9, 9,12,12, 8,10,10,12,13, 8,10,10,13, + 12,11,12,13,14,15,10,12,12,14,14, 9,10,10,13,13, + 10,10,12,13,14,10,11,11,14,13,12,13,14,14,15,12, + 13,13,15,15, 8,10, 9,13,12,10,11,11,13,14, 9,11, + 10,14,13,12,13,13,15,15,12,13,12,15,14,12,13,13, + 14,14,12,13,13,14,15,13,14,14,14,15,14,14,15,14, + 16,14,15,15,16,16,11,12,12,14,13,13,13,13,15,15, + 12,13,12,15,13,14,15,15,16,16,14,15,14,16,14, 7, + 9,10,12,13,10,10,12,12,14,10,12,11,14,13,12,13, + 14,14,15,12,13,13,15,14,10,11,11,13,13,11,11,12, + 13,14,12,13,12,14,14,13,13,14,13,16,14,14,14,15, + 15, 9,10,11,13,14,12,12,13,13,15,10,12,10,14,13, + 13,14,14,15,16,13,14,13,15,13,13,14,13,14,15,12, + 13,13,14,15,14,14,14,15,15,14,13,15,13,16,15,16, + 16,16,16,12,13,13,14,14,14,14,14,15,15,12,13,13, + 15,14,15,15,16,16,16,14,15,13,16,13, 7,10, 9,12, + 12, 9,10,11,13,13, 9,11,10,14,13,12,13,13,14,15, + 11,13,12,15,14, 9,11,11,13,13,10,10,12,13,14,11, + 12,12,14,14,13,13,14,14,16,13,14,14,16,15, 9,11, + 10,13,12,11,12,11,14,14,10,12,10,14,13,13,14,13, + 15,15,12,14,12,16,14,12,13,13,14,15,13,13,14,14, + 16,13,14,14,15,15,14,14,15,14,16,15,15,15,16,16, + 12,13,12,15,14,13,14,14,15,15,12,14,13,16,14,14, + 15,15,16,16,14,15,14,17,14,11,12,13,14,15,13,13, + 14,14,16,13,14,13,15,15,15,15,16,16,17,15,15,15, + 16,16,13,14,13,15,15,13,13,15,15,16,14,15,15,16, + 16,15,15,16,15,17,16,16,16,17,17,13,13,14,14,15, + 14,14,15,15,16,13,14,13,15,15,15,16,16,16,17,15, + 16,15,16,16,15,15,15,16,16,15,15,16,16,17,16,16, + 16,17,17,16,16,17,16,18,17,17,17,18,18,15,15,15, + 16,16,16,16,16,17,17,15,15,15,16,16,17,17,17,17, + 18,16,16,16,17,15,11,13,12,15,14,13,13,14,15,15, + 12,14,13,16,14,14,15,15,16,16,14,15,14,16,15,13, + 14,14,15,15,13,14,14,16,16,14,15,14,16,16,15,15, + 16,17,17,15,16,16,17,17,13,14,13,15,14,14,14,14, + 16,15,13,15,13,16,14,15,16,15,17,16,15,16,14,17, + 15,14,16,15,16,17,15,16,16,16,17,15,16,16,17,17, + 16,16,17,17,18,16,17,17,18,17,14,15,15,17,15,15, + 16,16,17,16,15,16,15,17,15,16,17,17,18,17,16,17, + 16,18,15,10,12,12,14,14,12,13,13,15,15,12,13,13, + 15,15,13,14,14,15,16,14,15,14,16,16,12,13,13,15, + 15,12,13,14,15,15,13,14,14,15,15,14,14,15,16,17, + 14,15,15,17,16,12,13,13,15,15,13,14,14,15,16,13, + 14,14,16,15,14,15,15,16,17,14,15,15,17,16,13,14, + 14,15,16,14,14,15,15,16,14,15,15,16,16,15,15,16, + 16,17,15,16,16,17,17,14,15,15,16,16,15,15,15,16, + 16,15,15,15,16,16,16,17,16,17,17,16,16,16,18,16, + 11,12,12,14,14,12,13,14,15,15,12,13,13,15,15,13, + 14,15,16,16,14,15,15,16,16,12,13,13,15,15,13,13, + 14,15,16,13,14,14,15,16,14,14,15,16,17,15,15,15, + 16,17,12,13,13,15,15,13,14,14,15,16,13,14,14,16, + 15,15,15,15,16,17,15,16,15,17,16,14,14,15,15,16, + 14,14,15,15,17,15,15,16,16,17,15,15,16,15,18,16, + 16,16,17,17,14,15,15,16,16,15,16,16,17,17,15,15, + 15,17,16,16,17,16,17,17,16,16,16,18,16,11,12,12, + 14,14,13,13,14,15,15,13,14,13,15,15,14,15,15,16, + 16,14,15,15,16,16,12,13,13,15,15,13,13,14,15,15, + 14,14,14,16,15,15,15,15,15,16,15,16,15,17,16,12, + 13,13,15,15,14,14,15,15,16,13,14,13,16,15,15,15, + 16,16,17,15,16,15,17,15,14,15,14,16,16,14,15,15, + 16,16,15,16,15,17,16,15,15,16,15,17,16,17,16,17, + 17,14,15,15,16,16,15,16,16,16,17,14,15,15,16,16, + 16,17,17,17,18,16,16,16,17,16,12,13,13,15,15,13, + 13,14,15,16,13,14,14,16,15,14,15,15,16,17,14,15, + 15,17,16,13,14,14,15,16,14,14,15,15,17,14,15,15, + 16,16,15,14,16,15,17,15,16,16,17,17,13,14,14,16, + 16,14,15,15,16,16,14,15,14,16,16,15,16,16,17,17, + 15,16,15,17,16,15,15,16,15,17,15,15,16,15,17,15, + 16,16,16,17,16,15,17,15,18,17,17,17,17,17,15,15, + 15,17,17,16,16,16,17,17,15,16,15,17,17,16,17,17, + 18,18,16,17,15,18,15,11,12,12,15,15,13,13,15,14, + 16,13,14,13,16,14,15,15,16,16,17,15,16,15,17,15, + 12,14,13,16,14,13,13,14,14,16,14,15,14,16,15,15, + 15,16,15,17,16,16,16,17,16,12,13,14,15,16,15,15, + 15,15,16,13,15,13,16,14,16,16,16,17,17,15,16,15, + 17,15,15,16,15,16,15,14,14,15,16,16,16,16,16,17, + 16,15,15,16,15,17,17,17,17,18,17,15,15,15,16,16, + 16,16,16,16,17,14,15,15,17,16,17,17,17,17,18,15, + 16,15,18,14,10,12,12,14,14,12,13,13,15,15,12,13, + 13,15,15,14,14,15,15,16,13,15,14,16,16,12,13,13, + 15,15,13,14,14,15,16,13,14,14,15,15,14,15,15,16, + 17,14,15,15,17,16,12,13,13,15,15,13,14,14,15,15, + 12,14,13,15,15,14,15,15,16,17,14,15,14,17,15,14, + 15,15,16,16,14,15,15,16,17,15,15,15,17,16,16,16, + 16,16,17,16,16,16,17,17,13,14,14,16,15,14,15,15, + 16,16,14,15,14,16,16,15,16,16,17,17,15,16,15,17, + 16,11,12,12,14,15,13,13,14,14,15,13,14,13,15,15, + 14,15,15,16,16,14,15,15,16,16,12,14,13,15,15,13, + 13,14,15,16,14,15,14,16,15,15,15,16,15,17,15,16, + 16,17,16,12,13,13,15,15,14,14,15,15,16,13,14,13, + 16,15,15,15,16,16,17,15,15,15,16,16,14,15,15,16, + 16,14,15,15,16,16,15,16,16,17,17,16,16,16,16,17, + 16,17,17,18,17,14,14,15,15,16,15,15,16,16,17,14, + 15,15,16,16,16,16,16,17,17,15,16,15,17,15,11,12, + 12,14,14,12,13,14,15,15,12,13,13,15,15,14,15,15, + 16,16,13,15,14,16,16,12,13,13,15,15,13,14,14,15, + 16,13,14,14,16,16,15,15,15,16,17,15,15,15,17,16, + 12,13,13,15,15,13,14,14,16,15,13,14,13,16,15,15, + 16,15,17,17,14,15,14,17,16,14,15,15,16,16,15,15, + 16,16,17,15,16,16,17,17,16,16,16,16,18,16,17,16, + 18,17,14,15,14,16,15,15,15,15,17,16,14,15,14,17, + 15,16,17,16,17,17,15,16,15,17,15,11,12,12,15,15, + 13,13,15,14,16,13,15,13,16,14,15,15,16,15,17,15, + 16,15,17,16,12,14,13,15,15,13,13,15,15,16,15,15, + 15,16,15,15,15,16,15,17,16,16,16,17,16,12,13,14, + 15,16,14,14,15,15,16,13,14,13,16,14,16,16,16,16, + 17,15,16,15,17,15,15,16,15,16,16,14,15,15,16,16, + 16,16,16,17,16,15,15,16,15,17,17,17,17,18,17,15, + 15,15,15,16,16,16,16,16,17,14,15,14,16,15,17,17, + 17,17,18,15,16,15,17,15,12,13,13,15,15,13,14,14, + 15,16,13,14,14,16,15,14,15,15,16,17,14,15,15,17, + 16,13,14,14,16,15,13,14,15,16,16,14,15,15,16,16, + 15,15,16,16,17,15,16,16,17,17,13,14,13,16,15,14, + 15,15,16,16,13,15,14,16,15,15,16,16,17,17,15,16, + 14,17,15,15,15,16,17,17,15,15,16,16,17,16,16,16, + 17,17,16,15,17,16,18,17,17,17,18,18,15,15,15,17, + 14,16,16,16,17,16,15,16,15,17,15,16,17,17,18,17, + 16,17,15,18,15, +}; + +static const static_codebook _44p8_p5_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p8_p5_0, + 1, -528744448, 1616642048, 3, 0, + (long *)_vq_quantlist__44p8_p5_0, + 0 +}; + +static const long _vq_quantlist__44p8_p5_1[] = { + 3, + 2, + 4, + 1, + 5, + 0, + 6, +}; + +static const char _vq_lengthlist__44p8_p5_1[] = { + 2, 3, 3, 3, 3, 3, 3, +}; + +static const static_codebook _44p8_p5_1 = { + 1, 7, + (char *)_vq_lengthlist__44p8_p5_1, + 1, -533200896, 1611661312, 3, 0, + (long *)_vq_quantlist__44p8_p5_1, + 0 +}; + +static const long _vq_quantlist__44p8_p6_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p8_p6_0[] = { + 2, 6, 6, 5, 7, 7, 5, 7, 7, 5, 7, 7, 7, 7, 9, 7, + 9, 9, 6, 7, 7, 8, 9, 9, 7, 9, 7, 6, 8, 8, 8, 9, + 10, 8, 9, 9, 8, 9,10, 9, 9,10,10,10,10, 8, 9, 9, + 10,10,11, 9,10,10, 6, 8, 8, 8, 9, 9, 8,10, 9, 8, + 9, 9, 9,10,10,10,11,10, 8,10, 9,10,11,10, 9,11, + 9, 6, 8, 8, 7, 9, 9, 7, 9, 9, 7, 9, 9, 8, 9,10, + 9,10,10, 8, 9, 9, 9,10,10, 9,10, 9, 7, 9, 9, 9, + 9,10, 9,10,10, 9, 9,10,10, 9,11,10,11,11, 9,10, + 10,10,11,11,10,11,10, 6, 9, 8, 9, 9,10, 9,10, 9, + 8,10,10, 9, 9,10,10,11,11, 9,10,10,10,11,11, 9, + 11, 9, 6, 8, 8, 7, 9, 9, 7, 9, 9, 8, 9, 9, 9, 9, + 10, 9,10,10, 7, 9, 9, 9,10,10, 8,10, 9, 6, 8, 9, + 9, 9,10, 9,10, 9, 9,10,10, 9, 9,11,10,11,11, 8, + 9,10,10,11,11, 9,10, 9, 7, 9, 9, 9,10,10, 9,10, + 9, 9,10,10,10,10,11,10,11,11, 9,10, 9,10,11,11, + 10,11, 9, +}; + +static const static_codebook _44p8_p6_0 = { + 5, 243, + (char *)_vq_lengthlist__44p8_p6_0, + 1, -527106048, 1620377600, 2, 0, + (long *)_vq_quantlist__44p8_p6_0, + 0 +}; + +static const long _vq_quantlist__44p8_p6_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p8_p6_1[] = { + 4, 7, 7, 7, 7, 8, 7, 8, 7, 7, 7, 8, 7, 8, 8, 8, + 8, 8, 7, 8, 7, 8, 8, 8, 7, 8, 8, 7, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, 9, 8, 8, 8, + 8, 9, 8, 8, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, 9, + 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, + 8, 8, 9, 8, 8, 8, 8, 9, 9, 8, 9, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 9, 9, 8, 8, + 8, 8, 9, 9, 8, 9, 9, 7, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 9, 8, 9, 8, 8, 8, 8, 8, 9, 9, 8, + 9, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 9, 8, 9, 9, 8, 8, 8, 8, 9, 8, 8, 9, 8, 7, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 9, 9, 8, + 8, 8, 8, 9, 9, 8, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 9, 9, 8, 9, 9, 8, 8, 8, 8, 9, 9, + 8, 9, 8, +}; + +static const static_codebook _44p8_p6_1 = { + 5, 243, + (char *)_vq_lengthlist__44p8_p6_1, + 1, -530841600, 1616642048, 2, 0, + (long *)_vq_quantlist__44p8_p6_1, + 0 +}; + +static const long _vq_quantlist__44p8_p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p8_p7_0[] = { + 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, +}; + +static const static_codebook _44p8_p7_0 = { + 5, 243, + (char *)_vq_lengthlist__44p8_p7_0, + 1, -512202240, 1635281408, 2, 0, + (long *)_vq_quantlist__44p8_p7_0, + 0 +}; + +static const long _vq_quantlist__44p8_p7_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p8_p7_1[] = { + 1, 7, 7,12,12, 5,11,12,12,12, 5,12,11,12,12,12, + 12,12,12,12,12,13,13,13,13, 7,11,11,13,13,13,12, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13, 7,13,10,13,13,13,13,13,13,13,12,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13, 7,13,12, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,12, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13, 8,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,12,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,12,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13, 8,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,12,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,10,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13, 8,13,12,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,11, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,11,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13, +}; + +static const static_codebook _44p8_p7_1 = { + 5, 3125, + (char *)_vq_lengthlist__44p8_p7_1, + 1, -514619392, 1630767104, 3, 0, + (long *)_vq_quantlist__44p8_p7_1, + 0 +}; + +static const long _vq_quantlist__44p8_p7_2[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p8_p7_2[] = { + 1, 3, 2, 4, 5, 7, 7, 8, 8, 9, 9,10,10,11,11,12, + 12,13,13,14,14,15,15,15,15, +}; + +static const static_codebook _44p8_p7_2 = { + 1, 25, + (char *)_vq_lengthlist__44p8_p7_2, + 1, -518864896, 1620639744, 5, 0, + (long *)_vq_quantlist__44p8_p7_2, + 0 +}; + +static const long _vq_quantlist__44p8_p7_3[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p8_p7_3[] = { + 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44p8_p7_3 = { + 1, 25, + (char *)_vq_lengthlist__44p8_p7_3, + 1, -529006592, 1611661312, 5, 0, + (long *)_vq_quantlist__44p8_p7_3, + 0 +}; + +static const char _huff_lengthlist__44p8_short[] = { + 3, 9,15,17,20,21,22,23, 5, 5, 7, 9,11,13,17,20, + 9, 5, 5, 6, 8,10,15,18,11, 7, 5, 4, 6, 9,13,17, + 14, 9, 7, 5, 6, 7,10,14,17,10, 8, 6, 6, 4, 5, 8, + 20,14,13,10, 8, 4, 3, 4,23,17,16,14,12, 6, 4, 4, +}; + +static const static_codebook _huff_book__44p8_short = { + 2, 64, + (char *)_huff_lengthlist__44p8_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p9_l0_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44p9_l0_0[] = { + 2, 5, 5, 7, 6, 8, 8, 9, 9,10,10,11,11, 4, 5, 5, + 6, 7, 8, 8, 9, 9,10,10,11,10, 4, 5, 5, 7, 6, 8, + 8, 9, 9,10,10,10,10, 6, 6, 7, 6, 7, 8, 8, 9, 9, + 10, 9,11, 9, 6, 6, 6, 7, 6, 8, 8, 9, 9, 9,10, 9, + 11, 7, 7, 8, 8, 8, 8, 9, 9, 9,10, 9,11, 9, 7, 8, + 8, 8, 8, 9, 8, 9, 9, 9,10, 9,11, 8, 9, 9, 9, 9, + 9, 9,10,10,11,10,12,10, 8, 9, 9, 9, 9, 9, 9,10, + 9,10,11,11,12, 9,10,10,10,10,10,10,10,11,11,11, + 11,12, 9,10,10,10,10,11,10,11,10,11,11,12,11,11, + 11,11,11,11,11,11,11,12,11,12,11,12,11,11,11,11, + 11,11,11,12,11,12,11,12,11, +}; + +static const static_codebook _44p9_l0_0 = { + 2, 169, + (char *)_vq_lengthlist__44p9_l0_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44p9_l0_0, + 0 +}; + +static const long _vq_quantlist__44p9_l0_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p9_l0_1[] = { + 4, 4, 4, 5, 5, 4, 4, 5, 5, 5, 4, 5, 4, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44p9_l0_1 = { + 2, 25, + (char *)_vq_lengthlist__44p9_l0_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p9_l0_1, + 0 +}; + +static const long _vq_quantlist__44p9_l1_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p9_l1_0[] = { + 1, 2, 3, 5, 9, 9, 4, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9,10,10,10,10,10,10,10,10, +}; + +static const static_codebook _44p9_l1_0 = { + 2, 25, + (char *)_vq_lengthlist__44p9_l1_0, + 1, -514619392, 1630767104, 3, 0, + (long *)_vq_quantlist__44p9_l1_0, + 0 +}; + +static const char _huff_lengthlist__44p9_lfe[] = { + 1, 1, +}; + +static const static_codebook _huff_book__44p9_lfe = { + 1, 2, + (char *)_huff_lengthlist__44p9_lfe, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44p9_long[] = { + 3, 3, 3, 3, 3, 3, 3, 3, +}; + +static const static_codebook _huff_book__44p9_long = { + 1, 8, + (char *)_huff_lengthlist__44p9_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44p9_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p9_p1_0[] = { + 1, 5, 5, 4, 8, 8, 4, 8, 8, 5, 7, 8, 8, 9,10, 8, + 10,10, 5, 8, 7, 8,10,10, 8,10, 9, 7, 9, 9, 9,11, + 11, 9,11,11, 9,11,11,11,12,13,11,13,13, 9,11,11, + 11,13,13,11,13,13, 7, 9, 9, 9,11,11, 9,11,11, 9, + 11,11,11,13,13,11,13,13, 9,11,11,11,13,13,11,13, + 12, 5, 9, 9, 9,11,11, 9,11,11, 9,11,11,11,12,13, + 11,13,13, 9,11,11,11,13,13,11,13,13, 9,11,12,11, + 13,13,12,13,13,11,12,13,13,14,15,13,14,14,12,13, + 13,13,15,15,13,15,14, 8,10,10,11,13,13,12,14,13, + 11,12,12,13,14,15,13,15,15,11,12,12,13,15,15,13, + 15,14, 5, 9, 9, 9,11,11, 9,11,11, 9,11,11,11,13, + 13,11,13,13, 9,11,10,11,13,13,11,13,12, 8,10,10, + 11,13,13,12,13,13,11,12,12,13,14,15,14,15,15,10, + 12,12,13,14,15,13,15,14, 9,12,11,12,13,13,11,13, + 13,12,13,13,13,15,15,13,14,15,11,13,12,13,15,14, + 13,15,14, +}; + +static const static_codebook _44p9_p1_0 = { + 5, 243, + (char *)_vq_lengthlist__44p9_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p9_p1_0, + 0 +}; + +static const long _vq_quantlist__44p9_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p9_p2_0[] = { + 4, 6, 6, 8, 8, 5, 7, 7, 9, 9, 5, 7, 7, 9, 9, 6, + 8, 8,11,11, 6, 8, 8,11,11, 6, 7, 7, 9, 9, 7, 8, + 9,10,11, 7, 9, 9,11,10, 8, 9,10,12,12, 8,10,10, + 12,12, 6, 7, 7, 9, 9, 7, 9, 9,10,10, 7, 9, 8,11, + 10, 8,10,10,12,12, 8,10, 9,12,12, 8, 9, 9,11,11, + 9,10,10,12,12, 9,11,11,12,13,11,12,12,13,14,11, + 12,12,14,14, 8, 9, 9,11,11, 9,11,10,13,12, 9,10, + 10,13,12,11,12,12,14,14,11,12,12,14,13, 7, 8, 9, + 10,10, 8,10,10,11,11, 8,10,10,11,11,10,11,11,13, + 13,10,11,11,13,13, 8, 9,10,10,11,10,11,11,12,13, + 10,11,11,12,12,11,11,12,13,14,11,12,12,14,14, 8, + 10,10,11,11,10,11,11,12,13,10,11,11,12,12,11,12, + 12,14,14,11,12,12,14,14,10,11,11,12,13,11,12,12, + 13,14,12,13,13,14,14,13,13,14,14,16,13,14,14,15, + 16,10,11,11,13,13,12,12,12,14,14,11,12,12,14,14, + 13,14,14,15,16,13,14,14,16,15, 7, 8, 8,10,10, 8, + 10,10,11,11, 8,10,10,12,11,10,11,11,13,13,10,11, + 11,13,13, 8,10,10,11,11,10,11,11,12,12,10,11,11, + 12,12,11,12,12,14,14,11,12,12,14,14, 8,10, 9,11, + 10,10,11,11,13,12,10,11,10,13,12,11,12,12,14,14, + 11,12,11,14,13,10,11,11,13,13,11,12,12,14,14,12, + 12,12,14,14,13,14,14,15,16,13,14,14,15,15,10,11, + 11,13,12,12,12,12,14,14,11,12,12,14,13,13,14,14, + 16,15,13,14,13,16,14,10,11,11,13,13,12,12,13,14, + 15,12,13,13,14,15,13,14,15,15,16,13,14,14,16,16, + 11,12,13,14,14,13,13,14,15,16,13,14,14,15,16,14, + 15,15,16,17,14,15,16,17,17,11,12,12,14,14,13,14, + 14,15,16,13,14,14,15,15,14,15,15,16,18,14,15,15, + 17,16,13,14,15,15,16,15,15,16,16,18,15,15,15,17, + 17,16,16,17,17,18,16,16,16,18,18,14,14,14,16,16, + 15,15,15,16,17,15,15,15,16,17,16,17,17,18,18,16, + 16,17,18,17,10,11,11,14,13,12,13,13,15,14,11,13, + 13,15,14,13,15,15,16,16,13,14,14,16,16,11,12,12, + 14,14,13,13,13,15,15,13,14,13,15,15,15,15,15,17, + 16,14,15,15,17,16,11,13,12,14,14,13,14,13,15,15, + 13,14,13,15,15,14,15,15,17,17,14,15,15,17,16,14, + 14,14,16,16,14,15,15,17,17,15,15,16,17,16,17,16, + 17,18,18,16,17,17,18,18,13,14,14,16,15,15,15,15, + 17,17,14,16,15,16,16,17,17,17,18,18,16,17,16,20, + 19, 6, 8, 8,10,10, 8,10,10,11,11, 8,10,10,12,11, + 10,11,11,13,13,10,11,11,13,13, 8, 9,10,11,11,10, + 11,11,12,12,10,11,11,13,12,11,12,12,14,14,11,12, + 12,14,14, 9,10,10,11,11,10,11,11,12,12,10,11,11, + 13,12,11,12,12,14,14,11,12,12,14,14,10,10,11,12, + 13,11,12,12,14,14,11,12,12,14,14,13,14,14,15,16, + 13,14,14,15,16,10,11,11,13,13,12,12,12,14,14,12, + 13,12,14,14,13,14,14,16,16,13,14,14,15,15, 9,10, + 10,11,12,10,11,11,12,13,10,11,11,13,12,11,12,12, + 14,14,11,12,12,14,14,10,10,11,12,13,11,12,12,13, + 14,11,12,12,13,14,12,13,14,14,15,12,13,13,15,15, + 10,11,11,13,13,11,12,12,13,14,11,12,12,14,13,12, + 13,13,15,15,12,13,13,15,15,12,11,13,12,14,13,13, + 14,14,15,13,13,14,14,15,14,15,15,16,17,14,15,15, + 16,17,12,13,12,14,14,13,14,14,15,15,13,14,14,15, + 15,14,15,15,16,17,14,15,15,16,17, 8, 9, 9,11,11, + 10,11,11,12,13,10,11,11,13,12,12,13,13,14,15,11, + 13,12,15,14, 9,11,10,12,12,11,12,12,13,14,11,12, + 12,14,13,13,13,14,15,15,13,14,13,15,15, 9,11,11, + 12,12,11,12,12,14,14,11,12,12,14,13,13,14,14,15, + 16,13,14,13,15,14,11,12,12,14,13,12,13,13,14,15, + 13,14,14,16,15,15,15,15,15,16,15,16,15,17,17,11, + 12,12,14,14,13,14,14,15,15,12,13,13,15,14,15,15, + 15,17,17,14,15,15,17,15,11,12,12,14,14,12,13,13, + 15,15,12,13,13,15,15,14,15,15,17,17,14,15,15,16, + 16,12,13,13,14,15,13,14,14,16,16,14,14,14,15,16, + 15,16,16,17,17,15,16,16,17,17,12,13,13,15,15,14, + 14,14,16,16,14,14,15,16,16,15,16,16,17,17,15,16, + 16,17,17,14,15,15,15,16,15,15,16,16,18,15,16,16, + 17,17,17,17,17,18,18,16,17,17,19,18,14,15,15,16, + 17,15,16,16,17,17,15,16,16,18,17,16,17,17,19,18, + 17,17,17,19,18,10,12,12,14,14,13,13,14,15,15,12, + 14,13,16,15,15,15,15,17,17,14,15,15,17,16,12,13, + 13,15,14,13,14,14,16,16,14,14,15,17,16,15,16,16, + 17,17,15,16,16,18,17,12,13,13,15,14,14,15,15,16, + 16,13,15,14,16,15,16,17,16,19,17,15,16,16,17,17, + 14,15,15,17,15,15,16,15,17,17,16,17,16,18,17,17, + 17,18,18,18,17,17,18,19,18,14,15,15,16,16,15,16, + 16,17,18,15,16,16,18,16,17,18,18,19,19,17,18,17, + 18,19, 6, 8, 8,10,10, 8,10,10,11,11, 8,10,10,12, + 11,10,11,11,13,13, 9,11,11,13,13, 9,10,10,11,11, + 10,11,11,12,12,10,11,11,12,12,11,12,12,14,14,11, + 12,12,14,14, 8,10, 9,11,11,10,11,11,12,12,10,11, + 11,12,12,11,12,12,14,14,11,12,12,14,14,10,11,11, + 13,13,11,12,13,14,14,12,12,12,14,14,13,14,14,15, + 16,13,14,14,16,16,10,11,10,13,12,11,12,12,14,14, + 11,12,12,14,14,13,14,14,15,16,13,14,14,16,15, 8, + 9, 9,11,11,10,11,11,12,13,10,11,11,13,12,12,13, + 13,14,15,12,13,13,15,14,10,11,11,12,12,11,11,12, + 13,14,11,12,12,14,14,13,13,14,15,16,13,14,14,15, + 15, 9,10,11,12,12,11,12,12,13,14,11,12,12,14,13, + 13,14,14,15,16,12,14,13,15,15,11,12,12,14,14,12, + 13,13,14,15,13,14,14,16,15,14,15,15,15,17,15,15, + 16,16,17,11,12,12,13,14,13,14,14,15,15,12,13,13, + 15,14,15,16,15,16,17,14,16,15,17,15, 9,10,10,12, + 11,10,11,11,13,13,10,11,11,13,12,11,12,12,14,14, + 11,12,12,14,14,10,11,11,12,13,11,12,12,13,14,11, + 12,12,14,14,12,13,13,15,15,12,13,13,15,15,10,11, + 10,13,12,11,12,12,13,13,11,12,12,14,13,12,13,13, + 15,15,12,13,13,15,14,12,13,12,14,14,13,14,14,15, + 15,13,14,14,15,15,14,15,15,16,16,14,15,15,16,16, + 11,13,11,14,12,13,13,13,15,14,12,14,13,15,14,15, + 15,15,17,16,14,15,14,17,15,10,12,12,14,14,13,13, + 14,15,16,12,14,13,15,15,14,15,16,17,17,14,15,16, + 17,17,12,13,13,14,15,13,14,14,16,16,14,14,15,16, + 16,16,16,16,17,17,16,16,16,18,18,12,13,13,14,15, + 14,14,15,16,16,13,14,14,16,15,16,16,16,17,18,15, + 16,16,17,17,14,15,15,16,16,15,15,16,17,17,15,16, + 16,17,18,17,18,18,18,19,17,18,18,19,19,14,15,15, + 16,16,15,16,16,17,17,15,16,16,17,17,17,17,18,20, + 18,17,18,17,18,18,11,12,12,14,14,12,13,14,15,15, + 12,13,13,15,15,14,15,15,16,17,14,15,15,16,17,12, + 13,13,15,15,14,14,14,16,16,14,14,14,16,16,15,16, + 16,17,17,15,16,16,17,17,12,13,13,15,14,13,14,14, + 16,15,14,15,14,16,15,15,16,16,17,17,15,16,16,17, + 16,14,15,15,16,16,15,16,16,17,17,16,16,16,17,17, + 17,17,17,19,18,17,17,17,18,19,14,15,14,17,15,15, + 16,16,17,17,15,16,15,17,17,16,17,17,18,18,16,17, + 17,18,17, 6,11,11,13,13,11,12,12,14,14,11,12,12, + 14,14,13,14,14,16,16,13,14,14,16,16,11,12,12,14, + 14,12,13,13,15,15,12,13,13,15,15,14,15,15,16,17, + 14,15,15,17,18,11,12,12,14,14,12,13,13,15,15,12, + 13,13,15,15,14,15,15,17,17,14,15,15,16,16,13,14, + 14,15,16,14,15,15,16,17,14,15,15,17,16,15,16,17, + 18,17,16,16,16,18,17,14,14,15,16,16,14,15,15,18, + 16,14,15,15,17,16,16,17,17,18,18,16,17,16,18,17, + 11,12,12,14,14,12,13,13,15,15,12,13,13,15,15,14, + 15,15,17,17,14,15,15,16,16,12,13,13,15,15,13,14, + 14,15,16,13,14,14,16,16,15,16,16,17,17,15,15,16, + 17,17,12,13,13,15,15,14,14,14,16,16,13,14,14,16, + 16,15,16,16,17,17,15,16,16,17,17,14,14,15,15,16, + 15,15,16,16,17,15,15,16,16,17,16,17,17,17,18,16, + 17,17,18,18,14,15,15,16,16,15,16,16,17,17,15,16, + 16,17,17,17,17,17,18,19,17,17,17,18,18,10,12,12, + 14,14,12,13,14,15,16,13,14,13,15,15,14,15,15,17, + 17,14,15,16,17,17,12,13,13,15,15,13,14,14,15,15, + 14,15,14,16,16,15,16,16,17,18,15,17,16,18,17,12, + 13,13,15,15,14,14,14,16,16,13,14,14,16,15,15,16, + 16,17,18,15,16,16,17,17,14,14,14,16,16,15,15,16, + 17,17,15,16,16,17,17,17,17,17,18,20,17,17,17,19, + 19,14,15,15,16,16,15,17,16,18,18,15,16,15,17,16, + 17,18,19,19,19,17,17,17,18,17,13,14,14,16,16,14, + 15,15,17,17,14,15,15,16,17,15,17,17,18,18,16,16, + 17,18,17,14,15,15,16,17,15,16,16,17,17,15,16,16, + 17,17,16,17,17,18,18,17,17,17,18,19,14,15,15,16, + 17,15,16,16,17,17,15,16,16,17,17,16,17,17,18,18, + 17,17,17,19,19,16,16,16,16,18,16,17,17,17,18,17, + 17,17,17,19,18,18,18,19,19,18,18,18,19,20,16,16, + 17,18,18,16,18,17,18,18,17,17,17,20,19,18,18,19, + 21,20,18,20,18,18,19,10,12,12,14,14,14,14,15,15, + 17,14,15,14,17,15,16,16,17,18,18,16,18,17,19,18, + 12,14,13,16,15,14,14,15,15,17,15,16,16,18,17,16, + 17,18,17,19,17,19,18,20,19,12,13,13,15,15,15,16, + 17,17,18,14,16,14,17,16,17,18,18,19,19,17,17,17, + 18,18,15,15,15,17,16,15,16,16,17,17,17,19,17,18, + 18,18,18,18,18,21,19,20,19,20,19,15,15,16,16,17, + 17,17,18,20,20,15,16,16,18,17,18,19,19,19,20,18, + 19,18,19,17, 6,11,11,13,13,11,12,12,14,14,11,12, + 12,14,14,13,14,14,16,16,13,14,14,16,16,11,12,12, + 14,14,12,13,13,15,15,12,13,13,15,15,14,15,15,17, + 17,14,15,15,17,16,11,12,12,14,14,12,13,13,15,15, + 12,13,13,15,15,14,15,15,16,16,14,15,15,16,16,13, + 14,14,16,16,15,15,15,16,16,14,15,15,17,16,16,17, + 17,19,18,16,17,17,18,18,13,14,14,15,15,14,15,15, + 17,16,14,15,15,17,16,16,17,16,17,18,15,16,16,18, + 18,10,12,12,14,14,12,13,14,15,15,12,13,13,15,15, + 14,15,15,17,17,14,15,15,17,16,12,13,13,15,15,14, + 14,14,15,16,14,15,15,16,16,15,16,16,17,18,16,16, + 16,18,18,12,13,13,14,14,14,14,15,16,16,13,14,14, + 16,16,15,16,16,18,18,15,16,16,19,17,14,15,15,16, + 17,15,15,16,17,17,16,17,16,17,18,17,17,18,17,19, + 17,17,18,18,19,14,14,14,16,16,15,16,16,17,17,15, + 16,15,17,17,17,17,17,19,20,16,17,17,18,18,11,12, + 12,14,14,12,13,13,15,15,12,13,13,15,15,14,15,15, + 16,16,14,15,14,16,16,12,13,13,15,15,14,14,14,16, + 16,13,14,14,16,16,15,16,16,18,17,15,16,16,17,17, + 12,13,13,15,15,13,14,14,16,16,13,14,14,16,16,15, + 16,15,18,18,15,16,15,17,16,14,15,15,16,16,15,16, + 16,17,17,15,16,16,18,17,16,17,17,18,18,16,17,17, + 18,18,14,15,14,16,15,15,16,15,17,17,15,16,15,17, + 16,16,17,17,18,18,17,17,16,19,17,10,12,12,14,15, + 14,14,15,15,17,14,15,14,17,15,16,17,17,17,18,16, + 17,17,18,18,12,14,13,16,15,14,14,16,15,17,15,17, + 16,18,17,17,17,18,17,19,18,18,18,19,18,12,13,14, + 15,15,15,16,16,16,17,14,15,14,18,16,18,17,18,19, + 19,17,18,17,20,18,15,15,15,17,17,15,16,16,17,18, + 18,18,18,19,18,18,18,19,18,20,18,19,19,21,21,15, + 15,16,16,17,17,18,18,18,18,15,16,16,17,17,17,19, + 20,19,20,17,18,18,19,17,13,14,14,16,16,14,15,15, + 16,17,14,15,15,17,17,16,16,17,17,18,15,17,16,17, + 17,14,15,15,16,16,15,16,16,17,17,16,16,16,17,17, + 17,17,18,17,18,17,17,17,18,20,14,15,15,17,16,15, + 16,16,17,17,15,16,16,17,17,17,17,17,18,18,16,17, + 17,19,18,16,16,17,17,17,17,18,17,19,18,17,17,17, + 18,19,17,20,18,19,21,17,19,18,19,20,15,17,15,17, + 16,16,17,17,18,18,17,17,17,18,17,18,19,18,19,21, + 18,18,17,19,19, +}; + +static const static_codebook _44p9_p2_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p9_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p9_p2_0, + 0 +}; + +static const long _vq_quantlist__44p9_p3_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p9_p3_0[] = { + 2, 5, 4, 4, 7, 7, 4, 7, 6, 5, 6, 7, 7, 8, 9, 7, + 9, 9, 5, 7, 6, 7, 9, 9, 7, 9, 8, 6, 8, 8, 8,10, + 10, 8,10,10, 8, 9,10,10,11,12,10,12,12, 8,10,10, + 10,12,12,10,12,11, 6, 8, 8, 8,10,10, 8,10,10, 8, + 10,10,10,11,12,10,12,12, 8,10, 9,10,12,11,10,12, + 11, 5, 8, 8, 8,10,10, 8,10,10, 8, 9,10,10,11,11, + 10,11,11, 8,10,10,10,11,12,10,12,11, 8,10,10,10, + 11,11,10,11,11,10,11,11,11,12,13,11,12,13,10,11, + 11,11,13,13,11,13,13, 7, 9, 9,10,11,12,10,12,11, + 9,11,11,11,12,13,12,14,13, 9,11,11,12,13,14,11, + 13,12, 5, 8, 8, 8,10,10, 8,10,10, 8,10,10,10,11, + 12,10,12,12, 8,10, 9,10,12,11, 9,11,11, 7, 9, 9, + 10,11,12,10,12,11, 9,11,11,11,12,13,12,14,13, 9, + 11,11,12,13,14,11,13,12, 8,10,10,10,11,11,10,11, + 11,10,11,11,11,13,13,11,13,13,10,11,10,11,13,12, + 11,13,12, +}; + +static const static_codebook _44p9_p3_0 = { + 5, 243, + (char *)_vq_lengthlist__44p9_p3_0, + 1, -533200896, 1614282752, 2, 0, + (long *)_vq_quantlist__44p9_p3_0, + 0 +}; + +static const long _vq_quantlist__44p9_p3_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p9_p3_1[] = { + 4, 6, 6, 6, 7, 7, 6, 7, 7, 6, 7, 7, 7, 7, 8, 7, + 7, 8, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 8, 9, 9, 8, 8, 8, + 8, 9, 9, 8, 9, 9, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 9, 9, 8, 9, 9, 8, 8, 8, 8, 9, 9, 8, 9, + 9, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, + 8, 9, 9, 8, 8, 8, 8, 9, 9, 8, 9, 9, 8, 8, 8, 8, + 9, 9, 8, 9, 9, 8, 8, 9, 9, 9, 9, 9, 9, 9, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 7, 8, 8, 8, 9, 9, 8, 9, 9, + 8, 9, 8, 9, 9, 9, 9, 9, 9, 8, 8, 8, 9, 9, 9, 9, + 9, 9, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, + 9, 8, 9, 9, 8, 8, 8, 8, 9, 9, 8, 9, 9, 7, 8, 8, + 8, 9, 9, 8, 9, 9, 8, 8, 9, 9, 9, 9, 9, 9, 9, 8, + 8, 8, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 9, 9, 8, 9, + 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 8, 9, 9, 9, + 9, 9, 9, +}; + +static const static_codebook _44p9_p3_1 = { + 5, 243, + (char *)_vq_lengthlist__44p9_p3_1, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44p9_p3_1, + 0 +}; + +static const long _vq_quantlist__44p9_p4_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p9_p4_0[] = { + 2, 5, 5, 4, 7, 7, 4, 7, 6, 5, 7, 7, 7, 8, 9, 7, + 9, 9, 5, 7, 7, 7, 9, 9, 7, 9, 8, 6, 7, 8, 8, 9, + 10, 8,10,10, 8, 9,10,10,11,12,10,11,12, 8,10,10, + 10,11,12,10,12,11, 6, 8, 7, 8,10,10, 8,10, 9, 8, + 10,10,10,11,12,10,12,12, 8,10, 9,10,12,11,10,12, + 11, 5, 8, 8, 8,10,10, 8,10,10, 7, 9,10, 9,10,11, + 10,11,11, 8,10,10,10,12,12,10,12,11, 7, 9, 9, 9, + 11,11, 9,11,11, 9,10,11,11,11,12,11,12,12, 9,11, + 11,11,12,12,11,12,12, 7, 9, 9,10,11,12,10,12,11, + 9,11,10,11,11,12,12,13,13, 9,11,11,12,13,13,11, + 13,11, 5, 8, 8, 8,10,10, 8,10,10, 8,10,10,10,11, + 12,10,12,12, 7, 9, 9, 9,11,11, 9,11,10, 7, 9, 9, + 10,11,12,10,12,11, 9,11,11,11,11,13,12,13,13, 9, + 10,11,12,13,13,11,12,11, 7, 9, 9, 9,11,11, 9,11, + 11, 9,11,11,11,12,12,11,12,12, 9,11,10,11,12,12, + 10,12,11, +}; + +static const static_codebook _44p9_p4_0 = { + 5, 243, + (char *)_vq_lengthlist__44p9_p4_0, + 1, -531365888, 1616117760, 2, 0, + (long *)_vq_quantlist__44p9_p4_0, + 0 +}; + +static const long _vq_quantlist__44p9_p4_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p9_p4_1[] = { + 6, 8, 8,10, 9, 8, 9, 9,10,10, 8, 9, 9,10,10, 8, + 10,10,10,10, 8,10,10,10,10, 9, 9, 9,10,10, 9,10, + 10,10,11, 9,10,10,11,11,10,10,10,11,11,10,10,10, + 11,11, 9, 9, 9,10,10, 9,10,10,11,11, 9,10,10,11, + 10,10,10,10,11,11,10,10,10,11,11,10,10,10,10,11, + 10,10,11,11,11,10,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,10,10,10,11,10,10,11,11,11,11,10,11, + 10,11,11,11,11,11,11,11,10,11,11,11,11, 9,10,10, + 10,11,10,10,11,11,11,10,11,11,11,11,10,11,11,11, + 11,10,11,11,11,11,10,10,11,11,11,11,11,11,11,11, + 11,11,11,11,12,11,11,12,12,12,11,11,11,12,12,10, + 11,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11, + 11,12,12,11,11,11,12,12,11,11,11,11,11,11,12,12, + 12,12,11,12,12,12,12,11,12,12,12,12,12,12,12,12, + 12,11,11,11,11,11,11,12,12,12,12,11,12,11,12,12, + 11,12,12,12,12,12,12,12,12,12, 9,10,10,11,10,10, + 11,11,11,11,10,11,11,11,11,10,11,11,11,11,10,11, + 11,11,11,10,11,11,11,11,11,11,11,11,11,11,11,11, + 12,12,11,11,12,12,12,11,11,11,12,12,10,11,10,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12, + 11,11,11,12,12,11,11,11,11,11,11,12,12,12,12,11, + 12,12,12,12,11,12,12,12,12,12,12,12,12,12,11,11, + 11,11,11,11,12,12,12,12,11,12,11,12,12,12,12,12, + 12,12,11,12,12,12,12,11,11,11,11,11,11,12,12,12, + 12,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,13,13,12,12,12,13,13,11,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,13,13,12,12,12, + 13,13,12,12,12,12,12,12,12,12,12,13,12,12,12,13, + 13,12,13,13,13,13,12,13,13,13,13,12,12,12,12,12, + 12,12,12,13,13,12,12,12,13,13,12,13,13,13,13,12, + 13,13,13,13,11,11,11,11,11,11,12,12,12,12,11,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,11,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, + 13,12,12,12,13,13,11,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,13,13,12,12,12,13,13,12, + 12,12,12,12,12,12,12,13,13,12,12,12,13,13,12,13, + 13,13,13,12,13,13,13,13,12,12,12,12,12,12,12,12, + 13,13,12,12,12,13,12,12,13,13,13,13,12,13,13,13, + 13, 7,10,10,11,11,10,10,11,11,11,10,11,11,11,11, + 10,11,11,11,11,10,11,11,11,11,10,10,10,11,11,10, + 11,11,11,11,11,11,11,11,12,11,11,11,12,12,11,11, + 11,12,12,10,11,11,11,11,11,11,11,12,11,11,11,11, + 12,11,11,11,11,12,12,11,11,11,12,12,11,11,11,11, + 11,11,11,11,12,12,11,11,12,12,12,11,12,12,12,12, + 11,12,12,12,12,11,11,11,11,11,11,12,12,12,12,11, + 11,12,12,12,11,12,12,12,12,11,12,12,12,12,10,11, + 11,11,11,11,11,11,11,12,11,11,11,11,11,11,11,11, + 12,12,11,11,11,12,12,11,11,11,11,11,11,11,12,12, + 12,11,11,11,12,12,11,12,12,12,12,11,12,12,12,12, + 11,11,11,11,11,11,12,11,12,12,11,11,11,12,12,11, + 12,12,12,12,11,12,12,12,12,11,11,11,11,12,11,12, + 12,12,12,11,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,11,11,11,12,12,11,12,12,12,12,11,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,10,11,10,11,11, + 11,11,11,12,12,11,11,11,12,12,11,12,12,12,12,11, + 12,12,12,12,10,11,11,12,11,11,11,12,12,12,11,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,11,11,11, + 12,11,11,12,12,12,12,11,12,11,12,12,12,12,12,12, + 12,12,12,12,12,12,11,12,11,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,13,12,12,12,12,12,11, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,13,12,12,12,13,12,11,11,11,12,12,12,12,12, + 12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 13,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,13,13,13,12,12,12,13,13,11,12,12,12,12,12, + 12,12,12,13,12,12,12,12,12,12,12,13,13,13,12,13, + 12,13,13,12,12,12,12,12,12,12,12,13,13,12,12,12, + 13,13,12,13,13,13,13,12,13,13,13,13,12,12,12,12, + 12,12,12,12,13,13,12,13,12,13,13,12,13,13,13,13, + 12,13,13,13,13,11,11,11,12,12,12,12,12,12,12,11, + 12,12,12,12,12,12,12,13,13,12,12,12,13,13,11,12, + 12,12,12,12,12,12,12,12,12,12,12,13,13,12,13,12, + 13,13,12,13,13,13,13,11,12,12,12,12,12,12,12,13, + 13,12,12,12,13,12,12,13,13,13,13,12,13,13,13,13, + 12,12,12,12,12,12,12,13,13,13,12,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,12,12,12,12,12,12,13, + 13,13,13,12,12,12,13,13,13,13,13,13,13,13,13,13, + 13,13, 7,10,10,11,11,10,11,11,11,11,10,11,11,11, + 11,10,11,11,11,11,10,11,11,11,11,10,11,11,11,11, + 11,11,11,11,11,11,11,11,12,11,11,11,12,12,12,11, + 11,11,12,12,10,10,10,11,11,11,11,11,12,11,10,11, + 11,11,11,11,11,11,12,12,11,11,11,12,12,11,11,11, + 11,11,11,11,12,12,12,11,12,11,12,12,11,12,12,12, + 12,11,12,12,12,12,11,11,11,11,11,11,11,11,12,12, + 11,12,11,12,12,11,12,12,12,12,11,12,12,12,12,10, + 10,10,11,11,11,11,11,12,12,11,11,11,12,12,11,12, + 12,12,12,11,12,12,12,12,11,11,11,11,11,11,11,12, + 12,12,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,11,11,11,11,11,11,12,12,12,12,11,12,11,12,12, + 12,12,12,12,12,12,12,12,12,12,11,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,13,12,12, + 12,13,12,11,11,11,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,10,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12, + 11,11,11,12,12,11,11,11,11,11,11,11,12,12,12,11, + 12,11,12,12,11,12,12,12,12,11,12,12,12,12,11,11, + 11,11,11,11,11,11,12,12,11,11,11,12,12,11,12,12, + 12,12,11,12,12,12,12,11,11,11,12,11,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 11,11,11,12,11,11,12,12,12,12,11,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,11,11,11,12,12,11,12, + 12,12,12,12,12,12,12,12,12,12,12,13,13,12,12,12, + 13,12,11,12,12,12,12,12,12,12,12,13,12,12,12,13, + 13,12,13,13,13,13,12,13,13,13,13,11,12,12,12,12, + 12,12,12,12,13,12,12,12,12,12,12,13,13,13,13,12, + 13,13,13,13,12,12,12,12,12,12,12,13,13,13,12,13, + 12,13,13,13,13,13,13,13,13,13,13,13,13,12,12,12, + 12,12,12,13,13,13,13,12,13,12,13,13,13,13,13,13, + 13,13,13,13,13,13,11,11,11,12,12,11,12,12,12,12, + 11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,11, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13, + 12,13,13,12,12,12,13,13,11,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,13,13,12,13,12,13, + 13,12,12,12,12,12,12,12,12,13,13,12,12,12,13,13, + 13,13,13,13,13,12,13,13,13,13,12,12,12,12,12,12, + 13,12,13,13,12,13,12,13,12,12,13,13,13,13,12,13, + 13,13,13, 8,11,11,12,12,11,12,12,12,12,11,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,11,11,11,12, + 12,11,12,12,12,12,12,12,12,12,12,12,12,12,13,13, + 12,12,12,13,13,11,11,11,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,13,13,12,12,12,13,13,11,12, + 12,12,12,12,12,12,12,13,12,12,12,12,12,12,12,13, + 13,13,12,12,13,13,13,11,12,12,12,12,12,12,12,13, + 12,12,12,12,13,13,12,13,13,13,13,12,13,13,13,13, + 11,11,11,12,12,11,12,12,12,12,11,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,11,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,13,13,12,12,12, + 13,13,11,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,13,12,13,13,12,13,12,13,13,12,12,12,12,12, + 12,12,12,12,13,12,12,12,13,13,12,13,13,13,13,12, + 13,13,13,13,12,12,12,12,12,12,12,12,13,13,12,12, + 12,13,13,12,13,13,13,13,12,13,13,13,13,11,11,11, + 12,12,11,12,12,12,12,11,12,12,12,12,12,12,12,13, + 12,12,12,12,12,13,11,12,12,12,12,12,12,12,12,13, + 12,12,12,12,13,12,13,13,13,13,12,13,13,13,13,11, + 12,12,12,12,12,12,12,12,13,12,12,12,13,12,12,13, + 13,13,13,12,13,13,13,13,12,12,12,12,12,12,12,12, + 13,13,12,12,13,13,13,12,13,13,13,13,12,13,13,13, + 13,12,12,12,12,12,12,13,13,13,13,12,13,12,13,13, + 12,13,13,13,13,13,13,13,13,13,11,11,11,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,11,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,13,13,13,12,13,13,13,13,11,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13, + 12,13,12,13,13,12,12,12,12,12,12,12,12,13,13,12, + 12,12,13,13,12,13,13,13,13,12,13,13,13,13,12,12, + 12,12,12,12,13,12,13,13,12,12,12,13,13,13,13,13, + 13,13,12,13,13,13,13,11,11,11,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,13,12,12,12,13,12, + 11,12,12,12,12,12,12,12,12,12,12,12,12,13,13,12, + 12,13,13,13,12,13,13,13,13,11,12,12,12,12,12,12, + 12,12,13,12,12,12,13,12,12,13,13,13,13,12,13,13, + 13,13,12,12,12,12,12,12,12,12,13,13,12,12,12,13, + 13,13,13,13,13,13,13,13,13,13,13,12,12,12,12,12, + 12,13,13,13,13,12,13,12,13,13,13,13,13,13,13,13, + 13,13,13,13, 8,11,11,11,11,11,12,12,12,12,11,12, + 12,12,12,12,12,12,12,12,11,12,12,12,12,11,11,11, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 13,12,12,12,13,13,11,11,11,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,13,13,12,12,12,13,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,13,13,12,13, + 13,13,13,12,13,13,13,13,11,12,12,12,12,12,12,12, + 12,13,12,12,12,13,12,12,13,13,13,13,12,13,12,13, + 13,11,11,11,12,12,12,12,12,12,12,11,12,12,12,12, + 12,12,12,13,13,12,12,12,13,12,11,12,12,12,12,12, + 12,12,12,12,12,12,12,13,13,12,12,13,13,13,12,13, + 13,13,13,11,12,12,12,12,12,12,12,13,13,12,12,12, + 12,12,12,13,13,13,13,12,13,13,13,13,12,12,12,12, + 12,12,12,13,13,13,12,12,13,13,13,13,13,13,13,13, + 12,13,13,13,13,12,12,12,12,12,12,13,12,13,13,12, + 12,12,13,13,13,13,13,13,13,12,13,13,13,13,11,11, + 11,12,12,11,12,12,12,12,11,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,11,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,13,12,13,13,12,12,12,13,13, + 11,12,12,12,12,12,12,12,12,13,12,12,12,12,12,12, + 12,12,13,13,12,13,12,13,13,12,12,12,12,12,12,12, + 12,13,12,12,12,12,13,13,12,13,13,13,13,12,13,13, + 13,13,12,12,12,12,12,12,12,12,13,13,12,12,12,13, + 12,12,13,13,13,13,12,13,13,13,13,11,11,11,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,13,13,11,12,12,12,12,12,12,12,12,13,12,12, + 12,12,12,12,13,13,13,13,12,13,13,13,13,11,12,12, + 12,12,12,12,12,12,13,12,12,12,12,12,12,13,13,13, + 13,12,13,13,13,13,12,12,12,12,12,12,12,12,13,13, + 12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,12, + 12,12,12,12,12,13,13,13,13,12,12,12,13,12,13,13, + 13,13,13,12,13,13,13,13,11,11,11,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 13,11,12,12,12,12,12,12,12,12,12,12,12,12,13,12, + 12,12,12,13,13,12,13,13,13,13,11,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,13,13,13,13,12,13, + 12,13,13,12,12,12,12,12,12,12,13,13,13,12,13,12, + 13,13,12,13,13,13,13,13,13,13,13,13,12,12,12,12, + 12,12,12,12,12,13,12,12,12,13,13,13,13,13,13,13, + 12,13,13,13,13, +}; + +static const static_codebook _44p9_p4_1 = { + 5, 3125, + (char *)_vq_lengthlist__44p9_p4_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44p9_p4_1, + 0 +}; + +static const long _vq_quantlist__44p9_p5_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p9_p5_0[] = { + 4, 6, 6, 9, 9, 6, 7, 8,10,11, 6, 8, 7,10,10, 8, + 10,10,12,12, 8,10,10,12,12, 6, 7, 8,10,10, 7, 8, + 9,10,11, 8, 9, 9,11,11,10,10,11,12,13,10,11,11, + 13,13, 6, 8, 7,10,10, 8, 9, 9,11,11, 7, 9, 8,11, + 10,10,11,11,13,13,10,11,10,13,12, 9,10,10,11,12, + 10,10,11,12,13,10,11,11,12,13,12,12,13,12,14,12, + 13,13,14,14, 9,10,10,12,11,10,11,11,13,12,10,11, + 10,13,12,12,13,13,14,14,12,13,12,14,12, 7, 8, 8, + 10,11, 8, 9,10,11,12, 8, 9, 9,11,12,10,11,12,13, + 14,10,11,11,13,13, 8, 9,10,11,12, 9,10,11,12,13, + 10,10,11,12,12,11,12,12,13,14,11,12,12,14,14, 8, + 9, 9,11,12,10,10,11,12,13, 9,10,10,12,12,11,12, + 12,14,14,11,12,12,14,13,11,11,12,12,13,11,12,12, + 13,14,12,12,13,14,14,13,13,14,14,16,13,14,14,15, + 15,11,12,11,13,13,12,12,12,14,14,11,12,12,14,13, + 13,14,14,15,15,13,14,13,15,14, 7, 8, 8,11,10, 8, + 10, 9,12,11, 8,10, 9,12,11,10,11,11,13,13,10,12, + 11,14,13, 8, 9, 9,12,11, 9,10,10,12,12,10,11,10, + 13,12,11,12,12,13,14,11,12,12,14,14, 8,10, 9,12, + 11,10,11,10,12,12, 9,11,10,13,11,11,12,12,14,14, + 11,12,12,14,13,11,11,12,13,13,11,12,12,13,14,12, + 12,12,14,14,13,13,14,14,15,13,14,14,15,15,11,12, + 11,13,12,12,12,12,14,14,11,12,12,14,13,13,14,14, + 15,15,13,14,13,15,14,10,11,11,12,13,11,12,12,13, + 14,11,12,12,13,14,13,13,14,14,16,13,14,14,15,15, + 11,12,12,12,14,12,12,13,13,15,12,13,13,13,15,14, + 14,15,15,16,14,14,15,15,16,11,12,12,13,14,12,13, + 13,14,15,12,13,13,14,14,14,14,15,15,16,14,14,14, + 15,15,13,14,14,14,15,14,14,15,15,16,14,15,15,15, + 16,15,15,16,16,18,16,16,16,17,17,13,14,14,15,15, + 14,14,15,16,16,14,14,14,16,15,16,16,16,17,17,15, + 16,16,17,16,10,11,11,13,12,11,12,12,14,13,11,12, + 12,14,13,13,14,14,15,15,13,14,13,16,14,11,12,12, + 14,13,12,13,13,14,14,12,13,13,15,14,14,14,14,15, + 15,14,15,14,16,15,11,12,12,14,12,12,13,13,15,14, + 12,13,12,15,13,14,15,14,16,15,14,15,14,16,15,13, + 14,14,15,15,14,14,14,15,16,14,15,14,16,16,15,16, + 16,16,17,16,16,16,17,17,13,14,14,15,14,14,15,15, + 16,15,14,15,14,16,15,16,16,16,17,17,15,16,15,18, + 16, 6, 8, 8,11,11, 8, 9,10,11,12, 8,10, 9,12,12, + 10,11,11,13,13,10,12,11,14,13, 8, 9, 9,11,12, 9, + 10,10,12,12, 9,10,10,12,12,11,11,12,13,14,11,12, + 12,14,14, 8,10, 9,12,11,10,11,11,12,12, 9,11,10, + 13,12,11,12,12,14,14,11,12,12,14,13,10,11,11,13, + 13,11,12,12,13,14,11,12,12,14,14,13,13,14,13,15, + 13,14,14,15,15,11,12,11,13,13,12,12,12,14,14,11, + 12,12,14,13,13,14,14,15,15,13,14,13,15,14, 8, 9, + 9,11,11, 9,10,10,12,12, 9,10,10,12,12,11,12,12, + 13,14,11,12,12,14,14, 9, 9,10,11,12,10,10,11,12, + 13,10,10,11,12,13,12,12,13,13,15,12,12,13,14,14, + 9,10,10,12,12,10,11,11,13,13,10,11,11,13,13,12, + 13,13,14,15,12,13,12,14,14,11,11,12,12,14,12,12, + 13,13,14,12,12,13,13,14,13,13,14,14,16,14,14,14, + 15,15,11,12,12,14,13,12,13,13,14,14,12,13,13,15, + 14,14,14,14,16,16,13,14,14,16,14, 7, 9, 9,12,11, + 9,10,10,12,12, 9,11,10,13,12,11,12,12,13,14,11, + 13,12,14,13, 9,10,10,12,12,10,10,11,12,13,10,12, + 11,13,13,12,12,13,13,14,12,13,13,15,14, 9,10,10, + 12,12,11,11,11,13,13,10,12,10,13,12,12,13,13,14, + 15,12,13,12,15,13,11,12,12,14,13,12,12,13,13,14, + 12,13,13,15,14,13,13,14,13,16,14,15,14,16,15,12, + 12,12,14,14,13,13,13,14,14,12,13,12,14,13,14,15, + 15,16,16,13,14,13,16,13,10,11,12,13,14,11,12,13, + 13,15,12,12,13,14,14,13,14,14,15,16,13,14,14,16, + 15,12,12,13,12,14,12,12,13,13,15,13,13,13,13,15, + 14,14,15,14,16,14,15,15,15,16,12,13,12,14,14,13, + 13,13,15,15,12,13,13,15,15,14,15,15,16,16,14,15, + 15,16,16,13,14,14,13,16,14,14,15,14,16,14,14,15, + 14,16,15,15,16,15,18,16,16,16,16,17,14,14,14,16, + 15,14,15,15,16,16,14,15,15,16,16,16,16,16,17,17, + 15,16,16,17,16,10,12,11,14,13,12,13,13,14,14,12, + 13,12,15,14,14,14,14,15,15,14,15,14,16,15,12,13, + 12,14,13,12,13,13,15,14,13,14,13,15,14,14,15,15, + 16,16,14,15,15,17,15,12,13,12,14,14,13,14,14,15, + 15,13,14,13,15,14,15,15,15,16,16,14,15,15,17,15, + 14,14,14,16,15,14,15,15,16,16,14,15,15,16,15,16, + 16,16,16,17,16,17,16,18,17,14,14,14,16,15,15,15, + 15,16,16,14,15,14,16,15,16,16,17,17,17,15,16,15, + 17,16, 6, 8, 8,11,11, 8, 9,10,12,12, 8,10, 9,12, + 11,10,11,12,13,13,10,11,11,13,13, 8, 9,10,11,12, + 9,10,11,12,13,10,11,11,12,12,11,12,12,13,14,11, + 12,12,14,14, 8, 9, 9,12,11, 9,10,10,12,12, 9,10, + 10,12,12,11,12,12,14,14,11,12,11,14,13,11,11,12, + 13,13,11,12,12,13,14,12,12,12,14,14,13,13,14,14, + 15,13,14,14,15,15,10,11,11,13,13,11,12,12,14,14, + 11,12,12,14,13,13,14,14,15,15,13,14,13,15,13, 7, + 9, 9,11,12, 9,10,11,12,13, 9,10,10,12,12,11,12, + 13,13,14,11,12,12,14,14, 9,10,10,12,12,10,10,11, + 12,13,11,12,11,13,13,12,12,13,13,15,12,13,13,15, + 14, 9,10,10,12,12,10,11,12,13,13,10,11,10,13,12, + 12,13,13,14,15,12,13,12,14,13,12,12,12,14,14,12, + 12,13,13,14,13,13,13,15,14,14,13,14,13,16,14,15, + 15,16,16,11,12,12,13,14,12,13,13,14,15,12,13,12, + 14,13,14,14,15,15,16,13,14,13,15,13, 8, 9, 9,11, + 11, 9,10,10,12,12, 9,10,10,12,12,11,12,12,14,14, + 11,12,11,14,13, 9,10,10,12,12,10,11,11,13,13,10, + 11,11,13,13,12,12,13,14,15,12,13,13,15,14, 9,10, + 9,12,11,10,11,10,13,12,10,11,10,13,12,12,13,12, + 14,14,12,13,12,15,13,11,12,12,13,14,12,13,13,14, + 14,12,13,13,14,14,14,14,14,14,16,14,14,14,16,15, + 11,12,11,14,12,12,13,12,15,13,12,13,12,15,13,14, + 14,14,16,15,13,14,13,16,14,10,11,12,13,14,12,12, + 13,13,15,12,13,13,14,14,14,14,15,15,16,14,14,14, + 15,16,12,12,13,14,14,12,13,14,14,15,13,14,14,15, + 15,14,15,15,15,17,15,15,15,16,16,12,12,13,13,14, + 13,13,14,14,15,12,13,13,14,15,15,15,15,15,17,14, + 15,15,15,15,14,14,14,16,16,14,15,15,15,16,15,15, + 15,16,16,16,15,16,16,18,16,16,17,17,17,14,14,14, + 15,16,15,15,15,16,17,14,15,14,16,16,16,16,17,17, + 18,16,16,15,17,16,10,12,11,14,13,12,12,12,14,14, + 11,13,12,14,13,13,14,14,15,15,13,14,13,16,15,12, + 12,13,14,14,12,13,13,15,15,13,13,13,15,15,14,15, + 15,16,16,14,15,15,17,16,12,13,12,14,12,13,13,13, + 15,13,12,13,12,15,13,14,15,15,16,15,14,15,14,16, + 14,14,14,14,16,16,14,15,15,16,16,14,15,15,16,16, + 15,16,16,16,17,16,17,16,18,17,13,14,14,16,13,14, + 15,15,16,14,14,15,14,16,14,16,16,16,17,16,15,16, + 15,18,15, 9,11,11,13,13,11,12,12,14,14,11,12,12, + 14,14,13,14,14,15,15,13,14,14,15,15,11,12,12,14, + 14,11,12,13,14,15,12,13,13,15,14,13,14,14,15,16, + 13,14,14,16,16,11,12,12,14,14,12,13,13,15,15,12, + 13,13,15,14,14,14,14,16,16,14,15,14,16,15,12,13, + 13,14,15,12,13,14,15,16,13,14,14,16,16,14,14,15, + 16,17,15,15,15,17,17,13,14,14,15,15,14,15,14,16, + 16,14,15,14,16,15,15,16,16,17,17,15,16,15,17,16, + 10,12,12,13,14,11,12,13,14,14,12,13,12,14,14,13, + 14,14,15,16,13,14,14,16,15,11,12,12,14,14,12,12, + 13,14,15,12,13,13,15,15,13,13,15,15,17,14,14,15, + 16,16,12,13,12,14,14,12,13,13,15,15,12,13,13,15, + 14,14,15,15,16,16,14,15,14,16,16,13,12,14,13,16, + 13,13,15,14,16,14,13,15,15,16,14,14,16,15,17,15, + 15,16,16,17,13,14,14,16,15,14,15,15,16,16,14,15, + 14,16,15,16,16,16,17,17,15,16,16,18,16,10,12,12, + 14,14,12,12,13,14,14,12,13,12,15,14,13,14,14,15, + 16,14,15,14,16,15,11,12,12,14,14,12,13,13,14,15, + 13,14,13,15,15,14,14,15,15,16,14,15,15,17,16,12, + 13,13,14,14,13,13,14,15,15,12,14,13,15,15,14,15, + 15,16,16,14,15,15,17,15,13,14,13,15,15,13,14,14, + 15,16,14,15,14,17,16,15,15,15,15,17,16,16,16,18, + 17,14,14,14,16,16,15,15,15,16,16,14,15,14,16,16, + 16,16,17,17,17,16,16,16,17,16,11,12,13,14,14,12, + 13,13,15,15,12,13,13,15,15,14,15,15,16,16,14,15, + 15,17,16,12,13,13,14,15,13,13,14,14,16,13,14,14, + 15,16,15,14,16,15,17,15,15,16,16,17,12,13,13,15, + 15,13,14,14,16,16,13,14,14,16,15,15,15,16,17,17, + 15,16,15,17,16,14,14,15,13,16,15,14,16,14,17,15, + 15,16,14,17,16,15,17,15,18,16,16,17,16,18,14,15, + 15,17,16,15,16,16,17,17,15,16,15,17,16,16,17,17, + 18,18,16,17,15,18,16,11,12,12,14,14,13,13,14,14, + 15,13,14,13,16,14,15,15,15,16,16,15,16,15,17,16, + 12,13,13,15,14,13,13,14,15,15,14,15,14,16,15,15, + 15,16,15,16,16,16,16,18,16,12,13,13,15,15,14,14, + 15,15,16,13,14,13,16,15,16,16,16,17,17,15,16,15, + 17,15,14,15,14,16,15,14,15,15,16,16,15,16,15,17, + 16,16,15,16,15,17,17,18,17,18,17,15,15,15,16,16, + 16,16,16,17,17,14,15,15,17,16,17,17,18,18,18,16, + 17,15,18,15, 9,11,11,13,13,11,12,12,14,14,11,12, + 12,14,14,13,14,14,15,16,13,14,14,15,15,11,12,12, + 14,14,12,13,13,14,15,12,13,13,14,14,14,14,15,15, + 16,14,14,14,16,16,11,12,12,14,14,12,13,13,14,15, + 11,13,12,14,14,13,14,14,16,16,13,14,14,16,15,13, + 14,14,15,15,14,14,15,15,16,14,15,14,16,16,15,15, + 16,16,17,15,16,16,17,17,12,13,13,15,15,13,14,14, + 16,15,12,14,13,16,15,15,16,15,17,17,14,15,15,17, + 15,10,12,12,14,14,12,12,13,14,15,12,13,12,14,14, + 14,14,15,15,16,13,14,14,16,16,12,13,13,14,14,13, + 13,14,14,15,13,14,13,15,15,14,15,15,15,17,14,15, + 15,16,16,11,12,12,14,14,13,13,14,15,15,12,13,13, + 15,14,14,15,15,16,17,14,15,14,16,15,14,14,14,16, + 16,14,15,15,16,16,15,15,15,16,16,15,16,16,16,18, + 16,17,16,18,17,13,13,14,15,15,14,14,15,16,16,13, + 14,14,16,15,16,16,17,17,17,15,15,15,17,15,10,12, + 12,14,13,12,12,13,14,14,11,13,12,14,14,13,14,14, + 16,16,13,14,14,16,15,12,12,13,14,14,12,13,13,14, + 15,13,13,13,15,15,14,14,15,16,16,14,15,15,16,16, + 11,12,12,14,14,12,13,13,15,15,12,13,12,15,14,14, + 15,14,16,16,13,15,13,16,15,13,14,14,15,16,14,15, + 15,15,17,14,15,15,16,16,16,15,16,16,17,16,16,16, + 17,17,13,14,12,16,13,14,15,13,16,15,13,15,13,16, + 14,15,16,15,17,16,15,16,14,17,15,11,12,12,14,15, + 13,13,14,14,16,13,14,13,15,14,15,15,16,16,17,15, + 15,15,16,16,12,13,13,15,15,13,13,14,15,16,14,15, + 14,16,15,15,15,16,15,17,16,16,16,17,17,12,13,13, + 14,15,14,14,15,15,16,13,14,13,15,15,16,16,16,17, + 17,15,16,15,16,15,15,15,15,16,16,14,15,15,16,17, + 16,16,16,17,17,16,15,17,15,18,17,18,17,18,18,14, + 14,15,15,17,15,15,16,16,17,14,15,15,16,16,17,17, + 17,17,18,16,16,15,17,15,11,12,12,14,14,12,13,13, + 15,15,12,13,13,15,15,14,15,15,16,16,14,15,14,17, + 16,13,13,13,15,15,13,14,14,15,16,13,14,14,16,16, + 15,15,16,16,17,15,16,16,17,17,12,13,13,15,14,13, + 14,14,16,15,13,14,13,16,14,15,16,16,17,16,15,16, + 14,17,15,14,15,15,16,17,15,15,16,16,17,15,16,16, + 17,17,16,15,17,16,18,16,17,17,18,18,14,15,14,16, + 13,15,16,15,17,14,15,16,14,17,14,16,17,16,18,16, + 16,17,15,18,15, +}; + +static const static_codebook _44p9_p5_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p9_p5_0, + 1, -528744448, 1616642048, 3, 0, + (long *)_vq_quantlist__44p9_p5_0, + 0 +}; + +static const long _vq_quantlist__44p9_p5_1[] = { + 3, + 2, + 4, + 1, + 5, + 0, + 6, +}; + +static const char _vq_lengthlist__44p9_p5_1[] = { + 2, 3, 3, 3, 3, 3, 3, +}; + +static const static_codebook _44p9_p5_1 = { + 1, 7, + (char *)_vq_lengthlist__44p9_p5_1, + 1, -533200896, 1611661312, 3, 0, + (long *)_vq_quantlist__44p9_p5_1, + 0 +}; + +static const long _vq_quantlist__44p9_p6_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p9_p6_0[] = { + 2, 5, 5, 5, 7, 7, 5, 7, 7, 5, 7, 7, 7, 8, 9, 7, + 9, 9, 5, 7, 7, 7, 9, 9, 7, 9, 8, 5, 7, 8, 8, 9, + 10, 8, 9,10, 8, 9,10,10,10,12,10,11,11, 8,10,10, + 10,11,12,10,11,10, 5, 8, 7, 8,10,10, 8,10, 9, 8, + 10,10,10,10,11,10,12,11, 8,10, 9,10,11,11,10,12, + 10, 5, 8, 8, 7, 9,10, 8,10, 9, 7, 9,10, 9,10,11, + 9,11,11, 8,10, 9,10,11,11, 9,11,10, 7, 9, 9, 9, + 10,11, 9,11,11, 9, 9,11,10,10,13,11,12,12, 9,11, + 11,11,12,13,11,13,11, 7, 9, 9, 9,10,11, 9,11,10, + 9,11,10,10,10,12,11,13,12, 9,11,11,11,12,12,10, + 12,10, 5, 8, 8, 8, 9,10, 7,10, 9, 8, 9,10, 9,10, + 11,10,11,11, 7,10, 9, 9,11,11, 9,11,10, 7, 9, 9, + 9,10,11, 9,11,10, 9,11,11,10,10,12,11,12,12, 9, + 10,11,11,12,13,10,12,10, 7, 9, 9, 9,11,11, 9,11, + 10, 9,11,11,11,11,13,11,13,12, 9,11, 9,11,12,12, + 10,13,10, +}; + +static const static_codebook _44p9_p6_0 = { + 5, 243, + (char *)_vq_lengthlist__44p9_p6_0, + 1, -527106048, 1620377600, 2, 0, + (long *)_vq_quantlist__44p9_p6_0, + 0 +}; + +static const long _vq_quantlist__44p9_p6_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44p9_p6_1[] = { + 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 7, 8, 8, 7, + 8, 8, 7, 8, 7, 7, 8, 8, 7, 8, 8, 7, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, 9, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, + 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, 9, 8, 8, + 8, 8, 9, 9, 8, 9, 9, 7, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 9, 8, 8, 8, 8, 8, 9, 9, 8, + 9, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 9, 9, 8, + 8, 8, 8, 8, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 9, 9, 8, 9, 9, 8, 8, 8, 8, 9, 8, + 8, 9, 8, +}; + +static const static_codebook _44p9_p6_1 = { + 5, 243, + (char *)_vq_lengthlist__44p9_p6_1, + 1, -530841600, 1616642048, 2, 0, + (long *)_vq_quantlist__44p9_p6_1, + 0 +}; + +static const long _vq_quantlist__44p9_p7_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p9_p7_0[] = { + 1,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13, +}; + +static const static_codebook _44p9_p7_0 = { + 5, 3125, + (char *)_vq_lengthlist__44p9_p7_0, + 1, -510105088, 1635281408, 3, 0, + (long *)_vq_quantlist__44p9_p7_0, + 0 +}; + +static const long _vq_quantlist__44p9_p7_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44p9_p7_1[] = { + 1, 4, 4,16,16, 4, 9,11,15,16, 4,12, 8,16,16,12, + 16,16,16,16,13,16,16,16,16, 5, 8,10,16,16, 9, 9, + 14,15,16,12,14,14,16,16,16,16,16,16,16,16,16,16, + 16,16, 5,11, 8,16,15,12,14,16,16,16, 9,15, 9,16, + 16,16,16,16,16,16,16,16,16,16,16,15,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16, 6,11,11, + 16,16,12,13,16,16,16,12,16,14,16,16,16,16,16,16, + 16,16,16,16,16,16,11,15,15,16,16,14,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,12, + 15,16,16,16,16,16,16,16,16,14,16,15,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16, 5,11,11,16,16,12, + 15,16,16,16,12,16,14,16,16,16,16,16,16,16,16,16, + 16,16,16,12,15,15,16,16,14,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,11,15,15,16, + 16,16,16,16,16,16,15,16,14,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16, 6,11,12,16,16,11,15,16,16,16,13,16,14,16,16, + 16,16,16,16,16,16,16,16,16,16,11,16,14,16,16,14, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,12,14,14,16,16,16,16,16,16,16,15,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,15,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16, 8,13, + 15,16,16,15,15,16,16,16,14,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,14,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 15,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16, 7,12,12,16,16, + 13,12,16,16,16,14,16,14,16,16,16,16,16,16,16,16, + 16,16,16,16,13,16,16,16,16,14,14,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,12,14,16, + 16,16,16,16,16,16,16,14,16,14,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16, 6,11,11,16,16,13,15,16,16,16,11,15,14,16, + 16,16,16,16,16,16,14,16,16,16,16,11,16,16,16,16, + 16,16,16,16,16,15,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,11,16,14,16,16,14,16,16,16,16,13,15, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, 7, + 11,11,16,16,13,13,16,16,16,13,16,13,16,16,16,16, + 16,16,16,16,16,16,16,16,12,16,15,16,16,14,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,12,14,16,16,16,16,16,16,16,16,14,16,13,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16, 8,13,14,16, + 16,15,16,16,16,16,14,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,15,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,15,16, + 15,16,16,16,16,16,16,16,16,16,15,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,15,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,15,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16, +}; + +static const static_codebook _44p9_p7_1 = { + 5, 3125, + (char *)_vq_lengthlist__44p9_p7_1, + 1, -514619392, 1630767104, 3, 0, + (long *)_vq_quantlist__44p9_p7_1, + 0 +}; + +static const long _vq_quantlist__44p9_p7_2[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p9_p7_2[] = { + 1, 3, 2, 5, 4, 7, 7, 8, 8, 9,10,10,10,11,11,11, + 12,12,12,13,13,13,13,13,13, +}; + +static const static_codebook _44p9_p7_2 = { + 1, 25, + (char *)_vq_lengthlist__44p9_p7_2, + 1, -518864896, 1620639744, 5, 0, + (long *)_vq_quantlist__44p9_p7_2, + 0 +}; + +static const long _vq_quantlist__44p9_p7_3[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44p9_p7_3[] = { + 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44p9_p7_3 = { + 1, 25, + (char *)_vq_lengthlist__44p9_p7_3, + 1, -529006592, 1611661312, 5, 0, + (long *)_vq_quantlist__44p9_p7_3, + 0 +}; + +static const char _huff_lengthlist__44p9_short[] = { + 3, 3, 3, 3, 3, 3, 3, 3, +}; + +static const static_codebook _huff_book__44p9_short = { + 1, 8, + (char *)_huff_lengthlist__44p9_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44pn1_l0_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44pn1_l0_0[] = { + 1, 3, 3, 8, 8,10,10,10,10,10,10,10,10, 5, 7, 5, + 9, 8,10,10,10,10,11,10,11,10, 5, 5, 7, 8, 9,10, + 10,11,10,10,11,10,11,10,10,10,11,11,11,11,11,11, + 11,10,11,11,10,10,10,10,11,11,11,11,11,10,11,11, + 11,11,11,11,11,11,12,11,10,11,11,11,11,11,11,11, + 11,11,11,11,11,10,10,11,11,12,11,11,11,11,11,11, + 12,11,11,11,10,11,11,11,11,11,11,11,11,10,11,11, + 10,11,10,11,11,11,11,11,11,11,11,11,11,12,11,11, + 12,12,11,11,11,11,11,11,11,11,11,11,11,11,12,11, + 10,11,11,11,11,11,11,11,12,11,13,11,11,11,11,11, + 11,11,11,11,11,11,12,11,13, +}; + +static const static_codebook _44pn1_l0_0 = { + 2, 169, + (char *)_vq_lengthlist__44pn1_l0_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44pn1_l0_0, + 0 +}; + +static const long _vq_quantlist__44pn1_l0_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44pn1_l0_1[] = { + 1, 4, 4, 7, 7, 4, 5, 6, 7, 7, 4, 6, 5, 7, 7, 7, + 6, 7, 6, 7, 7, 7, 6, 7, 6, +}; + +static const static_codebook _44pn1_l0_1 = { + 2, 25, + (char *)_vq_lengthlist__44pn1_l0_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44pn1_l0_1, + 0 +}; + +static const long _vq_quantlist__44pn1_l1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44pn1_l1_0[] = { + 1, 4, 4, 4, 4, 4, 4, 4, 4, +}; + +static const static_codebook _44pn1_l1_0 = { + 2, 9, + (char *)_vq_lengthlist__44pn1_l1_0, + 1, -516716544, 1630767104, 2, 0, + (long *)_vq_quantlist__44pn1_l1_0, + 0 +}; + +static const char _huff_lengthlist__44pn1_lfe[] = { + 1, 3, 2, 3, +}; + +static const static_codebook _huff_book__44pn1_lfe = { + 2, 4, + (char *)_huff_lengthlist__44pn1_lfe, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44pn1_long[] = { + 2, 3, 6, 7, 9,13,17, 3, 2, 5, 7, 9,13,17, 6, 5, + 5, 6, 9,12,16, 7, 7, 6, 6, 7,10,13,10,10, 9, 7, + 6,10,13,13,13,12,10,10,11,15,17,17,17,14,14,15, + 17, +}; + +static const static_codebook _huff_book__44pn1_long = { + 2, 49, + (char *)_huff_lengthlist__44pn1_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44pn1_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44pn1_p1_0[] = { + 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, +}; + +static const static_codebook _44pn1_p1_0 = { + 5, 243, + (char *)_vq_lengthlist__44pn1_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44pn1_p1_0, + 0 +}; + +static const long _vq_quantlist__44pn1_p2_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44pn1_p2_0[] = { + 1, 5, 5, 0, 7, 7, 0, 8, 8, 0, 9, 9, 0,12,12, 0, + 8, 8, 0, 9, 9, 0,13,13, 0, 8, 8, 0, 6, 6, 0,11, + 11, 0,12,12, 0,12,12, 0,14,14, 0,11,12, 0,12,12, + 0,15,15, 0,12,12, 0, 5, 5, 0, 5, 5, 0, 6, 6, 0, + 7, 7, 0,10,10, 0, 6, 6, 0, 7, 7, 0,11,11, 0, 6, + 6, 0, 7, 7, 0,11,11, 0,12,11, 0,11,11, 0,14,14, + 0,10,10, 0,12,12, 0,15,15, 0,12,12, 0, 6, 6, 0, + 12,12, 0,12,12, 0,12,12, 0,14,14, 0,11,11, 0,12, + 12, 0,16,16, 0,12,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 8, 0,12,12, 0,12,12, 0,12,12, 0,15, + 15, 0,12,12, 0,11,11, 0,16,16, 0,11,11, 0, 6, 6, + 0,12,12, 0,12,12, 0,13,13, 0,15,15, 0,12,12, 0, + 13,13, 0,15,15, 0,12,12, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, +}; + +static const static_codebook _44pn1_p2_0 = { + 5, 243, + (char *)_vq_lengthlist__44pn1_p2_0, + 1, -533200896, 1614282752, 2, 0, + (long *)_vq_quantlist__44pn1_p2_0, + 0 +}; + +static const long _vq_quantlist__44pn1_p2_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44pn1_p2_1[] = { + 1, 3, 3, 0, 9, 9, 0, 9, 9, 0,10,10, 0, 9, 9, 0, + 10,10, 0,10,10, 0,10,10, 0,10,10, 0, 7, 7, 0, 7, + 7, 0, 6, 6, 0, 8, 8, 0, 7, 7, 0, 8, 8, 0, 8, 8, + 0, 7, 7, 0, 8, 8, 0, 7, 7, 0, 9, 9, 0, 8, 9, 0, + 10,10, 0, 9, 9, 0,10,10, 0,10,11, 0, 9, 9, 0,10, + 10, 0, 9, 9, 0,11,11, 0,12,12, 0,12,12, 0,11,11, + 0,12,12, 0,13,13, 0,12,12, 0,13,13, 0, 8, 8, 0, + 12,12, 0,12,12, 0,13,13, 0,13,13, 0,13,13, 0,13, + 13, 0,13,13, 0,13,13, 0, 7, 7, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 9, 9, 0,11,11, 0,12,12, 0,13,13, 0,12, + 12, 0,13,13, 0,13,13, 0,12,12, 0,12,12, 0, 9, 9, + 0,12,12, 0,13,13, 0,14,14, 0,13,13, 0,14,14, 0, + 14,14, 0,13,13, 0,14,14, 0, 7, 7, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, +}; + +static const static_codebook _44pn1_p2_1 = { + 5, 243, + (char *)_vq_lengthlist__44pn1_p2_1, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44pn1_p2_1, + 0 +}; + +static const long _vq_quantlist__44pn1_p3_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44pn1_p3_0[] = { + 1, 6, 6, 6, 8, 8, 6, 8, 8, 7, 9, 9,10,11,11, 8, + 8, 8, 7, 9, 9,11,12,12, 9, 9, 9, 6, 7, 7,10,11, + 11,10,11,11,10,11,11,13,13,13,12,12,12,10,12,11, + 14,14,14,12,12,12, 6, 5, 5, 9, 6, 6, 9, 6, 6, 9, + 7, 7,12,10,10,11, 7, 6, 9, 7, 7,13,11,11,12, 7, + 7, 7, 8, 8,12,10,10,12,10,10,11,10,10,15,13,13, + 13, 9, 9,12,11,11,15,14,14,15,11,11, 8, 7, 7,12, + 11,11,12,11,11,11,11,11,14,13,14,14,12,12,12,11, + 11,16,15,15,14,12,12, 0,10,10, 0,12,12, 0,12,12, + 0,11,11, 0,14,14, 0,11,11, 0,11,11, 0,15,15, 0, + 11,11, 7, 8, 8,13,11,11,12,10,10,12,11,11,15,13, + 13,14,11,11,12,10,10,16,14,14,15,10,10, 9, 7, 7, + 13,11,12,13,12,11,12,11,11,15,14,14,14,12,12,13, + 12,12,16,15,15,15,12,12, 0,11,11, 0,12,12, 0,12, + 13, 0,12,12, 0,15,15, 0,12,12, 0,12,12, 0,16,15, + 0,12,12, +}; + +static const static_codebook _44pn1_p3_0 = { + 5, 243, + (char *)_vq_lengthlist__44pn1_p3_0, + 1, -531365888, 1616117760, 2, 0, + (long *)_vq_quantlist__44pn1_p3_0, + 0 +}; + +static const long _vq_quantlist__44pn1_p3_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44pn1_p3_1[] = { + 2, 3, 4, 9, 9,10,12,12,12,11,10,12,12,13,12,11, + 13,12,11,11,11,12,12,12,11,11,13,13,13,13,11,12, + 12,14,14,12,13,13,13,13,11,13,13,13,13,11,13,13, + 13,13,11,13,13,13,13,11,12,12,14,14,12,13,13,12, + 12,11,13,13,13,13,11,13,13,12,12,11,13,13,13,13, + 12,12,13,14,14,12,13,13,12,12,11,13,13,13,13,11, + 13,13,12,12,11,13,13,13,13,12,13,13,14,14,12,13, + 13,12,12,11,13,13,13,13,11,13,13,12,12,11,10,10, + 10,10,12,10,10,11,11,12, 9, 9,11,11,13,11,11,10, + 10,13,10,10,10,10,13,11,11,12,12,13,10,10,12,12, + 14,12,11,12,12,13,11,11,11,12,13,12,12,12,12,13, + 11,11,12,12,13,10,10,12,12,14,11,11,12,12,13,11, + 11,12,12,13,11,11,12,12,14,12,12,12,12,14,10,10, + 11,11,14,12,11,11,11,13,11,11,11,11,13,12,12,11, + 11,14,12,12,12,11,14,10,10,11,11,14,12,11,11,11, + 13,11,11,11,11,13,12,12,11,11,11,11,11,10,10,12, + 10,11, 9, 9,12,12,12,11,11,13,12,12, 9, 9,13,13, + 13,10,10,13,13,13,12,12,13,13,13,14,14,13,12,12, + 11,11,14,13,13,12,12,14,13,13,11,11,13,13,13,12, + 11,13,13,13,14,14,13,12,12,10,10,14,13,13,11,11, + 13,13,13,10,10,13,13,13,11,11,14,13,13,14,14,14, + 12,12,10,10,13,13,13,11,11,13,13,13,10,10,13,13, + 13,11,11,14,13,13,14,14,14,13,13,10,10,13,13,13, + 11,11,13,13,13,10,10,14,12,12, 8, 8,14,12,12, 9, + 9,14,11,11, 9, 9,14,12,12, 8, 8,14,12,12, 7, 7, + 15,13,13,10,10,15,12,12,10,10,15,13,13,10,10,15, + 12,13, 9, 9,15,13,13,10,10,15,13,13,10,10,15,12, + 12,10,10,15,13,13,10,10,15,13,13, 9, 9,15,13,13, + 10,10,15,13,13,10,10,15,12,12,10,10,15,13,13, 9, + 9,14,13,12, 9, 9,14,13,13, 9, 9,15,13,13,10,10, + 15,12,12,10,10,15,13,13, 9, 9,15,13,13, 9, 9,14, + 13,13, 9, 9,14,12,12, 8, 8,13,13,13, 8, 8,14,14, + 13, 9, 9,14,14,13, 7, 7,14,14,14, 8, 8,14,14,14, + 10,10,15,14,14,12,12,14,14,14, 9, 9,15,14,14,10, + 10,14,14,14, 9, 9,14,14,14,10, 9,15,14,14,12,12, + 14,14,14, 9, 9,15,14,14,10,10,14,14,14, 9, 9,15, + 14,15, 9, 9,15,14,14,11,11,14,14,14, 8, 8,14,14, + 14, 9, 9,14,14,14, 8, 8,14,15,14,10,10,15,14,14, + 11,11,14,14,14, 8, 8,15,14,14, 9, 9,14,14,14, 8, + 8,12,12,12,13,13,16,16,15,12,12,17,16,16,13,13, + 17,16,16,11,11,17,16,16,12,12,17,16,17,13,13,17, + 16,16,14,14,17,17,16,12,12,18,16,16,13,13,17,16, + 17,12,12,17,17,17,13,13,18,16,16,14,14,18,17,17, + 12,12,17,17,17,13,13,18,17,17,13,13,17,17,17,13, + 13,17,16,16,14,14,17,17,17,12,12,16,16,17,13,13, + 17,17,16,12,12,18,17,17,13,13,18,16,16,14,14,18, + 17,17,12,12,19,16,17,13,13,17,16,17,12,12,13,14, + 14,10,10,16,14,14,13,13,17,15,15,14,14,17,14,14, + 13,13,16,14,14,13,13,17,16,15,14,14,16,16,16,15, + 15,17,15,15,14,14,17,15,15,14,14,17,15,15,14,14, + 17,16,15,14,14,16,16,16,15,15,18,15,15,13,13,16, + 16,15,14,14,17,15,15,14,13,17,15,15,14,14,16,16, + 16,15,15,18,15,14,13,13,17,15,15,14,14,18,14,15, + 13,13,18,15,15,14,14,16,16,16,15,15,17,15,15,13, + 13,17,15,15,14,14,17,15,15,13,13,13,11,11,10,10, + 16,14,14,13,13,17,14,15,14,14,17,15,15,12,12,17, + 14,14,12,12,16,15,15,14,14,16,14,14,14,14,16,15, + 15,14,14,16,15,15,14,14,16,15,15,14,14,16,15,15, + 14,14,16,15,14,15,15,17,15,15,14,14,17,15,15,14, + 14,17,15,15,14,14,17,15,16,14,14,16,14,14,14,14, + 17,15,15,13,13,17,15,15,13,13,16,15,15,13,13,17, + 16,16,14,14,17,15,14,15,14,17,15,15,13,13,17,15, + 15,13,13,17,15,15,13,13,14,14,14, 9, 9,14,14,14, + 18,19,14,15,15,19,18,14,14,14,19,19,15,14,14,19, + 19,15,16,16,19,19,15,16,16,19,19,15,15,15,19,19, + 15,16,16,19,20,15,15,15,19,19,15,15,15,19,19,15, + 16,16,20,20,15,15,15,18,19,15,15,16,19,20,15,15, + 15,19,18,15,15,15,18,18,15,16,16,21,20,15,15,15, + 19,19,15,15,15,19,19,15,15,14,19,20,15,15,15,20, + 19,15,16,16,19,20,15,15,15,19,19,15,15,15,20,21, + 15,14,15,19,19,14,12,12, 9, 9,14,14,15,21,19,14, + 14,14,18,19,14,15,15,19,20,14,14,14,19,19,15,15, + 15,19,20,15,15,14,21,19,15,15,15,20,19,15,14,15, + 20,21,15,15,15,18,18,15,15,15,20,21,16,14,14,18, + 19,15,15,15,20,19,15,15,15,18,21,15,15,15,19,19, + 15,15,15,19,20,16,15,14,20,19,15,16,15,19,19,15, + 15,15,19, 0,14,15,15,19,19,15,15,15,19,19,15,15, + 14,20,19,15,15,15,20,19,15,15,15,19,19,15,15,15, + 20,19,12,12,12,13,13,16,15,16,11,11,16,16,16,12, + 12,17,16,16,11,11,17,16,16,12,11,17,17,17,13,13, + 18,16,16,14,14,18,18,17,13,13,17,16,16,13,13,17, + 17,17,13,13,17,16,17,12,12,17,15,16,13,13,17,16, + 17,12,12,17,16,16,13,12,17,16,16,12,12,18,17,17, + 13,13,18,16,16,13,14,18,17,17,12,12,17,16,16,12, + 12,17,17,17,12,12,18,17,17,13,13,17,16,16,14,14, + 17,17,17,12,12,17,16,16,12,12,18,17,17,12,12,13, + 14,14, 9, 9,16,14,14,13,13,16,15,15,14,14,16,14, + 14,13,13,16,14,14,13,13,17,16,15,15,15,16,15,16, + 16,15,17,15,15,14,14,17,15,15,15,15,17,15,15,14, + 14,17,15,15,14,14,16,15,16,16,16,17,15,15,14,14, + 16,15,15,14,15,16,15,15,14,14,17,15,15,15,15,16, + 16,16,15,16,18,15,14,13,14,17,15,15,14,14,17,14, + 14,13,13,17,15,15,14,14,16,15,15,15,15,17,15,14, + 14,14,17,15,15,14,14,17,14,14,13,13,13,11,11,11, + 11,16,14,14,12,12,16,14,14,13,13,16,14,14,12,12, + 16,14,14,12,12,16,15,15,13,13,17,14,14,14,14,17, + 15,15,13,13,16,15,15,14,13,16,15,15,13,13,16,15, + 15,13,13,16,14,14,14,14,16,15,15,13,13,16,14,15, + 13,13,17,15,15,13,13,17,15,15,13,13,16,14,14,14, + 14,17,15,15,12,12,17,14,15,13,13,17,15,15,12,12, + 16,15,15,13,13,17,14,14,14,14,17,15,15,12,12,17, + 15,15,13,13,16,15,15,12,12,14,15,15, 8, 8,14,14, + 14,19,18,14,15,15,19,20,14,14,14,19,19,14,14,15, + 19,20,15,16,15,19,21,15,16,16,21,19,15,15,15,20, + 19,15,16,16,19,20,15,15,15,19,18,15,16,15,20,19, + 15,16,16,19,20,15,15,15,19,19,15,16,15,20,20,14, + 15,15,19,19,15,15,15,21,19,15,17,16,19,20,15,14, + 15, 0,21,15,15,15,19,20,14,14,14,19,19,15,15,15, + 20,19,15,16,16,19,19,15,15,15,19,18,15,15,15,20, + 19,14,14,15,18,18,14,12,12, 9, 9,14,14,14,18,18, + 14,14,14,18,18,14,15,14,19,18,14,14,14,19,18,15, + 15,15,19,20,15,14,14,18,18,15,15,15,20,19,15,15, + 15,18,20,15,15,15,19,18,15,15,15,19,19,15,14,14, + 19,21,15,15,15,20,20,15,15,15,18,19,14,15,15,19, + 20,15,15,15,20,19,15,14,14,19,21,15,15,15,18,19, + 15,14,15,20,19,14,15,15,21,21,14,15,15,19,20,15, + 14,14,19,20,15,15,15,19,20,15,15,14,20,20,14,15, + 15,20,19,13,12,12,13,13,17,16,16,11,11,17,16,16, + 12,12,18,17,16,11,11,18,16,16,11,11,17,17,17,13, + 13,18,16,16,13,13,18,17,17,12,12,18,16,16,13,13, + 18,17,17,12,12,18,17,17,13,13,18,16,16,14,14,18, + 16,17,12,12,18,17,17,13,13,17,17,17,12,12,17,17, + 17,12,12,17,16,15,13,13,18,16,16,11,11,17,16,16, + 12,12,17,16,17,11,11,18,17,17,13,12,17,16,16,13, + 13,17,17,17,12,12,17,16,17,12,12,18,17,17,11,11, + 14,14,14, 9, 9,16,14,14,13,13,17,15,15,14,14,17, + 14,14,13,13,16,14,14,13,13,17,15,15,14,14,16,16, + 16,16,15,18,15,15,14,14,17,16,15,15,15,17,15,15, + 14,14,17,15,15,14,15,16,16,16,15,16,18,15,15,14, + 14,17,15,15,14,15,17,15,15,14,14,17,15,15,14,14, + 16,16,16,15,16,17,14,14,13,13,17,15,15,14,14,18, + 15,15,13,13,17,15,15,14,14,16,16,16,15,15,17,14, + 14,13,13,17,15,15,14,14,17,14,14,13,13,13,11,11, + 11,11,16,14,14,12,12,16,14,14,12,13,17,15,14,11, + 11,17,14,14,11,11,17,15,15,13,14,17,14,14,14,14, + 17,15,15,13,13,17,14,14,13,13,17,15,15,13,13,17, + 15,15,13,13,17,14,14,14,14,17,15,15,13,13,18,14, + 15,13,13,17,15,15,13,13,16,15,15,13,13,17,14,14, + 13,13,17,15,15,12,12,16,14,14,12,12,16,15,15,12, + 12,17,16,15,13,13,17,14,14,13,13,17,15,15,12,12, + 16,15,15,12,12,16,15,15,12,12,13,15,15, 8, 8,14, + 14,14,18,19,14,15,15,19,20,14,14,14,18,18,14,15, + 15,18,18,15,16,16,19,19,15,16,17,20,20,15,15,15, + 19,19,15,16,16,18,20,15,15,15,19,19,15,15,16,18, + 18,15,17,16,19,19,15,15,15,18,21,15,16,16,21,20, + 15,15,15,19,21,15,16,15,20,19,15,16,17,20,20,15, + 15,15,19,19,15,16,16,21,20,15,15,15,19,20,15,15, + 15,19,19,15,16,16,20,19,15,15,15,19,19,15,16,15, + 20,21,15,15,15,21,19,14,12,12, 8, 8,14,14,14,20, + 18,14,13,13,19,19,14,14,14,19,18,15,14,14,19,20, + 14,15,15,20,20,15,14,14,21,20,15,15,15,20,20,15, + 15,14,21,19,15,15,15,19,19,15,15,15,19,20,15,14, + 14,20,20,15,15,15,19,20,15,14,14,19,20,15,15,15, + 20,20,15,15,15,20,19,15,14,14,20,21,15,15,15,20, + 21,15,14,14,20, 0,15,16,15,20,21,15,15,15,19,20, + 15,14,14,19,19,15,15,15,19,20,15,15,15,19,19,15, + 15,15,18,20,13,12,12,13,13,18,16,17,12,12,17,16, + 16,12,12,17,17,16,11,11,18,16,16,11,11,17,17,18, + 13,13,18,16,16,14,14,18,17,17,13,13,18,16,16,13, + 13,18,17,17,12,12,17,17,16,13,13,17,16,16,13,14, + 18,17,17,12,12,18,16,16,12,13,17,16,17,12,12,17, + 18,17,13,13,18,16,16,13,13,18,17,17,12,12,17,16, + 16,12,12,17,17,17,11,11,17,16,17,12,12,17,16,16, + 13,13,17,16,16,11,11,17,16,16,12,12,18,16,17,11, + 11,14,14,14, 9, 9,16,14,15,13,13,17,15,15,14,14, + 17,14,14,12,12,16,14,14,13,13,18,15,15,15,15,17, + 15,16,15,16,18,15,15,14,14,17,15,16,15,15,17,15, + 15,14,14,18,15,15,14,14,16,16,16,16,15,17,15,15, + 14,14,16,15,15,14,14,17,15,15,14,14,17,15,15,14, + 14,17,16,16,15,15,17,15,14,13,13,17,15,15,14,14, + 17,15,15,13,13,17,15,15,14,14,16,16,16,15,15,18, + 15,14,14,14,17,15,15,14,14,18,15,15,13,13,13,12, + 12,11,11,16,14,14,12,12,16,14,14,13,13,17,15,15, + 12,12,17,14,14,12,12,17,15,15,14,14,17,14,14,14, + 14,17,15,15,13,13,17,15,14,13,13,17,15,15,13,13, + 17,15,15,13,13,16,14,14,14,14,17,15,15,13,13,16, + 14,14,13,13,16,15,15,13,13,17,15,16,13,13,17,14, + 14,14,13,17,15,15,12,12,16,15,14,12,12,17,15,15, + 12,12,16,15,16,13,13,16,14,14,14,13,17,15,15,12, + 12,16,14,14,12,12,17,15,15,12,12,14,15,15, 8, 8, + 14,14,14,18,18,14,15,15,19,18,14,14,14,18,18,14, + 15,15,19,20,15,16,15,21,18,15,16,16,18, 0,15,15, + 15,19,20,15,16,16,20, 0,15,16,15,19,18,15,15,15, + 19,19,15,16,16,21,19,15,15,15,19,19,15,16,16,20, + 20,15,15,15,19,19,15,15,15,19,18,15,16,16,20,20, + 15,14,15,20,19,15,15,15,19,20,15,15,15,19,19,15, + 16,15,19,20,15,16,16,19,20,15,15,15,19,19,15,16, + 15,20,20,15,15,15,20,18,13,12,12, 8, 8,14,14,14, + 19,20,14,14,14,19,19,14,15,15,20,20,14,14,14,18, + 19,15,15,15,20, 0,15,14,14,18,20,15,15,15,19,19, + 15,15,15,21,19,15,15,15,19,20,15,15,15,20,21,15, + 14,14,20,19,15,15,15,20,19,15,15,14,21,19,15,15, + 15,19,18,15,15,15,20,19,15,14,14,19,19,15,15,16, + 20,19,15,15,15,20, 0,15,15,15,19,21,15,15,15,22, + 20,15,14,14,22,19,15,15,15,19,20,15,14,14,20,19, + 14,15,15,19,21, +}; + +static const static_codebook _44pn1_p3_1 = { + 5, 3125, + (char *)_vq_lengthlist__44pn1_p3_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44pn1_p3_1, + 0 +}; + +static const long _vq_quantlist__44pn1_p4_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44pn1_p4_0[] = { + 1, 7, 7,14,14, 6, 8, 8,15,16, 7, 8, 8,16,15, 0, + 14,14,17,17, 0,14,14,16,16, 7, 9, 9,16,16,10,11, + 11,17,18, 9, 8, 8,16,16, 0,14,14,19,19, 0,14,14, + 17,16, 8, 9, 9,16,16,12,12,12,17,17,10, 9, 9,16, + 16, 0,15,14,18,20, 0,14,14,17,17, 0,15,15,18,17, + 0,21, 0, 0,21, 0,13,13,17,17, 0,17,17, 0, 0, 0, + 15,15,17,17, 0,15,15,17,18, 0, 0, 0, 0,21, 0,13, + 13,17,17, 0,18,18, 0,21, 0,16,15,17,18, 6, 7, 7, + 14,14, 9,10,10,16,16,11,10,10,15,15, 0,21, 0,20, + 21, 0, 0, 0,18,20,10,10,10,15,16,12,13,13,18,18, + 12,11,11,15,15, 0, 0, 0,20,20, 0, 0,21,19,19,12, + 11,11,15,15,15,14,14,18,18,13,11,11,15,16, 0, 0, + 0,20,19, 0, 0, 0,20,21, 0, 0,20,19,19, 0, 0, 0, + 0, 0, 0,20, 0,17,18, 0, 0,21, 0, 0, 0, 0, 0,21, + 0, 0,21, 0,20,19, 0, 0, 0, 0, 0, 0,21, 0,18,18, + 0, 0, 0,21, 0, 0, 0, 0, 0,20, 7, 6, 6,13,13, 9, + 6, 6,12,12, 9, 7, 7,14,14, 0,10,10,12,12, 0,11, + 11,15,15, 9, 7, 7,14,14,12, 9, 9,14,14,10, 7, 7, + 14,13, 0,11,11,16,15, 0,11,11,14,14, 9, 7, 7,14, + 14,13,10,10,14,14,11, 7, 7,14,13, 0,11,11,16,16, + 0,11,11,14,14, 0,12,12,16,16, 0,19, 0,17,18, 0, + 10,10,14,14, 0,15,14, 0, 0, 0,12,12,14,14, 0,12, + 12,15,15, 0,20, 0,18,19, 0,10,10,14,14, 0,16,15, + 0,20, 0,13,13,14,14, 0,11,11,13,13, 0,12,13,16, + 16, 0,12,12,16,16, 0,16,16, 0,21, 0,17,18, 0, 0, + 0,12,12,16,16, 0,15,15,18, 0, 0,12,12,16,16, 0, + 17,16,21,21, 0,16,17, 0, 0, 0,13,13,17,16, 0,16, + 16,20,21, 0,12,12,17,16, 0,17,17, 0,21, 0,17,17, + 21,21, 0,17,18, 0, 0, 0, 0, 0, 0, 0, 0,15,15, 0, + 0, 0,18,21, 0, 0, 0,18,19, 0, 0, 0,18,17,21,21, + 0, 0, 0, 0, 0, 0,16,16, 0, 0, 0, 0, 0, 0, 0, 0, + 19,19, 0, 0, 0,11,11,12,12, 0,11,11,10,10, 0,12, + 12,13,13, 0,12,12, 9, 9, 0,14,14,13,13, 0,12,12, + 13,13, 0,14,14,12,13, 0,11,11,12,12, 0,13,13,13, + 13, 0,13,13,13,13, 0,12,12,13,13, 0,14,14,12,12, + 0,11,11,12,12, 0,14,13,14,14, 0,13,13,13,13, 0, + 15,15,14,15, 0, 0, 0,16,16, 0,12,12,13,13, 0,16, + 17,20,21, 0,14,13,12,12, 0,14,14,14,14, 0,21, 0, + 16,16, 0,12,12,13,13, 0,18,17,21, 0, 0,14,14,13, + 13, 7, 8, 8,17,17,11,10,10,18,18,12,10,10,17,17, + 0,15,15,20,18, 0,15,15,17,17,11, 9, 9,17,17,14, + 12,12,19,19,13, 9, 9,16,16, 0,15,14, 0,19, 0,14, + 14,16,16,12,10,10,20,18,16,13,13,21,20,14,10,10, + 17,17, 0,15,15,21,20, 0,15,14,17,17, 0,15,15,21, + 21, 0, 0,21, 0, 0, 0,13,13,18,18, 0,19,16, 0, 0, + 0,15,15,17,16, 0,16,16, 0,21, 0, 0, 0, 0,21, 0, + 13,14,18,17, 0,20,19, 0, 0, 0,15,15,18,18, 8, 7, + 7,15,15,12,11,11,17,16,13,11,11,16,16, 0, 0, 0, + 21,20, 0, 0, 0, 0,20,11,10,10,17,17,14,13,13,19, + 18,14,11,11,16,16, 0,20, 0,21,19, 0, 0,21, 0,20, + 12,11,11,17,17,16,15,15, 0,19,14,11,11,17,16, 0, + 21, 0, 0,19, 0, 0, 0,21,20, 0, 0,21,20, 0, 0, 0, + 0, 0, 0, 0, 0, 0,19,21, 0, 0, 0, 0, 0, 0, 0, 0, + 19,20, 0, 0, 0,20,21, 0, 0, 0, 0, 0, 0,20, 0,19, + 21, 0, 0, 0, 0, 0, 0, 0, 0,21,20,11,10, 9,15,15, + 14,11,11,15,15,14,11,11,16,16, 0,14,14,14,14, 0, + 16,15,17,16,13,11,11,16,16,16,13,13,16,16,15,10, + 10,15,15, 0,14,15,17,17, 0,14,14,16,15,13,11,11, + 16,16,17,15,14,16,16,15,10,10,15,15, 0,15,15,17, + 18, 0,15,15,16,16, 0,16,16,17,17, 0,21, 0,21,20, + 0,13,13,15,15, 0,18,18, 0,21, 0,15,15,15,15, 0, + 16,16,17,17, 0, 0, 0, 0,18, 0,13,13,15,15, 0,19, + 18, 0, 0, 0,15,15,16,16, 0,12,12,15,15, 0,13,13, + 17,17, 0,13,13,17,18, 0,16,17,21, 0, 0,20,18, 0, + 0, 0,13,13,17,17, 0,15,15, 0,18, 0,12,12,17,18, + 0,16,16, 0, 0, 0,17,17,21, 0, 0,13,13,18,18, 0, + 16,16,21,21, 0,12,12,17,18, 0,16,17,21, 0, 0,17, + 17, 0,21, 0,17,18, 0, 0, 0, 0, 0, 0, 0, 0,16,15, + 0,21, 0,21,19, 0, 0, 0,18,18, 0, 0, 0,18,19, 0, + 0, 0, 0, 0, 0, 0, 0,16,16,21,21, 0,20,19, 0, 0, + 0,19,21, 0,21, 0,12,12,15,15, 0,12,12,15,16, 0, + 13,13,16,16, 0,14,14,15,15, 0,16,15,17,17, 0,13, + 13,17,17, 0,15,15,16,18, 0,12,12,16,16, 0,14,14, + 17,17, 0,15,14,16,16, 0,13,13,16,16, 0,16,15,17, + 17, 0,12,12,16,16, 0,15,15,18,18, 0,14,14,17,16, + 0,16,16,17,18, 0, 0, 0,20,21, 0,13,13,16,17, 0, + 17,17, 0, 0, 0,15,15,16,16, 0,15,16,17,17, 0, 0, + 0,19, 0, 0,13,13,15,16, 0,19,18, 0, 0, 0,16,15, + 16,17, 8, 8, 8,17,17,13,11,10,17,18,13,10,10,17, + 17, 0,15,15,20,19, 0,15,15,17,17,12,10,10,19,18, + 15,12,12,20,18,14,10,10,17,16, 0,15,15,20,20, 0, + 14,15,16,16,13,10,10,17,17,17,14,14, 0,18,15,10, + 10,17,17, 0,16,15,20,20, 0,14,14,17,17, 0,15,16, + 20,20, 0, 0,21, 0, 0, 0,13,13,17,17, 0,18,17, 0, + 0, 0,15,16,17,18, 0,15,15,18,21, 0, 0, 0,21, 0, + 0,13,13,18,18, 0,19,19, 0, 0, 0,16,16,18,17, 9, + 8, 8,15,15,12,11,11,16,16,13,11,11,16,15, 0, 0, + 0, 0,21, 0,21, 0,19,19,12,11,11,17,18,15,13,13, + 18,19,14,11,11,16,16, 0, 0,21,21,19, 0, 0, 0,21, + 20,13,11,11,18,17,17,14,15,20,21,15,11,12,16,16, + 0, 0, 0,20, 0, 0, 0,21, 0,19, 0, 0, 0, 0,19, 0, + 0, 0, 0, 0, 0,21,21,19,19, 0, 0, 0,21, 0, 0, 0, + 0,19,21, 0, 0, 0,19,20, 0, 0, 0,21, 0, 0, 0,21, + 19,19, 0, 0, 0, 0, 0, 0, 0, 0,21,20, 0,11,11,15, + 15, 0,12,12,15,16, 0,12,12,16,16, 0,15,15,16,15, + 0,16,16,17,17, 0,12,12,17,17, 0,14,14,17,17, 0, + 11,11,16,16, 0,15,15,19,18, 0,15,15,16,16, 0,12, + 12,17,16, 0,14,15,16,16, 0,11,11,15,15, 0,16,16, + 18,19, 0,15,15,15,16, 0,17,17,18,20, 0,21, 0,21, + 19, 0,14,14,16,16, 0,18,18, 0, 0, 0,16,16,15,15, + 0,16,16,18,17, 0, 0, 0,19,20, 0,14,14,16,16, 0, + 19,19, 0, 0, 0,16,17,15,15, 0,12,12,14,15, 0,13, + 13,16,17, 0,12,12,17,17, 0,17,16, 0, 0, 0,18,17, + 21, 0, 0,13,13,19,17, 0,15,15,20,21, 0,12,12,17, + 17, 0,17,17, 0, 0, 0,17,17, 0, 0, 0,13,13,17,18, + 0,16,16,21, 0, 0,12,12,17,17, 0,17,17, 0, 0, 0, + 17,17, 0, 0, 0,18,21, 0, 0, 0, 0, 0, 0, 0, 0,15, + 15,21, 0, 0,20,21, 0, 0, 0,18,19, 0, 0, 0,18,17, + 0, 0, 0, 0, 0, 0, 0, 0,16,16,21, 0, 0,21,21, 0, + 0, 0,18,19, 0, 0, 0,12,12,16,16, 0,13,13,16,17, + 0,13,13,17,16, 0,14,14,16,16, 0,16,15,19,18, 0, + 13,13,17,17, 0,15,15,18,18, 0,12,12,16,16, 0,15, + 15,18,19, 0,15,15,17,16, 0,13,13,17,17, 0,16,16, + 18,17, 0,12,12,17,16, 0,15,15,18,18, 0,15,15,17, + 17, 0,16,16, 0,19, 0, 0, 0, 0, 0, 0,14,14,16,17, + 0,18,18, 0, 0, 0,15,15,17,17, 0,16,16,21,19, 0, + 21, 0,21,21, 0,13,14,16,16, 0,19,19, 0, 0, 0,15, + 16,16,16, 0,11,11,17,16, 0,15,14,19,18, 0,14,14, + 19,19, 0,18,17,18,20, 0,17,17,18,19, 0,13,13,17, + 17, 0,16,17,21,18, 0,13,13,17,16, 0,18,17,19, 0, + 0,16,17,18,18, 0,12,12,19,18, 0,18,18,20,20, 0, + 13,13,17,17, 0,17,17,21, 0, 0,16,17,17,18, 0,18, + 17,19,18, 0, 0, 0, 0, 0, 0,14,14,17,17, 0,19,19, + 21, 0, 0,16,16,16,17, 0,17,17,19,20, 0, 0, 0, 0, + 21, 0,15,15,17,18, 0,21,21, 0, 0, 0,17,17,17,18, + 0,10,10,15,15, 0,15,14,17,18, 0,14,14,16,16, 0, + 0, 0,18, 0, 0,21, 0,19, 0, 0,13,13,17,16, 0,17, + 17,18, 0, 0,14,14,16,15, 0, 0, 0,21, 0, 0,21, 0, + 19,18, 0,13,13,17,17, 0,18,18,20,20, 0,15,15,16, + 16, 0, 0, 0,21,21, 0, 0, 0,20,20, 0, 0, 0,19, 0, + 0, 0, 0, 0, 0, 0,21,20,18,18, 0, 0, 0, 0, 0, 0, + 0, 0, 0,20, 0, 0, 0, 0,20, 0, 0, 0, 0, 0, 0, 0, + 0,19,18, 0, 0, 0, 0,21, 0, 0, 0,18,20, 0,18,19, + 16,17, 0,21,19,17,17, 0, 0,21,18,18, 0, 0,21,20, + 19, 0, 0, 0,20,20, 0, 0,21,17,17, 0, 0, 0,19,19, + 0,20,20,17,17, 0, 0, 0, 0,20, 0, 0,20,18,18, 0, + 21,20,17,17, 0, 0, 0,20,21, 0,19, 0,17,17, 0, 0, + 21, 0, 0, 0,20, 0,18,19, 0, 0, 0,21,21, 0, 0, 0, + 0,21, 0,20,20,17,17, 0, 0, 0, 0, 0, 0,21, 0,18, + 17, 0, 0, 0,20,19, 0, 0, 0, 0,21, 0,20,20,17,17, + 0, 0, 0, 0, 0, 0,21,21,18,18, 0,12,12,15,14, 0, + 14,14,17,17, 0,14,14,17,16, 0,18,18,21, 0, 0,19, + 20, 0, 0, 0,13,13,18,17, 0,16,16,19,18, 0,13,13, + 17,17, 0,17,17, 0, 0, 0,17,17,21, 0, 0,13,13,17, + 17, 0,17,17,21,20, 0,13,13,18,17, 0,18,19,21,21, + 0,19,18, 0, 0, 0,18,17, 0, 0, 0, 0, 0, 0, 0, 0, + 15,16, 0, 0, 0,21,21, 0, 0, 0,20,18,21, 0, 0,17, + 18, 0, 0, 0, 0, 0, 0, 0, 0,15,16, 0, 0, 0, 0,20, + 0, 0, 0, 0,19, 0, 0, 0,15,15,18,19, 0,18,17,21, + 0, 0,16,18, 0,20, 0,17,18,21, 0, 0,18,20, 0, 0, + 0,16,16,21,21, 0,19,20,21, 0, 0,16,15, 0,21, 0, + 18,20, 0, 0, 0,18,19, 0, 0, 0,16,15,21,21, 0,21, + 0, 0, 0, 0,16,15,21, 0, 0,20,19, 0, 0, 0,18,21, + 21, 0, 0,20,18, 0, 0, 0, 0, 0, 0, 0, 0,16,16, 0, + 20, 0,21, 0, 0, 0, 0,17,18,20,21, 0,18,18,21,21, + 0, 0, 0, 0, 0, 0,16,16,20, 0, 0, 0,21, 0, 0, 0, + 21,18, 0, 0, 0,12,12,20,17, 0,15,15,19,18, 0,14, + 14,19,18, 0,18,17,21,19, 0,17,17,21,17, 0,13,13, + 21,19, 0,16,17,20,19, 0,13,13,16,16, 0,17,17,20, + 21, 0,16,16,19,17, 0,13,13,18,18, 0,17,19,19,19, + 0,13,13,17,17, 0,18,18, 0,19, 0,16,17,18,18, 0, + 16,17,19,21, 0, 0, 0, 0, 0, 0,15,15,16,17, 0,20, + 19,21, 0, 0,17,17,17,17, 0,17,17,21,19, 0, 0, 0, + 0, 0, 0,15,15,17,17, 0,21, 0, 0, 0, 0,18,18,17, + 17, 0,10,10,15,15, 0,15,15,17,17, 0,15,14,16,16, + 0, 0, 0,21,19, 0,21,21,19,21, 0,13,13,17,16, 0, + 17,17,18,19, 0,14,15,16,15, 0, 0, 0,21,19, 0,21, + 21,18,19, 0,14,14,16,17, 0,18,18,18,19, 0,15,15, + 15,16, 0, 0,21, 0,21, 0, 0, 0,19,20, 0, 0, 0,21, + 19, 0, 0, 0, 0, 0, 0,21,21,19,17, 0, 0, 0, 0, 0, + 0, 0, 0,21,21, 0,21, 0, 0,21, 0, 0, 0, 0, 0, 0, + 21,21,19,18, 0, 0, 0, 0, 0, 0, 0, 0, 0,19, 0,21, + 18,18,17, 0,21, 0,20,20, 0, 0, 0,18,20, 0, 0,21, + 18,21, 0, 0, 0,21,18, 0, 0, 0, 0,19, 0, 0, 0,21, + 21, 0,20,21,17,19, 0,21, 0,21, 0, 0,21, 0,18,18, + 0,20,21,17,18, 0, 0, 0,21,19, 0,20,21,17,18, 0, + 0, 0,21,21, 0, 0, 0,20,19, 0, 0, 0,21,21, 0, 0, + 0, 0, 0, 0,21,21,19,18, 0, 0, 0, 0, 0, 0, 0,21, + 19,18, 0,21,21,19, 0, 0, 0, 0,21, 0, 0,21,21,18, + 17, 0, 0, 0, 0, 0, 0,21, 0,21,18, 0,12,12,14,14, + 0,15,14,17,17, 0,14,14,17,16, 0,19,17, 0, 0, 0, + 19,19, 0, 0, 0,13,13,17,17, 0,17,17,20,20, 0,13, + 13,18,18, 0,18,17, 0, 0, 0,18,21, 0, 0, 0,13,13, + 17,17, 0,18,18,21,20, 0,14,14,18,19, 0,19,18,21, + 0, 0,19,19, 0, 0, 0,20,18,20, 0, 0, 0, 0, 0, 0, + 0,15,16, 0, 0, 0,21,21, 0, 0, 0,19,19, 0, 0, 0, + 18,18, 0, 0, 0, 0, 0, 0, 0, 0,16,16, 0,21, 0, 0, + 0, 0, 0, 0,19,20, 0, 0, 0,15,15,20,21, 0,17,17, + 21,21, 0,17,17, 0, 0, 0,19,18, 0, 0, 0,18,19, 0, + 0, 0,17,16, 0,21, 0, 0,20, 0, 0, 0,16,16, 0,20, + 0,19,19, 0,21, 0,19,18, 0,21, 0,16,16, 0, 0, 0, + 21,21, 0, 0, 0,16,16, 0, 0, 0,21,21, 0, 0, 0,19, + 19, 0, 0, 0,20, 0, 0, 0, 0, 0, 0, 0, 0, 0,17,17, + 0,21, 0, 0,20, 0, 0, 0,20,18,21,21, 0,19,18, 0, + 20, 0, 0, 0, 0, 0, 0,16,17,21, 0, 0, 0,21, 0, 0, + 0,19,20,21,20, +}; + +static const static_codebook _44pn1_p4_0 = { + 5, 3125, + (char *)_vq_lengthlist__44pn1_p4_0, + 1, -528744448, 1616642048, 3, 0, + (long *)_vq_quantlist__44pn1_p4_0, + 0 +}; + +static const long _vq_quantlist__44pn1_p4_1[] = { + 3, + 2, + 4, + 1, + 5, + 0, + 6, +}; + +static const char _vq_lengthlist__44pn1_p4_1[] = { + 2, 3, 3, 3, 3, 3, 3, +}; + +static const static_codebook _44pn1_p4_1 = { + 1, 7, + (char *)_vq_lengthlist__44pn1_p4_1, + 1, -533200896, 1611661312, 3, 0, + (long *)_vq_quantlist__44pn1_p4_1, + 0 +}; + +static const long _vq_quantlist__44pn1_p5_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44pn1_p5_0[] = { + 1, 7, 7, 6, 8, 8, 7, 8, 8, 7, 9, 9,11,11,11, 9, + 8, 8, 7, 9, 9,11,12,11, 9, 9, 9, 6, 7, 7,10,11, + 11,10,10,10,10,11,11,15,14,14,12,12,12,11,11,11, + 14,14,14,12,12,12, 5, 6, 6, 8, 5, 5, 8, 7, 7, 8, + 8, 8,12,10,10,10, 7, 7, 8, 7, 7,12,10,10,10, 7, + 7, 6, 7, 7,12,11,11,12,10,10,11,10,10,14,14,13, + 13,10,10,11,10,10,16,14,14,14,11,10, 7, 7, 7,13, + 12,12,12,12,11,11,11,11,15,14,17,13,12,12,12,11, + 11,15,15,15,14,13,13,10, 9, 9,14,12,11,13,11,11, + 12,11,11,16,15,14,14,11,11,12,11,11,17,14,14,15, + 11,11, 7, 8, 8,12,11,11,13,10,10,11,10,10,17,14, + 13,14,10,10,12,10,10,18,15,15,14,10,10, 8, 7, 7, + 13,12,12,13,11,11,12,11,11,16,14,15,14,12,12,12, + 11,11,18,16,16,14,12,12,11,10,10,13,12,11,13,11, + 11,13,12,12, 0,15,14,14,11,11,13,11,11,16,15,15, + 15,11,11, +}; + +static const static_codebook _44pn1_p5_0 = { + 5, 243, + (char *)_vq_lengthlist__44pn1_p5_0, + 1, -527106048, 1620377600, 2, 0, + (long *)_vq_quantlist__44pn1_p5_0, + 0 +}; + +static const long _vq_quantlist__44pn1_p5_1[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44pn1_p5_1[] = { + 2, 6, 7, 6, 8, 8, 7, 7, 8, 7, 8, 8, 9, 9, 9, 8, + 7, 7, 8, 8, 8, 9, 9, 9, 9, 8, 8, 6, 6, 6, 9, 7, + 7, 9, 7, 7, 9, 8, 8,10, 8, 8,10, 8, 8,10, 8, 8, + 10, 9, 8,10, 8, 8, 7, 6, 6, 9, 6, 6, 9, 6, 6, 9, + 7, 7,10, 8, 8,10, 6, 6, 9, 7, 7,10, 8, 8,10, 6, + 6, 7, 7, 7,11, 9, 9,11, 9, 9,10, 9, 9,12,10,10, + 12, 8, 8,11, 9, 9,13, 9,10,12, 8, 8, 8, 7, 7,11, + 9,10,11,10,10,10, 9, 9,11,11,11,11, 9, 9,11,10, + 9,12,11,11,11, 9,10,10, 8, 8,11, 9,10,11, 9, 9, + 11, 9, 9,12,10,10,11, 9, 9,11, 9, 9,12,10,11,11, + 9, 9, 8, 8, 8,12, 9, 9,12, 9, 9,11, 9, 9,13, 9, + 9,13, 8, 8,12, 9, 9,13,10,10,12, 8, 8, 9, 7, 7, + 11,10,10,11,10,10,11,10,10,12,11,11,11,10, 9,11, + 10,10,11,11,11,11, 9, 9,11, 9, 9,12,10,10,11,10, + 10,12,10,10,11,11,11,11, 9, 9,11,10,10,12,11,11, + 11, 9, 9, +}; + +static const static_codebook _44pn1_p5_1 = { + 5, 243, + (char *)_vq_lengthlist__44pn1_p5_1, + 1, -530841600, 1616642048, 2, 0, + (long *)_vq_quantlist__44pn1_p5_1, + 0 +}; + +static const long _vq_quantlist__44pn1_p6_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44pn1_p6_0[] = { + 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, +}; + +static const static_codebook _44pn1_p6_0 = { + 5, 243, + (char *)_vq_lengthlist__44pn1_p6_0, + 1, -516716544, 1630767104, 2, 0, + (long *)_vq_quantlist__44pn1_p6_0, + 0 +}; + +static const long _vq_quantlist__44pn1_p6_1[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44pn1_p6_1[] = { + 1, 3, 2, 5, 4, 7, 7, 8, 8, 9, 9,10,10,11,11,12, + 12,13,13,14,14,15,15,15,15, +}; + +static const static_codebook _44pn1_p6_1 = { + 1, 25, + (char *)_vq_lengthlist__44pn1_p6_1, + 1, -518864896, 1620639744, 5, 0, + (long *)_vq_quantlist__44pn1_p6_1, + 0 +}; + +static const long _vq_quantlist__44pn1_p6_2[] = { + 12, + 11, + 13, + 10, + 14, + 9, + 15, + 8, + 16, + 7, + 17, + 6, + 18, + 5, + 19, + 4, + 20, + 3, + 21, + 2, + 22, + 1, + 23, + 0, + 24, +}; + +static const char _vq_lengthlist__44pn1_p6_2[] = { + 3, 5, 4, 5, 4, 5, 4, 5, 5, 5, 4, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44pn1_p6_2 = { + 1, 25, + (char *)_vq_lengthlist__44pn1_p6_2, + 1, -529006592, 1611661312, 5, 0, + (long *)_vq_quantlist__44pn1_p6_2, + 0 +}; + +static const char _huff_lengthlist__44pn1_short[] = { + 4, 3, 7, 9,12,16,16, 3, 2, 5, 7,11,14,15, 7, 4, + 5, 6, 9,12,15, 8, 5, 5, 5, 8,10,14, 9, 7, 6, 6, + 8,10,12,12,10,10, 7, 6, 8,10,15,12,10, 6, 4, 7, + 9, +}; + +static const static_codebook _huff_book__44pn1_short = { + 2, 49, + (char *)_huff_lengthlist__44pn1_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + diff --git a/code/libvorbis-1.3.4/lib/books/coupled/res_books_stereo.h b/code/libvorbis-1.3.4/lib/books/coupled/res_books_stereo.h new file mode 100644 index 00000000..9a9049f6 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/books/coupled/res_books_stereo.h @@ -0,0 +1,15783 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: static codebooks autogenerated by huff/huffbuld + last modified: $Id: res_books_stereo.h 19057 2014-01-22 12:32:31Z xiphmont $ + + ********************************************************************/ + +#include "codebook.h" + +static const long _vq_quantlist__16c0_s_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__16c0_s_p1_0[] = { + 1, 4, 4, 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 0, + 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 8, 8, 0, 0, 0, 0, 0, 0, 8, 9,10, 0, 0, 0, + 0, 0, 0, 7, 9,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _16c0_s_p1_0 = { + 8, 6561, + (char *)_vq_lengthlist__16c0_s_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__16c0_s_p1_0, + 0 +}; + +static const long _vq_quantlist__16c0_s_p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__16c0_s_p3_0[] = { + 1, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 6, 6, 7, 6, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 9, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 6, 6, 9, 9, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _16c0_s_p3_0 = { + 4, 625, + (char *)_vq_lengthlist__16c0_s_p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__16c0_s_p3_0, + 0 +}; + +static const long _vq_quantlist__16c0_s_p4_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__16c0_s_p4_0[] = { + 1, 3, 2, 7, 8, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, + 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 7, 7, + 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0, + 8, 8, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, + 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _16c0_s_p4_0 = { + 2, 81, + (char *)_vq_lengthlist__16c0_s_p4_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__16c0_s_p4_0, + 0 +}; + +static const long _vq_quantlist__16c0_s_p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__16c0_s_p5_0[] = { + 1, 3, 3, 6, 6, 6, 6, 8, 8, 0, 0, 0, 7, 7, 7, 7, + 8, 8, 0, 0, 0, 7, 7, 7, 7, 8, 8, 0, 0, 0, 7, 7, + 8, 8, 9, 9, 0, 0, 0, 7, 7, 8, 8, 9, 9, 0, 0, 0, + 8, 9, 8, 8,10,10, 0, 0, 0, 8, 8, 8, 8,10,10, 0, + 0, 0,10,10, 9, 9,10,10, 0, 0, 0, 0, 0, 9, 9,10, + 10, +}; + +static const static_codebook _16c0_s_p5_0 = { + 2, 81, + (char *)_vq_lengthlist__16c0_s_p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__16c0_s_p5_0, + 0 +}; + +static const long _vq_quantlist__16c0_s_p6_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__16c0_s_p6_0[] = { + 1, 3, 4, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,10,11, + 11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10,11, + 11,11, 0, 0, 0, 6, 6, 8, 8, 9, 9, 9, 9,10,10,11, + 11,11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10, + 11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10, + 10,11,11,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10,10, + 11,11,12,12,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10, + 10,11,11,12,12,12,13, 0, 0, 0, 9, 9, 9, 9,10,10, + 10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0,10,10,10, + 10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9, + 10,10,11,11,12,12,13,13,13,13, 0, 0, 0, 0, 0, 9, + 9,10,10,11,11,12,12,13,13,13,14, 0, 0, 0, 0, 0, + 10,10,10,11,11,11,12,12,13,13,13,14, 0, 0, 0, 0, + 0, 0, 0,10,10,11,11,12,12,13,13,14,14, 0, 0, 0, + 0, 0, 0, 0,11,11,12,12,13,13,13,13,14,14, 0, 0, + 0, 0, 0, 0, 0,11,11,12,12,12,13,13,14,15,14, 0, + 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,13,14,14,15, + 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,13,13,14,13,14, + 14, +}; + +static const static_codebook _16c0_s_p6_0 = { + 2, 289, + (char *)_vq_lengthlist__16c0_s_p6_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__16c0_s_p6_0, + 0 +}; + +static const long _vq_quantlist__16c0_s_p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__16c0_s_p7_0[] = { + 1, 4, 4, 6, 6, 6, 7, 6, 6, 4, 7, 7,11,10,10,11, + 11,10, 4, 7, 7,10,10,10,11,10,10, 6,10,10,11,11, + 11,11,11,10, 6, 9, 9,11,12,12,11, 9, 9, 6, 9,10, + 11,12,12,11, 9,10, 7,11,11,11,11,11,12,13,12, 6, + 9,10,11,10,10,12,13,13, 6,10, 9,11,10,10,11,12, + 13, +}; + +static const static_codebook _16c0_s_p7_0 = { + 4, 81, + (char *)_vq_lengthlist__16c0_s_p7_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__16c0_s_p7_0, + 0 +}; + +static const long _vq_quantlist__16c0_s_p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__16c0_s_p7_1[] = { + 1, 3, 4, 6, 6, 7, 7, 8, 8, 8, 8,10,10,10, 7, 7, + 8, 8, 8, 9, 9, 9,10,10,10, 6, 7, 8, 8, 8, 8, 9, + 8,10,10,10, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10, 7, + 7, 8, 8, 9, 9, 8, 9,10,10,10, 8, 8, 9, 9, 9, 9, + 9, 9,11,11,11, 8, 8, 9, 9, 9, 9, 9,10,10,11,11, + 9, 9, 9, 9, 9, 9, 9,10,11,11,11,10,11, 9, 9, 9, + 9,10, 9,11,11,11,10,11,10,10, 9, 9,10,10,11,11, + 11,11,11, 9, 9, 9, 9,10,10, +}; + +static const static_codebook _16c0_s_p7_1 = { + 2, 121, + (char *)_vq_lengthlist__16c0_s_p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__16c0_s_p7_1, + 0 +}; + +static const long _vq_quantlist__16c0_s_p8_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__16c0_s_p8_0[] = { + 1, 4, 4, 7, 7, 7, 7, 7, 6, 8, 8,10,10, 6, 5, 6, + 8, 8, 8, 8, 8, 8, 8, 9,10,10, 7, 6, 6, 8, 8, 8, + 8, 8, 8, 8, 8,10,10, 0, 8, 8, 8, 8, 9, 8, 9, 9, + 9,10,10,10, 0, 9, 8, 8, 8, 9, 9, 8, 8, 9, 9,10, + 10, 0,12,11, 8, 8, 9, 9, 9, 9,10,10,11,10, 0,12, + 13, 8, 8, 9,10, 9, 9,11,11,11,12, 0, 0, 0, 8, 8, + 8, 8,10, 9,12,13,12,14, 0, 0, 0, 8, 8, 8, 9,10, + 10,12,12,13,14, 0, 0, 0,13,13, 9, 9,11,11, 0, 0, + 14, 0, 0, 0, 0,14,14,10,10,12,11,12,14,14,14, 0, + 0, 0, 0, 0,11,11,13,13,14,13,14,14, 0, 0, 0, 0, + 0,12,13,13,12,13,14,14,14, +}; + +static const static_codebook _16c0_s_p8_0 = { + 2, 169, + (char *)_vq_lengthlist__16c0_s_p8_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__16c0_s_p8_0, + 0 +}; + +static const long _vq_quantlist__16c0_s_p8_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__16c0_s_p8_1[] = { + 1, 4, 3, 5, 5, 7, 7, 7, 6, 6, 7, 7, 7, 5, 5, 7, + 7, 7, 6, 6, 7, 7, 7, 6, 6, +}; + +static const static_codebook _16c0_s_p8_1 = { + 2, 25, + (char *)_vq_lengthlist__16c0_s_p8_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__16c0_s_p8_1, + 0 +}; + +static const long _vq_quantlist__16c0_s_p9_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__16c0_s_p9_0[] = { + 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, +}; + +static const static_codebook _16c0_s_p9_0 = { + 4, 81, + (char *)_vq_lengthlist__16c0_s_p9_0, + 1, -518803456, 1628680192, 2, 0, + (long *)_vq_quantlist__16c0_s_p9_0, + 0 +}; + +static const long _vq_quantlist__16c0_s_p9_1[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__16c0_s_p9_1[] = { + 1, 5, 5, 5, 5, 9,11,11,10,10,10,10,10,10,10, 7, + 6, 6, 6, 6,10,10,10,10,10,10,10,10,10,10, 7, 6, + 6, 6, 6,10, 9,10,10,10,10,10,10,10,10,10, 7, 7, + 8, 9,10,10,10,10,10,10,10,10,10,10,10, 8, 7,10, + 10,10, 9,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10, +}; + +static const static_codebook _16c0_s_p9_1 = { + 2, 225, + (char *)_vq_lengthlist__16c0_s_p9_1, + 1, -520986624, 1620377600, 4, 0, + (long *)_vq_quantlist__16c0_s_p9_1, + 0 +}; + +static const long _vq_quantlist__16c0_s_p9_2[] = { + 10, + 9, + 11, + 8, + 12, + 7, + 13, + 6, + 14, + 5, + 15, + 4, + 16, + 3, + 17, + 2, + 18, + 1, + 19, + 0, + 20, +}; + +static const char _vq_lengthlist__16c0_s_p9_2[] = { + 1, 5, 5, 7, 8, 8, 7, 9, 9, 9,12,12,11,12,12,10, + 10,11,12,12,12,11,12,12, 8, 9, 8, 7, 9,10,10,11, + 11,10,11,12,10,12,10,12,12,12,11,12,11, 9, 8, 8, + 9,10, 9, 8, 9,10,12,12,11,11,12,11,10,11,12,11, + 12,12, 8, 9, 9, 9,10,11,12,11,12,11,11,11,11,12, + 12,11,11,12,12,11,11, 9, 9, 8, 9, 9,11, 9, 9,10, + 9,11,11,11,11,12,11,11,10,12,12,12, 9,12,11,10, + 11,11,11,11,12,12,12,11,11,11,12,10,12,12,12,10, + 10, 9,10, 9,10,10, 9, 9, 9,10,10,12,10,11,11, 9, + 11,11,10,11,11,11,10,10,10, 9, 9,10,10, 9, 9,10, + 11,11,10,11,10,11,10,11,11,10,11,11,11,10, 9,10, + 10, 9,10, 9, 9,11, 9, 9,11,10,10,11,11,10,10,11, + 10,11, 8, 9,11,11,10, 9,10,11,11,10,11,11,10,10, + 10,11,10, 9,10,10,11, 9,10,10, 9,11,10,10,10,10, + 11,10,11,11, 9,11,10,11,10,10,11,11,10,10,10, 9, + 10,10,11,11,11, 9,10,10,10,10,10,11,10,10,10, 9, + 10,10,11,10,10,10,10,10, 9,10,11,10,10,10,10,11, + 11,11,10,10,10,10,10,11,10,11,10,11,10,10,10, 9, + 11,11,10,10,10,11,11,10,10,10,10,10,10,10,10,11, + 11, 9,10,10,10,11,10,11,10,10,10,11, 9,10,11,10, + 11,10,10, 9,10,10,10,11,10,11,10,10,10,10,10,11, + 11,10,11,11,10,10,11,11,10, 9, 9,10,10,10,10,10, + 9,11, 9,10,10,10,11,11,10,10,10,10,11,11,11,10, + 9, 9,10,10,11,10,10,10,10,10,11,11,11,10,10,10, + 11,11,11, 9,10,10,10,10, 9,10, 9,10,11,10,11,10, + 10,11,11,10,11,11,11,11,11,10,11,10,10,10, 9,11, + 11,10,11,11,11,11,11,11,11,11,11,10,11,10,10,10, + 10,11,10,10,11, 9,10,10,10, +}; + +static const static_codebook _16c0_s_p9_2 = { + 2, 441, + (char *)_vq_lengthlist__16c0_s_p9_2, + 1, -529268736, 1611661312, 5, 0, + (long *)_vq_quantlist__16c0_s_p9_2, + 0 +}; + +static const char _huff_lengthlist__16c0_s_single[] = { + 3, 4,19, 7, 9, 7, 8,11, 9,12, 4, 1,19, 6, 7, 7, + 8,10,11,13,18,18,18,18,18,18,18,18,18,18, 8, 6, + 18, 8, 9, 9,11,12,14,18, 9, 6,18, 9, 7, 8, 9,11, + 12,18, 7, 6,18, 8, 7, 7, 7, 9,11,17, 8, 8,18, 9, + 7, 6, 6, 8,11,17,10,10,18,12, 9, 8, 7, 9,12,18, + 13,15,18,15,13,11,10,11,15,18,14,18,18,18,18,18, + 16,16,18,18, +}; + +static const static_codebook _huff_book__16c0_s_single = { + 2, 100, + (char *)_huff_lengthlist__16c0_s_single, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__16c1_s_long[] = { + 2, 5,20, 7,10, 7, 8,10,11,11, 4, 2,20, 5, 8, 6, + 7, 9,10,10,20,20,20,20,19,19,19,19,19,19, 7, 5, + 19, 6,10, 7, 9,11,13,17,11, 8,19,10, 7, 7, 8,10, + 11,15, 7, 5,19, 7, 7, 5, 6, 9,11,16, 7, 6,19, 8, + 7, 6, 6, 7, 9,13, 9, 9,19,11, 9, 8, 6, 7, 8,13, + 12,14,19,16,13,10, 9, 8, 9,13,14,17,19,18,18,17, + 12,11,11,13, +}; + +static const static_codebook _huff_book__16c1_s_long = { + 2, 100, + (char *)_huff_lengthlist__16c1_s_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__16c1_s_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__16c1_s_p1_0[] = { + 1, 5, 5, 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 0, + 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 8, 7, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0, 0, + 0, 0, 0, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 7, 8, 0, 0, 0, 0, 0, 0, 7, 9, 8, 0, 0, + 0, 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 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 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _16c1_s_p1_0 = { + 8, 6561, + (char *)_vq_lengthlist__16c1_s_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__16c1_s_p1_0, + 0 +}; + +static const long _vq_quantlist__16c1_s_p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__16c1_s_p3_0[] = { + 1, 4, 4, 6, 6, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _16c1_s_p3_0 = { + 4, 625, + (char *)_vq_lengthlist__16c1_s_p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__16c1_s_p3_0, + 0 +}; + +static const long _vq_quantlist__16c1_s_p4_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__16c1_s_p4_0[] = { + 1, 2, 3, 7, 7, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, + 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 7, 7, + 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0, + 8, 8, 0, 0, 0, 0, 0, 0, 0, 8, 9, 0, 0, 0, 0, 0, + 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _16c1_s_p4_0 = { + 2, 81, + (char *)_vq_lengthlist__16c1_s_p4_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__16c1_s_p4_0, + 0 +}; + +static const long _vq_quantlist__16c1_s_p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__16c1_s_p5_0[] = { + 1, 3, 3, 5, 5, 6, 6, 8, 8, 0, 0, 0, 7, 7, 7, 7, + 9, 9, 0, 0, 0, 7, 7, 7, 7, 9, 9, 0, 0, 0, 8, 8, + 8, 8, 9, 9, 0, 0, 0, 8, 8, 8, 8,10,10, 0, 0, 0, + 9, 9, 8, 8,10,10, 0, 0, 0, 9, 9, 8, 8,10,10, 0, + 0, 0,10,10, 9, 9,10,10, 0, 0, 0, 0, 0, 9, 9,10, + 10, +}; + +static const static_codebook _16c1_s_p5_0 = { + 2, 81, + (char *)_vq_lengthlist__16c1_s_p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__16c1_s_p5_0, + 0 +}; + +static const long _vq_quantlist__16c1_s_p6_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__16c1_s_p6_0[] = { + 1, 3, 3, 6, 6, 8, 8, 9, 9, 9, 9,10,10,11,11,12, + 12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11,11, + 12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11, + 11,12,12, 0, 0, 0, 8, 8, 8, 9,10, 9,10,10,10,10, + 11,11,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10,10,11, + 11,11,12,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10,10, + 11,11,12,12,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10, + 10,11,11,12,12,13,13, 0, 0, 0, 9, 9, 9, 9,10,10, + 10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9,10, + 10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9, + 10,10,11,11,12,12,12,12,13,13, 0, 0, 0, 0, 0, 9, + 9,10,10,11,11,12,12,12,12,13,13, 0, 0, 0, 0, 0, + 10,10,11,10,11,11,12,12,13,13,13,13, 0, 0, 0, 0, + 0, 0, 0,10,10,11,11,12,12,13,13,13,13, 0, 0, 0, + 0, 0, 0, 0,11,11,12,12,12,12,13,13,14,14, 0, 0, + 0, 0, 0, 0, 0,11,11,12,12,12,12,13,13,14,14, 0, + 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,13,13,14,14, + 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,13,13,13,13,14, + 14, +}; + +static const static_codebook _16c1_s_p6_0 = { + 2, 289, + (char *)_vq_lengthlist__16c1_s_p6_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__16c1_s_p6_0, + 0 +}; + +static const long _vq_quantlist__16c1_s_p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__16c1_s_p7_0[] = { + 1, 4, 4, 6, 6, 6, 7, 6, 6, 4, 7, 7,10, 9,10,10, + 10, 9, 4, 7, 7,10,10,10,11,10,10, 6,10,10,11,11, + 11,11,10,10, 6,10, 9,11,11,11,11,10,10, 6,10,10, + 11,11,11,11,10,10, 7,11,11,11,11,11,12,12,11, 6, + 10,10,11,10,10,11,11,11, 6,10,10,10,11,10,11,11, + 11, +}; + +static const static_codebook _16c1_s_p7_0 = { + 4, 81, + (char *)_vq_lengthlist__16c1_s_p7_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__16c1_s_p7_0, + 0 +}; + +static const long _vq_quantlist__16c1_s_p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__16c1_s_p7_1[] = { + 2, 3, 3, 5, 6, 7, 7, 7, 7, 8, 8,10,10,10, 6, 6, + 7, 7, 8, 8, 8, 8,10,10,10, 6, 6, 7, 7, 8, 8, 8, + 8,10,10,10, 7, 7, 7, 7, 8, 8, 8, 8,10,10,10, 7, + 7, 7, 7, 8, 8, 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, + 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10, + 8, 8, 8, 8, 8, 8, 9, 9,10,10,10,10,10, 8, 8, 8, + 8, 9, 9,10,10,10,10,10, 9, 9, 8, 8, 9, 9,10,10, + 10,10,10, 8, 8, 8, 8, 9, 9, +}; + +static const static_codebook _16c1_s_p7_1 = { + 2, 121, + (char *)_vq_lengthlist__16c1_s_p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__16c1_s_p7_1, + 0 +}; + +static const long _vq_quantlist__16c1_s_p8_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__16c1_s_p8_0[] = { + 1, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 6, 5, 5, + 7, 8, 8, 9, 8, 8, 9, 9,10,11, 6, 5, 5, 8, 8, 9, + 9, 8, 8, 9,10,10,11, 0, 8, 8, 8, 9, 9, 9, 9, 9, + 10,10,11,11, 0, 9, 9, 9, 8, 9, 9, 9, 9,10,10,11, + 11, 0,13,13, 9, 9,10,10,10,10,11,11,12,12, 0,14, + 13, 9, 9,10,10,10,10,11,11,12,12, 0, 0, 0,10,10, + 9, 9,11,11,12,12,13,12, 0, 0, 0,10,10, 9, 9,10, + 10,12,12,13,13, 0, 0, 0,13,14,11,10,11,11,12,12, + 13,14, 0, 0, 0,14,14,10,10,11,11,12,12,13,13, 0, + 0, 0, 0, 0,12,12,12,12,13,13,14,15, 0, 0, 0, 0, + 0,12,12,12,12,13,13,14,15, +}; + +static const static_codebook _16c1_s_p8_0 = { + 2, 169, + (char *)_vq_lengthlist__16c1_s_p8_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__16c1_s_p8_0, + 0 +}; + +static const long _vq_quantlist__16c1_s_p8_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__16c1_s_p8_1[] = { + 2, 3, 3, 5, 5, 6, 6, 6, 5, 5, 6, 6, 6, 5, 5, 6, + 6, 6, 5, 5, 6, 6, 6, 5, 5, +}; + +static const static_codebook _16c1_s_p8_1 = { + 2, 25, + (char *)_vq_lengthlist__16c1_s_p8_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__16c1_s_p8_1, + 0 +}; + +static const long _vq_quantlist__16c1_s_p9_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__16c1_s_p9_0[] = { + 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, +}; + +static const static_codebook _16c1_s_p9_0 = { + 2, 169, + (char *)_vq_lengthlist__16c1_s_p9_0, + 1, -513964032, 1628680192, 4, 0, + (long *)_vq_quantlist__16c1_s_p9_0, + 0 +}; + +static const long _vq_quantlist__16c1_s_p9_1[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__16c1_s_p9_1[] = { + 1, 4, 4, 4, 4, 8, 8,12,13,14,14,14,14,14,14, 6, + 6, 6, 6, 6,10, 9,14,14,14,14,14,14,14,14, 7, 6, + 5, 6, 6,10, 9,12,13,13,13,13,13,13,13,13, 7, 7, + 9, 9,11,11,12,13,13,13,13,13,13,13,13, 7, 7, 8, + 8,11,12,13,13,13,13,13,13,13,13,13,12,12,10,10, + 13,12,13,13,13,13,13,13,13,13,13,12,12,10,10,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,12,13,12, + 13,13,13,13,13,13,13,13,13,13,13,13,12,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,12,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,12,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13, +}; + +static const static_codebook _16c1_s_p9_1 = { + 2, 225, + (char *)_vq_lengthlist__16c1_s_p9_1, + 1, -520986624, 1620377600, 4, 0, + (long *)_vq_quantlist__16c1_s_p9_1, + 0 +}; + +static const long _vq_quantlist__16c1_s_p9_2[] = { + 10, + 9, + 11, + 8, + 12, + 7, + 13, + 6, + 14, + 5, + 15, + 4, + 16, + 3, + 17, + 2, + 18, + 1, + 19, + 0, + 20, +}; + +static const char _vq_lengthlist__16c1_s_p9_2[] = { + 1, 4, 4, 6, 6, 7, 7, 8, 7, 8, 8, 9, 9, 9, 9,10, + 10,10, 9,10,10,11,12,12, 8, 8, 8, 8, 9, 9, 9, 9, + 10,10,10,10,10,11,11,10,12,11,11,13,11, 7, 7, 8, + 8, 8, 8, 9, 9, 9,10,10,10,10, 9,10,10,11,11,12, + 11,11, 8, 8, 8, 8, 9, 9,10,10,10,10,11,11,11,11, + 11,11,11,12,11,12,12, 8, 8, 9, 9, 9, 9, 9,10,10, + 10,10,10,10,11,11,11,11,11,11,12,11, 9, 9, 9, 9, + 10,10,10,10,11,10,11,11,11,11,11,11,12,12,12,12, + 11, 9, 9, 9, 9,10,10,10,10,11,11,11,11,11,11,11, + 11,11,12,12,12,13, 9,10,10, 9,11,10,10,10,10,11, + 11,11,11,11,10,11,12,11,12,12,11,12,11,10, 9,10, + 10,11,10,11,11,11,11,11,11,11,11,11,12,12,11,12, + 12,12,10,10,10,11,10,11,11,11,11,11,11,11,11,11, + 11,11,12,13,12,12,11, 9,10,10,11,11,10,11,11,11, + 12,11,11,11,11,11,12,12,13,13,12,13,10,10,12,10, + 11,11,11,11,11,11,11,11,11,12,12,11,13,12,12,12, + 12,13,12,11,11,11,11,11,11,12,11,12,11,11,11,11, + 12,12,13,12,11,12,12,11,11,11,11,11,12,11,11,11, + 11,12,11,11,12,11,12,13,13,12,12,12,12,11,11,11, + 11,11,12,11,11,12,11,12,11,11,11,11,13,12,12,12, + 12,13,11,11,11,12,12,11,11,11,12,11,12,12,12,11, + 12,13,12,11,11,12,12,11,12,11,11,11,12,12,11,12, + 11,11,11,12,12,12,12,13,12,13,12,12,12,12,11,11, + 12,11,11,11,11,11,11,12,12,12,13,12,11,13,13,12, + 12,11,12,10,11,11,11,11,12,11,12,12,11,12,12,13, + 12,12,13,12,12,12,12,12,11,12,12,12,11,12,11,11, + 11,12,13,12,13,13,13,13,13,12,13,13,12,12,13,11, + 11,11,11,11,12,11,11,12,11, +}; + +static const static_codebook _16c1_s_p9_2 = { + 2, 441, + (char *)_vq_lengthlist__16c1_s_p9_2, + 1, -529268736, 1611661312, 5, 0, + (long *)_vq_quantlist__16c1_s_p9_2, + 0 +}; + +static const char _huff_lengthlist__16c1_s_short[] = { + 5, 6,17, 8,12, 9,10,10,12,13, 5, 2,17, 4, 9, 5, + 7, 8,11,13,16,16,16,16,16,16,16,16,16,16, 6, 4, + 16, 5,10, 5, 7,10,14,16,13, 9,16,11, 8, 7, 8, 9, + 13,16, 7, 4,16, 5, 7, 4, 6, 8,11,13, 8, 6,16, 7, + 8, 5, 5, 7, 9,13, 9, 8,16, 9, 8, 6, 6, 7, 9,13, + 11,11,16,10,10, 7, 7, 7, 9,13,13,13,16,13,13, 9, + 9, 9,10,13, +}; + +static const static_codebook _huff_book__16c1_s_short = { + 2, 100, + (char *)_huff_lengthlist__16c1_s_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__16c2_s_long[] = { + 4, 7, 9, 9, 9, 8, 9,10,13,16, 5, 4, 5, 6, 7, 7, + 8, 9,12,16, 6, 5, 5, 5, 7, 7, 9,10,12,15, 7, 6, + 5, 4, 5, 6, 8, 9,10,13, 8, 7, 7, 5, 5, 5, 7, 9, + 10,12, 7, 7, 7, 6, 5, 5, 6, 7,10,12, 8, 8, 8, 7, + 7, 5, 5, 6, 9,11, 8, 9, 9, 8, 8, 6, 6, 5, 8,11, + 10,11,12,12,11, 9, 9, 8, 9,12,13,14,15,15,14,12, + 12,11,11,13, +}; + +static const static_codebook _huff_book__16c2_s_long = { + 2, 100, + (char *)_huff_lengthlist__16c2_s_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__16c2_s_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__16c2_s_p1_0[] = { + 1, 3, 3, 0, 0, 0, 0, 0, 0, 4, 5, 5, 0, 0, 0, 0, + 0, 0, 4, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _16c2_s_p1_0 = { + 4, 81, + (char *)_vq_lengthlist__16c2_s_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__16c2_s_p1_0, + 0 +}; + +static const long _vq_quantlist__16c2_s_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__16c2_s_p2_0[] = { + 2, 4, 4, 7, 7, 0, 0, 0, 8, 8, 0, 0, 0, 8, 8, 0, + 0, 0, 8, 8, 0, 0, 0, 8, 8, 4, 4, 4, 8, 7, 0, 0, + 0, 8, 8, 0, 0, 0, 8, 8, 0, 0, 0, 9, 9, 0, 0, 0, + 9, 9, 4, 4, 4, 7, 8, 0, 0, 0, 8, 8, 0, 0, 0, 8, + 8, 0, 0, 0, 9, 9, 0, 0, 0, 9, 9, 7, 8, 8,10, 9, + 0, 0, 0,12,11, 0, 0, 0,11,12, 0, 0, 0,14,13, 0, + 0, 0,14,14, 7, 8, 8, 9,10, 0, 0, 0,11,12, 0, 0, + 0,11,11, 0, 0, 0,14,14, 0, 0, 0,14,14, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, + 9, 9,14,14, 0, 0, 0,13,13, 0, 0, 0,13,13, 0, 0, + 0,13,13, 0, 0, 0,13,12, 8, 9, 9,14,14, 0, 0, 0, + 13,13, 0, 0, 0,13,13, 0, 0, 0,13,13, 0, 0, 0,12, + 12, +}; + +static const static_codebook _16c2_s_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__16c2_s_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__16c2_s_p2_0, + 0 +}; + +static const long _vq_quantlist__16c2_s_p3_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__16c2_s_p3_0[] = { + 1, 3, 3, 5, 5, 7, 7, 8, 8, 0, 0, 0, 6, 6, 8, 8, + 9, 9, 0, 0, 0, 6, 6, 8, 8, 9, 9, 0, 0, 0, 7, 7, + 8, 9,10,10, 0, 0, 0, 7, 7, 9, 9,10,10, 0, 0, 0, + 8, 8, 9, 9,11,11, 0, 0, 0, 7, 7, 9, 9,11,11, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _16c2_s_p3_0 = { + 2, 81, + (char *)_vq_lengthlist__16c2_s_p3_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__16c2_s_p3_0, + 0 +}; + +static const long _vq_quantlist__16c2_s_p4_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__16c2_s_p4_0[] = { + 2, 3, 3, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, + 9, 0, 0, 0, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,10, + 11,10, 0, 0, 0, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10, + 10,10,10, 0, 0, 0, 6, 6, 8, 8, 9, 9, 9, 9,10,10, + 11,11,11,11, 0, 0, 0, 7, 6, 8, 8, 9, 9, 9, 9,10, + 10,11,11,11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9,10,10, + 11,11,11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9,10, + 10,11,11,11,11,12,12, 0, 0, 0, 7, 8, 8, 8, 9, 9, + 10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 8, 8, 9, + 9,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _16c2_s_p4_0 = { + 2, 289, + (char *)_vq_lengthlist__16c2_s_p4_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__16c2_s_p4_0, + 0 +}; + +static const long _vq_quantlist__16c2_s_p5_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__16c2_s_p5_0[] = { + 1, 4, 4, 5, 7, 7, 6, 7, 7, 4, 6, 6,10,11,10,10, + 10,11, 4, 6, 6,10,10,11,10,11,10, 5,10,10, 9,12, + 11,10,12,12, 7,10,10,12,12,12,12,13,13, 7,11,10, + 11,12,12,12,13,13, 6,11,10,10,12,12,11,12,12, 7, + 11,10,12,13,13,12,12,12, 7,10,11,12,13,13,12,12, + 12, +}; + +static const static_codebook _16c2_s_p5_0 = { + 4, 81, + (char *)_vq_lengthlist__16c2_s_p5_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__16c2_s_p5_0, + 0 +}; + +static const long _vq_quantlist__16c2_s_p5_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__16c2_s_p5_1[] = { + 2, 3, 3, 6, 6, 6, 6, 7, 7, 7, 7,11,10,10, 6, 6, + 7, 7, 8, 8, 8, 8,10,10,10, 6, 6, 7, 7, 8, 8, 8, + 8,11,11,11, 7, 7, 8, 8, 8, 8, 9, 9,11,11,11, 6, + 7, 8, 8, 8, 8, 9, 9,11,11,11, 7, 7, 8, 8, 8, 8, + 8, 8,11,11,11, 7, 7, 8, 8, 8, 8, 9, 9,11,11,11, + 8, 8, 8, 8, 8, 8, 8, 8,11,11,11,11,11, 8, 8, 8, + 8, 8, 8,12,11,11,11,11, 8, 8, 8, 8, 8, 8,12,11, + 11,11,11, 7, 7, 8, 8, 8, 8, +}; + +static const static_codebook _16c2_s_p5_1 = { + 2, 121, + (char *)_vq_lengthlist__16c2_s_p5_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__16c2_s_p5_1, + 0 +}; + +static const long _vq_quantlist__16c2_s_p6_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__16c2_s_p6_0[] = { + 1, 4, 4, 6, 6, 8, 7, 8, 8, 9, 9,10,10, 5, 5, 5, + 7, 7, 9, 9, 9, 9,11,11,12,12, 6, 5, 5, 7, 7, 9, + 9,10, 9,11,11,12,12, 0, 7, 7, 7, 7, 9, 9,10,10, + 11,11,12,12, 0, 7, 7, 7, 7, 9, 9,10,10,11,11,12, + 12, 0,11,11, 8, 8,10,10,11,11,12,12,13,13, 0,12, + 12, 9, 9,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const static_codebook _16c2_s_p6_0 = { + 2, 169, + (char *)_vq_lengthlist__16c2_s_p6_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__16c2_s_p6_0, + 0 +}; + +static const long _vq_quantlist__16c2_s_p6_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__16c2_s_p6_1[] = { + 2, 3, 3, 5, 5, 6, 6, 6, 5, 5, 6, 6, 6, 5, 5, 6, + 6, 6, 5, 5, 6, 6, 6, 5, 5, +}; + +static const static_codebook _16c2_s_p6_1 = { + 2, 25, + (char *)_vq_lengthlist__16c2_s_p6_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__16c2_s_p6_1, + 0 +}; + +static const long _vq_quantlist__16c2_s_p7_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__16c2_s_p7_0[] = { + 1, 4, 4, 7, 7, 8, 8, 8, 8,10, 9,10,10, 5, 5, 5, + 7, 7, 9, 9,10,10,11,10,12,11, 6, 5, 5, 7, 7, 9, + 9,10,10,11,11,12,12,20, 7, 7, 7, 7, 9, 9,10,10, + 11,11,12,12,20, 7, 7, 7, 7, 9, 9,11,10,12,11,12, + 12,20,11,11, 8, 8,10,10,11,11,12,12,13,13,20,12, + 12, 8, 8, 9, 9,11,11,12,12,13,13,20,20,21,10,10, + 10,10,11,11,12,12,13,13,21,21,21,10,10,10,10,11, + 11,12,12,13,13,21,21,21,14,14,11,11,12,12,13,13, + 13,14,21,21,21,16,15,11,11,12,11,13,13,14,14,21, + 21,21,21,21,13,13,12,12,13,13,14,14,21,21,21,21, + 21,13,13,12,12,13,13,14,14, +}; + +static const static_codebook _16c2_s_p7_0 = { + 2, 169, + (char *)_vq_lengthlist__16c2_s_p7_0, + 1, -523206656, 1618345984, 4, 0, + (long *)_vq_quantlist__16c2_s_p7_0, + 0 +}; + +static const long _vq_quantlist__16c2_s_p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__16c2_s_p7_1[] = { + 2, 4, 4, 6, 6, 7, 7, 7, 7, 7, 7, 9, 9, 9, 6, 7, + 7, 7, 7, 7, 8, 8, 9, 9, 9, 6, 6, 7, 7, 7, 7, 8, + 8, 9, 9, 9, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 7, + 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 7, 7, 7, 7, 8, 8, + 8, 8, 9, 9, 9, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, + 7, 7, 8, 8, 7, 7, 8, 8, 9, 9, 9, 9, 9, 8, 8, 7, + 7, 8, 8, 9, 9, 9, 9, 9, 8, 8, 7, 7, 8, 8, 9, 9, + 9, 9, 9, 7, 7, 7, 7, 8, 8, +}; + +static const static_codebook _16c2_s_p7_1 = { + 2, 121, + (char *)_vq_lengthlist__16c2_s_p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__16c2_s_p7_1, + 0 +}; + +static const long _vq_quantlist__16c2_s_p8_0[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__16c2_s_p8_0[] = { + 1, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9,10,10, 6, + 6, 6, 8, 8, 9, 9, 8, 8, 9, 9,10,10,11,11, 6, 5, + 5, 8, 7, 9, 9, 8, 8, 9, 9,10,10,11,11,20, 8, 8, + 8, 8, 9, 9, 9, 9,10,10,11,10,12,11,20, 8, 8, 8, + 8, 9, 9, 9, 9,10,10,11,11,12,12,20,12,12, 9, 9, + 10,10,10,10,11,11,12,12,13,12,20,13,13, 9, 9,10, + 10,10,10,11,11,12,12,13,13,20,20,20, 9, 9, 9, 9, + 10,10,11,11,12,12,13,12,20,20,20, 9, 9, 9, 8,10, + 10,12,11,12,12,13,13,20,20,20,13,13,10,10,11,11, + 12,12,13,13,13,13,20,20,20,13,13,10,10,11,10,12, + 11,13,13,14,14,20,20,20,20,20,11,11,11,11,12,12, + 13,13,14,14,20,20,20,20,20,11,10,11,11,13,11,13, + 13,14,14,20,20,21,21,21,14,14,11,12,13,13,13,13, + 14,14,21,21,21,21,21,15,15,12,11,13,12,14,13,15, + 14, +}; + +static const static_codebook _16c2_s_p8_0 = { + 2, 225, + (char *)_vq_lengthlist__16c2_s_p8_0, + 1, -520986624, 1620377600, 4, 0, + (long *)_vq_quantlist__16c2_s_p8_0, + 0 +}; + +static const long _vq_quantlist__16c2_s_p8_1[] = { + 10, + 9, + 11, + 8, + 12, + 7, + 13, + 6, + 14, + 5, + 15, + 4, + 16, + 3, + 17, + 2, + 18, + 1, + 19, + 0, + 20, +}; + +static const char _vq_lengthlist__16c2_s_p8_1[] = { + 2, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8,11,11,11, 7, 7, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,11,10, 7, 7, 8, + 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,11, + 11,11, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9,11,11,11, 8, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9,10, 9,10,10,10,10,11,11,11, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,11,11, + 11, 8, 8, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10,10, + 10,10,10,11,11,11, 9, 9, 9, 9, 9, 9, 9, 9,10,10, + 10,10,10,10,10,10,10,10,11,11,11,11,11, 9, 9, 9, + 9, 9, 9,10,10,10,10,10,10,10,10,10,10,11,11,11, + 11,11, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10, + 10,10,11,11,11,11,11, 9, 9, 9, 9,10,10,10,10,10, + 10,10,10,10,10,10,10,11,11,11,11,11,10, 9,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11, + 11,11,11,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,11,11,11,11,11,11,11,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,11,11,11,11,11,11,11,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11, + 11,11,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 11,11,11,11,11,11,11,11,11,10,10,10,10,10,10,10, + 10,10,10,10,10,11,11,11,11,11,11,11,11,11,10,10, + 10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11, + 11,11,11,10,10,10,10,10,10,10,10,10,10,10,10,11, + 11,11,11,11,11,11,11,11,10,10,10,10,10,10,10,10, + 10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,10, + 10,10,10,10,10,10,10,10,10, +}; + +static const static_codebook _16c2_s_p8_1 = { + 2, 441, + (char *)_vq_lengthlist__16c2_s_p8_1, + 1, -529268736, 1611661312, 5, 0, + (long *)_vq_quantlist__16c2_s_p8_1, + 0 +}; + +static const long _vq_quantlist__16c2_s_p9_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__16c2_s_p9_0[] = { + 1, 4, 3,10, 8,10,10,10,10,10,10,10,10,10,10,10, + 10, 6,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10, 6,10, 9,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10, +}; + +static const static_codebook _16c2_s_p9_0 = { + 2, 289, + (char *)_vq_lengthlist__16c2_s_p9_0, + 1, -509798400, 1631393792, 5, 0, + (long *)_vq_quantlist__16c2_s_p9_0, + 0 +}; + +static const long _vq_quantlist__16c2_s_p9_1[] = { + 9, + 8, + 10, + 7, + 11, + 6, + 12, + 5, + 13, + 4, + 14, + 3, + 15, + 2, + 16, + 1, + 17, + 0, + 18, +}; + +static const char _vq_lengthlist__16c2_s_p9_1[] = { + 1, 4, 4, 7, 7, 7, 7, 7, 7, 8, 8,10, 9,11,10,13, + 11,14,13, 6, 6, 6, 8, 8, 8, 8, 8, 7, 9, 8,11, 9, + 13,11,14,12,14,13, 5, 6, 6, 8, 8, 8, 8, 8, 8, 9, + 9,11,11,13,11,14,13,15,15,17, 8, 8, 8, 8, 9, 9, + 9, 8,11, 9,12,10,13,11,14,12,14,13,17, 8, 8, 8, + 8, 9, 9, 9, 9,10,10,11,11,13,13,13,14,16,15,17, + 12,12, 8, 8, 9, 9,10,10,11,11,12,11,13,12,13,12, + 14,13,16,12,12, 8, 8, 9, 9,10,10,11,11,12,12,13, + 13,14,14,15,15,17,17,17, 9, 9, 9, 9,11,11,12,12, + 12,13,13,13,16,14,14,14,17,17,17, 9, 8, 9, 8,11, + 10,12,12,13,13,14,14,15,15,16,16,17,17,17,12,12, + 10,10,11,12,12,13,13,14,13,15,15,14,16,15,17,17, + 17,12,12,10, 8,12, 9,13,12,14,14,15,14,15,16,16, + 16,17,17,17,17,17,11,11,12,12,14,14,14,16,15,16, + 15,16,15,17,17,17,17,17,17,11, 9,12,10,13,11,15, + 14,16,16,17,16,16,15,17,17,17,17,17,15,15,12,12, + 14,14,15,16,16,15,16,16,17,17,17,17,17,17,17,14, + 14,12,10,14,11,15,12,17,16,15,16,17,16,17,17,17, + 17,17,17,17,13,13,14,14,14,16,17,17,16,17,17,17, + 17,17,17,17,17,17,17,13, 9,13,12,15,13,16,16,17, + 17,17,17,17,17,17,17,17,17,17,15,17,14,14,15,16, + 16,17,16,17,16,17,17,17,17,17,17,17,17,17,17,14, + 13,15,16,16,17,16,17,17,17, +}; + +static const static_codebook _16c2_s_p9_1 = { + 2, 361, + (char *)_vq_lengthlist__16c2_s_p9_1, + 1, -518287360, 1622704128, 5, 0, + (long *)_vq_quantlist__16c2_s_p9_1, + 0 +}; + +static const long _vq_quantlist__16c2_s_p9_2[] = { + 24, + 23, + 25, + 22, + 26, + 21, + 27, + 20, + 28, + 19, + 29, + 18, + 30, + 17, + 31, + 16, + 32, + 15, + 33, + 14, + 34, + 13, + 35, + 12, + 36, + 11, + 37, + 10, + 38, + 9, + 39, + 8, + 40, + 7, + 41, + 6, + 42, + 5, + 43, + 4, + 44, + 3, + 45, + 2, + 46, + 1, + 47, + 0, + 48, +}; + +static const char _vq_lengthlist__16c2_s_p9_2[] = { + 2, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, + 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, +}; + +static const static_codebook _16c2_s_p9_2 = { + 1, 49, + (char *)_vq_lengthlist__16c2_s_p9_2, + 1, -526909440, 1611661312, 6, 0, + (long *)_vq_quantlist__16c2_s_p9_2, + 0 +}; + +static const char _huff_lengthlist__16c2_s_short[] = { + 7,10,12,11,12,13,15,16,18,15,10, 8, 8, 8, 9,10, + 12,13,14,17,10, 7, 7, 7, 7, 8,10,12,15,18,10, 7, + 7, 5, 5, 6, 8,10,13,15,10, 7, 6, 5, 4, 4, 6, 9, + 12,15,11, 7, 7, 5, 4, 3, 4, 7,11,13,12, 9, 8, 7, + 5, 4, 4, 5,10,13,11,11,11, 9, 7, 5, 5, 5, 9,12, + 13,12,13,12,10, 8, 8, 7, 9,13,14,14,14,14,13,11, + 11,10,10,13, +}; + +static const static_codebook _huff_book__16c2_s_short = { + 2, 100, + (char *)_huff_lengthlist__16c2_s_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__8c0_s_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__8c0_s_p1_0[] = { + 1, 5, 4, 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 0, + 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _8c0_s_p1_0 = { + 8, 6561, + (char *)_vq_lengthlist__8c0_s_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__8c0_s_p1_0, + 0 +}; + +static const long _vq_quantlist__8c0_s_p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__8c0_s_p3_0[] = { + 1, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 6, 7, 7, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 5, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 7, 8, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 7, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +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, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _8c0_s_p3_0 = { + 4, 625, + (char *)_vq_lengthlist__8c0_s_p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__8c0_s_p3_0, + 0 +}; + +static const long _vq_quantlist__8c0_s_p4_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__8c0_s_p4_0[] = { + 1, 2, 3, 7, 7, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, + 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 7, 7, + 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0, + 8, 8, 0, 0, 0, 0, 0, 0, 0, 9, 8, 0, 0, 0, 0, 0, + 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _8c0_s_p4_0 = { + 2, 81, + (char *)_vq_lengthlist__8c0_s_p4_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__8c0_s_p4_0, + 0 +}; + +static const long _vq_quantlist__8c0_s_p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__8c0_s_p5_0[] = { + 1, 3, 3, 5, 5, 7, 6, 8, 8, 0, 0, 0, 7, 7, 7, 7, + 8, 8, 0, 0, 0, 7, 7, 7, 7, 8, 9, 0, 0, 0, 8, 8, + 8, 8, 9, 9, 0, 0, 0, 8, 8, 8, 8, 9, 9, 0, 0, 0, + 9, 9, 8, 8,10,10, 0, 0, 0, 9, 9, 8, 8,10,10, 0, + 0, 0,10,10, 9, 9,10,10, 0, 0, 0, 0, 0, 9, 9,10, + 10, +}; + +static const static_codebook _8c0_s_p5_0 = { + 2, 81, + (char *)_vq_lengthlist__8c0_s_p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__8c0_s_p5_0, + 0 +}; + +static const long _vq_quantlist__8c0_s_p6_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__8c0_s_p6_0[] = { + 1, 3, 3, 6, 6, 8, 8, 9, 9, 8, 8,10, 9,10,10,11, + 11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11,11, + 11,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11, + 11,12,11, 0, 0, 0, 8, 8, 9, 9,10,10, 9, 9,10,10, + 11,11,12,12, 0, 0, 0, 8, 8, 9, 9,10,10, 9, 9,11, + 10,11,11,12,12, 0, 0, 0, 9, 9, 9, 9,10,10,10,10, + 11,11,11,12,12,12, 0, 0, 0, 9, 9, 9, 9,10,10,10, + 10,11,11,12,12,13,13, 0, 0, 0,10,10,10,10,11,11, + 10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0,10, 9,10, + 11,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9, + 10, 9,10,11,12,12,13,13,14,13, 0, 0, 0, 0, 0, 9, + 9, 9,10,10,10,11,11,13,12,13,13, 0, 0, 0, 0, 0, + 10,10,10,10,11,11,12,12,13,13,14,14, 0, 0, 0, 0, + 0, 0, 0,10,10,11,11,12,12,13,13,13,14, 0, 0, 0, + 0, 0, 0, 0,11,11,11,11,12,12,13,14,14,14, 0, 0, + 0, 0, 0, 0, 0,11,11,11,11,12,12,13,13,14,13, 0, + 0, 0, 0, 0, 0, 0,11,11,12,12,13,13,14,14,14,14, + 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,14, + 14, +}; + +static const static_codebook _8c0_s_p6_0 = { + 2, 289, + (char *)_vq_lengthlist__8c0_s_p6_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__8c0_s_p6_0, + 0 +}; + +static const long _vq_quantlist__8c0_s_p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__8c0_s_p7_0[] = { + 1, 4, 4, 7, 6, 6, 7, 6, 6, 4, 7, 7,11, 9,10,12, + 9,10, 4, 7, 7,10,10,10,11, 9, 9, 6,11,10,11,11, + 12,11,11,11, 6,10,10,11,11,12,11,10,10, 6, 9,10, + 11,11,11,11,10,10, 7,10,11,12,11,11,12,11,12, 6, + 9, 9,10, 9, 9,11,10,10, 6, 9, 9,10,10,10,11,10, + 10, +}; + +static const static_codebook _8c0_s_p7_0 = { + 4, 81, + (char *)_vq_lengthlist__8c0_s_p7_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__8c0_s_p7_0, + 0 +}; + +static const long _vq_quantlist__8c0_s_p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__8c0_s_p7_1[] = { + 1, 3, 3, 6, 6, 8, 8, 9, 9, 9, 9,10,10,10, 7, 7, + 8, 8, 9, 9, 9, 9,10,10, 9, 7, 7, 8, 8, 9, 9, 9, + 9,10,10,10, 8, 8, 9, 9, 9, 9, 9, 9,10,10,10, 8, + 8, 9, 9, 9, 9, 8, 9,10,10,10, 8, 8, 9, 9, 9,10, + 10,10,10,10,10, 9, 9, 9, 9, 9, 9,10,10,11,10,11, + 9, 9, 9, 9,10,10,10,10,11,11,11,10,10, 9, 9,10, + 10,10, 9,11,10,10,10,10,10,10, 9, 9,10,10,11,11, + 10,10,10, 9, 9, 9,10,10,10, +}; + +static const static_codebook _8c0_s_p7_1 = { + 2, 121, + (char *)_vq_lengthlist__8c0_s_p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__8c0_s_p7_1, + 0 +}; + +static const long _vq_quantlist__8c0_s_p8_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__8c0_s_p8_0[] = { + 1, 4, 4, 7, 6, 7, 7, 7, 7, 8, 8, 9, 9, 7, 6, 6, + 7, 7, 8, 8, 7, 7, 8, 9,10,10, 7, 6, 6, 7, 7, 8, + 7, 7, 7, 9, 9,10,12, 0, 8, 8, 8, 8, 8, 9, 8, 8, + 9, 9,10,10, 0, 8, 8, 8, 8, 8, 9, 8, 9, 9, 9,11, + 10, 0, 0,13, 9, 8, 9, 9, 9, 9,10,10,11,11, 0,13, + 0, 9, 9, 9, 9, 9, 9,11,10,11,11, 0, 0, 0, 8, 9, + 10, 9,10,10,13,11,12,12, 0, 0, 0, 8, 9, 9, 9,10, + 10,13,12,12,13, 0, 0, 0,12, 0,10,10,12,11,10,11, + 12,12, 0, 0, 0,13,13,10,10,10,11,12, 0,13, 0, 0, + 0, 0, 0, 0,13,11, 0,12,12,12,13,12, 0, 0, 0, 0, + 0, 0,13,13,11,13,13,11,12, +}; + +static const static_codebook _8c0_s_p8_0 = { + 2, 169, + (char *)_vq_lengthlist__8c0_s_p8_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__8c0_s_p8_0, + 0 +}; + +static const long _vq_quantlist__8c0_s_p8_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__8c0_s_p8_1[] = { + 1, 3, 4, 5, 5, 7, 6, 6, 6, 5, 7, 7, 7, 6, 6, 7, + 7, 7, 6, 6, 7, 7, 7, 6, 6, +}; + +static const static_codebook _8c0_s_p8_1 = { + 2, 25, + (char *)_vq_lengthlist__8c0_s_p8_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__8c0_s_p8_1, + 0 +}; + +static const long _vq_quantlist__8c0_s_p9_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__8c0_s_p9_0[] = { + 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, +}; + +static const static_codebook _8c0_s_p9_0 = { + 4, 81, + (char *)_vq_lengthlist__8c0_s_p9_0, + 1, -518803456, 1628680192, 2, 0, + (long *)_vq_quantlist__8c0_s_p9_0, + 0 +}; + +static const long _vq_quantlist__8c0_s_p9_1[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__8c0_s_p9_1[] = { + 1, 4, 4, 5, 5,10, 8,11,11,11,11,11,11,11,11, 6, + 6, 6, 7, 6,11,10,11,11,11,11,11,11,11,11, 7, 5, + 6, 6, 6, 8, 7,11,11,11,11,11,11,11,11,11, 7, 8, + 8, 8, 9, 9,11,11,11,11,11,11,11,11,11, 9, 8, 7, + 8, 9,11,11,11,11,11,11,11,11,11,11,11,10,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,10,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11, +}; + +static const static_codebook _8c0_s_p9_1 = { + 2, 225, + (char *)_vq_lengthlist__8c0_s_p9_1, + 1, -520986624, 1620377600, 4, 0, + (long *)_vq_quantlist__8c0_s_p9_1, + 0 +}; + +static const long _vq_quantlist__8c0_s_p9_2[] = { + 10, + 9, + 11, + 8, + 12, + 7, + 13, + 6, + 14, + 5, + 15, + 4, + 16, + 3, + 17, + 2, + 18, + 1, + 19, + 0, + 20, +}; + +static const char _vq_lengthlist__8c0_s_p9_2[] = { + 1, 5, 5, 7, 7, 8, 7, 8, 8,10,10, 9, 9,10,10,10, + 11,11,10,12,11,12,12,12, 9, 8, 8, 8, 8, 8, 9,10, + 10,10,10,11,11,11,10,11,11,12,12,11,12, 8, 8, 7, + 7, 8, 9,10,10,10, 9,10,10, 9,10,10,11,11,11,11, + 11,11, 9, 9, 9, 9, 8, 9,10,10,11,10,10,11,11,12, + 10,10,12,12,11,11,10, 9, 9,10, 8, 9,10,10,10, 9, + 10,10,11,11,10,11,10,10,10,12,12,12, 9,10, 9,10, + 9, 9,10,10,11,11,11,11,10,10,10,11,12,11,12,11, + 12,10,11,10,11, 9,10, 9,10, 9,10,10, 9,10,10,11, + 10,11,11,11,11,12,11, 9,10,10,10,10,11,11,11,11, + 11,10,11,11,11,11,10,12,10,12,12,11,12,10,10,11, + 10, 9,11,10,11, 9,10,11,10,10,10,11,11,11,11,12, + 12,10, 9, 9,11,10, 9,12,11,10,12,12,11,11,11,11, + 10,11,11,12,11,10,12, 9,11,10,11,10,10,11,10,11, + 9,10,10,10,11,12,11,11,12,11,10,10,11,11, 9,10, + 10,12,10,11,10,10,10, 9,10,10,10,10, 9,10,10,11, + 11,11,11,12,11,10,10,10,10,11,11,10,11,11, 9,11, + 10,12,10,12,11,10,11,10,10,10,11,10,10,11,11,10, + 11,10,10,10,10,11,11,12,10,10,10,11,10,11,12,11, + 10,11,10,10,11,11,10,12,10, 9,10,10,11,11,11,10, + 12,10,10,11,11,11,10,10,11,10,10,10,11,10,11,10, + 12,11,11,10,10,10,12,10,10,11, 9,10,11,11,11,10, + 10,11,10,10, 9,11,11,12,12,11,12,11,11,11,11,11, + 11, 9,10,11,10,12,10,10,10,10,11,10,10,11,10,10, + 12,10,10,10,10,10, 9,12,10,10,10,10,12, 9,11,10, + 10,11,10,12,12,10,12,12,12,10,10,10,10, 9,10,11, + 10,10,12,10,10,12,11,10,11,10,10,12,11,10,12,10, + 10,11, 9,11,10, 9,10, 9,10, +}; + +static const static_codebook _8c0_s_p9_2 = { + 2, 441, + (char *)_vq_lengthlist__8c0_s_p9_2, + 1, -529268736, 1611661312, 5, 0, + (long *)_vq_quantlist__8c0_s_p9_2, + 0 +}; + +static const char _huff_lengthlist__8c0_s_single[] = { + 4, 5,18, 7,10, 6, 7, 8, 9,10, 5, 2,18, 5, 7, 5, + 6, 7, 8,11,17,17,17,17,17,17,17,17,17,17, 7, 4, + 17, 6, 9, 6, 8,10,12,15,11, 7,17, 9, 6, 6, 7, 9, + 11,15, 6, 4,17, 6, 6, 4, 5, 8,11,16, 6, 6,17, 8, + 6, 5, 6, 9,13,16, 8, 9,17,11, 9, 8, 8,11,13,17, + 9,12,17,15,14,13,12,13,14,17,12,15,17,17,17,17, + 17,16,17,17, +}; + +static const static_codebook _huff_book__8c0_s_single = { + 2, 100, + (char *)_huff_lengthlist__8c0_s_single, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static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0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _8c1_s_p1_0 = { + 8, 6561, + (char *)_vq_lengthlist__8c1_s_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__8c1_s_p1_0, + 0 +}; + +static const long _vq_quantlist__8c1_s_p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__8c1_s_p3_0[] = { + 2, 4, 4, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 6, 6, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _8c1_s_p3_0 = { + 4, 625, + (char *)_vq_lengthlist__8c1_s_p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__8c1_s_p3_0, + 0 +}; + +static const long _vq_quantlist__8c1_s_p4_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__8c1_s_p4_0[] = { + 1, 2, 3, 7, 7, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, + 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 7, 7, + 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0, + 8, 8, 0, 0, 0, 0, 0, 0, 0, 9, 8, 0, 0, 0, 0, 0, + 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _8c1_s_p4_0 = { + 2, 81, + (char *)_vq_lengthlist__8c1_s_p4_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__8c1_s_p4_0, + 0 +}; + +static const long _vq_quantlist__8c1_s_p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__8c1_s_p5_0[] = { + 1, 3, 3, 4, 5, 6, 6, 8, 8, 0, 0, 0, 8, 8, 7, 7, + 9, 9, 0, 0, 0, 8, 8, 7, 7, 9, 9, 0, 0, 0, 9,10, + 8, 8, 9, 9, 0, 0, 0,10,10, 8, 8, 9, 9, 0, 0, 0, + 11,10, 8, 8,10,10, 0, 0, 0,11,11, 8, 8,10,10, 0, + 0, 0,12,12, 9, 9,10,10, 0, 0, 0, 0, 0, 9, 9,10, + 10, +}; + +static const static_codebook _8c1_s_p5_0 = { + 2, 81, + (char *)_vq_lengthlist__8c1_s_p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__8c1_s_p5_0, + 0 +}; + +static const long _vq_quantlist__8c1_s_p6_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__8c1_s_p6_0[] = { + 1, 3, 3, 5, 5, 8, 8, 8, 8, 9, 9,10,10,11,11,11, + 11, 0, 0, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11,11, + 12,12, 0, 0, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11, + 11,12,12, 0, 0, 0, 9, 9, 8, 8,10,10,10,10,11,11, + 12,12,12,12, 0, 0, 0, 9, 9, 8, 8,10,10,10,10,11, + 11,12,12,12,12, 0, 0, 0,10,10, 9, 9,10,10,10,10, + 11,11,12,12,13,13, 0, 0, 0,10,10, 9, 9,10,10,10, + 10,11,11,12,12,13,13, 0, 0, 0,11,11, 9, 9,10,10, + 10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9,10, + 10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9, + 10,10,11,11,12,12,12,12,13,13, 0, 0, 0, 0, 0, 9, + 9,10,10,11,11,12,11,12,12,13,13, 0, 0, 0, 0, 0, + 10,10,11,11,11,11,12,12,13,12,13,13, 0, 0, 0, 0, + 0, 0, 0,11,10,11,11,12,12,13,13,13,13, 0, 0, 0, + 0, 0, 0, 0,11,11,12,12,12,12,13,13,13,14, 0, 0, + 0, 0, 0, 0, 0,11,11,12,12,12,12,13,13,14,13, 0, + 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,13,13,14,14, + 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,13,13,13,13,14, + 14, +}; + +static const static_codebook _8c1_s_p6_0 = { + 2, 289, + (char *)_vq_lengthlist__8c1_s_p6_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__8c1_s_p6_0, + 0 +}; + +static const long _vq_quantlist__8c1_s_p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__8c1_s_p7_0[] = { + 1, 4, 4, 6, 6, 6, 7, 6, 6, 4, 7, 7,10, 9, 9,10, + 9, 9, 5, 7, 7,10, 9, 9,10, 9, 9, 6,10,10,10,10, + 10,11,10,10, 6, 9, 9,10, 9,10,11,10,10, 6, 9, 9, + 10, 9, 9,11, 9,10, 7,10,10,11,11,11,11,10,10, 6, + 9, 9,10,10,10,11, 9, 9, 6, 9, 9,10,10,10,10, 9, + 9, +}; + +static const static_codebook _8c1_s_p7_0 = { + 4, 81, + (char *)_vq_lengthlist__8c1_s_p7_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__8c1_s_p7_0, + 0 +}; + +static const long _vq_quantlist__8c1_s_p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__8c1_s_p7_1[] = { + 2, 3, 3, 5, 5, 7, 7, 7, 7, 7, 7,10,10, 9, 7, 7, + 7, 7, 8, 8, 8, 8, 9, 9, 9, 7, 7, 7, 7, 8, 8, 8, + 8,10,10,10, 7, 7, 7, 7, 8, 8, 8, 8,10,10,10, 7, + 7, 7, 7, 8, 8, 8, 8,10,10,10, 8, 8, 8, 8, 8, 8, + 8, 8,10,10,10, 8, 8, 8, 8, 8, 8, 8, 8,10,10,10, + 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,10,10, 8, 8, 8, + 8, 8, 8,10,10,10,10,10, 8, 8, 8, 8, 8, 8,10,10, + 10,10,10, 8, 8, 8, 8, 8, 8, +}; + +static const static_codebook _8c1_s_p7_1 = { + 2, 121, + (char *)_vq_lengthlist__8c1_s_p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__8c1_s_p7_1, + 0 +}; + +static const long _vq_quantlist__8c1_s_p8_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__8c1_s_p8_0[] = { + 1, 4, 4, 6, 6, 8, 8, 8, 8, 9, 9,10,10, 7, 5, 5, + 7, 7, 8, 8, 8, 8, 9,10,11,11, 7, 5, 5, 7, 7, 8, + 8, 9, 9,10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9, + 9,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11, + 11, 0,12,12, 9, 9, 9, 9,10, 9,10,11,11,11, 0,13, + 12, 9, 8, 9, 9,10,10,11,11,12,11, 0, 0, 0, 9, 9, + 9, 9,10,10,11,11,12,12, 0, 0, 0,10,10, 9, 9,10, + 10,11,11,12,12, 0, 0, 0,13,13,10,10,11,11,12,11, + 13,12, 0, 0, 0,14,14,10,10,11,10,11,11,12,12, 0, + 0, 0, 0, 0,12,12,11,11,12,12,13,13, 0, 0, 0, 0, + 0,12,12,11,10,12,11,13,12, +}; + +static const static_codebook _8c1_s_p8_0 = { + 2, 169, + (char *)_vq_lengthlist__8c1_s_p8_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__8c1_s_p8_0, + 0 +}; + +static const long _vq_quantlist__8c1_s_p8_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__8c1_s_p8_1[] = { + 2, 3, 3, 5, 5, 6, 6, 6, 5, 5, 6, 6, 6, 5, 5, 6, + 6, 6, 5, 5, 6, 6, 6, 5, 5, +}; + +static const static_codebook _8c1_s_p8_1 = { + 2, 25, + (char *)_vq_lengthlist__8c1_s_p8_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__8c1_s_p8_1, + 0 +}; + +static const long _vq_quantlist__8c1_s_p9_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__8c1_s_p9_0[] = { + 1, 3, 3,10,10,10,10,10,10,10,10,10,10, 5, 6, 6, + 10,10,10,10,10,10,10,10,10,10, 6, 7, 8,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10, 9, 9, 9, 9, +}; + +static const static_codebook _8c1_s_p9_0 = { + 2, 169, + (char *)_vq_lengthlist__8c1_s_p9_0, + 1, -513964032, 1628680192, 4, 0, + (long *)_vq_quantlist__8c1_s_p9_0, + 0 +}; + +static const long _vq_quantlist__8c1_s_p9_1[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__8c1_s_p9_1[] = { + 1, 4, 4, 5, 5, 7, 7, 9, 9,11,11,12,12,13,13, 6, + 5, 5, 6, 6, 9, 9,10,10,12,12,12,13,15,14, 6, 5, + 5, 7, 7, 9, 9,10,10,12,12,12,13,14,13,17, 7, 7, + 8, 8,10,10,11,11,12,13,13,13,13,13,17, 7, 7, 8, + 8,10,10,11,11,13,13,13,13,14,14,17,11,11, 9, 9, + 11,11,12,12,12,13,13,14,15,13,17,12,12, 9, 9,11, + 11,12,12,13,13,13,13,14,16,17,17,17,11,12,12,12, + 13,13,13,14,15,14,15,15,17,17,17,12,12,11,11,13, + 13,14,14,15,14,15,15,17,17,17,15,15,13,13,14,14, + 15,14,15,15,16,15,17,17,17,15,15,13,13,13,14,14, + 15,15,15,15,16,17,17,17,17,16,14,15,14,14,15,14, + 14,15,15,15,17,17,17,17,17,14,14,16,14,15,15,15, + 15,15,15,17,17,17,17,17,17,16,16,15,17,15,15,14, + 17,15,17,16,17,17,17,17,16,15,14,15,15,15,15,15, + 15, +}; + +static const static_codebook _8c1_s_p9_1 = { + 2, 225, + (char *)_vq_lengthlist__8c1_s_p9_1, + 1, -520986624, 1620377600, 4, 0, + (long *)_vq_quantlist__8c1_s_p9_1, + 0 +}; + +static const long _vq_quantlist__8c1_s_p9_2[] = { + 10, + 9, + 11, + 8, + 12, + 7, + 13, + 6, + 14, + 5, + 15, + 4, + 16, + 3, + 17, + 2, + 18, + 1, + 19, + 0, + 20, +}; + +static const char _vq_lengthlist__8c1_s_p9_2[] = { + 2, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 9, 8, 9, 9, 9, + 9, 9, 9, 9, 9,11,11,12, 7, 7, 7, 7, 8, 8, 9, 9, + 9, 9,10,10,10,10,10,10,10,10,11,11,11, 7, 7, 7, + 7, 8, 8, 9, 8, 9, 9, 9, 9, 9, 9,10,10,10,10,11, + 11,12, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9,10,10,10,10, + 10,10,10,10,11,11,11, 7, 7, 8, 8, 8, 8, 9, 9, 9, + 9,10,10,10,10,10,10,10,10,11,11,11, 8, 8, 8, 8, + 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,11,11, + 11, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9,10,10,10,10,10, + 10,10,10,11,12,11, 9, 9, 8, 9, 9, 9, 9, 9,10,10, + 10,10,10,10,10,10,10,10,11,11,11,11,11, 8, 8, 9, + 9, 9, 9,10,10,10,10,10,10,10,10,10,10,11,12,11, + 12,11, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10, + 10,10,11,11,11,11,11, 9, 9, 9, 9,10,10,10,10,10, + 10,10,10,10,10,10,10,12,11,12,11,11, 9, 9, 9,10, + 10,10,10,10,10,10,10,10,10,10,10,10,12,11,11,11, + 11,11,11,10,10,10,10,10,10,10,10,10,10,10,10,10, + 11,11,11,12,11,11,12,11,10,10,10,10,10,10,10,10, + 10,10,10,10,11,10,11,11,11,11,11,11,11,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,11,11,12,11,12, + 11,11,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 11,11,12,11,12,11,11,11,11,10,10,10,10,10,10,10, + 10,10,10,10,10,11,11,12,11,11,12,11,11,12,10,10, + 11,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11, + 11,11,11,10,10,10,10,10,10,10,10,10,10,10,10,12, + 12,11,12,11,11,12,12,12,11,11,10,10,10,10,10,10, + 10,10,10,11,12,12,11,12,12,11,12,11,11,11,11,10, + 10,10,10,10,10,10,10,10,10, +}; + +static const static_codebook _8c1_s_p9_2 = { + 2, 441, + (char *)_vq_lengthlist__8c1_s_p9_2, + 1, -529268736, 1611661312, 5, 0, + (long *)_vq_quantlist__8c1_s_p9_2, + 0 +}; + +static const char _huff_lengthlist__8c1_s_single[] = { + 4, 6,18, 8,11, 8, 8, 9, 9,10, 4, 4,18, 5, 9, 5, + 6, 7, 8,10,18,18,18,18,17,17,17,17,17,17, 7, 5, + 17, 6,11, 6, 7, 8, 9,12,12, 9,17,12, 8, 8, 9,10, + 10,13, 7, 5,17, 6, 8, 4, 5, 6, 8,10, 6, 5,17, 6, + 8, 5, 4, 5, 7, 9, 7, 7,17, 8, 9, 6, 5, 5, 6, 8, + 8, 8,17, 9,11, 8, 6, 6, 6, 7, 9,10,17,12,12,10, + 9, 7, 7, 8, +}; + +static const static_codebook _huff_book__8c1_s_single = { + 2, 100, + (char *)_huff_lengthlist__8c1_s_single, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44c2_s_long[] = { + 6, 6,12,10,10,10, 9,10,12,12, 6, 1,10, 5, 6, 6, + 7, 9,11,14,12, 9, 8,11, 7, 8, 9,11,13,15,10, 5, + 12, 7, 8, 7, 9,12,14,15,10, 6, 7, 8, 5, 6, 7, 9, + 12,14, 9, 6, 8, 7, 6, 6, 7, 9,12,12, 9, 7, 9, 9, + 7, 6, 6, 7,10,10,10, 9,10,11, 8, 7, 6, 6, 8,10, + 12,11,13,13,11,10, 8, 8, 8,10,11,13,15,15,14,13, + 10, 8, 8, 9, +}; + +static const static_codebook _huff_book__44c2_s_long = { + 2, 100, + (char *)_huff_lengthlist__44c2_s_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44c2_s_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c2_s_p1_0[] = { + 2, 4, 4, 0, 0, 0, 0, 0, 0, 5, 6, 6, 0, 0, 0, 0, + 0, 0, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c2_s_p1_0 = { + 8, 6561, + (char *)_vq_lengthlist__44c2_s_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44c2_s_p1_0, + 0 +}; + +static const long _vq_quantlist__44c2_s_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c2_s_p2_0[] = { + 1, 4, 4, 0, 0, 0, 7, 7, 0, 0, 0, 7, 7, 0, 0, 0, + 8, 8, 0, 0, 0, 0, 0, 0, 0, 4, 6, 6, 0, 0, 0, 8, + 8, 0, 0, 0, 8, 8, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, + 0, 0, 4, 6, 6, 0, 0, 0, 8, 8, 0, 0, 0, 8, 8, 0, + 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0,11,12, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c2_s_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__44c2_s_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c2_s_p2_0, + 0 +}; + +static const long _vq_quantlist__44c2_s_p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c2_s_p3_0[] = { + 2, 4, 3, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 6, 6, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 9, 9, + 0, 0, 0, 0, 0, 0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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c2_s_p3_0 = { + 4, 625, + (char *)_vq_lengthlist__44c2_s_p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c2_s_p3_0, + 0 +}; + +static const long _vq_quantlist__44c2_s_p4_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c2_s_p4_0[] = { + 1, 3, 3, 6, 6, 0, 0, 0, 0, 0, 6, 6, 6, 6, 0, 0, + 0, 0, 0, 6, 6, 6, 6, 0, 0, 0, 0, 0, 7, 7, 6, 6, + 0, 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 0, + 7, 8, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, + 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c2_s_p4_0 = { + 2, 81, + (char *)_vq_lengthlist__44c2_s_p4_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c2_s_p4_0, + 0 +}; + +static const long _vq_quantlist__44c2_s_p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c2_s_p5_0[] = { + 1, 3, 3, 6, 6, 7, 7, 9, 9, 0, 7, 7, 7, 7, 7, 7, + 9, 9, 0, 7, 7, 7, 7, 7, 7, 9, 9, 0, 8, 8, 7, 7, + 8, 8,10,10, 0, 0, 0, 7, 7, 8, 8,10,10, 0, 0, 0, + 9, 9, 8, 8,10,10, 0, 0, 0, 9, 9, 8, 8,10,10, 0, + 0, 0,10,10, 9, 9,11,11, 0, 0, 0, 0, 0, 9, 9,11, + 11, +}; + +static const static_codebook _44c2_s_p5_0 = { + 2, 81, + (char *)_vq_lengthlist__44c2_s_p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c2_s_p5_0, + 0 +}; + +static const long _vq_quantlist__44c2_s_p6_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c2_s_p6_0[] = { + 1, 4, 3, 6, 6, 8, 8, 9, 9, 9, 9, 9, 9,10,10,11, + 11, 0, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11,11, + 12,11, 0, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11, + 11,11,12, 0, 8, 8, 7, 7, 9, 9,10,10, 9, 9,10,10, + 11,11,12,12, 0, 0, 0, 7, 7, 9, 9,10,10,10, 9,10, + 10,11,11,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10,10, + 11,11,11,11,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10, + 10,11,11,12,12,12,12, 0, 0, 0, 9, 9, 9, 9,10,10, + 10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 9, 9,10, + 10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9, + 10,10,11,11,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, + 9,10,10,11,11,11,11,12,12,13,13, 0, 0, 0, 0, 0, + 10,10,10,10,11,11,12,12,13,12,13,13, 0, 0, 0, 0, + 0, 0, 0,10,10,11,11,12,12,13,13,13,13, 0, 0, 0, + 0, 0, 0, 0,11,11,12,12,12,12,13,13,13,14, 0, 0, + 0, 0, 0, 0, 0,11,11,12,12,12,12,13,13,13,14, 0, + 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,13,13,14,14, + 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,13,13,13,13,14, + 14, +}; + +static const static_codebook _44c2_s_p6_0 = { + 2, 289, + (char *)_vq_lengthlist__44c2_s_p6_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c2_s_p6_0, + 0 +}; + +static const long _vq_quantlist__44c2_s_p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c2_s_p7_0[] = { + 1, 4, 4, 7, 6, 6, 7, 6, 6, 4, 7, 7,10, 9, 9,11, + 9, 9, 4, 7, 7,10, 9, 9,10, 9, 9, 7,10,10,11,10, + 11,11,10,11, 6, 9, 9,11,10,10,11,10,10, 6, 9, 9, + 11,10,11,11,10,10, 7,11,10,11,11,11,12,11,11, 6, + 9, 9,11,10,10,11,11,10, 6, 9, 9,11,10,10,12,10, + 11, +}; + +static const static_codebook _44c2_s_p7_0 = { + 4, 81, + (char *)_vq_lengthlist__44c2_s_p7_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44c2_s_p7_0, + 0 +}; + +static const long _vq_quantlist__44c2_s_p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44c2_s_p7_1[] = { + 2, 3, 4, 6, 6, 7, 7, 7, 7, 7, 7, 9, 7, 7, 6, 6, + 7, 7, 8, 8, 8, 8, 9, 6, 6, 6, 6, 7, 7, 8, 8, 8, + 8,10, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,10,10,10, 7, + 7, 7, 7, 8, 8, 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, + 8, 8,10,10,10, 7, 8, 8, 8, 8, 8, 8, 8,10,10,10, + 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,10,10, 8, 8, 8, + 8, 8, 8,10,10,10,10,10, 9, 9, 8, 8, 8, 8,10,10, + 10,10,10, 8, 8, 8, 8, 8, 8, +}; + +static const static_codebook _44c2_s_p7_1 = { + 2, 121, + (char *)_vq_lengthlist__44c2_s_p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44c2_s_p7_1, + 0 +}; + +static const long _vq_quantlist__44c2_s_p8_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c2_s_p8_0[] = { + 1, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 6, 5, 5, + 7, 7, 8, 8, 8, 8, 9, 9,10,10, 7, 6, 5, 7, 7, 8, + 8, 8, 8, 9, 9,10,10, 0, 8, 8, 8, 8, 9, 9, 9, 9, + 10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11, + 11, 0,12,12, 9, 9,10,10,10,10,11,11,11,11, 0,13, + 13, 9, 9,10,10,10,10,11,11,12,12, 0, 0, 0,10,10, + 10,10,11,11,12,12,12,13, 0, 0, 0,10,10,10,10,11, + 11,12,12,12,12, 0, 0, 0,14,14,10,11,11,11,12,12, + 13,13, 0, 0, 0,14,14,11,10,11,11,13,12,13,13, 0, + 0, 0, 0, 0,12,12,11,12,13,12,14,14, 0, 0, 0, 0, + 0,12,12,12,12,13,12,14,14, +}; + +static const static_codebook _44c2_s_p8_0 = { + 2, 169, + (char *)_vq_lengthlist__44c2_s_p8_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44c2_s_p8_0, + 0 +}; + +static const long _vq_quantlist__44c2_s_p8_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c2_s_p8_1[] = { + 2, 4, 4, 5, 4, 6, 5, 5, 5, 5, 6, 5, 5, 5, 5, 6, + 5, 5, 5, 5, 6, 6, 6, 5, 5, +}; + +static const static_codebook _44c2_s_p8_1 = { + 2, 25, + (char *)_vq_lengthlist__44c2_s_p8_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c2_s_p8_1, + 0 +}; + +static const long _vq_quantlist__44c2_s_p9_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c2_s_p9_0[] = { + 1, 5, 4,12,12,12,12,12,12,12,12,12,12, 4, 9, 8, + 11,11,11,11,11,11,11,11,11,11, 2, 8, 7,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,10,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11, +}; + +static const static_codebook _44c2_s_p9_0 = { + 2, 169, + (char *)_vq_lengthlist__44c2_s_p9_0, + 1, -514541568, 1627103232, 4, 0, + (long *)_vq_quantlist__44c2_s_p9_0, + 0 +}; + +static const long _vq_quantlist__44c2_s_p9_1[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c2_s_p9_1[] = { + 1, 4, 4, 6, 6, 7, 6, 8, 8,10, 9,10,10, 6, 5, 5, + 7, 7, 8, 7,10, 9,11,11,12,13, 6, 5, 5, 7, 7, 8, + 8,10,10,11,11,13,13,18, 8, 8, 8, 8, 9, 9,10,10, + 12,12,12,13,18, 8, 8, 8, 8, 9, 9,10,10,12,12,13, + 13,18,11,11, 8, 8,10,10,11,11,12,11,13,12,18,11, + 11, 9, 7,10,10,11,11,11,12,12,13,17,17,17,10,10, + 11,11,12,12,12,10,12,12,17,17,17,11,10,11,10,13, + 12,11,12,12,12,17,17,17,15,14,11,11,12,11,13,10, + 13,12,17,17,17,14,14,12,10,11,11,13,13,13,13,17, + 17,16,17,16,13,13,12,10,13,10,14,13,17,16,17,16, + 17,13,12,12,10,13,11,14,14, +}; + +static const static_codebook _44c2_s_p9_1 = { + 2, 169, + (char *)_vq_lengthlist__44c2_s_p9_1, + 1, -522616832, 1620115456, 4, 0, + (long *)_vq_quantlist__44c2_s_p9_1, + 0 +}; + +static const long _vq_quantlist__44c2_s_p9_2[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c2_s_p9_2[] = { + 2, 4, 4, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, + 8,10, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, + 9, 9,10, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9,10, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, + 9, 9, 9, 9,10,10,10, 8, 7, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 9, 9,10,11,11, 8, 8, 8, 8, 9, 9, 9, 9, + 9, 9,10, 9, 9, 9,10,11,10, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 9,10,10,10,10,11,10, 8, 8, 9, 9, 9, 9, + 9, 9,10, 9, 9,10, 9,10,11,10,11,11,11, 8, 8, 9, + 9, 9, 9, 9, 9, 9, 9,10,10,11,11,11,11,11, 9, 9, + 9, 9, 9, 9,10, 9, 9, 9,10,10,11,11,11,11,11, 9, + 9, 9, 9, 9, 9, 9, 9, 9,10, 9,10,11,11,11,11,11, + 9, 9, 9, 9,10,10, 9, 9, 9,10,10,10,11,11,11,11, + 11,11,11, 9, 9, 9,10, 9, 9,10,10,10,10,11,11,10, + 11,11,11,11,10, 9,10,10, 9, 9, 9, 9,10,10,11,10, + 11,11,11,11,11, 9, 9, 9, 9,10, 9,10,10,10,10,11, + 10,11,11,11,11,11,10,10, 9, 9,10, 9,10,10,10,10, + 10,10,10,11,11,11,11,11,11, 9, 9,10, 9,10, 9,10, + 10, +}; + +static const static_codebook _44c2_s_p9_2 = { + 2, 289, + (char *)_vq_lengthlist__44c2_s_p9_2, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c2_s_p9_2, + 0 +}; + +static const char _huff_lengthlist__44c2_s_short[] = { + 11, 9,13,12,12,11,12,12,13,15, 8, 2,11, 4, 8, 5, + 7,10,12,15,13, 7,10, 9, 8, 8,10,13,17,17,11, 4, + 12, 5, 9, 5, 8,11,14,16,12, 6, 8, 7, 6, 6, 8,11, + 13,16,11, 4, 9, 5, 6, 4, 6,10,13,16,11, 6,11, 7, + 7, 6, 7,10,13,15,13, 9,12, 9, 8, 6, 8,10,12,14, + 14,10,10, 8, 6, 5, 6, 9,11,13,15,11,11, 9, 6, 5, + 6, 8, 9,12, +}; + +static const static_codebook _huff_book__44c2_s_short = { + 2, 100, + (char *)_huff_lengthlist__44c2_s_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44c3_s_long[] = { + 5, 6,11,11,11,11,10,10,12,11, 5, 2,11, 5, 6, 6, + 7, 9,11,13,13,10, 7,11, 6, 7, 8, 9,10,12,11, 5, + 11, 6, 8, 7, 9,11,14,15,11, 6, 6, 8, 4, 5, 7, 8, + 10,13,10, 5, 7, 7, 5, 5, 6, 8,10,11,10, 7, 7, 8, + 6, 5, 5, 7, 9, 9,11, 8, 8,11, 8, 7, 6, 6, 7, 9, + 12,11,10,13, 9, 9, 7, 7, 7, 9,11,13,12,15,12,11, + 9, 8, 8, 8, +}; + +static const static_codebook _huff_book__44c3_s_long = { + 2, 100, + (char *)_huff_lengthlist__44c3_s_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44c3_s_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c3_s_p1_0[] = { + 2, 4, 4, 0, 0, 0, 0, 0, 0, 5, 6, 6, 0, 0, 0, 0, + 0, 0, 5, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0, 0, + 0, 0, 0, 6, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 6, 8, 7, 0, 0, + 0, 0, 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, + 0, +}; + +static const static_codebook _44c3_s_p1_0 = { + 8, 6561, + (char *)_vq_lengthlist__44c3_s_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44c3_s_p1_0, + 0 +}; + +static const long _vq_quantlist__44c3_s_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c3_s_p2_0[] = { + 2, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0, + 7, 8, 0, 0, 0, 0, 0, 0, 0, 5, 6, 6, 0, 0, 0, 7, + 7, 0, 0, 0, 7, 7, 0, 0, 0,10,10, 0, 0, 0, 0, 0, + 0, 0, 5, 6, 6, 0, 0, 0, 7, 7, 0, 0, 0, 7, 7, 0, + 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 7, 7, 0, 0, + 0, 7, 7, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 5, + 7, 7, 0, 0, 0, 7, 7, 0, 0, 0, 7, 7, 0, 0, 0, 9, + 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c3_s_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__44c3_s_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c3_s_p2_0, + 0 +}; + +static const long _vq_quantlist__44c3_s_p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c3_s_p3_0[] = { + 2, 4, 3, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 6, 6, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 9, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 6, 7, 9, 9, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c3_s_p3_0 = { + 4, 625, + (char *)_vq_lengthlist__44c3_s_p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c3_s_p3_0, + 0 +}; + +static const long _vq_quantlist__44c3_s_p4_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c3_s_p4_0[] = { + 2, 3, 3, 6, 6, 0, 0, 0, 0, 0, 4, 4, 6, 6, 0, 0, + 0, 0, 0, 4, 4, 6, 6, 0, 0, 0, 0, 0, 5, 5, 6, 6, + 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, + 7, 8, 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, + 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c3_s_p4_0 = { + 2, 81, + (char *)_vq_lengthlist__44c3_s_p4_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c3_s_p4_0, + 0 +}; + +static const long _vq_quantlist__44c3_s_p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c3_s_p5_0[] = { + 1, 3, 4, 6, 6, 7, 7, 9, 9, 0, 5, 5, 7, 7, 7, 8, + 9, 9, 0, 5, 5, 7, 7, 8, 8, 9, 9, 0, 7, 7, 8, 8, + 8, 8,10,10, 0, 0, 0, 8, 8, 8, 8,10,10, 0, 0, 0, + 9, 9, 9, 9,10,10, 0, 0, 0, 9, 9, 9, 9,10,10, 0, + 0, 0,10,10,10,10,11,11, 0, 0, 0, 0, 0,10,10,11, + 11, +}; + +static const static_codebook _44c3_s_p5_0 = { + 2, 81, + (char *)_vq_lengthlist__44c3_s_p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c3_s_p5_0, + 0 +}; + +static const long _vq_quantlist__44c3_s_p6_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c3_s_p6_0[] = { + 2, 3, 3, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,10,11, + 10, 0, 5, 5, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10,10, + 11,11, 0, 5, 5, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10, + 10,11,11, 0, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9,10,10, + 11,11,11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10, + 10,11,11,11,12, 0, 0, 0, 8, 8, 8, 8, 9, 9, 9, 9, + 10,10,11,11,12,12, 0, 0, 0, 8, 8, 8, 8, 9, 9, 9, + 9,10,10,11,11,12,12, 0, 0, 0, 9, 9, 9, 9,10,10, + 10,10,11,10,11,11,12,12, 0, 0, 0, 0, 0, 9, 9,10, + 10,10,10,11,11,11,11,12,12, 0, 0, 0, 0, 0, 9, 8, + 9, 9,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 8, + 8, 9, 9,10,10,11,11,12,11,12,12, 0, 0, 0, 0, 0, + 9,10,10,10,11,11,11,11,12,12,13,13, 0, 0, 0, 0, + 0, 0, 0,10,10,10,10,11,11,12,12,13,13, 0, 0, 0, + 0, 0, 0, 0,11,11,11,11,12,12,12,12,13,13, 0, 0, + 0, 0, 0, 0, 0,11,11,11,11,12,12,12,12,13,13, 0, + 0, 0, 0, 0, 0, 0,11,11,12,12,12,12,13,13,13,13, + 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,13, + 13, +}; + +static const static_codebook _44c3_s_p6_0 = { + 2, 289, + (char *)_vq_lengthlist__44c3_s_p6_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c3_s_p6_0, + 0 +}; + +static const long _vq_quantlist__44c3_s_p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c3_s_p7_0[] = { + 1, 4, 4, 7, 6, 6, 7, 6, 6, 4, 7, 7,10, 9, 9,11, + 9, 9, 4, 7, 7,10, 9, 9,11, 9, 9, 7,10,10,11,11, + 10,12,11,11, 6, 9, 9,11,10,10,11,10,10, 6, 9, 9, + 11,10,10,11,10,10, 7,11,11,11,11,11,12,11,11, 6, + 9, 9,11,10,10,11,10,10, 6, 9, 9,11,10,10,11,10, + 10, +}; + +static const static_codebook _44c3_s_p7_0 = { + 4, 81, + (char *)_vq_lengthlist__44c3_s_p7_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44c3_s_p7_0, + 0 +}; + +static const long _vq_quantlist__44c3_s_p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44c3_s_p7_1[] = { + 2, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8,10, 5, 5, 6, 6, + 7, 7, 8, 8, 8, 8,10, 5, 5, 6, 6, 7, 7, 8, 8, 8, + 8,10, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10, 7, + 7, 8, 7, 8, 8, 8, 8,10,10,10, 8, 8, 8, 8, 8, 8, + 8, 8,10,10,10, 7, 8, 8, 8, 8, 8, 8, 8,10,10,10, + 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,10,10, 8, 8, 8, + 8, 8, 8,10,10,10,10,10, 9, 9, 8, 8, 9, 8,10,10, + 10,10,10, 8, 8, 8, 8, 8, 8, +}; + +static const static_codebook _44c3_s_p7_1 = { + 2, 121, + (char *)_vq_lengthlist__44c3_s_p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44c3_s_p7_1, + 0 +}; + +static const long _vq_quantlist__44c3_s_p8_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c3_s_p8_0[] = { + 1, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10, 6, 5, 5, + 7, 7, 8, 8, 8, 8, 9, 9,10,10, 7, 5, 5, 7, 7, 8, + 8, 8, 8, 9, 9,11,10, 0, 8, 8, 8, 8, 9, 9, 9, 9, + 10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11, + 11, 0,12,12, 9, 9,10,10,10,10,11,11,11,12, 0,13, + 13, 9, 9,10,10,10,10,11,11,12,12, 0, 0, 0,10,10, + 10,10,11,11,12,12,12,12, 0, 0, 0,10,10,10,10,11, + 11,12,12,12,12, 0, 0, 0,14,14,11,11,11,11,12,12, + 13,13, 0, 0, 0,14,14,11,11,11,11,12,12,13,13, 0, + 0, 0, 0, 0,12,12,12,12,13,13,14,13, 0, 0, 0, 0, + 0,13,13,12,12,13,12,14,13, +}; + +static const static_codebook _44c3_s_p8_0 = { + 2, 169, + (char *)_vq_lengthlist__44c3_s_p8_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44c3_s_p8_0, + 0 +}; + +static const long _vq_quantlist__44c3_s_p8_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c3_s_p8_1[] = { + 2, 4, 4, 5, 5, 6, 5, 5, 5, 5, 6, 4, 5, 5, 5, 6, + 5, 5, 5, 5, 6, 6, 6, 5, 5, +}; + +static const static_codebook _44c3_s_p8_1 = { + 2, 25, + (char *)_vq_lengthlist__44c3_s_p8_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c3_s_p8_1, + 0 +}; + +static const long _vq_quantlist__44c3_s_p9_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c3_s_p9_0[] = { + 1, 4, 4,12,12,12,12,12,12,12,12,12,12, 4, 9, 8, + 12,12,12,12,12,12,12,12,12,12, 2, 9, 7,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,11,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11, +}; + +static const static_codebook _44c3_s_p9_0 = { + 2, 169, + (char *)_vq_lengthlist__44c3_s_p9_0, + 1, -514332672, 1627381760, 4, 0, + (long *)_vq_quantlist__44c3_s_p9_0, + 0 +}; + +static const long _vq_quantlist__44c3_s_p9_1[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__44c3_s_p9_1[] = { + 1, 4, 4, 6, 6, 7, 7, 8, 7, 9, 9,10,10,10,10, 6, + 5, 5, 7, 7, 8, 8,10, 8,11,10,12,12,13,13, 6, 5, + 5, 7, 7, 8, 8,10, 9,11,11,12,12,13,12,18, 8, 8, + 8, 8, 9, 9,10, 9,11,10,12,12,13,13,18, 8, 8, 8, + 8, 9, 9,10,10,11,11,13,12,14,13,18,11,11, 9, 9, + 10,10,11,11,11,12,13,12,13,14,18,11,11, 9, 8,11, + 10,11,11,11,11,12,12,14,13,18,18,18,10,11,10,11, + 12,12,12,12,13,12,14,13,18,18,18,10,11,11, 9,12, + 11,12,12,12,13,13,13,18,18,17,14,14,11,11,12,12, + 13,12,14,12,14,13,18,18,18,14,14,11,10,12, 9,12, + 13,13,13,13,13,18,18,17,16,18,13,13,12,12,13,11, + 14,12,14,14,17,18,18,17,18,13,12,13,10,12,11,14, + 14,14,14,17,18,18,18,18,15,16,12,12,13,10,14,12, + 14,15,18,18,18,16,17,16,14,12,11,13,10,13,13,14, + 15, +}; + +static const static_codebook _44c3_s_p9_1 = { + 2, 225, + (char *)_vq_lengthlist__44c3_s_p9_1, + 1, -522338304, 1620115456, 4, 0, + (long *)_vq_quantlist__44c3_s_p9_1, + 0 +}; + +static const long _vq_quantlist__44c3_s_p9_2[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c3_s_p9_2[] = { + 2, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, + 8,10, 6, 6, 7, 7, 8, 7, 8, 8, 8, 8, 8, 9, 9, 9, + 9, 9,10, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9,10, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, + 9, 9, 9, 9,10,10,10, 7, 7, 8, 8, 8, 9, 9, 9, 9, + 9, 9, 9, 9, 9,11,11,11, 8, 8, 8, 8, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9,10,10,10, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9,10,10,10, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9,10, 9,10,10,10,11,11, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9,11,10,11,11,11, 9, 9, + 9, 9, 9, 9,10,10, 9, 9,10, 9,11,10,11,11,11, 9, + 9, 9, 9, 9, 9, 9, 9,10,10,10, 9,11,11,11,11,11, + 9, 9, 9, 9,10,10, 9, 9, 9, 9,10, 9,11,11,11,11, + 11,11,11, 9, 9, 9, 9, 9, 9,10,10,10,10,11,11,11, + 11,11,11,11,10, 9,10,10, 9,10, 9, 9,10, 9,11,10, + 10,11,11,11,11, 9,10, 9, 9, 9, 9,10,10,10,10,11, + 11,11,11,11,11,10,10,10, 9, 9,10, 9,10, 9,10,10, + 10,10,11,11,11,11,11,11,11, 9, 9, 9, 9, 9,10,10, + 10, +}; + +static const static_codebook _44c3_s_p9_2 = { + 2, 289, + (char *)_vq_lengthlist__44c3_s_p9_2, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c3_s_p9_2, + 0 +}; + +static const char _huff_lengthlist__44c3_s_short[] = { + 10, 9,13,11,14,10,12,13,13,14, 7, 2,12, 5,10, 5, + 7,10,12,14,12, 6, 9, 8, 7, 7, 9,11,13,16,10, 4, + 12, 5,10, 6, 8,12,14,16,12, 6, 8, 7, 6, 5, 7,11, + 12,16,10, 4, 8, 5, 6, 4, 6, 9,13,16,10, 6,10, 7, + 7, 6, 7, 9,13,15,12, 9,11, 9, 8, 6, 7,10,12,14, + 14,11,10, 9, 6, 5, 6, 9,11,13,15,13,11,10, 6, 5, + 6, 8, 9,11, +}; + +static const static_codebook _huff_book__44c3_s_short = { + 2, 100, + (char *)_huff_lengthlist__44c3_s_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44c4_s_long[] = { + 4, 7,11,11,11,11,10,11,12,11, 5, 2,11, 5, 6, 6, + 7, 9,11,12,11, 9, 6,10, 6, 7, 8, 9,10,11,11, 5, + 11, 7, 8, 8, 9,11,13,14,11, 6, 5, 8, 4, 5, 7, 8, + 10,11,10, 6, 7, 7, 5, 5, 6, 8, 9,11,10, 7, 8, 9, + 6, 6, 6, 7, 8, 9,11, 9, 9,11, 7, 7, 6, 6, 7, 9, + 12,12,10,13, 9, 8, 7, 7, 7, 8,11,13,11,14,11,10, + 9, 8, 7, 7, +}; + +static const static_codebook _huff_book__44c4_s_long = { + 2, 100, + (char *)_huff_lengthlist__44c4_s_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44c4_s_p1_0[] = { + 1, + 0, + 2, +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, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c4_s_p1_0 = { + 8, 6561, + (char *)_vq_lengthlist__44c4_s_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44c4_s_p1_0, + 0 +}; + +static const long _vq_quantlist__44c4_s_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c4_s_p2_0[] = { + 2, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0, + 7, 7, 0, 0, 0, 0, 0, 0, 0, 5, 6, 6, 0, 0, 0, 7, + 7, 0, 0, 0, 7, 7, 0, 0, 0,10,10, 0, 0, 0, 0, 0, + 0, 0, 5, 6, 6, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7,10,10, 0, 0, 0, 9, 9, 0, 0, 0, 9, 9, 0, 0, 0, + 10,10, 0, 0, 0, 0, 0, 0, 0, 8,10,10, 0, 0, 0, 9, + 9, 0, 0, 0, 9, 9, 0, 0, 0,10,10, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c4_s_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__44c4_s_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c4_s_p2_0, + 0 +}; + +static const long _vq_quantlist__44c4_s_p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c4_s_p3_0[] = { + 2, 3, 3, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 4, 6, 6, 0, 0, + 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c4_s_p3_0 = { + 4, 625, + (char *)_vq_lengthlist__44c4_s_p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c4_s_p3_0, + 0 +}; + +static const long _vq_quantlist__44c4_s_p4_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c4_s_p4_0[] = { + 2, 3, 3, 6, 6, 0, 0, 0, 0, 0, 4, 4, 6, 6, 0, 0, + 0, 0, 0, 4, 4, 6, 6, 0, 0, 0, 0, 0, 5, 5, 6, 6, + 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, + 7, 8, 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, + 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c4_s_p4_0 = { + 2, 81, + (char *)_vq_lengthlist__44c4_s_p4_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c4_s_p4_0, + 0 +}; + +static const long _vq_quantlist__44c4_s_p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c4_s_p5_0[] = { + 2, 3, 3, 6, 6, 7, 7, 9, 9, 0, 4, 4, 6, 6, 7, 7, + 9, 9, 0, 4, 5, 6, 6, 7, 7, 9, 9, 0, 6, 6, 7, 7, + 8, 8,10,10, 0, 0, 0, 7, 7, 8, 8,10, 9, 0, 0, 0, + 9, 8, 8, 8,10,10, 0, 0, 0, 8, 8, 8, 8,10,10, 0, + 0, 0,10,10, 9, 9,11,11, 0, 0, 0, 0, 0, 9, 9,10, + 10, +}; + +static const static_codebook _44c4_s_p5_0 = { + 2, 81, + (char *)_vq_lengthlist__44c4_s_p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c4_s_p5_0, + 0 +}; + +static const long _vq_quantlist__44c4_s_p6_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c4_s_p6_0[] = { + 2, 4, 4, 6, 6, 8, 8, 9, 9, 8, 8, 9, 9,10,10,11, + 11, 0, 4, 4, 6, 6, 8, 8, 9, 9, 9, 9,10,10,11,11, + 11,11, 0, 4, 4, 7, 6, 8, 8, 9, 9, 9, 9,10,10,11, + 11,11,11, 0, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9,10,10, + 11,11,11,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10, + 10,11,11,12,12, 0, 0, 0, 8, 8, 8, 8, 9, 9, 9, 9, + 10,10,11,11,12,12, 0, 0, 0, 8, 8, 8, 8, 9, 9, 9, + 9,10,10,11,11,12,12, 0, 0, 0, 9, 9, 9, 9,10,10, + 10,10,11,11,11,11,12,12, 0, 0, 0, 0, 0, 9, 9,10, + 10,10,10,11,11,11,11,12,12, 0, 0, 0, 0, 0, 9, 9, + 9,10,10,10,11,11,11,11,12,12, 0, 0, 0, 0, 0, 9, + 9, 9, 9,10,10,11,11,11,12,12,12, 0, 0, 0, 0, 0, + 10,10,10,10,11,11,11,11,12,12,13,12, 0, 0, 0, 0, + 0, 0, 0,10,10,11,11,11,11,12,12,12,12, 0, 0, 0, + 0, 0, 0, 0,11,11,11,11,12,12,12,12,13,13, 0, 0, + 0, 0, 0, 0, 0,11,11,11,11,12,12,12,12,13,13, 0, + 0, 0, 0, 0, 0, 0,12,12,12,12,12,12,13,13,13,13, + 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,12,12,12,13,13, + 13, +}; + +static const static_codebook _44c4_s_p6_0 = { + 2, 289, + (char *)_vq_lengthlist__44c4_s_p6_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c4_s_p6_0, + 0 +}; + +static const long _vq_quantlist__44c4_s_p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c4_s_p7_0[] = { + 1, 4, 4, 7, 6, 6, 7, 6, 6, 4, 7, 7,10, 9, 9,11, + 9, 9, 4, 7, 7,10, 9, 9,11, 9, 9, 7,10,10,11,11, + 10,11,11,11, 6, 9, 9,11,10,10,11,10,10, 6, 9, 9, + 11,10,10,11,10,10, 7,11,11,12,11,11,12,11,11, 6, + 9, 9,11,10,10,11,10,10, 6, 9, 9,11,10,10,11,10, + 10, +}; + +static const static_codebook _44c4_s_p7_0 = { + 4, 81, + (char *)_vq_lengthlist__44c4_s_p7_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44c4_s_p7_0, + 0 +}; + +static const long _vq_quantlist__44c4_s_p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44c4_s_p7_1[] = { + 2, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8,10, 5, 5, 6, 6, + 7, 7, 8, 8, 8, 8,10, 5, 5, 6, 6, 7, 7, 8, 8, 8, + 8,10, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10, 7, + 7, 8, 8, 8, 8, 8, 8,10,10,10, 8, 7, 8, 8, 8, 8, + 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10, + 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,10,10, 8, 8, 8, + 8, 8, 8,10,10,10,10,10, 9, 9, 8, 8, 9, 8,10,10, + 10,10,10, 8, 8, 8, 8, 9, 9, +}; + +static const static_codebook _44c4_s_p7_1 = { + 2, 121, + (char *)_vq_lengthlist__44c4_s_p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44c4_s_p7_1, + 0 +}; + +static const long _vq_quantlist__44c4_s_p8_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c4_s_p8_0[] = { + 1, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10, 6, 5, 5, + 7, 7, 8, 8, 8, 8, 9,10,11,11, 7, 5, 5, 7, 7, 8, + 8, 9, 9,10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9, + 10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11, + 11, 0,12,12, 9, 9, 9, 9,10,10,10,10,11,11, 0,13, + 13, 9, 9,10, 9,10,10,11,11,11,12, 0, 0, 0,10,10, + 10,10,10,10,11,11,12,12, 0, 0, 0,10,10,10,10,10, + 10,11,11,12,12, 0, 0, 0,14,14,11,11,11,11,12,12, + 12,12, 0, 0, 0,14,14,11,11,11,11,12,12,12,13, 0, + 0, 0, 0, 0,12,12,12,12,12,12,13,13, 0, 0, 0, 0, + 0,13,12,12,12,12,12,13,13, +}; + +static const static_codebook _44c4_s_p8_0 = { + 2, 169, + (char *)_vq_lengthlist__44c4_s_p8_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44c4_s_p8_0, + 0 +}; + +static const long _vq_quantlist__44c4_s_p8_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c4_s_p8_1[] = { + 2, 4, 4, 5, 5, 6, 5, 5, 5, 5, 6, 5, 4, 5, 5, 6, + 5, 5, 5, 5, 6, 6, 6, 5, 5, +}; + +static const static_codebook _44c4_s_p8_1 = { + 2, 25, + (char *)_vq_lengthlist__44c4_s_p8_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c4_s_p8_1, + 0 +}; + +static const long _vq_quantlist__44c4_s_p9_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c4_s_p9_0[] = { + 1, 3, 3,12,12,12,12,12,12,12,12,12,12, 4, 7, 7, + 12,12,12,12,12,12,12,12,12,12, 3, 8, 8,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12, +}; + +static const static_codebook _44c4_s_p9_0 = { + 2, 169, + (char *)_vq_lengthlist__44c4_s_p9_0, + 1, -513964032, 1628680192, 4, 0, + (long *)_vq_quantlist__44c4_s_p9_0, + 0 +}; + +static const long _vq_quantlist__44c4_s_p9_1[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__44c4_s_p9_1[] = { + 1, 4, 4, 5, 5, 7, 7, 9, 8,10, 9,10,10,10,10, 6, + 5, 5, 7, 7, 9, 8,10, 9,11,10,12,12,13,13, 6, 5, + 5, 7, 7, 9, 9,10,10,11,11,12,12,12,13,19, 8, 8, + 8, 8, 9, 9,10,10,12,11,12,12,13,13,19, 8, 8, 8, + 8, 9, 9,11,11,12,12,13,13,13,13,19,12,12, 9, 9, + 11,11,11,11,12,11,13,12,13,13,18,12,12, 9, 9,11, + 10,11,11,12,12,12,13,13,14,19,18,18,11,11,11,11, + 12,12,13,12,13,13,14,14,16,18,18,11,11,11,10,12, + 11,13,13,13,13,13,14,17,18,18,14,15,11,12,12,13, + 13,13,13,14,14,14,18,18,18,15,15,12,10,13,10,13, + 13,13,13,13,14,18,17,18,17,18,12,13,12,13,13,13, + 14,14,16,14,18,17,18,18,17,13,12,13,10,12,12,14, + 14,14,14,17,18,18,18,18,14,15,12,12,13,12,14,14, + 15,15,18,18,18,17,18,15,14,12,11,12,12,14,14,14, + 15, +}; + +static const static_codebook _44c4_s_p9_1 = { + 2, 225, + (char *)_vq_lengthlist__44c4_s_p9_1, + 1, -520986624, 1620377600, 4, 0, + (long *)_vq_quantlist__44c4_s_p9_1, + 0 +}; + +static const long _vq_quantlist__44c4_s_p9_2[] = { + 10, + 9, + 11, + 8, + 12, + 7, + 13, + 6, + 14, + 5, + 15, + 4, + 16, + 3, + 17, + 2, + 18, + 1, + 19, + 0, + 20, +}; + +static const char _vq_lengthlist__44c4_s_p9_2[] = { + 2, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, + 8, 9, 9, 9, 9,11, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9,10,10,10,10,11, 6, 6, 7, 7, 8, + 8, 8, 8, 9, 9, 9, 9, 9, 9,10, 9,10,10,10,10,11, + 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, 9,10,10,10, + 10,10,10,10,12,11,11, 7, 7, 8, 8, 9, 9, 9, 9, 9, + 9,10,10,10,10,10,10,10,10,12,11,12, 8, 8, 8, 8, + 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,11,11, + 11, 8, 8, 8, 8, 9, 9, 9, 9,10,10,10,10,10,10,10, + 10,10,10,11,11,12, 9, 9, 9, 9, 9, 9,10, 9,10,10, + 10,10,10,10,10,10,10,10,11,11,11,11,11, 9, 9, 9, + 9,10,10,10,10,10,10,10,10,10,10,10,10,11,12,11, + 11,11, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10, + 10,10,11,11,11,11,11, 9, 9, 9, 9,10,10,10,10,10, + 10,10,10,10,10,10,10,11,11,11,12,12,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,11,12,11,12, + 11,11,11, 9,10,10,10,10,10,10,10,10,10,10,10,10, + 10,11,12,11,11,11,11,11,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,11,11,11,12,11,11,11,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,12,11,11,12,11, + 11,11,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 11,11,11,11,11,11,11,11,11,10,10,10,10,10,10,10, + 10,10,10,10,10,11,11,11,11,12,12,11,11,11,11,11, + 11,11,10,10,10,10,10,10,10,10,12,12,12,11,11,11, + 12,11,11,11,10,10,10,10,10,10,10,10,10,10,10,12, + 11,12,12,12,12,12,11,12,11,11,10,10,10,10,10,10, + 10,10,10,10,12,12,12,12,11,11,11,11,11,11,11,10, + 10,10,10,10,10,10,10,10,10, +}; + +static const static_codebook _44c4_s_p9_2 = { + 2, 441, + (char *)_vq_lengthlist__44c4_s_p9_2, + 1, -529268736, 1611661312, 5, 0, + (long *)_vq_quantlist__44c4_s_p9_2, + 0 +}; + +static const char _huff_lengthlist__44c4_s_short[] = { + 4, 7,14,10,15,10,12,15,16,15, 4, 2,11, 5,10, 6, + 8,11,14,14,14,10, 7,11, 6, 8,10,11,13,15, 9, 4, + 11, 5, 9, 6, 9,12,14,15,14, 9, 6, 9, 4, 5, 7,10, + 12,13, 9, 5, 7, 6, 5, 5, 7,10,13,13,10, 8, 9, 8, + 7, 6, 8,10,14,14,13,11,10,10, 7, 7, 8,11,14,15, + 13,12, 9, 9, 6, 5, 7,10,14,17,15,13,11,10, 6, 6, + 7, 9,12,17, +}; + +static const static_codebook _huff_book__44c4_s_short = { + 2, 100, + (char *)_huff_lengthlist__44c4_s_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44c5_s_long[] = { + 3, 8, 9,13,10,12,12,12,12,12, 6, 4, 6, 8, 6, 8, + 10,10,11,12, 8, 5, 4,10, 4, 7, 8, 9,10,11,13, 8, + 10, 8, 9, 9,11,12,13,14,10, 6, 4, 9, 3, 5, 6, 8, + 10,11,11, 8, 6, 9, 5, 5, 6, 7, 9,11,12, 9, 7,11, + 6, 6, 6, 7, 8,10,12,11, 9,12, 7, 7, 6, 6, 7, 9, + 13,12,10,13, 9, 8, 7, 7, 7, 8,11,15,11,15,11,10, + 9, 8, 7, 7, +}; + +static const static_codebook _huff_book__44c5_s_long = { + 2, 100, + (char *)_huff_lengthlist__44c5_s_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44c5_s_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c5_s_p1_0[] = { + 2, 4, 4, 0, 0, 0, 0, 0, 0, 4, 7, 7, 0, 0, 0, 0, + 0, 0, 4, 6, 7, 0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0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c5_s_p1_0 = { + 8, 6561, + (char *)_vq_lengthlist__44c5_s_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44c5_s_p1_0, + 0 +}; + +static const long _vq_quantlist__44c5_s_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c5_s_p2_0[] = { + 2, 4, 4, 0, 0, 0, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0, + 8, 7, 0, 0, 0, 0, 0, 0, 0, 4, 6, 6, 0, 0, 0, 8, + 8, 0, 0, 0, 8, 7, 0, 0, 0,10,10, 0, 0, 0, 0, 0, + 0, 0, 4, 6, 6, 0, 0, 0, 8, 8, 0, 0, 0, 7, 8, 0, + 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 0,10, + 10, 0, 0, 0,10,10, 0, 0, 0,10,11, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c5_s_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__44c5_s_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c5_s_p2_0, + 0 +}; + +static const long _vq_quantlist__44c5_s_p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c5_s_p3_0[] = { + 2, 4, 3, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 5, 6, 6, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 5, 5, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6,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0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c5_s_p3_0 = { + 4, 625, + (char *)_vq_lengthlist__44c5_s_p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c5_s_p3_0, + 0 +}; + +static const long _vq_quantlist__44c5_s_p4_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c5_s_p4_0[] = { + 2, 3, 3, 6, 6, 0, 0, 0, 0, 0, 4, 4, 6, 6, 0, 0, + 0, 0, 0, 4, 4, 6, 6, 0, 0, 0, 0, 0, 5, 5, 6, 6, + 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, + 7, 7, 0, 0, 0, 0, 0, 0, 0, 8, 7, 0, 0, 0, 0, 0, + 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c5_s_p4_0 = { + 2, 81, + (char *)_vq_lengthlist__44c5_s_p4_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c5_s_p4_0, + 0 +}; + +static const long _vq_quantlist__44c5_s_p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c5_s_p5_0[] = { + 2, 4, 3, 6, 6, 7, 7, 9, 9, 0, 4, 4, 6, 6, 7, 7, + 9, 9, 0, 4, 4, 6, 6, 7, 7, 9, 9, 0, 6, 6, 7, 7, + 7, 7, 9, 9, 0, 0, 0, 7, 6, 7, 7, 9, 9, 0, 0, 0, + 8, 8, 8, 8,10,10, 0, 0, 0, 8, 8, 8, 8,10,10, 0, + 0, 0, 9, 9, 9, 9,10,10, 0, 0, 0, 0, 0, 9, 9,10, + 10, +}; + +static const static_codebook _44c5_s_p5_0 = { + 2, 81, + (char *)_vq_lengthlist__44c5_s_p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c5_s_p5_0, + 0 +}; + +static const long _vq_quantlist__44c5_s_p6_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c5_s_p6_0[] = { + 2, 4, 4, 6, 6, 8, 8, 9, 9, 9, 9,10,10,10,10,11, + 11, 0, 4, 4, 6, 6, 8, 8, 9, 9, 9, 9,10,10,11,11, + 12,12, 0, 4, 4, 6, 6, 8, 8, 9, 9, 9, 9,10,10,11, + 11,12,12, 0, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9,10,10, + 11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10, + 10,11,11,12,12, 0, 0, 0, 7, 7, 9, 9,10,10,10,10, + 11,11,11,11,12,12, 0, 0, 0, 7, 7, 8, 9,10,10,10, + 10,11,11,11,11,12,12, 0, 0, 0, 8, 8, 9, 9,10,10, + 10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 9, 9,10, + 10,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 9, 9, + 10,10,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 9, + 9, 9,10,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, + 10,10,10,10,11,11,11,12,12,12,13,13, 0, 0, 0, 0, + 0, 0, 0,10,10,11,11,11,11,12,12,13,13, 0, 0, 0, + 0, 0, 0, 0,11,11,11,11,12,12,12,13,13,13, 0, 0, + 0, 0, 0, 0, 0,11,11,11,11,12,12,12,12,13,13, 0, + 0, 0, 0, 0, 0, 0,12,12,12,12,13,12,13,13,13,13, + 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,13, + 13, +}; + +static const static_codebook _44c5_s_p6_0 = { + 2, 289, + (char *)_vq_lengthlist__44c5_s_p6_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c5_s_p6_0, + 0 +}; + +static const long _vq_quantlist__44c5_s_p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c5_s_p7_0[] = { + 1, 4, 4, 7, 6, 6, 7, 6, 6, 4, 7, 7,10, 9, 9,11, + 9, 9, 4, 7, 7,10, 9, 9,11, 9, 9, 7,10,10,11,11, + 10,11,11,11, 6, 9, 9,11,10,10,11,10,10, 6, 9, 9, + 11,10,10,11,10,10, 7,11,11,12,11,11,12,11,11, 6, + 9, 9,11,10,10,11,10,10, 6, 9, 9,11,10,10,11,10, + 10, +}; + +static const static_codebook _44c5_s_p7_0 = { + 4, 81, + (char *)_vq_lengthlist__44c5_s_p7_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44c5_s_p7_0, + 0 +}; + +static const long _vq_quantlist__44c5_s_p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44c5_s_p7_1[] = { + 2, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8,10, 5, 5, 6, 6, + 7, 7, 8, 8, 8, 8,10, 5, 5, 6, 6, 7, 7, 8, 8, 8, + 8,10, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10, 7, + 7, 8, 8, 8, 8, 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, + 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10, + 8, 8, 8, 8, 8, 8, 8, 9,10,10,10,10,10, 8, 8, 8, + 8, 8, 8,10,10,10,10,10, 9, 9, 8, 8, 8, 8,10,10, + 10,10,10, 8, 8, 8, 8, 8, 8, +}; + +static const static_codebook _44c5_s_p7_1 = { + 2, 121, + (char *)_vq_lengthlist__44c5_s_p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44c5_s_p7_1, + 0 +}; + +static const long _vq_quantlist__44c5_s_p8_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c5_s_p8_0[] = { + 1, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10, 6, 5, 5, + 7, 7, 8, 8, 8, 9,10,10,10,10, 7, 5, 5, 7, 7, 8, + 8, 9, 9,10,10,10,10, 0, 8, 8, 8, 8, 9, 9, 9, 9, + 10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11, + 11, 0,12,12, 9, 9, 9,10,10,10,10,10,11,11, 0,13, + 13, 9, 9, 9, 9,10,10,11,11,11,11, 0, 0, 0,10,10, + 10,10,10,10,11,11,11,11, 0, 0, 0,10,10,10,10,10, + 10,11,11,12,12, 0, 0, 0,14,14,11,11,11,11,12,12, + 12,12, 0, 0, 0,14,14,11,11,11,11,12,12,12,12, 0, + 0, 0, 0, 0,12,12,12,12,12,12,13,13, 0, 0, 0, 0, + 0,12,12,12,12,12,12,13,13, +}; + +static const static_codebook _44c5_s_p8_0 = { + 2, 169, + (char *)_vq_lengthlist__44c5_s_p8_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44c5_s_p8_0, + 0 +}; + +static const long _vq_quantlist__44c5_s_p8_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c5_s_p8_1[] = { + 2, 4, 4, 5, 5, 6, 5, 5, 5, 5, 6, 4, 5, 5, 5, 6, + 5, 5, 5, 5, 6, 6, 6, 5, 5, +}; + +static const static_codebook _44c5_s_p8_1 = { + 2, 25, + (char *)_vq_lengthlist__44c5_s_p8_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c5_s_p8_1, + 0 +}; + +static const long _vq_quantlist__44c5_s_p9_0[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__44c5_s_p9_0[] = { + 1, 3, 3,13,13,13,13,13,13,13,13,13,13,13,13, 4, + 7, 7,13,13,13,13,13,13,13,13,13,13,13,13, 3, 8, + 6,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,12,12,12,12,12,12,12, + 12, +}; + +static const static_codebook _44c5_s_p9_0 = { + 2, 225, + (char *)_vq_lengthlist__44c5_s_p9_0, + 1, -512522752, 1628852224, 4, 0, + (long *)_vq_quantlist__44c5_s_p9_0, + 0 +}; + +static const long _vq_quantlist__44c5_s_p9_1[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c5_s_p9_1[] = { + 1, 4, 4, 5, 5, 7, 7, 9, 8,10, 9,10,10,11,10,11, + 11, 6, 5, 5, 7, 7, 8, 9,10,10,11,10,12,11,12,11, + 13,12, 6, 5, 5, 7, 7, 9, 9,10,10,11,11,12,12,13, + 12,13,13,18, 8, 8, 8, 8, 9, 9,10,11,11,11,12,11, + 13,11,13,12,18, 8, 8, 8, 8,10,10,11,11,12,12,13, + 13,13,13,13,14,18,12,12, 9, 9,11,11,11,11,12,12, + 13,12,13,12,13,13,20,13,12, 9, 9,11,11,11,11,12, + 12,13,13,13,14,14,13,20,18,19,11,12,11,11,12,12, + 13,13,13,13,13,13,14,13,18,19,19,12,11,11,11,12, + 12,13,12,13,13,13,14,14,13,18,17,19,14,15,12,12, + 12,13,13,13,14,14,14,14,14,14,19,19,19,16,15,12, + 11,13,12,14,14,14,13,13,14,14,14,19,18,19,18,19, + 13,13,13,13,14,14,14,13,14,14,14,14,18,17,19,19, + 19,13,13,13,11,13,11,13,14,14,14,14,14,19,17,17, + 18,18,16,16,13,13,13,13,14,13,15,15,14,14,19,19, + 17,17,18,16,16,13,11,14,10,13,12,14,14,14,14,19, + 19,19,19,19,18,17,13,14,13,11,14,13,14,14,15,15, + 19,19,19,17,19,18,18,14,13,12,11,14,11,15,15,15, + 15, +}; + +static const static_codebook _44c5_s_p9_1 = { + 2, 289, + (char *)_vq_lengthlist__44c5_s_p9_1, + 1, -520814592, 1620377600, 5, 0, + (long *)_vq_quantlist__44c5_s_p9_1, + 0 +}; + +static const long _vq_quantlist__44c5_s_p9_2[] = { + 10, + 9, + 11, + 8, + 12, + 7, + 13, + 6, + 14, + 5, + 15, + 4, + 16, + 3, + 17, + 2, + 18, + 1, + 19, + 0, + 20, +}; + +static const char _vq_lengthlist__44c5_s_p9_2[] = { + 3, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 9,11, 5, 6, 7, 7, 8, 7, 8, 8, 8, 8, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,11, 5, 5, 7, 7, 7, + 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,11, + 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, + 9,10, 9,10,11,11,11, 7, 7, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9,10,10,10,10,10,10,11,11,11, 8, 8, 8, 8, + 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,11,11, + 11, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9,10,10,10,10,10, + 10,10,10,11,11,11, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 10,10,10,10,10,10,10,10,11,11,11,11,11, 9, 9, 9, + 9, 9, 9,10, 9,10,10,10,10,10,10,10,10,11,11,11, + 11,11, 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10, + 10,10,11,11,11,11,11, 9, 9, 9, 9, 9, 9,10,10,10, + 10,10,10,10,10,10,10,11,11,11,11,11, 9, 9,10, 9, + 10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11, + 11,11,11, 9, 9,10,10,10,10,10,10,10,10,10,10,10, + 10,11,11,11,11,11,11,11,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,11,11,11,11,11,11,11,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11, + 11,11,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 11,11,11,11,11,11,11,11,11,10,10,10,10,10,10,10, + 10,10,10,10,10,11,11,11,11,11,11,11,11,11,10,10, + 10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11, + 11,11,11,10,10,10,10,10,10,10,10,10,10,10,10,11, + 11,11,11,11,11,11,11,11,10,10,10,10,10,10,10,10, + 10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,10, + 10,10,10,10,10,10,10,10,10, +}; + +static const static_codebook _44c5_s_p9_2 = { + 2, 441, + (char *)_vq_lengthlist__44c5_s_p9_2, + 1, -529268736, 1611661312, 5, 0, + (long *)_vq_quantlist__44c5_s_p9_2, + 0 +}; + +static const char _huff_lengthlist__44c5_s_short[] = { + 5, 8,10,14,11,11,12,16,15,17, 5, 5, 7, 9, 7, 8, + 10,13,17,17, 7, 5, 5,10, 5, 7, 8,11,13,15,10, 8, + 10, 8, 8, 8,11,15,18,18, 8, 5, 5, 8, 3, 4, 6,10, + 14,16, 9, 7, 6, 7, 4, 3, 5, 9,14,18,10, 9, 8,10, + 6, 5, 6, 9,14,18,12,12,11,12, 8, 7, 8,11,14,18, + 14,13,12,10, 7, 5, 6, 9,14,18,14,14,13,10, 6, 5, + 6, 8,11,16, +}; + +static const static_codebook _huff_book__44c5_s_short = { + 2, 100, + (char *)_huff_lengthlist__44c5_s_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44c6_s_long[] = { + 3, 8,11,13,14,14,13,13,16,14, 6, 3, 4, 7, 9, 9, + 10,11,14,13,10, 4, 3, 5, 7, 7, 9,10,13,15,12, 7, + 4, 4, 6, 6, 8,10,13,15,12, 8, 6, 6, 6, 6, 8,10, + 13,14,11, 9, 7, 6, 6, 6, 7, 8,12,11,13,10, 9, 8, + 7, 6, 6, 7,11,11,13,11,10, 9, 9, 7, 7, 6,10,11, + 13,13,13,13,13,11, 9, 8,10,12,12,15,15,16,15,12, + 11,10,10,12, +}; + +static const static_codebook _huff_book__44c6_s_long = { + 2, 100, + (char *)_huff_lengthlist__44c6_s_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44c6_s_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c6_s_p1_0[] = { + 1, 5, 5, 0, 5, 5, 0, 5, 5, 5, 8, 7, 0, 9, 9, 0, + 9, 8, 5, 7, 8, 0, 9, 9, 0, 8, 9, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 9, 8, 0, 8, 8, 0, 8, 8, 5, 8, 9, + 0, 8, 8, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, + 9, 9, 0, 8, 8, 0, 8, 8, 5, 9, 9, 0, 8, 8, 0, 8, + 8, +}; +static const static_codebook _44c6_s_p1_0 = { + 4, 81, + (char *)_vq_lengthlist__44c6_s_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44c6_s_p1_0, + 0 +}; + +static const long _vq_quantlist__44c6_s_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c6_s_p2_0[] = { + 3, 5, 5, 8, 8, 0, 5, 5, 8, 8, 0, 5, 5, 8, 8, 0, + 7, 7, 9, 9, 0, 0, 0, 9, 9, 5, 7, 7, 9, 9, 0, 8, + 8,10,10, 0, 8, 7,10, 9, 0,10,10,11,11, 0, 0, 0, + 11,11, 5, 7, 7, 9, 9, 0, 8, 8,10,10, 0, 7, 8, 9, + 10, 0,10,10,11,11, 0, 0, 0,11,11, 8, 9, 9,11,11, + 0,11,11,12,12, 0,11,10,12,12, 0,13,14,14,14, 0, + 0, 0,14,13, 8, 9, 9,11,11, 0,11,11,12,12, 0,10, + 11,12,12, 0,14,13,14,14, 0, 0, 0,13,14, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 5, 8, 7,11,10, 0, 7, 7,10,10, + 0, 7, 7,10,10, 0, 9, 9,11,10, 0, 0, 0,11,11, 5, + 7, 8,10,11, 0, 7, 7,10,10, 0, 7, 7,10,10, 0, 9, + 9,10,11, 0, 0, 0,11,11, 8,10, 9,12,12, 0,10,10, + 12,12, 0,10,10,12,12, 0,12,12,13,13, 0, 0, 0,13, + 13, 8, 9,10,12,12, 0,10,10,11,12, 0,10,10,12,12, + 0,12,12,13,13, 0, 0, 0,13,13, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 8, 8,11,11, 0, 7, 7,10,10, 0, 7, 7, + 10,10, 0, 9, 9,10,11, 0, 0, 0,11,10, 5, 8, 8,11, + 11, 0, 7, 7,10,10, 0, 7, 7,10,10, 0, 9, 9,11,11, + 0, 0, 0,10,11, 8,10,10,12,12, 0,10,10,12,12, 0, + 10,10,12,12, 0,12,13,13,13, 0, 0, 0,14,13, 8,10, + 10,12,12, 0,10,10,12,12, 0,10,10,12,12, 0,13,12, + 13,13, 0, 0, 0,13,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7,10,10,14,13, 0, 9, 9,13,12, 0, 9, 9,12,12, 0, + 10,10,12,12, 0, 0, 0,12,12, 7,10,10,13,14, 0, 9, + 9,12,13, 0, 9, 9,12,12, 0,10,10,12,12, 0, 0, 0, + 12,12, 9,11,11,14,13, 0,11,10,14,13, 0,11,11,13, + 13, 0,12,12,13,13, 0, 0, 0,13,13, 9,11,11,13,14, + 0,10,11,13,14, 0,11,11,13,13, 0,12,12,13,13, 0, + 0, 0,13,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, + 11,11,14,14, 0,11,11,13,13, 0,11,10,13,13, 0,12, + 12,13,13, 0, 0, 0,13,13, 9,11,11,14,14, 0,11,11, + 13,13, 0,10,11,13,13, 0,12,12,14,13, 0, 0, 0,13, + 13, +}; + +static const static_codebook _44c6_s_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__44c6_s_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c6_s_p2_0, + 0 +}; + +static const long _vq_quantlist__44c6_s_p3_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c6_s_p3_0[] = { + 2, 3, 4, 6, 6, 7, 7, 9, 9, 0, 4, 4, 6, 6, 7, 7, + 9,10, 0, 4, 4, 6, 6, 7, 7,10, 9, 0, 5, 5, 7, 7, + 8, 8,10,10, 0, 0, 0, 7, 6, 8, 8,10,10, 0, 0, 0, + 7, 7, 9, 9,11,11, 0, 0, 0, 7, 7, 9, 9,11,11, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c6_s_p3_0 = { + 2, 81, + (char *)_vq_lengthlist__44c6_s_p3_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c6_s_p3_0, + 0 +}; + +static const long _vq_quantlist__44c6_s_p4_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c6_s_p4_0[] = { + 2, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9,10,10, + 10, 0, 4, 4, 6, 6, 8, 8, 9, 9, 9, 9,10,10,10,10, + 11,11, 0, 4, 4, 6, 6, 8, 8, 9, 9, 9, 9,10,10,10, + 10,11,11, 0, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9,10,10, + 11,11,11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10, + 10,11,11,11,11, 0, 0, 0, 7, 7, 9, 9,10,10,10,10, + 11,11,11,11,12,12, 0, 0, 0, 7, 7, 9, 9,10,10,10, + 10,11,11,11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, + 10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 8, 8, 9, + 9,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c6_s_p4_0 = { + 2, 289, + (char *)_vq_lengthlist__44c6_s_p4_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c6_s_p4_0, + 0 +}; + +static const long _vq_quantlist__44c6_s_p5_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c6_s_p5_0[] = { + 1, 4, 4, 5, 7, 7, 6, 7, 7, 4, 6, 6, 9, 9,10,10, + 10, 9, 4, 6, 6, 9,10, 9,10, 9,10, 6, 9, 9,10,12, + 11,10,11,11, 7,10, 9,11,12,12,12,12,12, 7,10,10, + 11,12,12,12,12,12, 6,10,10,10,12,12,11,12,12, 7, + 9,10,11,12,12,12,12,12, 7,10, 9,12,12,12,12,12, + 12, +}; + +static const static_codebook _44c6_s_p5_0 = { + 4, 81, + (char *)_vq_lengthlist__44c6_s_p5_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44c6_s_p5_0, + 0 +}; + +static const long _vq_quantlist__44c6_s_p5_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44c6_s_p5_1[] = { + 3, 5, 4, 6, 6, 7, 7, 8, 8, 8, 8,11, 4, 4, 6, 6, + 7, 7, 8, 8, 8, 8,11, 4, 4, 6, 6, 7, 7, 8, 8, 8, + 8,11, 6, 6, 6, 6, 8, 8, 8, 8, 9, 9,11,11,11, 6, + 6, 7, 8, 8, 8, 8, 9,11,11,11, 7, 7, 8, 8, 8, 8, + 8, 8,11,11,11, 7, 7, 8, 8, 8, 8, 8, 8,11,11,11, + 8, 8, 8, 8, 8, 8, 8, 8,11,11,11,10,10, 8, 8, 8, + 8, 8, 8,11,11,11,10,10, 8, 8, 8, 8, 8, 8,11,11, + 11,10,10, 7, 7, 8, 8, 8, 8, +}; + +static const static_codebook _44c6_s_p5_1 = { + 2, 121, + (char *)_vq_lengthlist__44c6_s_p5_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44c6_s_p5_1, + 0 +}; + +static const long _vq_quantlist__44c6_s_p6_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c6_s_p6_0[] = { + 1, 4, 4, 6, 6, 8, 8, 8, 8,10, 9,10,10, 6, 5, 5, + 7, 7, 9, 9, 9, 9,10,10,11,11, 6, 5, 5, 7, 7, 9, + 9,10, 9,11,10,11,11, 0, 6, 6, 7, 7, 9, 9,10,10, + 11,11,12,12, 0, 7, 7, 7, 7, 9, 9,10,10,11,11,12, + 12, 0,11,11, 8, 8,10,10,11,11,12,12,12,12, 0,11, + 12, 9, 8,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const static_codebook _44c6_s_p6_0 = { + 2, 169, + (char *)_vq_lengthlist__44c6_s_p6_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44c6_s_p6_0, + 0 +}; + +static const long _vq_quantlist__44c6_s_p6_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c6_s_p6_1[] = { + 3, 4, 4, 5, 5, 5, 4, 4, 5, 5, 5, 4, 4, 5, 5, 6, + 5, 5, 5, 5, 6, 6, 6, 5, 5, +}; + +static const static_codebook _44c6_s_p6_1 = { + 2, 25, + (char *)_vq_lengthlist__44c6_s_p6_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c6_s_p6_1, + 0 +}; + +static const long _vq_quantlist__44c6_s_p7_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c6_s_p7_0[] = { + 1, 4, 4, 6, 6, 8, 8, 8, 8,10,10,11,10, 6, 5, 5, + 7, 7, 8, 8, 9, 9,10,10,12,11, 6, 5, 5, 7, 7, 8, + 8, 9, 9,10,10,12,11,21, 7, 7, 7, 7, 9, 9,10,10, + 11,11,12,12,21, 7, 7, 7, 7, 9, 9,10,10,11,11,12, + 12,21,12,12, 9, 9,10,10,11,11,11,11,12,12,21,12, + 12, 9, 9,10,10,11,11,12,12,12,12,21,21,21,11,11, + 10,10,11,12,12,12,13,13,21,21,21,11,11,10,10,12, + 12,12,12,13,13,21,21,21,15,15,11,11,12,12,13,13, + 13,13,21,21,21,15,16,11,11,12,12,13,13,14,14,21, + 21,21,21,20,13,13,13,13,13,13,14,14,20,20,20,20, + 20,13,13,13,13,13,13,14,14, +}; + +static const static_codebook _44c6_s_p7_0 = { + 2, 169, + (char *)_vq_lengthlist__44c6_s_p7_0, + 1, -523206656, 1618345984, 4, 0, + (long *)_vq_quantlist__44c6_s_p7_0, + 0 +}; + +static const long _vq_quantlist__44c6_s_p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44c6_s_p7_1[] = { + 3, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 9, 5, 5, 6, 6, + 7, 7, 7, 7, 8, 7, 8, 5, 5, 6, 6, 7, 7, 7, 7, 7, + 7, 9, 6, 6, 7, 7, 7, 7, 8, 7, 7, 8, 9, 9, 9, 7, + 7, 7, 7, 7, 7, 7, 8, 9, 9, 9, 7, 7, 7, 7, 8, 8, + 8, 8, 9, 9, 9, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, + 8, 8, 8, 8, 7, 7, 8, 8, 9, 9, 9, 9, 8, 8, 8, 7, + 7, 8, 8, 9, 9, 9, 8, 8, 8, 8, 7, 7, 8, 8, 9, 9, + 9, 8, 8, 7, 7, 7, 7, 8, 8, +}; + +static const static_codebook _44c6_s_p7_1 = { + 2, 121, + (char *)_vq_lengthlist__44c6_s_p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44c6_s_p7_1, + 0 +}; + +static const long _vq_quantlist__44c6_s_p8_0[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__44c6_s_p8_0[] = { + 1, 4, 4, 7, 7, 8, 8, 7, 7, 8, 7, 9, 8,10, 9, 6, + 5, 5, 8, 8, 9, 9, 8, 8, 9, 9,11,10,11,10, 6, 5, + 5, 8, 8, 9, 9, 8, 8, 9, 9,10,10,11,11,18, 8, 8, + 9, 8,10,10, 9, 9,10,10,10,10,11,10,18, 8, 8, 9, + 9,10,10, 9, 9,10,10,11,11,12,12,18,12,13, 9,10, + 10,10, 9,10,10,10,11,11,12,11,18,13,13, 9, 9,10, + 10,10,10,10,10,11,11,12,12,18,18,18,10,10, 9, 9, + 11,11,11,11,11,12,12,12,18,18,18,10, 9,10, 9,11, + 10,11,11,11,11,13,12,18,18,18,14,13,10,10,11,11, + 12,12,12,12,12,12,18,18,18,14,13,10,10,11,10,12, + 12,12,12,12,12,18,18,18,18,18,12,12,11,11,12,12, + 13,13,13,14,18,18,18,18,18,12,12,11,11,12,11,13, + 13,14,13,18,18,18,18,18,16,16,11,12,12,13,13,13, + 14,13,18,18,18,18,18,16,15,12,11,12,11,13,11,15, + 14, +}; + +static const static_codebook _44c6_s_p8_0 = { + 2, 225, + (char *)_vq_lengthlist__44c6_s_p8_0, + 1, -520986624, 1620377600, 4, 0, + (long *)_vq_quantlist__44c6_s_p8_0, + 0 +}; + +static const long _vq_quantlist__44c6_s_p8_1[] = { + 10, + 9, + 11, + 8, + 12, + 7, + 13, + 6, + 14, + 5, + 15, + 4, + 16, + 3, + 17, + 2, + 18, + 1, + 19, + 0, + 20, +}; + +static const char _vq_lengthlist__44c6_s_p8_1[] = { + 3, 5, 5, 6, 6, 7, 7, 7, 7, 8, 7, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8,10, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 6, 6, 7, 7, 8, + 8, 8, 8, 8, 8, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9,10, + 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9,10,11,11, 8, 7, 8, 8, 8, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9,11,11,11, 8, 8, 8, 8, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,11,11, + 11, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9,11,11,11, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9,11,11,11,11,11, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10, 9,11,11,11, + 11,11, 9, 9, 9, 9, 9, 9,10, 9, 9,10, 9,10, 9, 9, + 10, 9,11,11,11,11,11, 9, 9, 9, 9, 9, 9, 9,10,10, + 10,10, 9,10,10, 9,10,11,11,11,11,11, 9, 9, 9, 9, + 10,10,10, 9,10,10,10,10, 9,10,10, 9,11,11,11,11, + 11,11,11, 9, 9, 9, 9,10,10,10,10, 9,10,10,10,10, + 10,11,11,11,11,11,11,11,10, 9,10,10,10,10,10,10, + 10, 9,10, 9,10,10,11,11,11,11,11,11,11,10, 9,10, + 9,10,10, 9,10,10,10,10,10,10,10,11,11,11,11,11, + 11,11,10,10,10,10,10,10,10, 9,10,10,10,10,10, 9, + 11,11,11,11,11,11,11,11,11,10,10,10,10,10,10,10, + 10,10,10,10,10,11,11,11,11,11,11,11,11,11,10,10, + 10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11, + 11,11,11,10,10,10,10,10,10,10,10,10, 9,10,10,11, + 11,11,11,11,11,11,11,11,10,10,10, 9,10,10,10,10, + 10,10,10,10,10,11,11,11,11,11,11,11,11,10,11, 9, + 10,10,10,10,10,10,10,10,10, +}; + +static const static_codebook _44c6_s_p8_1 = { + 2, 441, + (char *)_vq_lengthlist__44c6_s_p8_1, + 1, -529268736, 1611661312, 5, 0, + (long *)_vq_quantlist__44c6_s_p8_1, + 0 +}; + +static const long _vq_quantlist__44c6_s_p9_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c6_s_p9_0[] = { + 1, 3, 3,11,11,11,11,11,11,11,11,11,11, 4, 7, 7, + 11,11,11,11,11,11,11,11,11,11, 5, 8, 9,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10, +}; + +static const static_codebook _44c6_s_p9_0 = { + 2, 169, + (char *)_vq_lengthlist__44c6_s_p9_0, + 1, -511845376, 1630791680, 4, 0, + (long *)_vq_quantlist__44c6_s_p9_0, + 0 +}; + +static const long _vq_quantlist__44c6_s_p9_1[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c6_s_p9_1[] = { + 1, 4, 4, 7, 7, 7, 7, 7, 6, 8, 8, 8, 8, 6, 6, 6, + 8, 8, 8, 8, 8, 7, 9, 8,10,10, 5, 6, 6, 8, 8, 9, + 9, 8, 8,10,10,10,10,16, 9, 9, 9, 9, 9, 9, 9, 8, + 10, 9,11,11,16, 8, 9, 9, 9, 9, 9, 9, 9,10,10,11, + 11,16,13,13, 9, 9,10, 9, 9,10,11,11,11,12,16,13, + 14, 9, 8,10, 8, 9, 9,10,10,12,11,16,14,16, 9, 9, + 9, 9,11,11,12,11,12,11,16,16,16, 9, 7, 9, 6,11, + 11,11,10,11,11,16,16,16,11,12, 9,10,11,11,12,11, + 13,13,16,16,16,12,11,10, 7,12,10,12,12,12,12,16, + 16,15,16,16,10,11,10,11,13,13,14,12,16,16,16,15, + 15,12,10,11,11,13,11,12,13, +}; + +static const static_codebook _44c6_s_p9_1 = { + 2, 169, + (char *)_vq_lengthlist__44c6_s_p9_1, + 1, -518889472, 1622704128, 4, 0, + (long *)_vq_quantlist__44c6_s_p9_1, + 0 +}; + +static const long _vq_quantlist__44c6_s_p9_2[] = { + 24, + 23, + 25, + 22, + 26, + 21, + 27, + 20, + 28, + 19, + 29, + 18, + 30, + 17, + 31, + 16, + 32, + 15, + 33, + 14, + 34, + 13, + 35, + 12, + 36, + 11, + 37, + 10, + 38, + 9, + 39, + 8, + 40, + 7, + 41, + 6, + 42, + 5, + 43, + 4, + 44, + 3, + 45, + 2, + 46, + 1, + 47, + 0, + 48, +}; + +static const char _vq_lengthlist__44c6_s_p9_2[] = { + 2, 4, 3, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, +}; + +static const static_codebook _44c6_s_p9_2 = { + 1, 49, + (char *)_vq_lengthlist__44c6_s_p9_2, + 1, -526909440, 1611661312, 6, 0, + (long *)_vq_quantlist__44c6_s_p9_2, + 0 +}; + +static const char _huff_lengthlist__44c6_s_short[] = { + 3, 9,11,11,13,14,19,17,17,19, 5, 4, 5, 8,10,10, + 13,16,18,19, 7, 4, 4, 5, 8, 9,12,14,17,19, 8, 6, + 5, 5, 7, 7,10,13,16,18,10, 8, 7, 6, 5, 5, 8,11, + 17,19,11, 9, 7, 7, 5, 4, 5, 8,17,19,13,11, 8, 7, + 7, 5, 5, 7,16,18,14,13, 8, 6, 6, 5, 5, 7,16,18, + 18,16,10, 8, 8, 7, 7, 9,16,18,18,18,12,10,10, 9, + 9,10,17,18, +}; + +static const static_codebook _huff_book__44c6_s_short = { + 2, 100, + (char *)_huff_lengthlist__44c6_s_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44c7_s_long[] = { + 3, 8,11,13,15,14,14,13,15,14, 6, 4, 5, 7, 9,10, + 11,11,14,13,10, 4, 3, 5, 7, 8, 9,10,13,13,12, 7, + 4, 4, 5, 6, 8, 9,12,14,13, 9, 6, 5, 5, 6, 8, 9, + 12,14,12, 9, 7, 6, 5, 5, 6, 8,11,11,12,11, 9, 8, + 7, 6, 6, 7,10,11,13,11,10, 9, 8, 7, 6, 6, 9,11, + 13,13,12,12,12,10, 9, 8, 9,11,12,14,15,15,14,12, + 11,10,10,12, +}; + +static const static_codebook _huff_book__44c7_s_long = { + 2, 100, + (char *)_huff_lengthlist__44c7_s_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44c7_s_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c7_s_p1_0[] = { + 1, 5, 5, 0, 5, 5, 0, 5, 5, 5, 8, 7, 0, 9, 9, 0, + 9, 8, 5, 7, 8, 0, 9, 9, 0, 8, 9, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 9, 9, 0, 8, 8, 0, 8, 8, 5, 8, 9, + 0, 8, 8, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, + 9, 9, 0, 8, 8, 0, 8, 8, 5, 8, 9, 0, 8, 8, 0, 8, + 8, +}; + +static const static_codebook _44c7_s_p1_0 = { + 4, 81, + (char *)_vq_lengthlist__44c7_s_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44c7_s_p1_0, + 0 +}; + +static const long _vq_quantlist__44c7_s_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c7_s_p2_0[] = { + 3, 5, 5, 8, 8, 0, 5, 5, 8, 8, 0, 5, 5, 8, 8, 0, + 7, 7, 9, 9, 0, 0, 0, 9, 9, 5, 7, 7, 9, 9, 0, 8, + 8,10,10, 0, 8, 7,10, 9, 0,10,10,11,11, 0, 0, 0, + 11,11, 5, 7, 7, 9, 9, 0, 8, 8,10,10, 0, 7, 8, 9, + 10, 0,10,10,11,11, 0, 0, 0,11,11, 8, 9, 9,11,10, + 0,11,11,12,12, 0,11,10,12,12, 0,13,14,14,14, 0, + 0, 0,14,13, 8, 9, 9,10,11, 0,11,11,12,12, 0,10, + 11,12,12, 0,13,13,14,14, 0, 0, 0,13,14, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 5, 8, 7,11,10, 0, 7, 7,10,10, + 0, 7, 7,10,10, 0, 9, 9,11,10, 0, 0, 0,11,11, 5, + 7, 8,10,11, 0, 7, 7,10,10, 0, 7, 7,10,10, 0, 9, + 9,10,11, 0, 0, 0,11,11, 8,10, 9,12,12, 0,10,10, + 12,12, 0,10,10,12,12, 0,12,12,13,13, 0, 0, 0,13, + 13, 8, 9,10,12,12, 0,10,10,12,12, 0,10,10,11,12, + 0,12,12,13,13, 0, 0, 0,13,13, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 8, 8,11,11, 0, 7, 7,10,10, 0, 7, 7, + 10,10, 0, 9, 9,10,11, 0, 0, 0,11,10, 5, 8, 8,10, + 11, 0, 7, 7,10,10, 0, 7, 7,10,10, 0, 9, 9,11,10, + 0, 0, 0,10,11, 9,10,10,12,12, 0,10,10,12,12, 0, + 10,10,12,12, 0,12,13,13,13, 0, 0, 0,13,12, 9,10, + 10,12,12, 0,10,10,12,12, 0,10,10,12,12, 0,13,12, + 13,13, 0, 0, 0,12,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7,10,10,14,13, 0, 9, 9,12,12, 0, 9, 9,12,12, 0, + 10,10,12,12, 0, 0, 0,12,12, 7,10,10,13,14, 0, 9, + 9,12,13, 0, 9, 9,12,12, 0,10,10,12,12, 0, 0, 0, + 12,12, 9,11,11,14,13, 0,11,10,13,12, 0,11,11,13, + 13, 0,12,12,13,13, 0, 0, 0,13,13, 9,11,11,13,14, + 0,10,11,12,13, 0,11,11,13,13, 0,12,12,13,13, 0, + 0, 0,13,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, + 11,11,14,14, 0,10,11,13,13, 0,11,10,13,13, 0,12, + 12,13,13, 0, 0, 0,13,12, 9,11,11,14,14, 0,11,10, + 13,13, 0,10,11,13,13, 0,12,12,14,13, 0, 0, 0,13, + 13, +}; + +static const static_codebook _44c7_s_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__44c7_s_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c7_s_p2_0, + 0 +}; + +static const long _vq_quantlist__44c7_s_p3_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c7_s_p3_0[] = { + 2, 4, 4, 5, 5, 7, 7, 9, 9, 0, 4, 4, 6, 6, 7, 7, + 9, 9, 0, 4, 4, 6, 6, 7, 7, 9, 9, 0, 5, 5, 6, 6, + 8, 8,10,10, 0, 0, 0, 6, 6, 8, 8,10,10, 0, 0, 0, + 7, 7, 9, 9,10,10, 0, 0, 0, 7, 7, 8, 8,10,10, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c7_s_p3_0 = { + 2, 81, + (char *)_vq_lengthlist__44c7_s_p3_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c7_s_p3_0, + 0 +}; + +static const long _vq_quantlist__44c7_s_p4_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c7_s_p4_0[] = { + 3, 4, 4, 5, 5, 7, 7, 8, 8, 8, 8, 9, 9,10,10,11, + 11, 0, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11,11, + 12,12, 0, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11, + 11,12,12, 0, 5, 5, 6, 6, 8, 8, 9, 9, 9, 9,10,10, + 11,12,12,12, 0, 0, 0, 6, 6, 8, 7, 9, 9, 9, 9,10, + 10,11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9,10,10, + 11,11,12,12,13,12, 0, 0, 0, 7, 7, 8, 8, 9, 9,10, + 10,11,11,12,12,12,13, 0, 0, 0, 7, 7, 8, 8, 9, 9, + 10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 8, 8, 9, + 9,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c7_s_p4_0 = { + 2, 289, + (char *)_vq_lengthlist__44c7_s_p4_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c7_s_p4_0, + 0 +}; + +static const long _vq_quantlist__44c7_s_p5_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c7_s_p5_0[] = { + 1, 4, 4, 5, 7, 7, 6, 7, 7, 4, 6, 7,10,10,10,10, + 10, 9, 4, 6, 6,10,10,10,10, 9,10, 5,10,10, 9,11, + 12,10,11,12, 7,10,10,11,12,12,12,12,12, 7,10,10, + 11,12,12,12,12,12, 6,10,10,10,12,12,11,12,12, 7, + 10,10,12,12,12,12,11,12, 7,10,10,11,12,12,12,12, + 12, +}; + +static const static_codebook _44c7_s_p5_0 = { + 4, 81, + (char *)_vq_lengthlist__44c7_s_p5_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44c7_s_p5_0, + 0 +}; + +static const long _vq_quantlist__44c7_s_p5_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44c7_s_p5_1[] = { + 3, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8,11, 4, 4, 6, 6, + 7, 7, 8, 8, 9, 9,11, 4, 4, 6, 6, 7, 7, 8, 8, 9, + 9,12, 5, 5, 6, 6, 7, 7, 9, 9, 9, 9,12,12,12, 6, + 6, 7, 7, 9, 9, 9, 9,11,11,11, 7, 7, 7, 7, 8, 8, + 9, 9,11,11,11, 7, 7, 7, 7, 8, 8, 9, 9,11,11,11, + 7, 7, 8, 8, 8, 8, 9, 9,11,11,11,11,11, 8, 8, 8, + 8, 8, 9,11,11,11,11,11, 8, 8, 8, 8, 8, 8,11,11, + 11,11,11, 7, 7, 8, 8, 8, 8, +}; + +static const static_codebook _44c7_s_p5_1 = { + 2, 121, + (char *)_vq_lengthlist__44c7_s_p5_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44c7_s_p5_1, + 0 +}; + +static const long _vq_quantlist__44c7_s_p6_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c7_s_p6_0[] = { + 1, 4, 4, 6, 6, 7, 7, 8, 7, 9, 8,10,10, 6, 5, 5, + 7, 7, 8, 8, 9, 9, 9,10,11,11, 7, 5, 5, 7, 7, 8, + 8, 9, 9,10,10,11,11, 0, 7, 7, 7, 7, 9, 8, 9, 9, + 10,10,11,11, 0, 8, 8, 7, 7, 8, 9, 9, 9,10,10,11, + 11, 0,11,11, 9, 9,10,10,11,10,11,11,12,12, 0,12, + 12, 9, 9,10,10,11,11,11,11,12,12, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const static_codebook _44c7_s_p6_0 = { + 2, 169, + (char *)_vq_lengthlist__44c7_s_p6_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44c7_s_p6_0, + 0 +}; + +static const long _vq_quantlist__44c7_s_p6_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c7_s_p6_1[] = { + 3, 4, 4, 5, 5, 5, 4, 4, 5, 5, 5, 4, 4, 5, 5, 6, + 5, 5, 5, 5, 6, 6, 6, 5, 5, +}; + +static const static_codebook _44c7_s_p6_1 = { + 2, 25, + (char *)_vq_lengthlist__44c7_s_p6_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c7_s_p6_1, + 0 +}; + +static const long _vq_quantlist__44c7_s_p7_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c7_s_p7_0[] = { + 1, 4, 4, 6, 6, 7, 8, 9, 9,10,10,12,11, 6, 5, 5, + 7, 7, 8, 8, 9,10,11,11,12,12, 7, 5, 5, 7, 7, 8, + 8,10,10,11,11,12,12,20, 7, 7, 7, 7, 8, 9,10,10, + 11,11,12,13,20, 7, 7, 7, 7, 9, 9,10,10,11,12,13, + 13,20,11,11, 8, 8, 9, 9,11,11,12,12,13,13,20,11, + 11, 8, 8, 9, 9,11,11,12,12,13,13,20,20,20,10,10, + 10,10,12,12,13,13,13,13,20,20,20,10,10,10,10,12, + 12,13,13,13,14,20,20,20,14,14,11,11,12,12,13,13, + 14,14,20,20,20,14,14,11,11,12,12,13,13,14,14,20, + 20,20,20,19,13,13,13,13,14,14,15,14,19,19,19,19, + 19,13,13,13,13,14,14,15,15, +}; + +static const static_codebook _44c7_s_p7_0 = { + 2, 169, + (char *)_vq_lengthlist__44c7_s_p7_0, + 1, -523206656, 1618345984, 4, 0, + (long *)_vq_quantlist__44c7_s_p7_0, + 0 +}; + +static const long _vq_quantlist__44c7_s_p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44c7_s_p7_1[] = { + 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 8, 6, 6, 7, 7, + 7, 7, 7, 7, 7, 7, 8, 6, 6, 6, 7, 7, 7, 7, 7, 7, + 7, 8, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 7, + 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 7, 7, 7, 7, 7, 7, + 7, 7, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, + 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 7, 7, 7, + 7, 7, 7, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 8, 8, + 8, 8, 8, 7, 7, 7, 7, 7, 7, +}; + +static const static_codebook _44c7_s_p7_1 = { + 2, 121, + (char *)_vq_lengthlist__44c7_s_p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44c7_s_p7_1, + 0 +}; + +static const long _vq_quantlist__44c7_s_p8_0[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__44c7_s_p8_0[] = { + 1, 4, 4, 7, 7, 8, 8, 8, 7, 9, 8, 9, 9,10,10, 6, + 5, 5, 7, 7, 9, 9, 8, 8,10, 9,11,10,12,11, 6, 5, + 5, 8, 7, 9, 9, 8, 8,10,10,11,11,12,11,19, 8, 8, + 8, 8,10,10, 9, 9,10,10,11,11,12,11,19, 8, 8, 8, + 8,10,10, 9, 9,10,10,11,11,12,12,19,12,12, 9, 9, + 10,10, 9,10,10,10,11,11,12,12,19,12,12, 9, 9,10, + 10,10,10,10,10,12,12,12,12,19,19,19, 9, 9, 9, 9, + 11,10,11,11,12,11,13,13,19,19,19, 9, 9, 9, 9,11, + 10,11,11,11,12,13,13,19,19,19,13,13,10,10,11,11, + 12,12,12,12,13,12,19,19,19,14,13,10,10,11,11,12, + 12,12,13,13,13,19,19,19,19,19,12,12,12,11,12,13, + 14,13,13,13,19,19,19,19,19,12,12,12,11,12,12,13, + 14,13,14,19,19,19,19,19,16,16,12,13,12,13,13,14, + 15,14,19,18,18,18,18,16,15,12,11,12,11,14,12,14, + 14, +}; + +static const static_codebook _44c7_s_p8_0 = { + 2, 225, + (char *)_vq_lengthlist__44c7_s_p8_0, + 1, -520986624, 1620377600, 4, 0, + (long *)_vq_quantlist__44c7_s_p8_0, + 0 +}; + +static const long _vq_quantlist__44c7_s_p8_1[] = { + 10, + 9, + 11, + 8, + 12, + 7, + 13, + 6, + 14, + 5, + 15, + 4, + 16, + 3, + 17, + 2, + 18, + 1, + 19, + 0, + 20, +}; + +static const char _vq_lengthlist__44c7_s_p8_1[] = { + 3, 5, 5, 7, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8,10, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 6, 6, 7, 7, 8, + 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, + 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9,10,10,10, 8, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10, 8, 8, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10, + 10, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9,10,11,10,10,10, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9,10, 9, 9,10, 9, 9,10,11,10, + 11,10, 9, 9, 9, 9, 9, 9, 9,10,10,10, 9,10, 9, 9, + 9, 9,11,10,11,10,10, 9, 9, 9, 9, 9, 9,10, 9, 9, + 10, 9, 9,10, 9, 9,10,11,10,10,11,10, 9, 9, 9, 9, + 9,10,10, 9,10,10,10,10, 9,10,10,10,10,10,10,11, + 11,11,10, 9, 9, 9,10,10,10,10,10,10,10,10,10,10, + 10,10,10,11,11,10,10,10,10,10,10,10,10,10,10,10, + 10, 9,10,10, 9,10,11,11,10,11,10,11,10, 9,10,10, + 9,10,10,10,10,10,10,10,10,10,10,11,11,11,11,10, + 11,11,10,10,10,10,10,10, 9,10, 9,10,10, 9,10, 9, + 10,10,10,11,10,11,10,11,11,10,10,10,10,10,10, 9, + 10,10,10,10,10,10,10,11,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,11,10,11, + 11,10,10,10,10, 9, 9,10,10, 9, 9,10, 9,10,10,10, + 10,11,11,10,10,10,10,10,10,10, 9, 9,10,10,10, 9, + 9,10,10,10,10,10,11,10,11,10,10,10,10,10,10, 9, + 10,10,10,10,10,10,10,10,10, +}; + +static const static_codebook _44c7_s_p8_1 = { + 2, 441, + (char *)_vq_lengthlist__44c7_s_p8_1, + 1, -529268736, 1611661312, 5, 0, + (long *)_vq_quantlist__44c7_s_p8_1, + 0 +}; + +static const long _vq_quantlist__44c7_s_p9_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c7_s_p9_0[] = { + 1, 3, 3,11,11,11,11,11,11,11,11,11,11, 4, 6, 6, + 11,11,11,11,11,11,11,11,11,11, 4, 7, 7,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11, +}; + +static const static_codebook _44c7_s_p9_0 = { + 2, 169, + (char *)_vq_lengthlist__44c7_s_p9_0, + 1, -511845376, 1630791680, 4, 0, + (long *)_vq_quantlist__44c7_s_p9_0, + 0 +}; + +static const long _vq_quantlist__44c7_s_p9_1[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c7_s_p9_1[] = { + 1, 4, 4, 7, 7, 7, 7, 7, 6, 8, 8, 8, 8, 6, 6, 6, + 8, 8, 9, 8, 8, 7, 9, 8,11,10, 5, 6, 6, 8, 8, 9, + 8, 8, 8,10, 9,11,11,16, 8, 8, 9, 8, 9, 9, 9, 8, + 10, 9,11,10,16, 8, 8, 9, 9,10,10, 9, 9,10,10,11, + 11,16,13,13, 9, 9,10,10, 9,10,11,11,12,11,16,13, + 13, 9, 8,10, 9,10,10,10,10,11,11,16,14,16, 8, 9, + 9, 9,11,10,11,11,12,11,16,16,16, 9, 7,10, 7,11, + 10,11,11,12,11,16,16,16,12,12, 9,10,11,11,12,11, + 12,12,16,16,16,12,10,10, 7,11, 8,12,11,12,12,16, + 16,15,16,16,11,12,10,10,12,11,12,12,16,16,16,15, + 15,11,11,10,10,12,12,12,12, +}; + +static const static_codebook _44c7_s_p9_1 = { + 2, 169, + (char *)_vq_lengthlist__44c7_s_p9_1, + 1, -518889472, 1622704128, 4, 0, + (long *)_vq_quantlist__44c7_s_p9_1, + 0 +}; + +static const long _vq_quantlist__44c7_s_p9_2[] = { + 24, + 23, + 25, + 22, + 26, + 21, + 27, + 20, + 28, + 19, + 29, + 18, + 30, + 17, + 31, + 16, + 32, + 15, + 33, + 14, + 34, + 13, + 35, + 12, + 36, + 11, + 37, + 10, + 38, + 9, + 39, + 8, + 40, + 7, + 41, + 6, + 42, + 5, + 43, + 4, + 44, + 3, + 45, + 2, + 46, + 1, + 47, + 0, + 48, +}; + +static const char _vq_lengthlist__44c7_s_p9_2[] = { + 2, 4, 3, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, +}; + +static const static_codebook _44c7_s_p9_2 = { + 1, 49, + (char *)_vq_lengthlist__44c7_s_p9_2, + 1, -526909440, 1611661312, 6, 0, + (long *)_vq_quantlist__44c7_s_p9_2, + 0 +}; + +static const char _huff_lengthlist__44c7_s_short[] = { + 4,11,12,14,15,15,17,17,18,18, 5, 6, 6, 8, 9,10, + 13,17,18,19, 7, 5, 4, 6, 8, 9,11,15,19,19, 8, 6, + 5, 5, 6, 7,11,14,16,17, 9, 7, 7, 6, 7, 7,10,13, + 15,19,10, 8, 7, 6, 7, 6, 7, 9,14,16,12,10, 9, 7, + 7, 6, 4, 5,10,15,14,13,11, 7, 6, 6, 4, 2, 7,13, + 16,16,15, 9, 8, 8, 8, 6, 9,13,19,19,17,12,11,10, + 10, 9,11,14, +}; + +static const static_codebook _huff_book__44c7_s_short = { + 2, 100, + (char *)_huff_lengthlist__44c7_s_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44c8_s_long[] = { + 3, 8,12,13,14,14,14,13,14,14, 6, 4, 5, 8,10,10, + 11,11,14,13, 9, 5, 4, 5, 7, 8, 9,10,13,13,12, 7, + 5, 4, 5, 6, 8, 9,12,13,13, 9, 6, 5, 5, 5, 7, 9, + 11,14,12,10, 7, 6, 5, 4, 6, 7,10,11,12,11, 9, 8, + 7, 5, 5, 6,10,10,13,12,10, 9, 8, 6, 6, 5, 8,10, + 14,13,12,12,11,10, 9, 7, 8,10,12,13,14,14,13,12, + 11, 9, 9,10, +}; + +static const static_codebook _huff_book__44c8_s_long = { + 2, 100, + (char *)_huff_lengthlist__44c8_s_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44c8_s_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c8_s_p1_0[] = { + 1, 5, 5, 0, 5, 5, 0, 5, 5, 5, 7, 7, 0, 9, 8, 0, + 9, 8, 6, 7, 7, 0, 8, 9, 0, 8, 9, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 9, 8, 0, 8, 8, 0, 8, 8, 5, 8, 9, + 0, 8, 8, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, + 9, 8, 0, 8, 8, 0, 8, 8, 5, 8, 9, 0, 8, 8, 0, 8, + 8, +}; + +static const static_codebook _44c8_s_p1_0 = { + 4, 81, + (char *)_vq_lengthlist__44c8_s_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44c8_s_p1_0, + 0 +}; + +static const long _vq_quantlist__44c8_s_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c8_s_p2_0[] = { + 3, 5, 5, 8, 8, 0, 5, 5, 8, 8, 0, 5, 5, 8, 8, 0, + 7, 7, 9, 9, 0, 0, 0, 9, 9, 5, 7, 7, 9, 9, 0, 8, + 7,10, 9, 0, 8, 7,10, 9, 0,10,10,11,11, 0, 0, 0, + 11,11, 5, 7, 7, 9, 9, 0, 7, 8, 9,10, 0, 7, 8, 9, + 10, 0,10,10,11,11, 0, 0, 0,11,11, 8, 9, 9,11,10, + 0,11,10,12,11, 0,11,10,12,12, 0,13,13,14,14, 0, + 0, 0,14,13, 8, 9, 9,10,11, 0,10,11,12,12, 0,10, + 11,12,12, 0,13,13,14,14, 0, 0, 0,13,14, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 5, 8, 7,11,10, 0, 7, 7,10,10, + 0, 7, 7,10,10, 0, 9, 9,10,10, 0, 0, 0,11,10, 5, + 7, 8,10,11, 0, 7, 7,10,10, 0, 7, 7,10,10, 0, 9, + 9,10,10, 0, 0, 0,10,10, 8,10, 9,12,12, 0,10,10, + 12,11, 0,10,10,12,12, 0,12,12,13,12, 0, 0, 0,13, + 12, 8, 9,10,12,12, 0,10,10,11,12, 0,10,10,11,12, + 0,12,12,13,13, 0, 0, 0,12,13, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 6, 8, 7,11,10, 0, 7, 7,10,10, 0, 7, 7, + 10,10, 0, 9, 9,10,11, 0, 0, 0,10,10, 6, 7, 8,10, + 11, 0, 7, 7,10,10, 0, 7, 7,10,10, 0, 9, 9,10,10, + 0, 0, 0,10,10, 9,10, 9,12,12, 0,10,10,12,12, 0, + 10,10,12,11, 0,12,12,13,13, 0, 0, 0,13,12, 8, 9, + 10,12,12, 0,10,10,12,12, 0,10,10,11,12, 0,12,12, + 13,13, 0, 0, 0,12,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7,10,10,13,13, 0, 9, 9,12,12, 0, 9, 9,12,12, 0, + 10,10,12,12, 0, 0, 0,12,12, 7,10,10,13,13, 0, 9, + 9,12,12, 0, 9, 9,12,12, 0,10,10,12,12, 0, 0, 0, + 12,12, 9,11,11,14,13, 0,10,10,13,12, 0,11,10,13, + 12, 0,12,12,13,12, 0, 0, 0,13,13, 9,11,11,13,14, + 0,10,11,12,13, 0,10,11,13,13, 0,12,12,12,13, 0, + 0, 0,13,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, + 11,11,14,14, 0,10,11,13,13, 0,11,10,13,13, 0,11, + 12,13,13, 0, 0, 0,13,12, 9,11,11,14,14, 0,11,10, + 13,13, 0,10,11,13,13, 0,12,12,13,13, 0, 0, 0,12, + 13, +}; + +static const static_codebook _44c8_s_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__44c8_s_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c8_s_p2_0, + 0 +}; + +static const long _vq_quantlist__44c8_s_p3_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c8_s_p3_0[] = { + 2, 4, 4, 5, 5, 7, 7, 9, 9, 0, 4, 4, 6, 6, 7, 7, + 9, 9, 0, 4, 4, 6, 6, 7, 7, 9, 9, 0, 5, 5, 6, 6, + 8, 8,10,10, 0, 0, 0, 6, 6, 8, 8,10,10, 0, 0, 0, + 7, 7, 9, 9,10,10, 0, 0, 0, 7, 7, 8, 8,10,10, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c8_s_p3_0 = { + 2, 81, + (char *)_vq_lengthlist__44c8_s_p3_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c8_s_p3_0, + 0 +}; + +static const long _vq_quantlist__44c8_s_p4_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c8_s_p4_0[] = { + 3, 4, 4, 5, 5, 7, 7, 8, 8, 8, 8, 9, 9,10,10,11, + 11, 0, 4, 4, 6, 6, 7, 7, 8, 8, 9, 8,10,10,11,11, + 11,11, 0, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11, + 11,11,11, 0, 6, 5, 6, 6, 7, 7, 9, 9, 9, 9,10,10, + 11,11,12,12, 0, 0, 0, 6, 6, 7, 7, 9, 9, 9, 9,10, + 10,11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9,10,10, + 11,11,11,12,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9,10, + 10,11,11,11,12,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, + 10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 8, 8, 9, + 9,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c8_s_p4_0 = { + 2, 289, + (char *)_vq_lengthlist__44c8_s_p4_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c8_s_p4_0, + 0 +}; + +static const long _vq_quantlist__44c8_s_p5_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c8_s_p5_0[] = { + 1, 4, 4, 5, 7, 7, 6, 7, 7, 4, 7, 6,10,10,10,10, + 10,10, 4, 6, 6,10,10,10,10, 9,10, 5,10,10, 9,11, + 11,10,11,11, 7,10,10,11,12,12,12,12,12, 7,10,10, + 11,12,12,12,12,12, 6,10,10,10,12,12,10,12,12, 7, + 10,10,11,12,12,12,12,12, 7,10,10,11,12,12,12,12, + 12, +}; + +static const static_codebook _44c8_s_p5_0 = { + 4, 81, + (char *)_vq_lengthlist__44c8_s_p5_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44c8_s_p5_0, + 0 +}; + +static const long _vq_quantlist__44c8_s_p5_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44c8_s_p5_1[] = { + 3, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8,11, 4, 5, 6, 6, + 7, 7, 8, 8, 8, 8,11, 5, 5, 6, 6, 7, 7, 8, 8, 8, + 9,12, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,12,12,12, 6, + 6, 7, 7, 8, 8, 9, 9,11,11,11, 6, 6, 7, 7, 8, 8, + 8, 8,11,11,11, 6, 6, 7, 7, 8, 8, 8, 8,11,11,11, + 7, 7, 7, 8, 8, 8, 8, 8,11,11,11,11,11, 7, 7, 8, + 8, 8, 8,11,11,11,11,11, 7, 7, 7, 7, 8, 8,11,11, + 11,11,11, 7, 7, 7, 7, 8, 8, +}; + +static const static_codebook _44c8_s_p5_1 = { + 2, 121, + (char *)_vq_lengthlist__44c8_s_p5_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44c8_s_p5_1, + 0 +}; + +static const long _vq_quantlist__44c8_s_p6_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c8_s_p6_0[] = { + 1, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10, 6, 5, 5, + 7, 7, 8, 8, 9, 9,10,10,11,11, 6, 5, 5, 7, 7, 8, + 8, 9, 9,10,10,11,11, 0, 7, 7, 7, 7, 9, 9,10,10, + 10,10,11,11, 0, 7, 7, 7, 7, 9, 9,10,10,10,10,11, + 11, 0,11,11, 9, 9,10,10,11,11,11,11,12,12, 0,12, + 12, 9, 9,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const static_codebook _44c8_s_p6_0 = { + 2, 169, + (char *)_vq_lengthlist__44c8_s_p6_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44c8_s_p6_0, + 0 +}; + +static const long _vq_quantlist__44c8_s_p6_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c8_s_p6_1[] = { + 3, 4, 4, 5, 5, 5, 4, 4, 5, 5, 5, 4, 4, 5, 5, 6, + 5, 5, 5, 5, 6, 6, 6, 5, 5, +}; + +static const static_codebook _44c8_s_p6_1 = { + 2, 25, + (char *)_vq_lengthlist__44c8_s_p6_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c8_s_p6_1, + 0 +}; + +static const long _vq_quantlist__44c8_s_p7_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c8_s_p7_0[] = { + 1, 4, 4, 6, 6, 8, 7, 9, 9,10,10,12,12, 6, 5, 5, + 7, 7, 8, 8,10,10,11,11,12,12, 7, 5, 5, 7, 7, 8, + 8,10,10,11,11,12,12,21, 7, 7, 7, 7, 8, 9,10,10, + 11,11,12,12,21, 7, 7, 7, 7, 9, 9,10,10,12,12,13, + 13,21,11,11, 8, 8, 9, 9,11,11,12,12,13,13,21,11, + 11, 8, 8, 9, 9,11,11,12,12,13,13,21,21,21,10,10, + 10,10,11,11,12,13,13,13,21,21,21,10,10,10,10,11, + 11,13,13,14,13,21,21,21,13,13,11,11,12,12,13,13, + 14,14,21,21,21,14,14,11,11,12,12,13,13,14,14,21, + 21,21,21,20,13,13,13,12,14,14,16,15,20,20,20,20, + 20,13,13,13,13,14,13,15,15, +}; + +static const static_codebook _44c8_s_p7_0 = { + 2, 169, + (char *)_vq_lengthlist__44c8_s_p7_0, + 1, -523206656, 1618345984, 4, 0, + (long *)_vq_quantlist__44c8_s_p7_0, + 0 +}; + +static const long _vq_quantlist__44c8_s_p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44c8_s_p7_1[] = { + 4, 5, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 6, 6, 6, 7, + 7, 7, 7, 7, 7, 7, 8, 6, 6, 6, 6, 7, 7, 7, 7, 7, + 7, 8, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 7, + 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 7, 7, 7, 7, 7, 7, + 7, 7, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, + 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 7, 7, 7, + 7, 7, 7, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 8, 8, + 8, 8, 8, 7, 7, 7, 7, 7, 7, +}; + +static const static_codebook _44c8_s_p7_1 = { + 2, 121, + (char *)_vq_lengthlist__44c8_s_p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44c8_s_p7_1, + 0 +}; + +static const long _vq_quantlist__44c8_s_p8_0[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__44c8_s_p8_0[] = { + 1, 4, 4, 7, 6, 8, 8, 8, 7, 9, 8,10,10,11,10, 6, + 5, 5, 7, 7, 9, 9, 8, 8,10,10,11,11,12,11, 6, 5, + 5, 7, 7, 9, 9, 9, 9,10,10,11,11,12,12,20, 8, 8, + 8, 8, 9, 9, 9, 9,10,10,11,11,12,12,20, 8, 8, 8, + 8,10, 9, 9, 9,10,10,11,11,12,12,20,12,12, 9, 9, + 10,10,10,10,10,11,12,12,12,12,20,12,12, 9, 9,10, + 10,10,10,11,11,12,12,13,13,20,20,20, 9, 9, 9, 9, + 11,10,11,11,12,12,12,13,20,19,19, 9, 9, 9, 9,11, + 11,11,12,12,12,13,13,19,19,19,13,13,10,10,11,11, + 12,12,13,13,13,13,19,19,19,14,13,11,10,11,11,12, + 12,12,13,13,13,19,19,19,19,19,12,12,12,12,13,13, + 13,13,14,13,19,19,19,19,19,12,12,12,11,12,12,13, + 14,14,14,19,19,19,19,19,16,15,13,12,13,13,13,14, + 14,14,19,19,19,19,19,17,17,13,12,13,11,14,13,15, + 15, +}; + +static const static_codebook _44c8_s_p8_0 = { + 2, 225, + (char *)_vq_lengthlist__44c8_s_p8_0, + 1, -520986624, 1620377600, 4, 0, + (long *)_vq_quantlist__44c8_s_p8_0, + 0 +}; + +static const long _vq_quantlist__44c8_s_p8_1[] = { + 10, + 9, + 11, + 8, + 12, + 7, + 13, + 6, + 14, + 5, + 15, + 4, + 16, + 3, + 17, + 2, + 18, + 1, + 19, + 0, + 20, +}; + +static const char _vq_lengthlist__44c8_s_p8_1[] = { + 4, 5, 5, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8,10, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 6, 6, 7, 7, 8, + 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, + 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9,10,10,10, 8, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10, 8, 8, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10, + 10, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10, + 10,10, 9, 9, 9, 9, 9, 9, 9, 9,10, 9, 9, 9, 9, 9, + 9, 9,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10, 9, 9, 9, 9, + 9, 9, 9, 9,10,10,10, 9, 9, 9, 9, 9,10,10,10,10, + 10,10,10, 9, 9, 9, 9, 9,10,10,10, 9, 9, 9, 9, 9, + 9,10,10,10,10,10,10,10, 9,10,10, 9,10,10,10,10, + 9,10, 9,10,10, 9,10,10,10,10,10,10,10, 9,10,10, + 10,10,10,10, 9, 9,10,10, 9,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10, 9, 9, 9,10, 9, 9, 9, 9, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, + 10, 9,10, 9,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10, 9, 9,10, 9, 9, 9,10,10,10,10,10,10, + 10,10,10,10,10, 9, 9, 9, 9, 9, 9,10, 9, 9,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10, 9,10, 9, + 9,10, 9, 9,10,10,10,10,10,10,10,10,10,10,10,10, + 10, 9, 9,10,10, 9,10, 9, 9, +}; + +static const static_codebook _44c8_s_p8_1 = { + 2, 441, + (char *)_vq_lengthlist__44c8_s_p8_1, + 1, -529268736, 1611661312, 5, 0, + (long *)_vq_quantlist__44c8_s_p8_1, + 0 +}; + +static const long _vq_quantlist__44c8_s_p9_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c8_s_p9_0[] = { + 1, 4, 3,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11, 4, 7, 7,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11, 4, 8,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10, +}; + +static const static_codebook _44c8_s_p9_0 = { + 2, 289, + (char *)_vq_lengthlist__44c8_s_p9_0, + 1, -509798400, 1631393792, 5, 0, + (long *)_vq_quantlist__44c8_s_p9_0, + 0 +}; + +static const long _vq_quantlist__44c8_s_p9_1[] = { + 9, + 8, + 10, + 7, + 11, + 6, + 12, + 5, + 13, + 4, + 14, + 3, + 15, + 2, + 16, + 1, + 17, + 0, + 18, +}; + +static const char _vq_lengthlist__44c8_s_p9_1[] = { + 1, 4, 4, 7, 6, 7, 7, 7, 7, 8, 8, 9, 9,10,10,10, + 10,11,11, 6, 6, 6, 8, 8, 9, 8, 8, 7,10, 8,11,10, + 12,11,12,12,13,13, 5, 5, 6, 8, 8, 9, 9, 8, 8,10, + 9,11,11,12,12,13,13,13,13,17, 8, 8, 9, 9, 9, 9, + 9, 9,10, 9,12,10,12,12,13,12,13,13,17, 9, 8, 9, + 9, 9, 9, 9, 9,10,10,12,12,12,12,13,13,13,13,17, + 13,13, 9, 9,10,10,10,10,11,11,12,11,13,12,13,13, + 14,15,17,13,13, 9, 8,10, 9,10,10,11,11,12,12,14, + 13,15,13,14,15,17,17,17, 9,10, 9,10,11,11,12,12, + 12,12,13,13,14,14,15,15,17,17,17, 9, 8, 9, 8,11, + 11,12,12,12,12,14,13,14,14,14,15,17,17,17,12,14, + 9,10,11,11,12,12,14,13,13,14,15,13,15,15,17,17, + 17,13,11,10, 8,11, 9,13,12,13,13,13,13,13,14,14, + 14,17,17,17,17,17,11,12,11,11,13,13,14,13,15,14, + 13,15,16,15,17,17,17,17,17,11,11,12, 8,13,12,14, + 13,17,14,15,14,15,14,17,17,17,17,17,15,15,12,12, + 12,12,13,14,14,14,15,14,17,14,17,17,17,17,17,16, + 17,12,12,13,12,13,13,14,14,14,14,14,14,17,17,17, + 17,17,17,17,14,14,13,12,13,13,15,15,14,13,15,17, + 17,17,17,17,17,17,17,13,14,13,13,13,13,14,15,15, + 15,14,15,17,17,17,17,17,17,17,16,15,13,14,13,13, + 14,14,15,14,14,16,17,17,17,17,17,17,17,16,16,13, + 14,13,13,14,14,15,14,15,14, +}; + +static const static_codebook _44c8_s_p9_1 = { + 2, 361, + (char *)_vq_lengthlist__44c8_s_p9_1, + 1, -518287360, 1622704128, 5, 0, + (long *)_vq_quantlist__44c8_s_p9_1, + 0 +}; + +static const long _vq_quantlist__44c8_s_p9_2[] = { + 24, + 23, + 25, + 22, + 26, + 21, + 27, + 20, + 28, + 19, + 29, + 18, + 30, + 17, + 31, + 16, + 32, + 15, + 33, + 14, + 34, + 13, + 35, + 12, + 36, + 11, + 37, + 10, + 38, + 9, + 39, + 8, + 40, + 7, + 41, + 6, + 42, + 5, + 43, + 4, + 44, + 3, + 45, + 2, + 46, + 1, + 47, + 0, + 48, +}; + +static const char _vq_lengthlist__44c8_s_p9_2[] = { + 2, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, +}; + +static const static_codebook _44c8_s_p9_2 = { + 1, 49, + (char *)_vq_lengthlist__44c8_s_p9_2, + 1, -526909440, 1611661312, 6, 0, + (long *)_vq_quantlist__44c8_s_p9_2, + 0 +}; + +static const char _huff_lengthlist__44c8_s_short[] = { + 4,11,13,14,15,15,18,17,19,17, 5, 6, 8, 9,10,10, + 12,15,19,19, 6, 6, 6, 6, 8, 8,11,14,18,19, 8, 6, + 5, 4, 6, 7,10,13,16,17, 9, 7, 6, 5, 6, 7, 9,12, + 15,19,10, 8, 7, 6, 6, 6, 7, 9,13,15,12,10, 9, 8, + 7, 6, 4, 5,10,15,13,13,11, 8, 6, 6, 4, 2, 7,12, + 17,15,16,10, 8, 8, 7, 6, 9,12,19,18,17,13,11,10, + 10, 9,11,14, +}; + +static const static_codebook _huff_book__44c8_s_short = { + 2, 100, + (char *)_huff_lengthlist__44c8_s_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44c9_s_long[] = { + 3, 8,12,14,15,15,15,13,15,15, 6, 5, 8,10,12,12, + 13,12,14,13,10, 6, 5, 6, 8, 9,11,11,13,13,13, 8, + 5, 4, 5, 6, 8,10,11,13,14,10, 7, 5, 4, 5, 7, 9, + 11,12,13,11, 8, 6, 5, 4, 5, 7, 9,11,12,11,10, 8, + 7, 5, 4, 5, 9,10,13,13,11,10, 8, 6, 5, 4, 7, 9, + 15,14,13,12,10, 9, 8, 7, 8, 9,12,12,14,13,12,11, + 10, 9, 8, 9, +}; + +static const static_codebook _huff_book__44c9_s_long = { + 2, 100, + (char *)_huff_lengthlist__44c9_s_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44c9_s_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c9_s_p1_0[] = { + 1, 5, 5, 0, 5, 5, 0, 5, 5, 6, 8, 8, 0, 9, 8, 0, + 9, 8, 6, 8, 8, 0, 8, 9, 0, 8, 9, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 8, 8, 0, 7, 7, 0, 8, 8, 5, 8, 8, + 0, 7, 8, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, + 9, 8, 0, 8, 8, 0, 7, 7, 5, 8, 9, 0, 8, 8, 0, 7, + 7, +}; + +static const static_codebook _44c9_s_p1_0 = { + 4, 81, + (char *)_vq_lengthlist__44c9_s_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44c9_s_p1_0, + 0 +}; + +static const long _vq_quantlist__44c9_s_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c9_s_p2_0[] = { + 3, 5, 5, 8, 8, 0, 5, 5, 8, 8, 0, 5, 5, 8, 8, 0, + 7, 7, 9, 9, 0, 0, 0, 9, 9, 6, 7, 7, 9, 8, 0, 8, + 8, 9, 9, 0, 8, 7, 9, 9, 0, 9,10,10,10, 0, 0, 0, + 11,10, 6, 7, 7, 8, 9, 0, 8, 8, 9, 9, 0, 7, 8, 9, + 9, 0,10, 9,11,10, 0, 0, 0,10,10, 8, 9, 8,10,10, + 0,10,10,12,11, 0,10,10,11,11, 0,12,13,13,13, 0, + 0, 0,13,12, 8, 8, 9,10,10, 0,10,10,11,12, 0,10, + 10,11,11, 0,13,12,13,13, 0, 0, 0,13,13, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 6, 8, 7,10,10, 0, 7, 7,10, 9, + 0, 7, 7,10,10, 0, 9, 9,10,10, 0, 0, 0,10,10, 6, + 7, 8,10,10, 0, 7, 7, 9,10, 0, 7, 7,10,10, 0, 9, + 9,10,10, 0, 0, 0,10,10, 8, 9, 9,11,11, 0,10,10, + 11,11, 0,10,10,11,11, 0,12,12,12,12, 0, 0, 0,12, + 12, 8, 9,10,11,11, 0, 9,10,11,11, 0,10,10,11,11, + 0,12,12,12,12, 0, 0, 0,12,12, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 8, 7,10,10, 0, 7, 7,10,10, 0, 7, 7, + 10, 9, 0, 9, 9,10,10, 0, 0, 0,10,10, 6, 7, 8,10, + 10, 0, 7, 7,10,10, 0, 7, 7, 9,10, 0, 9, 9,10,10, + 0, 0, 0,10,10, 8,10, 9,12,11, 0,10,10,12,11, 0, + 10, 9,11,11, 0,11,12,12,12, 0, 0, 0,12,12, 8, 9, + 10,11,12, 0,10,10,11,11, 0, 9,10,11,11, 0,12,11, + 12,12, 0, 0, 0,12,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7,10, 9,12,12, 0, 9, 9,12,11, 0, 9, 9,11,11, 0, + 10,10,12,11, 0, 0, 0,11,12, 7, 9,10,12,12, 0, 9, + 9,11,12, 0, 9, 9,11,11, 0,10,10,11,12, 0, 0, 0, + 11,11, 9,11,10,13,12, 0,10,10,12,12, 0,10,10,12, + 12, 0,11,11,12,12, 0, 0, 0,13,12, 9,10,11,12,13, + 0,10,10,12,12, 0,10,10,12,12, 0,11,12,12,12, 0, + 0, 0,12,13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, + 11,10,13,13, 0,10,10,12,12, 0,10,10,12,12, 0,11, + 12,12,12, 0, 0, 0,12,12, 9,10,11,13,13, 0,10,10, + 12,12, 0,10,10,12,12, 0,12,11,13,12, 0, 0, 0,12, + 12, +}; + +static const static_codebook _44c9_s_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__44c9_s_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c9_s_p2_0, + 0 +}; + +static const long _vq_quantlist__44c9_s_p3_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c9_s_p3_0[] = { + 3, 4, 4, 5, 5, 6, 6, 8, 8, 0, 4, 4, 5, 5, 6, 7, + 8, 8, 0, 4, 4, 5, 5, 7, 7, 8, 8, 0, 5, 5, 6, 6, + 7, 7, 9, 9, 0, 0, 0, 6, 6, 7, 7, 9, 9, 0, 0, 0, + 7, 7, 8, 8, 9, 9, 0, 0, 0, 7, 7, 8, 8, 9, 9, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c9_s_p3_0 = { + 2, 81, + (char *)_vq_lengthlist__44c9_s_p3_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c9_s_p3_0, + 0 +}; + +static const long _vq_quantlist__44c9_s_p4_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c9_s_p4_0[] = { + 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,10,10,10, + 10, 0, 5, 4, 5, 5, 7, 7, 8, 8, 8, 8, 9, 9,10,10, + 11,11, 0, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10, + 10,11,11, 0, 6, 5, 6, 6, 7, 7, 8, 8, 9, 9,10,10, + 11,11,11,12, 0, 0, 0, 6, 6, 7, 7, 8, 8, 9, 9,10, + 10,11,11,12,12, 0, 0, 0, 7, 7, 7, 7, 9, 9, 9, 9, + 10,10,11,11,12,12, 0, 0, 0, 7, 7, 7, 8, 9, 9, 9, + 9,10,10,11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, + 10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 8, 8, 9, + 9,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c9_s_p4_0 = { + 2, 289, + (char *)_vq_lengthlist__44c9_s_p4_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c9_s_p4_0, + 0 +}; + +static const long _vq_quantlist__44c9_s_p5_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c9_s_p5_0[] = { + 1, 4, 4, 5, 7, 7, 6, 7, 7, 4, 7, 6, 9,10,10,10, + 10, 9, 4, 6, 7, 9,10,10,10, 9,10, 5, 9, 9, 9,11, + 11,10,11,11, 7,10, 9,11,12,11,12,12,12, 7, 9,10, + 11,11,12,12,12,12, 6,10,10,10,12,12,10,12,11, 7, + 10,10,11,12,12,11,12,12, 7,10,10,11,12,12,12,12, + 12, +}; + +static const static_codebook _44c9_s_p5_0 = { + 4, 81, + (char *)_vq_lengthlist__44c9_s_p5_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44c9_s_p5_0, + 0 +}; + +static const long _vq_quantlist__44c9_s_p5_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44c9_s_p5_1[] = { + 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7,11, 5, 5, 6, 6, + 7, 7, 7, 7, 8, 8,11, 5, 5, 6, 6, 7, 7, 7, 7, 8, + 8,11, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8,11,11,11, 6, + 6, 7, 7, 7, 8, 8, 8,11,11,11, 6, 6, 7, 7, 7, 8, + 8, 8,11,11,11, 6, 6, 7, 7, 7, 7, 8, 8,11,11,11, + 7, 7, 7, 7, 7, 7, 8, 8,11,11,11,10,10, 7, 7, 7, + 7, 8, 8,11,11,11,11,11, 7, 7, 7, 7, 7, 7,11,11, + 11,11,11, 7, 7, 7, 7, 7, 7, +}; + +static const static_codebook _44c9_s_p5_1 = { + 2, 121, + (char *)_vq_lengthlist__44c9_s_p5_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44c9_s_p5_1, + 0 +}; + +static const long _vq_quantlist__44c9_s_p6_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c9_s_p6_0[] = { + 2, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 5, 4, 4, + 6, 6, 8, 8, 9, 9, 9, 9,10,10, 6, 4, 4, 6, 6, 8, + 8, 9, 9, 9, 9,10,10, 0, 6, 6, 7, 7, 8, 8, 9, 9, + 10,10,11,11, 0, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11, + 11, 0,10,10, 8, 8, 9, 9,10,10,11,11,12,12, 0,11, + 11, 8, 8, 9, 9,10,10,11,11,12,12, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + +static const static_codebook _44c9_s_p6_0 = { + 2, 169, + (char *)_vq_lengthlist__44c9_s_p6_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44c9_s_p6_0, + 0 +}; + +static const long _vq_quantlist__44c9_s_p6_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c9_s_p6_1[] = { + 4, 4, 4, 5, 5, 5, 4, 4, 5, 5, 5, 4, 4, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44c9_s_p6_1 = { + 2, 25, + (char *)_vq_lengthlist__44c9_s_p6_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c9_s_p6_1, + 0 +}; + +static const long _vq_quantlist__44c9_s_p7_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c9_s_p7_0[] = { + 2, 4, 4, 6, 6, 7, 7, 8, 8,10,10,11,11, 6, 4, 4, + 6, 6, 8, 8, 9, 9,10,10,12,12, 6, 4, 5, 6, 6, 8, + 8, 9, 9,10,10,12,12,20, 6, 6, 6, 6, 8, 8, 9,10, + 11,11,12,12,20, 6, 6, 6, 6, 8, 8,10,10,11,11,12, + 12,20,10,10, 7, 7, 9, 9,10,10,11,11,12,12,20,11, + 11, 7, 7, 9, 9,10,10,11,11,12,12,20,20,20, 9, 9, + 9, 9,11,11,12,12,13,13,20,20,20, 9, 9, 9, 9,11, + 11,12,12,13,13,20,20,20,13,13,10,10,11,11,12,13, + 13,13,20,20,20,13,13,10,10,11,11,12,13,13,13,20, + 20,20,20,19,12,12,12,12,13,13,14,15,19,19,19,19, + 19,12,12,12,12,13,13,14,14, +}; + +static const static_codebook _44c9_s_p7_0 = { + 2, 169, + (char *)_vq_lengthlist__44c9_s_p7_0, + 1, -523206656, 1618345984, 4, 0, + (long *)_vq_quantlist__44c9_s_p7_0, + 0 +}; + +static const long _vq_quantlist__44c9_s_p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44c9_s_p7_1[] = { + 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, + 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 7, 7, 7, 7, 7, + 7, 8, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 6, + 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 7, 7, 7, 7, 7, 7, + 7, 7, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, + 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 7, 7, 7, + 7, 7, 7, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 8, 8, + 8, 8, 8, 7, 7, 7, 7, 7, 7, +}; + +static const static_codebook _44c9_s_p7_1 = { + 2, 121, + (char *)_vq_lengthlist__44c9_s_p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44c9_s_p7_1, + 0 +}; + +static const long _vq_quantlist__44c9_s_p8_0[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__44c9_s_p8_0[] = { + 1, 4, 4, 7, 6, 8, 8, 8, 8, 9, 9,10,10,11,10, 6, + 5, 5, 7, 7, 9, 9, 8, 9,10,10,11,11,12,12, 6, 5, + 5, 7, 7, 9, 9, 9, 9,10,10,11,11,12,12,21, 7, 8, + 8, 8, 9, 9, 9, 9,10,10,11,11,12,12,21, 8, 8, 8, + 8, 9, 9, 9, 9,10,10,11,11,12,12,21,11,12, 9, 9, + 10,10,10,10,10,11,11,12,12,12,21,12,12, 9, 8,10, + 10,10,10,11,11,12,12,13,13,21,21,21, 9, 9, 9, 9, + 11,11,11,11,12,12,12,13,21,20,20, 9, 9, 9, 9,10, + 11,11,11,12,12,13,13,20,20,20,13,13,10,10,11,11, + 12,12,13,13,13,13,20,20,20,13,13,10,10,11,11,12, + 12,13,13,13,13,20,20,20,20,20,12,12,12,12,12,12, + 13,13,14,14,20,20,20,20,20,12,12,12,11,13,12,13, + 13,14,14,20,20,20,20,20,15,16,13,12,13,13,14,13, + 14,14,20,20,20,20,20,16,15,12,12,13,12,14,13,14, + 14, +}; + +static const static_codebook _44c9_s_p8_0 = { + 2, 225, + (char *)_vq_lengthlist__44c9_s_p8_0, + 1, -520986624, 1620377600, 4, 0, + (long *)_vq_quantlist__44c9_s_p8_0, + 0 +}; + +static const long _vq_quantlist__44c9_s_p8_1[] = { + 10, + 9, + 11, + 8, + 12, + 7, + 13, + 6, + 14, + 5, + 15, + 4, + 16, + 3, + 17, + 2, + 18, + 1, + 19, + 0, + 20, +}; + +static const char _vq_lengthlist__44c9_s_p8_1[] = { + 4, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8,10, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 6, 6, 7, 7, 8, + 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, + 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9,10,10,10, 8, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10, 8, 8, 8, 8, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10, + 10, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10, + 10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9,10, 9, 9, 9,10,10,10,10, + 10,10,10, 9, 9, 9, 9, 9, 9,10, 9, 9, 9, 9, 9, 9, + 9,10,10,10,10,10,10,10, 9, 9, 9,10,10,10,10,10, + 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10, 9, 9,10, + 9,10, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10,10, + 10,10,10,10, 9, 9,10,10, 9, 9, 9, 9, 9, 9, 9, 9, + 10,10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, + 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10, + 10,10, 9, 9,10, 9, 9, 9, 9, 9,10,10,10,10,10,10, + 10,10,10,10,10, 9, 9,10,10, 9, 9,10, 9, 9, 9,10, + 10,10,10,10,10,10,10,10,10,10, 9, 9,10, 9, 9, 9, + 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10, 9, + 9, 9, 9,10, 9, 9, 9, 9, 9, +}; + +static const static_codebook _44c9_s_p8_1 = { + 2, 441, + (char *)_vq_lengthlist__44c9_s_p8_1, + 1, -529268736, 1611661312, 5, 0, + (long *)_vq_quantlist__44c9_s_p8_1, + 0 +}; + +static const long _vq_quantlist__44c9_s_p9_0[] = { + 9, + 8, + 10, + 7, + 11, + 6, + 12, + 5, + 13, + 4, + 14, + 3, + 15, + 2, + 16, + 1, + 17, + 0, + 18, +}; + +static const char _vq_lengthlist__44c9_s_p9_0[] = { + 1, 4, 3,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12, 4, 5, 6,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12, 4, 6, 6,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,11,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11, +}; + +static const static_codebook _44c9_s_p9_0 = { + 2, 361, + (char *)_vq_lengthlist__44c9_s_p9_0, + 1, -508535424, 1631393792, 5, 0, + (long *)_vq_quantlist__44c9_s_p9_0, + 0 +}; + +static const long _vq_quantlist__44c9_s_p9_1[] = { + 9, + 8, + 10, + 7, + 11, + 6, + 12, + 5, + 13, + 4, + 14, + 3, + 15, + 2, + 16, + 1, + 17, + 0, + 18, +}; + +static const char _vq_lengthlist__44c9_s_p9_1[] = { + 1, 4, 4, 7, 7, 7, 7, 8, 7, 9, 8, 9, 9,10,10,11, + 11,11,11, 6, 5, 5, 8, 8, 9, 9, 9, 8,10, 9,11,10, + 12,12,13,12,13,13, 5, 5, 5, 8, 8, 9, 9, 9, 9,10, + 10,11,11,12,12,13,12,13,13,17, 8, 8, 9, 9, 9, 9, + 9, 9,10,10,12,11,13,12,13,13,13,13,18, 8, 8, 9, + 9, 9, 9, 9, 9,11,11,12,12,13,13,13,13,13,13,17, + 13,12, 9, 9,10,10,10,10,11,11,12,12,12,13,13,13, + 14,14,18,13,12, 9, 9,10,10,10,10,11,11,12,12,13, + 13,13,14,14,14,17,18,18,10,10,10,10,11,11,11,12, + 12,12,14,13,14,13,13,14,18,18,18,10, 9,10, 9,11, + 11,12,12,12,12,13,13,15,14,14,14,18,18,16,13,14, + 10,11,11,11,12,13,13,13,13,14,13,13,14,14,18,18, + 18,14,12,11, 9,11,10,13,12,13,13,13,14,14,14,13, + 14,18,18,17,18,18,11,12,12,12,13,13,14,13,14,14, + 13,14,14,14,18,18,18,18,17,12,10,12, 9,13,11,13, + 14,14,14,14,14,15,14,18,18,17,17,18,14,15,12,13, + 13,13,14,13,14,14,15,14,15,14,18,17,18,18,18,15, + 15,12,10,14,10,14,14,13,13,14,14,14,14,18,16,18, + 18,18,18,17,14,14,13,14,14,13,13,14,14,14,15,15, + 18,18,18,18,17,17,17,14,14,14,12,14,13,14,14,15, + 14,15,14,18,18,18,18,18,18,18,17,16,13,13,13,14, + 14,14,14,15,16,15,18,18,18,18,18,18,18,17,17,13, + 13,13,13,14,13,14,15,15,15, +}; + +static const static_codebook _44c9_s_p9_1 = { + 2, 361, + (char *)_vq_lengthlist__44c9_s_p9_1, + 1, -518287360, 1622704128, 5, 0, + (long *)_vq_quantlist__44c9_s_p9_1, + 0 +}; + +static const long _vq_quantlist__44c9_s_p9_2[] = { + 24, + 23, + 25, + 22, + 26, + 21, + 27, + 20, + 28, + 19, + 29, + 18, + 30, + 17, + 31, + 16, + 32, + 15, + 33, + 14, + 34, + 13, + 35, + 12, + 36, + 11, + 37, + 10, + 38, + 9, + 39, + 8, + 40, + 7, + 41, + 6, + 42, + 5, + 43, + 4, + 44, + 3, + 45, + 2, + 46, + 1, + 47, + 0, + 48, +}; + +static const char _vq_lengthlist__44c9_s_p9_2[] = { + 2, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, +}; + +static const static_codebook _44c9_s_p9_2 = { + 1, 49, + (char *)_vq_lengthlist__44c9_s_p9_2, + 1, -526909440, 1611661312, 6, 0, + (long *)_vq_quantlist__44c9_s_p9_2, + 0 +}; + +static const char _huff_lengthlist__44c9_s_short[] = { + 5,13,18,16,17,17,19,18,19,19, 5, 7,10,11,12,12, + 13,16,17,18, 6, 6, 7, 7, 9, 9,10,14,17,19, 8, 7, + 6, 5, 6, 7, 9,12,19,17, 8, 7, 7, 6, 5, 6, 8,11, + 15,19, 9, 8, 7, 6, 5, 5, 6, 8,13,15,11,10, 8, 8, + 7, 5, 4, 4,10,14,12,13,11, 9, 7, 6, 4, 2, 6,12, + 18,16,16,13, 8, 7, 7, 5, 8,13,16,17,18,15,11, 9, + 9, 8,10,13, +}; + +static const static_codebook _huff_book__44c9_s_short = { + 2, 100, + (char *)_huff_lengthlist__44c9_s_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44c0_s_long[] = { + 5, 4, 8, 9, 8, 9,10,12,15, 4, 1, 5, 5, 6, 8,11, + 12,12, 8, 5, 8, 9, 9,11,13,12,12, 9, 5, 8, 5, 7, + 9,12,13,13, 8, 6, 8, 7, 7, 9,11,11,11, 9, 7, 9, + 7, 7, 7, 7,10,12,10,10,11, 9, 8, 7, 7, 9,11,11, + 12,13,12,11, 9, 8, 9,11,13,16,16,15,15,12,10,11, + 12, +}; + +static const static_codebook _huff_book__44c0_s_long = { + 2, 81, + (char *)_huff_lengthlist__44c0_s_long, + 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c0_s_p1_0 = { + 8, 6561, + (char *)_vq_lengthlist__44c0_s_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44c0_s_p1_0, + 0 +}; + +static const long _vq_quantlist__44c0_s_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c0_s_p2_0[] = { + 1, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 5, 7, 6, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c0_s_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__44c0_s_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c0_s_p2_0, + 0 +}; + +static const long _vq_quantlist__44c0_s_p3_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c0_s_p3_0[] = { + 1, 3, 2, 8, 7, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, + 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 7, 7, + 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0, + 8, 8, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, + 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c0_s_p3_0 = { + 2, 81, + (char *)_vq_lengthlist__44c0_s_p3_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c0_s_p3_0, + 0 +}; + +static const long _vq_quantlist__44c0_s_p4_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c0_s_p4_0[] = { + 1, 3, 3, 6, 6, 6, 6, 8, 8, 0, 0, 0, 7, 7, 7, 7, + 9, 9, 0, 0, 0, 7, 7, 7, 7, 9, 9, 0, 0, 0, 7, 7, + 7, 8, 9, 9, 0, 0, 0, 7, 7, 7, 7, 9, 9, 0, 0, 0, + 9, 9, 8, 8,10,10, 0, 0, 0, 8, 9, 8, 8,10,10, 0, + 0, 0,10,10, 9, 9,10,10, 0, 0, 0, 0, 0, 9, 9,10, + 10, +}; + +static const static_codebook _44c0_s_p4_0 = { + 2, 81, + (char *)_vq_lengthlist__44c0_s_p4_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c0_s_p4_0, + 0 +}; + +static const long _vq_quantlist__44c0_s_p5_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c0_s_p5_0[] = { + 1, 4, 3, 6, 6, 8, 7, 8, 8, 8, 8, 9, 9,10,10,11, + 11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9, 9,10,10,10, + 11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10, + 10,11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10, + 11,11,11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10, + 10,11,11,11,11, 0, 0, 0, 8, 8, 9, 9, 9, 9,10,10, + 10,10,11,11,12,12, 0, 0, 0, 8, 8, 9, 9, 9, 9,10, + 10,10,10,11,11,12,12, 0, 0, 0, 9, 9, 9, 9,10,10, + 10,10,11,11,11,12,12,12, 0, 0, 0, 0, 0, 9, 9,10, + 10,10,10,11,11,11,11,12,12, 0, 0, 0, 0, 0, 9, 9, + 10,10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, + 9,10,10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, + 10,10,11,11,11,11,11,12,12,12,13,13, 0, 0, 0, 0, + 0, 0, 0,11,10,11,11,11,11,12,12,13,13, 0, 0, 0, + 0, 0, 0, 0,11,11,12,11,12,12,12,12,13,13, 0, 0, + 0, 0, 0, 0, 0,11,11,11,12,12,12,12,13,13,13, 0, + 0, 0, 0, 0, 0, 0,12,12,12,12,12,13,13,13,14,14, + 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,14, + 14, +}; + +static const static_codebook _44c0_s_p5_0 = { + 2, 289, + (char *)_vq_lengthlist__44c0_s_p5_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c0_s_p5_0, + 0 +}; + +static const long _vq_quantlist__44c0_s_p6_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c0_s_p6_0[] = { + 1, 4, 4, 7, 6, 6, 7, 6, 6, 4, 7, 7,10, 9, 9,10, + 9, 9, 4, 6, 7,10, 9, 9,11, 9, 9, 7,10,10,11,11, + 11,12,10,11, 6, 9, 9,11,10,11,11,10,10, 6, 9, 9, + 11,10,11,11,10,10, 7,11,10,12,11,11,11,11,11, 7, + 9, 9,10,10,10,11,11,10, 6, 9, 9,11,10,10,11,10, + 10, +}; + +static const static_codebook _44c0_s_p6_0 = { + 4, 81, + (char *)_vq_lengthlist__44c0_s_p6_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44c0_s_p6_0, + 0 +}; + +static const long _vq_quantlist__44c0_s_p6_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44c0_s_p6_1[] = { + 2, 3, 3, 6, 6, 7, 7, 7, 7, 7, 8,10,10,10, 6, 6, + 7, 7, 8, 8, 8, 8,10,10,10, 6, 6, 7, 7, 8, 8, 8, + 8,10,10,10, 7, 7, 7, 7, 8, 8, 8, 8,10,10,10, 7, + 7, 7, 7, 8, 8, 8, 8,10,10,10, 8, 7, 8, 8, 8, 8, + 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10, + 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,10,10, 8, 8, 8, + 8, 8, 8,10,10,10,10,10, 9, 9, 8, 8, 8, 8,10,10, + 10,10,10, 8, 8, 8, 8, 8, 8, +}; + +static const static_codebook _44c0_s_p6_1 = { + 2, 121, + (char *)_vq_lengthlist__44c0_s_p6_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44c0_s_p6_1, + 0 +}; + +static const long _vq_quantlist__44c0_s_p7_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c0_s_p7_0[] = { + 1, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 7, 5, 5, + 7, 7, 8, 8, 8, 8, 9, 9,10,10, 7, 5, 6, 7, 7, 8, + 8, 8, 8, 9, 9,10,10, 0, 8, 8, 8, 8, 9, 9, 9, 9, + 10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11, + 11, 0,12,12, 9, 9,10,10,10,10,11,11,11,11, 0,13, + 13, 9, 9, 9, 9,10,10,11,11,11,12, 0, 0, 0,10,10, + 10,10,11,11,11,11,12,12, 0, 0, 0,10,10, 9, 9,11, + 11,11,12,12,12, 0, 0, 0,13,13,10,10,11,11,12,12, + 13,13, 0, 0, 0,14,14,10,10,11,11,12,12,13,13, 0, + 0, 0, 0, 0,11,11,11,11,13,12,13,13, 0, 0, 0, 0, + 0,12,12,11,11,12,12,13,13, +}; + +static const static_codebook _44c0_s_p7_0 = { + 2, 169, + (char *)_vq_lengthlist__44c0_s_p7_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44c0_s_p7_0, + 0 +}; + +static const long _vq_quantlist__44c0_s_p7_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c0_s_p7_1[] = { + 2, 3, 3, 5, 5, 6, 6, 6, 5, 5, 6, 6, 6, 5, 5, 6, + 6, 6, 5, 5, 6, 6, 6, 5, 5, +}; + +static const static_codebook _44c0_s_p7_1 = { + 2, 25, + (char *)_vq_lengthlist__44c0_s_p7_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c0_s_p7_1, + 0 +}; + +static const long _vq_quantlist__44c0_s_p8_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c0_s_p8_0[] = { + 1, 5, 5,10,10, 6, 9, 8,10,10, 6,10, 9,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10, 8,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,10,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11, +}; + +static const static_codebook _44c0_s_p8_0 = { + 4, 625, + (char *)_vq_lengthlist__44c0_s_p8_0, + 1, -518283264, 1627103232, 3, 0, + (long *)_vq_quantlist__44c0_s_p8_0, + 0 +}; + +static const long _vq_quantlist__44c0_s_p8_1[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c0_s_p8_1[] = { + 1, 4, 4, 6, 6, 7, 7, 9, 9,11,12,13,12, 6, 5, 5, + 7, 7, 8, 8,10, 9,12,12,12,12, 6, 5, 5, 7, 7, 8, + 8,10, 9,12,11,11,13,16, 7, 7, 8, 8, 9, 9,10,10, + 12,12,13,12,16, 7, 7, 8, 7, 9, 9,10,10,11,12,12, + 13,16,10,10, 8, 8,10,10,11,12,12,12,13,13,16,11, + 10, 8, 7,11,10,11,11,12,11,13,13,16,16,16,10,10, + 10,10,11,11,13,12,13,13,16,16,16,11, 9,11, 9,15, + 13,12,13,13,13,16,16,16,15,13,11,11,12,13,12,12, + 14,13,16,16,16,14,13,11,11,13,12,14,13,13,13,16, + 16,16,16,16,13,13,13,12,14,13,14,14,16,16,16,16, + 16,13,13,12,12,14,14,15,13, +}; + +static const static_codebook _44c0_s_p8_1 = { + 2, 169, + (char *)_vq_lengthlist__44c0_s_p8_1, + 1, -522616832, 1620115456, 4, 0, + (long *)_vq_quantlist__44c0_s_p8_1, + 0 +}; + +static const long _vq_quantlist__44c0_s_p8_2[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c0_s_p8_2[] = { + 2, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, + 8,10,10,10, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 9, + 9, 9,10,10,10, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9,10,10,10, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, + 9,10, 9, 9,10,10,10, 7, 7, 8, 8, 9, 8, 9, 9, 9, + 9,10, 9, 9,10,10,10,10, 8, 8, 8, 8, 9, 8, 9, 9, + 9, 9, 9,10, 9,10,10,10,10, 7, 7, 8, 8, 9, 9, 9, + 9, 9, 9,10, 9,10,10,10,10,10, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 9,10,10,10, 9,11,10,10,10,10, 8, 8, 9, + 9, 9, 9, 9,10, 9, 9, 9,10,10,10,10,11,11, 9, 9, + 9, 9, 9, 9, 9, 9,10, 9, 9,10,11,10,10,11,11, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9,11,11,10,11,11, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9,11,10,10,11, + 11,11,11, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10, + 11,11,11,11, 9,10, 9,10, 9, 9, 9, 9,10, 9,10,11, + 10,11,10,10,10,10,10, 9, 9, 9,10, 9, 9, 9,10,11, + 11,10,11,11,10,11,10,10,10, 9, 9, 9, 9,10, 9, 9, + 10,11,10,11,11,11,11,10,11,10,10, 9,10, 9, 9, 9, + 10, +}; + +static const static_codebook _44c0_s_p8_2 = { + 2, 289, + (char *)_vq_lengthlist__44c0_s_p8_2, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c0_s_p8_2, + 0 +}; + +static const char _huff_lengthlist__44c0_s_short[] = { + 9, 8,12,11,12,13,14,14,16, 6, 1, 5, 6, 6, 9,12, + 14,17, 9, 4, 5, 9, 7, 9,13,15,16, 8, 5, 8, 6, 8, + 10,13,17,17, 9, 6, 7, 7, 8, 9,13,15,17,11, 8, 9, + 9, 9,10,12,16,16,13, 7, 8, 7, 7, 9,12,14,15,13, + 6, 7, 5, 5, 7,10,13,13,14, 7, 8, 5, 6, 7, 9,10, + 12, +}; + +static const static_codebook _huff_book__44c0_s_short = { + 2, 81, + (char *)_huff_lengthlist__44c0_s_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44c0_sm_long[] = { + 5, 4, 9,10, 9,10,11,12,13, 4, 1, 5, 7, 7, 9,11, + 12,14, 8, 5, 7, 9, 8,10,13,13,13,10, 7, 9, 4, 6, + 7,10,12,14, 9, 6, 7, 6, 6, 7,10,12,12, 9, 8, 9, + 7, 6, 7, 8,11,12,11,11,11, 9, 8, 7, 8,10,12,12, + 13,14,12,11, 9, 9, 9,12,12,17,17,15,16,12,10,11, + 13, +}; + +static const static_codebook _huff_book__44c0_sm_long = { + 2, 81, + (char *)_huff_lengthlist__44c0_sm_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44c0_sm_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c0_sm_p1_0[] = { + 1, 5, 5, 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 0, + 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 8, 7, 0, 0, 0, 0, 0, 0, 7, 9, 9, 0, 0, 0, + 0, 0, 0, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 7, 9, 8, 0, 0, + 0, 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,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6561, + (char *)_vq_lengthlist__44c0_sm_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44c0_sm_p1_0, + 0 +}; + +static const long _vq_quantlist__44c0_sm_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c0_sm_p2_0[] = { + 1, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 5, 7, 7, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 5, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 7, 9, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 7, 7, 9, 9, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c0_sm_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__44c0_sm_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c0_sm_p2_0, + 0 +}; + +static const long _vq_quantlist__44c0_sm_p3_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c0_sm_p3_0[] = { + 1, 3, 3, 7, 7, 0, 0, 0, 0, 0, 5, 4, 7, 7, 0, 0, + 0, 0, 0, 5, 5, 7, 7, 0, 0, 0, 0, 0, 6, 7, 8, 8, + 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, + 9,10, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, + 0, 0,11,11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c0_sm_p3_0 = { + 2, 81, + (char *)_vq_lengthlist__44c0_sm_p3_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c0_sm_p3_0, + 0 +}; + +static const long _vq_quantlist__44c0_sm_p4_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c0_sm_p4_0[] = { + 1, 4, 3, 6, 6, 7, 7, 9, 9, 0, 5, 5, 7, 7, 8, 7, + 9, 9, 0, 5, 5, 7, 7, 8, 8, 9, 9, 0, 7, 7, 8, 8, + 8, 8,10,10, 0, 0, 0, 8, 8, 8, 8,10,10, 0, 0, 0, + 9, 9, 9, 9,11,11, 0, 0, 0, 9, 9, 9, 9,11,11, 0, + 0, 0,10,10,10,10,11,11, 0, 0, 0, 0, 0, 9, 9,11, + 11, +}; + +static const static_codebook _44c0_sm_p4_0 = { + 2, 81, + (char *)_vq_lengthlist__44c0_sm_p4_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c0_sm_p4_0, + 0 +}; + +static const long _vq_quantlist__44c0_sm_p5_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c0_sm_p5_0[] = { + 1, 4, 4, 6, 6, 8, 8, 8, 8, 8, 8, 9, 9,10,10,11, + 11, 0, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10,11, + 11,11, 0, 5, 6, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10, + 11,11,11, 0, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9,10,10, + 11,11,12,12, 0, 0, 0, 8, 8, 8, 8, 9, 9, 9, 9,10, + 10,11,11,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10,10, + 11,11,11,11,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10, + 10,11,11,11,11,12,12, 0, 0, 0, 9, 9, 9, 9,10,10, + 10,10,11,11,12,12,12,13, 0, 0, 0, 0, 0, 9, 9,10, + 10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9, + 10,10,11,11,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, + 9,10,10,11,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, + 10,10,10,10,11,11,12,12,12,13,13,13, 0, 0, 0, 0, + 0, 0, 0,10,10,11,11,12,12,12,13,13,13, 0, 0, 0, + 0, 0, 0, 0,11,11,12,12,12,12,13,13,14,14, 0, 0, + 0, 0, 0, 0, 0,11,11,12,11,12,12,13,13,13,13, 0, + 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,13,13,14,14, + 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,14, + 14, +}; + +static const static_codebook _44c0_sm_p5_0 = { + 2, 289, + (char *)_vq_lengthlist__44c0_sm_p5_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c0_sm_p5_0, + 0 +}; + +static const long _vq_quantlist__44c0_sm_p6_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c0_sm_p6_0[] = { + 1, 4, 4, 7, 6, 6, 7, 6, 6, 4, 7, 7,10, 9, 9,11, + 9, 9, 4, 7, 7,10, 9, 9,11, 9, 9, 7,10,10,10,11, + 11,11,10,10, 6, 9, 9,11,11,10,11,10,10, 6, 9, 9, + 11,10,11,11,10,10, 7,11,10,11,11,11,11,11,11, 6, + 9, 9,11,10,10,11,11,10, 6, 9, 9,11,10,10,11,10, + 11, +}; + +static const static_codebook _44c0_sm_p6_0 = { + 4, 81, + (char *)_vq_lengthlist__44c0_sm_p6_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44c0_sm_p6_0, + 0 +}; + +static const long _vq_quantlist__44c0_sm_p6_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44c0_sm_p6_1[] = { + 2, 4, 4, 6, 6, 7, 7, 7, 7, 7, 8, 9, 5, 5, 6, 6, + 7, 7, 8, 8, 8, 8, 9, 5, 5, 6, 6, 7, 7, 8, 8, 8, + 8,10, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,10,10,10, 7, + 7, 7, 7, 8, 8, 8, 8,10,10,10, 8, 8, 8, 8, 8, 8, + 8, 8,10,10,10, 8, 8, 8, 8, 8, 8, 8, 8,10,10,10, + 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,10,10, 8, 8, 8, + 8, 8, 8,10,10,10,10,10, 9, 9, 8, 8, 8, 8,10,10, + 10,10,10, 8, 8, 8, 8, 8, 8, +}; + +static const static_codebook _44c0_sm_p6_1 = { + 2, 121, + (char *)_vq_lengthlist__44c0_sm_p6_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44c0_sm_p6_1, + 0 +}; + +static const long _vq_quantlist__44c0_sm_p7_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c0_sm_p7_0[] = { + 1, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 7, 5, 5, + 7, 7, 8, 8, 8, 8, 9, 9,10,10, 7, 6, 5, 7, 7, 8, + 8, 8, 8, 9, 9,10,10, 0, 8, 8, 8, 8, 9, 9, 9, 9, + 10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11, + 11, 0,12,12, 9, 9,10,10,10,10,11,11,11,11, 0,13, + 13, 9, 9, 9, 9,10,10,11,11,11,12, 0, 0, 0, 9,10, + 10,10,11,11,12,11,12,12, 0, 0, 0,10,10, 9, 9,11, + 11,12,12,12,12, 0, 0, 0,13,13,10,10,11,11,12,12, + 13,13, 0, 0, 0,14,14,10,10,11,11,12,12,13,13, 0, + 0, 0, 0, 0,11,12,11,11,13,12,13,13, 0, 0, 0, 0, + 0,12,12,11,11,13,12,14,14, +}; + +static const static_codebook _44c0_sm_p7_0 = { + 2, 169, + (char *)_vq_lengthlist__44c0_sm_p7_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44c0_sm_p7_0, + 0 +}; + +static const long _vq_quantlist__44c0_sm_p7_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c0_sm_p7_1[] = { + 2, 4, 4, 4, 4, 6, 5, 5, 5, 5, 6, 5, 5, 5, 5, 6, + 6, 6, 5, 5, 6, 6, 6, 5, 5, +}; + +static const static_codebook _44c0_sm_p7_1 = { + 2, 25, + (char *)_vq_lengthlist__44c0_sm_p7_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c0_sm_p7_1, + 0 +}; + +static const long _vq_quantlist__44c0_sm_p8_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c0_sm_p8_0[] = { + 1, 3, 3,11,11,11,11,11,11, 3, 7, 6,11,11,11,11, + 11,11, 4, 8, 7,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12, +}; + +static const static_codebook _44c0_sm_p8_0 = { + 2, 81, + (char *)_vq_lengthlist__44c0_sm_p8_0, + 1, -516186112, 1627103232, 4, 0, + (long *)_vq_quantlist__44c0_sm_p8_0, + 0 +}; + +static const long _vq_quantlist__44c0_sm_p8_1[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c0_sm_p8_1[] = { + 1, 4, 4, 6, 6, 7, 7, 9, 9,10,11,12,12, 6, 5, 5, + 7, 7, 8, 8,10,10,12,11,12,12, 6, 5, 5, 7, 7, 8, + 8,10,10,12,11,12,12,17, 7, 7, 8, 8, 9, 9,10,10, + 12,12,13,13,18, 7, 7, 8, 7, 9, 9,10,10,12,12,12, + 13,19,10,10, 8, 8,10,10,11,11,12,12,13,14,19,11, + 10, 8, 7,10,10,11,11,12,12,13,12,19,19,19,10,10, + 10,10,11,11,12,12,13,13,19,19,19,11, 9,11, 9,14, + 12,13,12,13,13,19,20,18,13,14,11,11,12,12,13,13, + 14,13,20,20,20,15,13,11,10,13,11,13,13,14,13,20, + 20,20,20,20,13,14,12,12,13,13,13,13,20,20,20,20, + 20,13,13,12,12,16,13,15,13, +}; + +static const static_codebook _44c0_sm_p8_1 = { + 2, 169, + (char *)_vq_lengthlist__44c0_sm_p8_1, + 1, -522616832, 1620115456, 4, 0, + (long *)_vq_quantlist__44c0_sm_p8_1, + 0 +}; + +static const long _vq_quantlist__44c0_sm_p8_2[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c0_sm_p8_2[] = { + 2, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, + 8,10, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, + 9, 9,10, 6, 6, 7, 7, 8, 7, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9,10, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9,10,10,10, 7, 7, 8, 8, 9, 8, 9, 9, 9, + 9,10, 9, 9,10,10,10,11, 8, 8, 8, 8, 9, 9, 9, 9, + 9, 9, 9,10, 9,10,10,10,10, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 9, 9,10,10,11,10,10, 8, 8, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9,10,10,10,10,10,11,11, 8, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 9,10,11,11,11,11,11, 9, 9, + 9, 9, 9, 9, 9, 9,10, 9,10, 9,11,11,10,11,11, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9,11,11,10,11,11, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9,11,10,11,11, + 11,11,11, 9, 9,10, 9, 9, 9, 9, 9, 9, 9,10,11,10, + 11,11,11,11,10,10,10,10, 9, 9, 9, 9, 9, 9,10,11, + 11,11,11,11,11, 9,10, 9, 9, 9, 9, 9, 9, 9, 9,11, + 11,10,11,11,11,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9, + 10,11,10,11,11,11,11,11,11, 9, 9, 9, 9, 9, 9, 9, + 9, +}; + +static const static_codebook _44c0_sm_p8_2 = { + 2, 289, + (char *)_vq_lengthlist__44c0_sm_p8_2, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c0_sm_p8_2, + 0 +}; + +static const char _huff_lengthlist__44c0_sm_short[] = { + 6, 6,12,13,13,14,16,17,17, 4, 2, 5, 8, 7, 9,12, + 15,15, 9, 4, 5, 9, 7, 9,12,16,18,11, 6, 7, 4, 6, + 8,11,14,18,10, 5, 6, 5, 5, 7,10,14,17,10, 5, 7, + 7, 6, 7,10,13,16,11, 5, 7, 7, 7, 8,10,12,15,13, + 6, 7, 5, 5, 7, 9,12,13,16, 8, 9, 6, 6, 7, 9,10, + 12, +}; + +static const static_codebook _huff_book__44c0_sm_short = { + 2, 81, + (char *)_huff_lengthlist__44c0_sm_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44c1_s_long[] = { + 5, 5, 9,10, 9, 9,10,11,12, 5, 1, 5, 6, 6, 7,10, + 12,14, 9, 5, 6, 8, 8,10,12,14,14,10, 5, 8, 5, 6, + 8,11,13,14, 9, 5, 7, 6, 6, 8,10,12,11, 9, 7, 9, + 7, 6, 6, 7,10,10,10, 9,12, 9, 8, 7, 7,10,12,11, + 11,13,12,10, 9, 8, 9,11,11,14,15,15,13,11, 9, 9, + 11, +}; + +static const static_codebook _huff_book__44c1_s_long = { + 2, 81, + (char *)_huff_lengthlist__44c1_s_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44c1_s_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c1_s_p1_0[] = { + 2, 4, 4, 0, 0, 0, 0, 0, 0, 5, 7, 6, 0, 0, 0, 0, + 0, 0, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0, 0, + 0, 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c1_s_p1_0 = { + 8, 6561, + (char *)_vq_lengthlist__44c1_s_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44c1_s_p1_0, + 0 +}; + +static const long _vq_quantlist__44c1_s_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c1_s_p2_0[] = { + 2, 3, 4, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 6, 6, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 4, 5, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 8, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 6, 6, 8, 8, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c1_s_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__44c1_s_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c1_s_p2_0, + 0 +}; + +static const long _vq_quantlist__44c1_s_p3_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c1_s_p3_0[] = { + 1, 3, 2, 7, 7, 0, 0, 0, 0, 0,13,13, 6, 6, 0, 0, + 0, 0, 0,12, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 7, 7, + 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0, + 8, 9, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, + 0, 0,11,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c1_s_p3_0 = { + 2, 81, + (char *)_vq_lengthlist__44c1_s_p3_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c1_s_p3_0, + 0 +}; + +static const long _vq_quantlist__44c1_s_p4_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c1_s_p4_0[] = { + 1, 3, 3, 6, 5, 6, 6, 8, 8, 0, 0, 0, 7, 7, 7, 7, + 9, 9, 0, 0, 0, 7, 7, 7, 7, 9, 9, 0, 0, 0, 7, 7, + 8, 8,10,10, 0, 0, 0, 7, 7, 8, 8,10,10, 0, 0, 0, + 9, 9, 8, 8,10,10, 0, 0, 0, 8, 8, 8, 8,10,10, 0, + 0, 0,10,10, 9, 9,11,11, 0, 0, 0, 0, 0, 9, 9,11, + 11, +}; + +static const static_codebook _44c1_s_p4_0 = { + 2, 81, + (char *)_vq_lengthlist__44c1_s_p4_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c1_s_p4_0, + 0 +}; + +static const long _vq_quantlist__44c1_s_p5_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c1_s_p5_0[] = { + 1, 4, 3, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,10,11, + 11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10,10, + 11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10, + 10,11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10, + 11,11,11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10, + 10,11,11,12,11, 0, 0, 0, 8, 8, 9, 9, 9,10,10,10, + 10,10,11,11,12,12, 0, 0, 0, 8, 8, 9, 9,10, 9,10, + 10,10,10,11,11,12,12, 0, 0, 0, 9, 9, 9, 9,10,10, + 10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 9, 9,10, + 10,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 9, 9, + 10,10,10,11,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, + 9,10,10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, + 10,10,10,10,11,11,12,12,12,12,13,13, 0, 0, 0, 0, + 0, 0, 0,10,10,11,11,12,12,12,12,13,13, 0, 0, 0, + 0, 0, 0, 0,11,11,12,12,12,12,13,13,13,13, 0, 0, + 0, 0, 0, 0, 0,11,11,11,11,12,12,13,13,13,13, 0, + 0, 0, 0, 0, 0, 0,12,12,12,12,12,12,13,13,14,14, + 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,14, + 14, +}; + +static const static_codebook _44c1_s_p5_0 = { + 2, 289, + (char *)_vq_lengthlist__44c1_s_p5_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c1_s_p5_0, + 0 +}; + +static const long _vq_quantlist__44c1_s_p6_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c1_s_p6_0[] = { + 1, 4, 4, 7, 6, 6, 7, 6, 6, 4, 7, 7,10, 9, 9,11, + 9, 9, 4, 7, 7,10, 9, 9,11, 9, 9, 6,10,10,11,11, + 11,11,10,10, 6, 9, 9,11,10,10,11,10,10, 6, 9, 9, + 11,10,11,11,10,10, 7,11,10,11,11,11,12,11,11, 7, + 9, 9,11,10,10,11,11,10, 6, 9, 9,10,10,10,12,10, + 11, +}; + +static const static_codebook _44c1_s_p6_0 = { + 4, 81, + (char *)_vq_lengthlist__44c1_s_p6_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44c1_s_p6_0, + 0 +}; + +static const long _vq_quantlist__44c1_s_p6_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44c1_s_p6_1[] = { + 2, 3, 3, 6, 6, 7, 7, 7, 7, 8, 8,10,10,10, 6, 6, + 7, 7, 8, 8, 8, 8,10,10,10, 6, 6, 7, 7, 8, 8, 8, + 8,10,10,10, 7, 7, 7, 7, 8, 8, 8, 8,10,10,10, 7, + 7, 7, 7, 8, 8, 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, + 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10, + 8, 8, 8, 8, 8, 8, 8, 8,10,10,10,10,10, 8, 8, 8, + 8, 8, 8,10,10,10,10,10, 9, 9, 8, 8, 8, 8,10,10, + 10,10,10, 8, 8, 8, 8, 8, 8, +}; + +static const static_codebook _44c1_s_p6_1 = { + 2, 121, + (char *)_vq_lengthlist__44c1_s_p6_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44c1_s_p6_1, + 0 +}; + +static const long _vq_quantlist__44c1_s_p7_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c1_s_p7_0[] = { + 1, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8,10, 9, 7, 5, 6, + 7, 7, 8, 8, 8, 8, 9, 9,10,10, 7, 5, 5, 7, 7, 8, + 8, 8, 8, 9, 9,10,10, 0, 8, 8, 8, 8, 9, 9, 9, 9, + 10,10,11,10, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11, + 11, 0,12,12, 9, 9, 9,10,10,10,11,11,11,11, 0,13, + 13, 9, 9, 9, 9,10,10,11,11,11,11, 0, 0, 0,10,10, + 10,10,11,11,12,11,12,12, 0, 0, 0,10,10,10, 9,11, + 11,12,11,13,12, 0, 0, 0,13,13,10,10,11,11,12,12, + 13,13, 0, 0, 0,14,14,10,10,11,11,12,12,13,13, 0, + 0, 0, 0, 0,11,12,11,11,12,12,14,13, 0, 0, 0, 0, + 0,12,11,11,11,13,10,14,13, +}; + +static const static_codebook _44c1_s_p7_0 = { + 2, 169, + (char *)_vq_lengthlist__44c1_s_p7_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44c1_s_p7_0, + 0 +}; + +static const long _vq_quantlist__44c1_s_p7_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c1_s_p7_1[] = { + 2, 3, 3, 5, 5, 6, 6, 6, 5, 5, 6, 6, 6, 5, 5, 6, + 6, 6, 5, 5, 6, 6, 6, 5, 5, +}; + +static const static_codebook _44c1_s_p7_1 = { + 2, 25, + (char *)_vq_lengthlist__44c1_s_p7_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c1_s_p7_1, + 0 +}; + +static const long _vq_quantlist__44c1_s_p8_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c1_s_p8_0[] = { + 1, 4, 3,10,10,10,10,10,10,10,10,10,10, 4, 8, 6, + 10,10,10,10,10,10,10,10,10,10, 4, 8, 7,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10, +}; + +static const static_codebook _44c1_s_p8_0 = { + 2, 169, + (char *)_vq_lengthlist__44c1_s_p8_0, + 1, -514541568, 1627103232, 4, 0, + (long *)_vq_quantlist__44c1_s_p8_0, + 0 +}; + +static const long _vq_quantlist__44c1_s_p8_1[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c1_s_p8_1[] = { + 1, 4, 4, 6, 5, 7, 7, 9, 9,10,10,12,12, 6, 5, 5, + 7, 7, 8, 8,10,10,12,11,12,12, 6, 5, 5, 7, 7, 8, + 8,10,10,11,11,12,12,15, 7, 7, 8, 8, 9, 9,11,11, + 12,12,13,12,15, 8, 8, 8, 7, 9, 9,10,10,12,12,13, + 13,16,11,10, 8, 8,10,10,11,11,12,12,13,13,16,11, + 11, 9, 8,11,10,11,11,12,12,13,12,16,16,16,10,11, + 10,11,12,12,12,12,13,13,16,16,16,11, 9,11, 9,14, + 12,12,12,13,13,16,16,16,12,14,11,12,12,12,13,13, + 14,13,16,16,16,15,13,12,10,13,10,13,14,13,13,16, + 16,16,16,16,13,14,12,13,13,12,13,13,16,16,16,16, + 16,13,12,12,11,14,12,15,13, +}; + +static const static_codebook _44c1_s_p8_1 = { + 2, 169, + (char *)_vq_lengthlist__44c1_s_p8_1, + 1, -522616832, 1620115456, 4, 0, + (long *)_vq_quantlist__44c1_s_p8_1, + 0 +}; + +static const long _vq_quantlist__44c1_s_p8_2[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c1_s_p8_2[] = { + 2, 4, 4, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, + 8,10,10,10, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, + 9, 9,10,10,10, 7, 7, 8, 7, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9,10,10,10, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, + 9,10, 9, 9,10,10,10, 7, 7, 8, 8, 9, 8, 9, 9, 9, + 9,10, 9, 9,10,10,11,11, 8, 8, 8, 8, 9, 9, 9, 9, + 9, 9,10, 9, 9,10,10,10,10, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 9, 9,10,10,11,11,11, 8, 8, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9,10,10,10,10,11,11,11, 8, 8, 9, + 9, 9, 9,10, 9, 9, 9, 9, 9,11,11,11,11,11, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,11,10,10,11,11, 9, + 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,11,10,11,11, + 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10, 9,10,10,11,11, + 11,11,11, 9, 9, 9,10, 9, 9, 9, 9, 9, 9,10,11,11, + 11,11,11,11,10,10,10,10, 9, 9, 9, 9, 9, 9,10,11, + 11,11,11,11,11, 9,10, 9, 9, 9, 9,10, 9, 9, 9,11, + 11,11,11,11,11,11,10,10, 9, 9, 9, 9, 9, 9,10, 9, + 11,11,10,11,11,11,11,10,11, 9, 9, 9, 9, 9, 9, 9, + 9, +}; + +static const static_codebook _44c1_s_p8_2 = { + 2, 289, + (char *)_vq_lengthlist__44c1_s_p8_2, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c1_s_p8_2, + 0 +}; + +static const char _huff_lengthlist__44c1_s_short[] = { + 6, 8,13,12,13,14,15,16,16, 4, 2, 4, 7, 6, 8,11, + 13,15,10, 4, 4, 8, 6, 8,11,14,17,11, 5, 6, 5, 6, + 8,12,14,17,11, 5, 5, 6, 5, 7,10,13,16,12, 6, 7, + 8, 7, 8,10,13,15,13, 8, 8, 7, 7, 8,10,12,15,15, + 7, 7, 5, 5, 7, 9,12,14,15, 8, 8, 6, 6, 7, 8,10, + 11, +}; + +static const static_codebook _huff_book__44c1_s_short = { + 2, 81, + (char *)_huff_lengthlist__44c1_s_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44c1_sm_long[] = { + 5, 4, 8,10, 9, 9,10,11,12, 4, 2, 5, 6, 6, 8,10, + 11,13, 8, 4, 6, 8, 7, 9,12,12,14,10, 6, 8, 4, 5, + 6, 9,11,12, 9, 5, 6, 5, 5, 6, 9,11,11, 9, 7, 9, + 6, 5, 5, 7,10,10,10, 9,11, 8, 7, 6, 7, 9,11,11, + 12,13,10,10, 9, 8, 9,11,11,15,15,12,13,11, 9,10, + 11, +}; + +static const static_codebook _huff_book__44c1_sm_long = { + 2, 81, + (char *)_huff_lengthlist__44c1_sm_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44c1_sm_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c1_sm_p1_0[] = { + 1, 5, 5, 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c1_sm_p1_0 = { + 8, 6561, + (char *)_vq_lengthlist__44c1_sm_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44c1_sm_p1_0, + 0 +}; + +static const long _vq_quantlist__44c1_sm_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c1_sm_p2_0[] = { + 2, 3, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 6, 6, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 9,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0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c1_sm_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__44c1_sm_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c1_sm_p2_0, + 0 +}; + +static const long _vq_quantlist__44c1_sm_p3_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c1_sm_p3_0[] = { + 1, 3, 3, 7, 7, 0, 0, 0, 0, 0, 5, 5, 6, 6, 0, 0, + 0, 0, 0, 5, 5, 7, 7, 0, 0, 0, 0, 0, 7, 7, 7, 7, + 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0, + 8, 9, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, + 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44c1_sm_p3_0 = { + 2, 81, + (char *)_vq_lengthlist__44c1_sm_p3_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c1_sm_p3_0, + 0 +}; + +static const long _vq_quantlist__44c1_sm_p4_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44c1_sm_p4_0[] = { + 1, 3, 3, 6, 6, 7, 7, 9, 9, 0, 6, 6, 7, 7, 8, 8, + 9, 9, 0, 6, 6, 7, 7, 8, 8, 9, 9, 0, 7, 7, 8, 8, + 8, 8,10,10, 0, 0, 0, 8, 8, 8, 8,10,10, 0, 0, 0, + 8, 8, 9, 9,11,11, 0, 0, 0, 9, 9, 9, 9,11,11, 0, + 0, 0,10,10,10,10,11,11, 0, 0, 0, 0, 0, 9, 9,11, + 11, +}; + +static const static_codebook _44c1_sm_p4_0 = { + 2, 81, + (char *)_vq_lengthlist__44c1_sm_p4_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44c1_sm_p4_0, + 0 +}; + +static const long _vq_quantlist__44c1_sm_p5_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c1_sm_p5_0[] = { + 2, 3, 3, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,10,11, + 11, 0, 5, 5, 6, 6, 8, 8, 9, 9, 9, 9,10,10,10,10, + 11,11, 0, 5, 5, 6, 6, 8, 8, 9, 9, 9, 9,10,10,10, + 10,11,11, 0, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9,10,10, + 11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10, + 10,11,11,12,12, 0, 0, 0, 8, 8, 8, 8, 9, 9,10,10, + 10,11,11,11,12,12, 0, 0, 0, 8, 8, 8, 8, 9, 9,10, + 10,10,10,11,11,12,12, 0, 0, 0, 9, 9, 9, 9,10,10, + 10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 9, 9,10, + 10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9, + 9, 9,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, + 9, 9, 9,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, + 9, 9,10,10,11,11,12,12,12,12,13,13, 0, 0, 0, 0, + 0, 0, 0,10,10,11,11,12,12,12,12,13,13, 0, 0, 0, + 0, 0, 0, 0,11,11,11,11,12,12,13,13,13,13, 0, 0, + 0, 0, 0, 0, 0,11,11,11,11,12,12,13,13,13,13, 0, + 0, 0, 0, 0, 0, 0,11,11,12,12,12,12,13,13,14,14, + 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,12,12,13,13,14, + 14, +}; + +static const static_codebook _44c1_sm_p5_0 = { + 2, 289, + (char *)_vq_lengthlist__44c1_sm_p5_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c1_sm_p5_0, + 0 +}; + +static const long _vq_quantlist__44c1_sm_p6_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44c1_sm_p6_0[] = { + 1, 4, 4, 7, 6, 6, 7, 6, 6, 4, 7, 7,10, 9, 9,11, + 9, 9, 4, 7, 7,10, 9, 9,11, 9, 9, 7,10,10,10,11, + 11,11,10,10, 6, 9, 9,11,11,10,11,10,10, 6, 9, 9, + 11,10,11,11,10,10, 7,11,11,11,11,11,11,11,11, 6, + 9, 9,11,10,10,11,11,10, 6, 9, 9,10,10,10,11,10, + 11, +}; + +static const static_codebook _44c1_sm_p6_0 = { + 4, 81, + (char *)_vq_lengthlist__44c1_sm_p6_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44c1_sm_p6_0, + 0 +}; + +static const long _vq_quantlist__44c1_sm_p6_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44c1_sm_p6_1[] = { + 2, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8,10, 5, 5, 6, 6, + 7, 7, 8, 8, 8, 8,10, 5, 5, 6, 6, 7, 7, 8, 8, 8, + 8,10, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10, 7, + 7, 7, 7, 8, 8, 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, + 8, 8,10,10,10, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10, + 8, 8, 8, 8, 8, 8, 9, 8,10,10,10,10,10, 8, 8, 8, + 8, 8, 8,10,10,10,10,10, 9, 9, 8, 8, 8, 8,10,10, + 10,10,10, 8, 8, 8, 8, 8, 8, +}; + +static const static_codebook _44c1_sm_p6_1 = { + 2, 121, + (char *)_vq_lengthlist__44c1_sm_p6_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44c1_sm_p6_1, + 0 +}; + +static const long _vq_quantlist__44c1_sm_p7_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c1_sm_p7_0[] = { + 1, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 7, 5, 5, + 7, 7, 8, 8, 8, 8, 9, 9,10,10, 7, 5, 6, 7, 7, 8, + 8, 8, 8, 9, 9,11,10, 0, 8, 8, 8, 8, 9, 9, 9, 9, + 10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11, + 11, 0,12,12, 9, 9,10,10,10,10,11,11,11,11, 0,13, + 13, 9, 9, 9, 9,10,10,11,11,12,12, 0, 0, 0, 9,10, + 9,10,11,11,12,11,13,12, 0, 0, 0,10,10, 9, 9,11, + 11,12,12,13,12, 0, 0, 0,13,13,10,10,11,11,12,12, + 13,13, 0, 0, 0,14,14,10,10,11,11,12,12,13,13, 0, + 0, 0, 0, 0,11,12,11,11,12,13,14,13, 0, 0, 0, 0, + 0,12,12,11,11,13,12,14,13, +}; + +static const static_codebook _44c1_sm_p7_0 = { + 2, 169, + (char *)_vq_lengthlist__44c1_sm_p7_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44c1_sm_p7_0, + 0 +}; + +static const long _vq_quantlist__44c1_sm_p7_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44c1_sm_p7_1[] = { + 2, 4, 4, 4, 5, 6, 5, 5, 5, 5, 6, 5, 5, 5, 5, 6, + 5, 5, 5, 5, 6, 6, 6, 5, 5, +}; + +static const static_codebook _44c1_sm_p7_1 = { + 2, 25, + (char *)_vq_lengthlist__44c1_sm_p7_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44c1_sm_p7_1, + 0 +}; + +static const long _vq_quantlist__44c1_sm_p8_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c1_sm_p8_0[] = { + 1, 3, 3,13,13,13,13,13,13,13,13,13,13, 3, 6, 6, + 13,13,13,13,13,13,13,13,13,13, 4, 8, 7,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13, +}; + +static const static_codebook _44c1_sm_p8_0 = { + 2, 169, + (char *)_vq_lengthlist__44c1_sm_p8_0, + 1, -514541568, 1627103232, 4, 0, + (long *)_vq_quantlist__44c1_sm_p8_0, + 0 +}; + +static const long _vq_quantlist__44c1_sm_p8_1[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44c1_sm_p8_1[] = { + 1, 4, 4, 6, 6, 7, 7, 9, 9,10,11,12,12, 6, 5, 5, + 7, 7, 8, 7,10,10,11,11,12,12, 6, 5, 5, 7, 7, 8, + 8,10,10,11,11,12,12,16, 7, 7, 8, 8, 9, 9,11,11, + 12,12,13,13,17, 7, 7, 8, 7, 9, 9,11,10,12,12,13, + 13,19,11,10, 8, 8,10,10,11,11,12,12,13,13,19,11, + 11, 9, 7,11,10,11,11,12,12,13,12,19,19,19,10,10, + 10,10,11,12,12,12,13,14,18,19,19,11, 9,11, 9,13, + 12,12,12,13,13,19,20,19,13,15,11,11,12,12,13,13, + 14,13,18,19,20,15,13,12,10,13,10,13,13,13,14,20, + 20,20,20,20,13,14,12,12,13,12,13,13,20,20,20,20, + 20,13,12,12,12,14,12,14,13, +}; + +static const static_codebook _44c1_sm_p8_1 = { + 2, 169, + (char *)_vq_lengthlist__44c1_sm_p8_1, + 1, -522616832, 1620115456, 4, 0, + (long *)_vq_quantlist__44c1_sm_p8_1, + 0 +}; + +static const long _vq_quantlist__44c1_sm_p8_2[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44c1_sm_p8_2[] = { + 2, 5, 5, 6, 6, 7, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, + 8,10, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, + 9, 9,10, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9,10, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9,10,10,10, 7, 7, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9,10,11,11, 8, 8, 8, 8, 9, 9, 9, 9, + 9, 9,10,10, 9,10,10,10,10, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 9, 9,10,10,11,10,10, 8, 8, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9,10, 9,10,10,10,11,11, 8, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9,11,11,11,11,11, 9, 9, + 9, 9, 9, 9, 9, 9,10, 9,10, 9,11,11,11,11,11, 9, + 8, 9, 9, 9, 9, 9, 9, 9,10,10, 9,11,11,10,11,11, + 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10, 9,11,11,11,11, + 11,11,11, 9, 9,10, 9, 9, 9, 9,10, 9,10,10,11,10, + 11,11,11,11, 9,10,10,10, 9, 9, 9, 9, 9, 9,10,11, + 11,11,11,11,11, 9, 9, 9, 9, 9, 9, 9, 9,10, 9,11, + 11,10,11,11,11,11,10,10, 9, 9, 9, 9, 9, 9,10, 9, + 10,11,10,11,11,11,11,11,11, 9, 9,10, 9, 9, 9, 9, + 9, +}; + +static const static_codebook _44c1_sm_p8_2 = { + 2, 289, + (char *)_vq_lengthlist__44c1_sm_p8_2, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44c1_sm_p8_2, + 0 +}; + +static const char _huff_lengthlist__44c1_sm_short[] = { + 4, 7,13,14,14,15,16,18,18, 4, 2, 5, 8, 7, 9,12, + 15,15,10, 4, 5,10, 6, 8,11,15,17,12, 5, 7, 5, 6, + 8,11,14,17,11, 5, 6, 6, 5, 6, 9,13,17,12, 6, 7, + 6, 5, 6, 8,12,14,14, 7, 8, 6, 6, 7, 9,11,14,14, + 8, 9, 6, 5, 6, 9,11,13,16,10,10, 7, 6, 7, 8,10, + 11, +}; + +static const static_codebook _huff_book__44c1_sm_short = { + 2, 81, + (char *)_huff_lengthlist__44c1_sm_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44cn1_s_long[] = { + 4, 4, 7, 8, 7, 8,10,12,17, 3, 1, 6, 6, 7, 8,10, + 12,15, 7, 6, 9, 9, 9,11,12,14,17, 8, 6, 9, 6, 7, + 9,11,13,17, 7, 6, 9, 7, 7, 8, 9,12,15, 8, 8,10, + 8, 7, 7, 7,10,14, 9,10,12,10, 8, 8, 8,10,14,11, + 13,15,13,12,11,11,12,16,17,18,18,19,20,18,16,16, + 20, +}; + +static const static_codebook _huff_book__44cn1_s_long = { + 2, 81, + (char *)_huff_lengthlist__44cn1_s_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44cn1_s_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44cn1_s_p1_0[] = { + 1, 4, 4, 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 0, + 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 8, 8, 0, 0, 0, 0, 0, 0, 8, 9, 9, 0, 0, 0, + 0, 0, 0, 7, 9,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 8, 8, 0, 0, 0, 0, 0, 0, 7,10, 9, 0, 0, + 0, 0, 0, 0, 8,10, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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_s_p1_0 = { + 8, 6561, + (char *)_vq_lengthlist__44cn1_s_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44cn1_s_p1_0, + 0 +}; + +static const long _vq_quantlist__44cn1_s_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44cn1_s_p2_0[] = { + 1, 4, 4, 7, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 5, 7, 7, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 5, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 7, 9, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 7, 7, 9, 9, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44cn1_s_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__44cn1_s_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44cn1_s_p2_0, + 0 +}; + +static const long _vq_quantlist__44cn1_s_p3_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44cn1_s_p3_0[] = { + 1, 2, 3, 7, 7, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, + 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 7, 7, + 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0, + 9, 8, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, + 0, 0,10,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44cn1_s_p3_0 = { + 2, 81, + (char *)_vq_lengthlist__44cn1_s_p3_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44cn1_s_p3_0, + 0 +}; + +static const long _vq_quantlist__44cn1_s_p4_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44cn1_s_p4_0[] = { + 1, 3, 3, 6, 6, 6, 6, 8, 8, 0, 0, 0, 6, 6, 7, 7, + 9, 9, 0, 0, 0, 6, 6, 7, 7, 9, 9, 0, 0, 0, 7, 7, + 8, 8,10,10, 0, 0, 0, 7, 7, 8, 8,10,10, 0, 0, 0, + 9, 9, 9, 9,10,10, 0, 0, 0, 9, 9, 9, 9,10,10, 0, + 0, 0,10,10,10,10,11,11, 0, 0, 0, 0, 0,10,10,11, + 11, +}; + +static const static_codebook _44cn1_s_p4_0 = { + 2, 81, + (char *)_vq_lengthlist__44cn1_s_p4_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44cn1_s_p4_0, + 0 +}; + +static const long _vq_quantlist__44cn1_s_p5_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44cn1_s_p5_0[] = { + 1, 4, 3, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,10,10, + 10, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10,10, + 11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10,10, + 10,11,11, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10,10, + 11,11,11,12, 0, 0, 0, 7, 7, 8, 8, 9, 9, 9, 9,10, + 10,11,11,11,11, 0, 0, 0, 8, 8, 9, 9, 9, 9,10,10, + 10,10,11,11,12,12, 0, 0, 0, 8, 8, 9, 9, 9, 9,10, + 10,10,11,11,11,12,12, 0, 0, 0, 9, 9,10, 9,10,10, + 10,10,11,11,11,11,12,12, 0, 0, 0, 0, 0, 9, 9,10, + 10,10,10,11,11,12,12,12,12, 0, 0, 0, 0, 0, 9, 9, + 10,10,10,11,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, + 9,10,10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, + 10,10,11,10,11,11,11,12,13,12,13,13, 0, 0, 0, 0, + 0, 0, 0,11,10,11,11,12,12,12,12,13,13, 0, 0, 0, + 0, 0, 0, 0,11,11,12,12,12,12,13,13,13,14, 0, 0, + 0, 0, 0, 0, 0,11,11,12,12,12,12,13,13,13,14, 0, + 0, 0, 0, 0, 0, 0,12,12,12,13,13,13,13,13,14,14, + 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,13,12,13,13,14, + 14, +}; + +static const static_codebook _44cn1_s_p5_0 = { + 2, 289, + (char *)_vq_lengthlist__44cn1_s_p5_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44cn1_s_p5_0, + 0 +}; + +static const long _vq_quantlist__44cn1_s_p6_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44cn1_s_p6_0[] = { + 1, 4, 4, 7, 6, 6, 7, 6, 6, 4, 6, 6,10, 9, 9,11, + 9, 9, 4, 6, 6,10, 9, 9,10, 9, 9, 7,10,10,11,11, + 11,12,11,11, 7, 9, 9,11,11,10,11,10,10, 7, 9, 9, + 11,10,11,11,10,10, 7,10,10,11,11,11,12,11,11, 7, + 9, 9,11,10,10,11,10,10, 7, 9, 9,11,10,10,11,10, + 10, +}; + +static const static_codebook _44cn1_s_p6_0 = { + 4, 81, + (char *)_vq_lengthlist__44cn1_s_p6_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44cn1_s_p6_0, + 0 +}; + +static const long _vq_quantlist__44cn1_s_p6_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44cn1_s_p6_1[] = { + 1, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8,10,10,10, 7, 6, + 8, 8, 8, 8, 8, 8,10,10,10, 7, 6, 7, 7, 8, 8, 8, + 8,10,10,10, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10, 7, + 7, 8, 8, 8, 8, 8, 8,10,10,10, 8, 8, 8, 8, 9, 9, + 9, 9,10,10,10, 8, 8, 8, 8, 9, 9, 9, 9,10,10,10, + 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10, 9, 9, 9, + 9, 9, 9,10,10,10,10,10, 9, 9, 9, 9, 9, 9,10,10, + 10,10,10, 9, 9, 9, 9, 9, 9, +}; + +static const static_codebook _44cn1_s_p6_1 = { + 2, 121, + (char *)_vq_lengthlist__44cn1_s_p6_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44cn1_s_p6_1, + 0 +}; + +static const long _vq_quantlist__44cn1_s_p7_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44cn1_s_p7_0[] = { + 1, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10, 6, 5, 5, + 7, 7, 8, 8, 8, 8, 9, 9,11,11, 7, 5, 5, 7, 7, 8, + 8, 8, 8, 9,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9, + 10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11, + 11, 0,12,12, 9, 9, 9,10,10,10,11,11,11,12, 0,13, + 13, 9, 9, 9, 9,10,10,11,11,11,12, 0, 0, 0,10,10, + 10,10,11,11,12,12,12,13, 0, 0, 0,10,10,10,10,11, + 11,12,12,13,12, 0, 0, 0,14,14,11,10,11,12,12,13, + 13,14, 0, 0, 0,15,15,11,11,12,11,12,12,14,13, 0, + 0, 0, 0, 0,12,12,12,12,13,13,14,14, 0, 0, 0, 0, + 0,13,13,12,12,13,13,13,14, +}; + +static const static_codebook _44cn1_s_p7_0 = { + 2, 169, + (char *)_vq_lengthlist__44cn1_s_p7_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44cn1_s_p7_0, + 0 +}; + +static const long _vq_quantlist__44cn1_s_p7_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44cn1_s_p7_1[] = { + 2, 3, 3, 5, 5, 6, 6, 6, 5, 5, 6, 6, 6, 5, 5, 6, + 6, 6, 5, 5, 6, 6, 6, 5, 5, +}; + +static const static_codebook _44cn1_s_p7_1 = { + 2, 25, + (char *)_vq_lengthlist__44cn1_s_p7_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44cn1_s_p7_1, + 0 +}; + +static const long _vq_quantlist__44cn1_s_p8_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44cn1_s_p8_0[] = { + 1, 7, 7,11,11, 8,11,11,11,11, 4,11, 3,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,10,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,10,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11, 7,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,10,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11, 8,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12, +}; + +static const static_codebook _44cn1_s_p8_0 = { + 4, 625, + (char *)_vq_lengthlist__44cn1_s_p8_0, + 1, -518283264, 1627103232, 3, 0, + (long *)_vq_quantlist__44cn1_s_p8_0, + 0 +}; + +static const long _vq_quantlist__44cn1_s_p8_1[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44cn1_s_p8_1[] = { + 1, 4, 4, 6, 6, 8, 8, 9,10,10,11,11,11, 6, 5, 5, + 7, 7, 8, 8, 9,10, 9,11,11,12, 5, 5, 5, 7, 7, 8, + 9,10,10,12,12,14,13,15, 7, 7, 8, 8, 9,10,11,11, + 10,12,10,11,15, 7, 8, 8, 8, 9, 9,11,11,13,12,12, + 13,15,10,10, 8, 8,10,10,12,12,11,14,10,10,15,11, + 11, 8, 8,10,10,12,13,13,14,15,13,15,15,15,10,10, + 10,10,12,12,13,12,13,10,15,15,15,10,10,11,10,13, + 11,13,13,15,13,15,15,15,13,13,10,11,11,11,12,10, + 14,11,15,15,14,14,13,10,10,12,11,13,13,14,14,15, + 15,15,15,15,11,11,11,11,12,11,15,12,15,15,15,15, + 15,12,12,11,11,14,12,13,14, +}; + +static const static_codebook _44cn1_s_p8_1 = { + 2, 169, + (char *)_vq_lengthlist__44cn1_s_p8_1, + 1, -522616832, 1620115456, 4, 0, + (long *)_vq_quantlist__44cn1_s_p8_1, + 0 +}; + +static const long _vq_quantlist__44cn1_s_p8_2[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44cn1_s_p8_2[] = { + 3, 4, 3, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, 9, + 9,10,11,11, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, + 9, 9,10,10,10, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9,10,10,10, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, + 9, 9,10, 9,10,11,10, 7, 6, 7, 7, 8, 8, 9, 9, 9, + 9, 9, 9, 9,10,10,10,11, 7, 7, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9,10,10,10, 7, 7, 8, 8, 8, 8, 9, + 9, 9, 9, 9, 9, 9,10,11,11,11, 8, 8, 8, 8, 8, 8, + 9, 9, 9, 9, 9, 9, 9, 9,11,10,10,11,11, 8, 8, 8, + 9, 9, 9, 9, 9, 9,10, 9,10,10,10,10,11,11, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,11,11,10,11,11, 9, + 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,11,10,11,11, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,11,10,10,11, + 11,11,11, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,11,11, + 10,11,11,11, 9,10,10, 9, 9, 9, 9, 9, 9, 9,10,11, + 11,11,11,11,11, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,11, + 11,11,11,11,11,11,10,10, 9, 9, 9, 9, 9, 9, 9, 9, + 11,11,11,10,11,11,11,11,11, 9, 9, 9,10, 9, 9, 9, + 9, +}; + +static const static_codebook _44cn1_s_p8_2 = { + 2, 289, + (char *)_vq_lengthlist__44cn1_s_p8_2, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44cn1_s_p8_2, + 0 +}; + +static const char _huff_lengthlist__44cn1_s_short[] = { + 10, 9,12,15,12,13,16,14,16, 7, 1, 5,14, 7,10,13, + 16,16, 9, 4, 6,16, 8,11,16,16,16,14, 4, 7,16, 9, + 12,14,16,16,10, 5, 7,14, 9,12,14,15,15,13, 8, 9, + 14,10,12,13,14,15,13, 9, 9, 7, 6, 8,11,12,12,14, + 8, 8, 5, 4, 5, 8,11,12,16,10,10, 6, 5, 6, 8, 9, + 10, +}; + +static const static_codebook _huff_book__44cn1_s_short = { + 2, 81, + (char *)_huff_lengthlist__44cn1_s_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44cn1_sm_long[] = { + 3, 3, 8, 8, 8, 8,10,12,14, 3, 2, 6, 7, 7, 8,10, + 12,16, 7, 6, 7, 9, 8,10,12,14,16, 8, 6, 8, 4, 5, + 7, 9,11,13, 7, 6, 8, 5, 6, 7, 9,11,14, 8, 8,10, + 7, 7, 6, 8,10,13, 9,11,12, 9, 9, 7, 8,10,12,10, + 13,15,11,11,10, 9,10,13,13,16,17,14,15,14,13,14, + 17, +}; + +static const static_codebook _huff_book__44cn1_sm_long = { + 2, 81, + (char *)_huff_lengthlist__44cn1_sm_long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44cn1_sm_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44cn1_sm_p1_0[] = { + 1, 4, 5, 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 0, + 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 8, 8, 0, 0, 0, 0, 0, 0, 8, 9, 9, 0, 0, 0, + 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44cn1_sm_p1_0 = { + 8, 6561, + (char *)_vq_lengthlist__44cn1_sm_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44cn1_sm_p1_0, + 0 +}; + +static const long _vq_quantlist__44cn1_sm_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44cn1_sm_p2_0[] = { + 1, 4, 4, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 5, 7, 7, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 5, 5, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 7, 9, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 7, 7, 9, 9, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44cn1_sm_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__44cn1_sm_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44cn1_sm_p2_0, + 0 +}; + +static const long _vq_quantlist__44cn1_sm_p3_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44cn1_sm_p3_0[] = { + 1, 3, 4, 7, 7, 0, 0, 0, 0, 0, 4, 4, 7, 7, 0, 0, + 0, 0, 0, 4, 5, 7, 7, 0, 0, 0, 0, 0, 6, 7, 8, 8, + 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, + 9, 9, 0, 0, 0, 0, 0, 0, 0,10, 9, 0, 0, 0, 0, 0, + 0, 0,11,11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, +}; + +static const static_codebook _44cn1_sm_p3_0 = { + 2, 81, + (char *)_vq_lengthlist__44cn1_sm_p3_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44cn1_sm_p3_0, + 0 +}; + +static const long _vq_quantlist__44cn1_sm_p4_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44cn1_sm_p4_0[] = { + 1, 4, 3, 6, 6, 7, 7, 9, 9, 0, 5, 5, 7, 7, 8, 7, + 9, 9, 0, 5, 5, 7, 7, 8, 8, 9, 9, 0, 7, 7, 8, 8, + 8, 8,10,10, 0, 0, 0, 8, 8, 8, 8,10,10, 0, 0, 0, + 9, 9, 9, 9,10,10, 0, 0, 0, 9, 9, 9, 9,10,10, 0, + 0, 0,10,10,10,10,11,11, 0, 0, 0, 0, 0,10,10,11, + 11, +}; + +static const static_codebook _44cn1_sm_p4_0 = { + 2, 81, + (char *)_vq_lengthlist__44cn1_sm_p4_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44cn1_sm_p4_0, + 0 +}; + +static const long _vq_quantlist__44cn1_sm_p5_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44cn1_sm_p5_0[] = { + 1, 4, 4, 6, 6, 8, 8, 9, 9, 8, 8, 9, 9,10,10,11, + 11, 0, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11,11, + 12,12, 0, 6, 5, 7, 7, 8, 8, 9, 9, 9, 9,10,10,11, + 11,12,12, 0, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9,10,10, + 11,11,12,12, 0, 0, 0, 7, 7, 8, 8, 9, 9,10,10,11, + 11,11,11,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10,10, + 11,11,12,12,12,12, 0, 0, 0, 8, 8, 9, 9,10,10,10, + 10,11,11,12,12,12,12, 0, 0, 0, 9, 9, 9, 9,10,10, + 10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9,10, + 10,10,10,11,11,12,12,13,13, 0, 0, 0, 0, 0, 9, 9, + 10,10,11,11,12,12,13,13,13,13, 0, 0, 0, 0, 0, 9, + 9,10,10,11,11,12,12,12,13,13,13, 0, 0, 0, 0, 0, + 10,10,11,11,11,11,12,12,13,13,14,14, 0, 0, 0, 0, + 0, 0, 0,11,11,11,11,12,12,13,13,14,14, 0, 0, 0, + 0, 0, 0, 0,11,11,12,12,13,13,13,13,14,14, 0, 0, + 0, 0, 0, 0, 0,11,11,12,12,13,13,13,13,14,14, 0, + 0, 0, 0, 0, 0, 0,12,12,12,13,13,13,14,14,14,14, + 0, 0, 0, 0, 0, 0, 0, 0, 0,12,12,13,13,14,14,14, + 14, +}; + +static const static_codebook _44cn1_sm_p5_0 = { + 2, 289, + (char *)_vq_lengthlist__44cn1_sm_p5_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44cn1_sm_p5_0, + 0 +}; + +static const long _vq_quantlist__44cn1_sm_p6_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44cn1_sm_p6_0[] = { + 1, 4, 4, 7, 6, 6, 7, 6, 6, 4, 7, 6,10, 9, 9,11, + 9, 9, 4, 6, 7,10, 9, 9,11, 9, 9, 7,10,10,10,11, + 11,11,11,10, 6, 9, 9,11,10,10,11,10,10, 6, 9, 9, + 11,10,11,11,10,10, 7,11,11,11,11,11,12,11,11, 7, + 9, 9,11,10,10,12,10,10, 7, 9, 9,11,10,10,11,10, + 10, +}; + +static const static_codebook _44cn1_sm_p6_0 = { + 4, 81, + (char *)_vq_lengthlist__44cn1_sm_p6_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44cn1_sm_p6_0, + 0 +}; + +static const long _vq_quantlist__44cn1_sm_p6_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44cn1_sm_p6_1[] = { + 2, 4, 4, 5, 5, 7, 7, 7, 7, 8, 8,10, 5, 5, 6, 6, + 7, 7, 8, 8, 8, 8,10, 5, 5, 6, 6, 7, 7, 8, 8, 8, + 8,10, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8,10,10,10, 7, + 7, 7, 7, 8, 8, 8, 8,10,10,10, 8, 8, 8, 8, 8, 8, + 8, 8,10,10,10, 8, 8, 8, 8, 8, 8, 8, 8,10,10,10, + 8, 8, 8, 8, 8, 8, 9, 9,10,10,10,10,10, 8, 8, 8, + 8, 9, 9,10,10,10,10,10, 9, 9, 9, 9, 8, 9,10,10, + 10,10,10, 8, 9, 8, 8, 9, 8, +}; + +static const static_codebook _44cn1_sm_p6_1 = { + 2, 121, + (char *)_vq_lengthlist__44cn1_sm_p6_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44cn1_sm_p6_1, + 0 +}; + +static const long _vq_quantlist__44cn1_sm_p7_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44cn1_sm_p7_0[] = { + 1, 4, 4, 6, 6, 7, 7, 7, 7, 9, 9,10,10, 7, 5, 5, + 7, 7, 8, 8, 8, 8,10, 9,11,10, 7, 5, 5, 7, 7, 8, + 8, 8, 8, 9,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9, + 10,10,11,11, 0, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11, + 11, 0,12,12, 9, 9, 9,10,10,10,11,11,12,12, 0,13, + 13, 9, 9, 9, 9,10,10,11,11,12,12, 0, 0, 0,10,10, + 10,10,11,11,12,12,12,13, 0, 0, 0,10,10,10,10,11, + 11,12,12,12,12, 0, 0, 0,14,14,11,11,11,11,12,13, + 13,13, 0, 0, 0,14,14,11,10,11,11,12,12,13,13, 0, + 0, 0, 0, 0,12,12,12,12,13,13,13,14, 0, 0, 0, 0, + 0,13,12,12,12,13,13,13,14, +}; + +static const static_codebook _44cn1_sm_p7_0 = { + 2, 169, + (char *)_vq_lengthlist__44cn1_sm_p7_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44cn1_sm_p7_0, + 0 +}; + +static const long _vq_quantlist__44cn1_sm_p7_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44cn1_sm_p7_1[] = { + 2, 4, 4, 4, 5, 6, 5, 5, 5, 5, 6, 5, 5, 5, 5, 6, + 5, 5, 5, 5, 6, 6, 6, 5, 5, +}; + +static const static_codebook _44cn1_sm_p7_1 = { + 2, 25, + (char *)_vq_lengthlist__44cn1_sm_p7_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44cn1_sm_p7_1, + 0 +}; + +static const long _vq_quantlist__44cn1_sm_p8_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44cn1_sm_p8_0[] = { + 1, 4, 4,12,11,13,13,14,14, 4, 7, 7,11,13,14,14, + 14,14, 3, 8, 3,14,14,14,14,14,14,14,10,12,14,14, + 14,14,14,14,14,14, 5,14, 8,14,14,14,14,14,12,14, + 13,14,14,14,14,14,14,14,13,14,10,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14, +}; + +static const static_codebook _44cn1_sm_p8_0 = { + 2, 81, + (char *)_vq_lengthlist__44cn1_sm_p8_0, + 1, -516186112, 1627103232, 4, 0, + (long *)_vq_quantlist__44cn1_sm_p8_0, + 0 +}; + +static const long _vq_quantlist__44cn1_sm_p8_1[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44cn1_sm_p8_1[] = { + 1, 4, 4, 6, 6, 8, 8, 9, 9,10,11,11,11, 6, 5, 5, + 7, 7, 8, 8,10,10,10,11,11,11, 6, 5, 5, 7, 7, 8, + 8,10,10,11,12,12,12,14, 7, 7, 7, 8, 9, 9,11,11, + 11,12,11,12,17, 7, 7, 8, 7, 9, 9,11,11,12,12,12, + 12,14,11,11, 8, 8,10,10,11,12,12,13,11,12,14,11, + 11, 8, 8,10,10,11,12,12,13,13,12,14,15,14,10,10, + 10,10,11,12,12,12,12,11,14,13,16,10,10,10, 9,12, + 11,12,12,13,14,14,15,14,14,13,10,10,11,11,12,11, + 13,11,14,12,15,13,14,11,10,12,10,12,12,13,13,13, + 13,14,15,15,12,12,11,11,12,11,13,12,14,14,14,14, + 17,12,12,11,10,13,11,13,13, +}; + +static const static_codebook _44cn1_sm_p8_1 = { + 2, 169, + (char *)_vq_lengthlist__44cn1_sm_p8_1, + 1, -522616832, 1620115456, 4, 0, + (long *)_vq_quantlist__44cn1_sm_p8_1, + 0 +}; + +static const long _vq_quantlist__44cn1_sm_p8_2[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44cn1_sm_p8_2[] = { + 3, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, + 9,10, 6, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9,10, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9,10, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, + 9, 9, 9, 9,10,10,10, 7, 7, 7, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 9, 9,10,10,10, 8, 8, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9,10,10,10, 8, 8, 8, 8, 8, 8, 9, + 9, 9, 9, 9, 9, 9, 9,11,10,11, 8, 8, 8, 8, 8, 8, + 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,11,11, 8, 8, 8, + 8, 9, 9, 9, 9, 9, 9, 9, 9,11,10,11,11,11, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,11,10,11,11, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,11,11,10,11,11, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,11,10,11,11, + 11,11,11, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,11,11, + 11,11,11,11, 9,10,10,10, 9, 9, 9, 9, 9, 9,11,10, + 11,11,11,11,11, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,11, + 11,11,11,11,11,11,10,10, 9, 9, 9, 9, 9, 9, 9, 9, + 10,11,11,11,11,11,11,11,11, 9, 9, 9, 9, 9, 9, 9, + 9, +}; + +static const static_codebook _44cn1_sm_p8_2 = { + 2, 289, + (char *)_vq_lengthlist__44cn1_sm_p8_2, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44cn1_sm_p8_2, + 0 +}; + +static const char _huff_lengthlist__44cn1_sm_short[] = { + 5, 6,12,14,12,14,16,17,18, 4, 2, 5,11, 7,10,12, + 14,15, 9, 4, 5,11, 7,10,13,15,18,15, 6, 7, 5, 6, + 8,11,13,16,11, 5, 6, 5, 5, 6, 9,13,15,12, 5, 7, + 6, 5, 6, 9,12,14,12, 6, 7, 8, 6, 7, 9,12,13,14, + 8, 8, 7, 5, 5, 8,10,12,16, 9, 9, 8, 6, 6, 7, 9, + 9, +}; + +static const static_codebook _huff_book__44cn1_sm_short = { + 2, 81, + (char *)_huff_lengthlist__44cn1_sm_short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + diff --git a/code/libvorbis-1.3.4/lib/books/floor/floor_books.h b/code/libvorbis-1.3.4/lib/books/floor/floor_books.h new file mode 100644 index 00000000..e925313f --- /dev/null +++ b/code/libvorbis-1.3.4/lib/books/floor/floor_books.h @@ -0,0 +1,1547 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: static codebooks autogenerated by huff/huffbuld + last modified: $Id: floor_books.h 19057 2014-01-22 12:32:31Z xiphmont $ + + ********************************************************************/ + +#include "codebook.h" + +static const char _huff_lengthlist_line_256x7_0sub1[] = { + 0, 2, 3, 3, 3, 3, 4, 3, 4, +}; + +static const static_codebook _huff_book_line_256x7_0sub1 = { + 1, 9, + (char *)_huff_lengthlist_line_256x7_0sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_256x7_0sub2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 3, 4, 3, 5, 3, + 6, 3, 6, 4, 6, 4, 7, 5, 7, +}; + +static const static_codebook _huff_book_line_256x7_0sub2 = { + 1, 25, + (char *)_huff_lengthlist_line_256x7_0sub2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_256x7_0sub3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 2, 5, 3, 5, 3, + 6, 3, 6, 4, 7, 6, 7, 8, 7, 9, 8, 9, 9, 9,10, 9, + 11,13,11,13,10,10,13,13,13,13,13,13,12,12,12,12, +}; + +static const static_codebook _huff_book_line_256x7_0sub3 = { + 1, 64, + (char *)_huff_lengthlist_line_256x7_0sub3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_256x7_1sub1[] = { + 0, 3, 3, 3, 3, 2, 4, 3, 4, +}; + +static const static_codebook _huff_book_line_256x7_1sub1 = { + 1, 9, + (char *)_huff_lengthlist_line_256x7_1sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_256x7_1sub2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 3, 4, 3, 4, 4, + 5, 4, 6, 5, 6, 7, 6, 8, 8, +}; + +static const static_codebook _huff_book_line_256x7_1sub2 = { + 1, 25, + (char *)_huff_lengthlist_line_256x7_1sub2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_256x7_1sub3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 4, 3, 6, 3, 7, + 3, 8, 5, 8, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, +}; + +static const static_codebook _huff_book_line_256x7_1sub3 = { + 1, 64, + (char *)_huff_lengthlist_line_256x7_1sub3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_256x7_class0[] = { + 7, 5, 5, 9, 9, 6, 6, 9,12, 8, 7, 8,11, 8, 9,15, + 6, 3, 3, 7, 7, 4, 3, 6, 9, 6, 5, 6, 8, 6, 8,15, + 8, 5, 5, 9, 8, 5, 4, 6,10, 7, 5, 5,11, 8, 7,15, + 14,15,13,13,13,13, 8,11,15,10, 7, 6,11, 9,10,15, +}; + +static const static_codebook _huff_book_line_256x7_class0 = { + 1, 64, + (char *)_huff_lengthlist_line_256x7_class0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_256x7_class1[] = { + 5, 6, 8,15, 6, 9,10,15,10,11,12,15,15,15,15,15, + 4, 6, 7,15, 6, 7, 8,15, 9, 8, 9,15,15,15,15,15, + 6, 8, 9,15, 7, 7, 8,15,10, 9,10,15,15,15,15,15, + 15,13,15,15,15,10,11,15,15,13,13,15,15,15,15,15, + 4, 6, 7,15, 6, 8, 9,15,10,10,12,15,15,15,15,15, + 2, 5, 6,15, 5, 6, 7,15, 8, 6, 7,15,15,15,15,15, + 5, 6, 8,15, 5, 6, 7,15, 9, 6, 7,15,15,15,15,15, + 14,12,13,15,12,10,11,15,15,15,15,15,15,15,15,15, + 7, 8, 9,15, 9,10,10,15,15,14,14,15,15,15,15,15, + 5, 6, 7,15, 7, 8, 9,15,12, 9,10,15,15,15,15,15, + 7, 7, 9,15, 7, 7, 8,15,12, 8, 9,15,15,15,15,15, + 13,13,14,15,12,11,12,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 13,13,13,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,12,13,15,15,12,13,15,15,14,15,15,15,15,15,15, + 15,15,15,15,15,15,13,15,15,15,15,15,15,15,15,15, +}; + +static const static_codebook _huff_book_line_256x7_class1 = { + 1, 256, + (char *)_huff_lengthlist_line_256x7_class1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_512x17_0sub0[] = { + 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 6, 5, 6, 6, 6, 6, 5, 6, 6, 7, 6, 7, 6, 7, 6, + 7, 6, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 9, 7, 9, 7, + 9, 7, 9, 8, 9, 8,10, 8,10, 8,10, 7,10, 6,10, 8, + 10, 8,11, 7,10, 7,11, 8,11,11,12,12,11,11,12,11, + 13,11,13,11,13,12,15,12,13,13,14,14,14,14,14,15, + 15,15,16,14,17,19,19,18,18,18,18,18,18,18,18,18, + 18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18, +}; + +static const static_codebook _huff_book_line_512x17_0sub0 = { + 1, 128, + (char *)_huff_lengthlist_line_512x17_0sub0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_512x17_1sub0[] = { + 2, 4, 5, 4, 5, 4, 5, 4, 5, 5, 5, 5, 5, 5, 6, 5, + 6, 5, 6, 6, 7, 6, 7, 6, 8, 7, 8, 7, 8, 7, 8, 7, +}; + +static const static_codebook _huff_book_line_512x17_1sub0 = { + 1, 32, + (char *)_huff_lengthlist_line_512x17_1sub0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_512x17_1sub1[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 3, 5, 3, 5, 4, 5, 4, 5, 4, 5, 5, 5, 5, 6, 5, + 6, 5, 7, 5, 8, 6, 8, 6, 8, 6, 8, 6, 8, 7, 9, 7, + 9, 7,11, 9,11,11,12,11,14,12,14,16,14,16,13,16, + 14,16,12,15,13,16,14,16,13,14,12,15,13,15,13,13, + 13,15,12,14,14,15,13,15,12,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, +}; + +static const static_codebook _huff_book_line_512x17_1sub1 = { + 1, 128, + (char *)_huff_lengthlist_line_512x17_1sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_512x17_2sub1[] = { + 0, 4, 5, 4, 4, 4, 5, 4, 4, 4, 5, 4, 5, 4, 5, 3, + 5, 3, +}; + +static const static_codebook _huff_book_line_512x17_2sub1 = { + 1, 18, + (char *)_huff_lengthlist_line_512x17_2sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_512x17_2sub2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 3, 4, 3, 4, 4, 5, 4, 5, 4, 6, 4, 6, 5, + 6, 5, 7, 5, 7, 6, 8, 6, 8, 6, 8, 7, 8, 7, 9, 7, + 9, 8, +}; + +static const static_codebook _huff_book_line_512x17_2sub2 = { + 1, 50, + (char *)_huff_lengthlist_line_512x17_2sub2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_512x17_2sub3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 3, 3, 4, 3, 4, 4, 5, 5, 6, 6, 7, 7, + 7, 8, 8,11, 8, 9, 9, 9,10,11,11,11, 9,10,10,11, + 11,11,11,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, +}; + +static const static_codebook _huff_book_line_512x17_2sub3 = { + 1, 128, + (char *)_huff_lengthlist_line_512x17_2sub3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_512x17_3sub1[] = { + 0, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 5, 4, 5, + 5, 5, +}; + +static const static_codebook _huff_book_line_512x17_3sub1 = { + 1, 18, + (char *)_huff_lengthlist_line_512x17_3sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_512x17_3sub2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 3, 3, 4, 3, 5, 4, 6, 4, 6, 5, 7, 6, 7, + 6, 8, 6, 8, 7, 9, 8,10, 8,12, 9,13,10,15,10,15, + 11,14, +}; + +static const static_codebook _huff_book_line_512x17_3sub2 = { + 1, 50, + (char *)_huff_lengthlist_line_512x17_3sub2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_512x17_3sub3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 8, 4, 8, 4, 8, 4, 8, 5, 8, 5, 8, 6, 8, + 4, 8, 4, 8, 5, 8, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +}; + +static const static_codebook _huff_book_line_512x17_3sub3 = { + 1, 128, + (char *)_huff_lengthlist_line_512x17_3sub3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_512x17_class1[] = { + 1, 2, 3, 6, 5, 4, 7, 7, +}; + +static const static_codebook _huff_book_line_512x17_class1 = { + 1, 8, + (char *)_huff_lengthlist_line_512x17_class1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_512x17_class2[] = { + 3, 3, 3,14, 5, 4, 4,11, 8, 6, 6,10,17,12,11,17, + 6, 5, 5,15, 5, 3, 4,11, 8, 5, 5, 8,16, 9,10,14, + 10, 8, 9,17, 8, 6, 6,13,10, 7, 7,10,16,11,13,14, + 17,17,17,17,17,16,16,16,16,15,16,16,16,16,16,16, +}; + +static const static_codebook _huff_book_line_512x17_class2 = { + 1, 64, + (char *)_huff_lengthlist_line_512x17_class2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_512x17_class3[] = { + 2, 4, 6,17, 4, 5, 7,17, 8, 7,10,17,17,17,17,17, + 3, 4, 6,15, 3, 3, 6,15, 7, 6, 9,17,17,17,17,17, + 6, 8,10,17, 6, 6, 8,16, 9, 8,10,17,17,15,16,17, + 17,17,17,17,12,15,15,16,12,15,15,16,16,16,16,16, +}; + +static const static_codebook _huff_book_line_512x17_class3 = { + 1, 64, + (char *)_huff_lengthlist_line_512x17_class3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x4_class0[] = { + 7, 7, 7,11, 6, 6, 7,11, 7, 6, 6,10,12,10,10,13, + 7, 7, 8,11, 7, 7, 7,11, 7, 6, 7,10,11,10,10,13, + 10,10, 9,12, 9, 9, 9,11, 8, 8, 8,11,13,11,10,14, + 15,15,14,15,15,14,13,14,15,12,12,17,17,17,17,17, + 7, 7, 6, 9, 6, 6, 6, 9, 7, 6, 6, 8,11,11,10,12, + 7, 7, 7, 9, 7, 6, 6, 9, 7, 6, 6, 9,13,10,10,11, + 10, 9, 8,10, 9, 8, 8,10, 8, 8, 7, 9,13,12,10,11, + 17,14,14,13,15,14,12,13,17,13,12,15,17,17,14,17, + 7, 6, 6, 7, 6, 6, 5, 7, 6, 6, 6, 6,11, 9, 9, 9, + 7, 7, 6, 7, 7, 6, 6, 7, 6, 6, 6, 6,10, 9, 8, 9, + 10, 9, 8, 8, 9, 8, 7, 8, 8, 7, 6, 8,11,10, 9,10, + 17,17,12,15,15,15,12,14,14,14,10,12,15,13,12,13, + 11,10, 8,10,11,10, 8, 8,10, 9, 7, 7,10, 9, 9,11, + 11,11, 9,10,11,10, 8, 9,10, 8, 6, 8,10, 9, 9,11, + 14,13,10,12,12,11,10,10, 8, 7, 8,10,10,11,11,12, + 17,17,15,17,17,17,17,17,17,13,12,17,17,17,14,17, +}; + +static const static_codebook _huff_book_line_128x4_class0 = { + 1, 256, + (char *)_huff_lengthlist_line_128x4_class0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x4_0sub0[] = { + 2, 2, 2, 2, +}; + +static const static_codebook _huff_book_line_128x4_0sub0 = { + 1, 4, + (char *)_huff_lengthlist_line_128x4_0sub0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x4_0sub1[] = { + 0, 0, 0, 0, 3, 2, 3, 2, 3, 3, +}; + +static const static_codebook _huff_book_line_128x4_0sub1 = { + 1, 10, + (char *)_huff_lengthlist_line_128x4_0sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x4_0sub2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 4, 3, 4, 3, + 4, 4, 5, 4, 5, 4, 6, 5, 6, +}; + +static const static_codebook _huff_book_line_128x4_0sub2 = { + 1, 25, + (char *)_huff_lengthlist_line_128x4_0sub2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x4_0sub3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 3, 5, 3, 5, 3, + 5, 4, 6, 5, 6, 5, 7, 6, 6, 7, 7, 9, 9,11,11,16, + 11,14,10,11,11,13,16,15,15,15,15,15,15,15,15,15, +}; + +static const static_codebook _huff_book_line_128x4_0sub3 = { + 1, 64, + (char *)_huff_lengthlist_line_128x4_0sub3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_256x4_class0[] = { + 6, 7, 7,12, 6, 6, 7,12, 7, 6, 6,10,15,12,11,13, + 7, 7, 8,13, 7, 7, 8,12, 7, 7, 7,11,12,12,11,13, + 10, 9, 9,11, 9, 9, 9,10,10, 8, 8,12,14,12,12,14, + 11,11,12,14,11,12,11,15,15,12,13,15,15,15,15,15, + 6, 6, 7,10, 6, 6, 6,11, 7, 6, 6, 9,14,12,11,13, + 7, 7, 7,10, 6, 6, 7, 9, 7, 7, 6,10,13,12,10,12, + 9, 9, 9,11, 9, 9, 8, 9, 9, 8, 8,10,13,12,10,12, + 12,12,11,13,12,12,11,12,15,13,12,15,15,15,14,14, + 6, 6, 6, 8, 6, 6, 5, 6, 7, 7, 6, 5,11,10, 9, 8, + 7, 6, 6, 7, 6, 6, 5, 6, 7, 7, 6, 6,11,10, 9, 8, + 8, 8, 8, 9, 8, 8, 7, 8, 8, 8, 6, 7,11,10, 9, 9, + 14,11,10,14,14,11,10,15,13,11, 9,11,15,12,12,11, + 11, 9, 8, 8,10, 9, 8, 9,11,10, 9, 8,12,11,12,11, + 13,10, 8, 9,11,10, 8, 9,10, 9, 8, 9,10, 8,12,12, + 15,11,10,10,13,11,10,10, 8, 8, 7,12,10, 9,11,12, + 15,12,11,15,13,11,11,15,12,14,11,13,15,15,13,13, +}; + +static const static_codebook _huff_book_line_256x4_class0 = { + 1, 256, + (char *)_huff_lengthlist_line_256x4_class0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_256x4_0sub0[] = { + 2, 2, 2, 2, +}; + +static const static_codebook _huff_book_line_256x4_0sub0 = { + 1, 4, + (char *)_huff_lengthlist_line_256x4_0sub0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_256x4_0sub1[] = { + 0, 0, 0, 0, 2, 2, 3, 3, 3, 3, +}; + +static const static_codebook _huff_book_line_256x4_0sub1 = { + 1, 10, + (char *)_huff_lengthlist_line_256x4_0sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_256x4_0sub2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 3, 4, 3, 4, 3, + 5, 3, 5, 4, 5, 4, 6, 4, 6, +}; + +static const static_codebook _huff_book_line_256x4_0sub2 = { + 1, 25, + (char *)_huff_lengthlist_line_256x4_0sub2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_256x4_0sub3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 3, 5, 3, 5, 3, + 6, 4, 7, 4, 7, 5, 7, 6, 7, 6, 7, 8,10,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,12,12,12,12,12, +}; + +static const static_codebook _huff_book_line_256x4_0sub3 = { + 1, 64, + (char *)_huff_lengthlist_line_256x4_0sub3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x7_class0[] = { + 10, 7, 8,13, 9, 6, 7,11,10, 8, 8,12,17,17,17,17, + 7, 5, 5, 9, 6, 4, 4, 8, 8, 5, 5, 8,16,14,13,16, + 7, 5, 5, 7, 6, 3, 3, 5, 8, 5, 4, 7,14,12,12,15, + 10, 7, 8, 9, 7, 5, 5, 6, 9, 6, 5, 5,15,12, 9,10, +}; + +static const static_codebook _huff_book_line_128x7_class0 = { + 1, 64, + (char *)_huff_lengthlist_line_128x7_class0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x7_class1[] = { + 8,13,17,17, 8,11,17,17,11,13,17,17,17,17,17,17, + 6,10,16,17, 6,10,15,17, 8,10,16,17,17,17,17,17, + 9,13,15,17, 8,11,17,17,10,12,17,17,17,17,17,17, + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, + 6,11,15,17, 7,10,15,17, 8,10,17,17,17,15,17,17, + 4, 8,13,17, 4, 7,13,17, 6, 8,15,17,16,15,17,17, + 6,11,15,17, 6, 9,13,17, 8,10,17,17,15,17,17,17, + 16,17,17,17,12,14,15,17,13,14,15,17,17,17,17,17, + 5,10,14,17, 5, 9,14,17, 7, 9,15,17,15,15,17,17, + 3, 7,12,17, 3, 6,11,17, 5, 7,13,17,12,12,17,17, + 5, 9,14,17, 3, 7,11,17, 5, 8,13,17,13,11,16,17, + 12,17,17,17, 9,14,15,17,10,11,14,17,16,14,17,17, + 8,12,17,17, 8,12,17,17,10,12,17,17,17,17,17,17, + 5,10,17,17, 5, 9,15,17, 7, 9,17,17,13,13,17,17, + 7,11,17,17, 6,10,15,17, 7, 9,15,17,12,11,17,17, + 12,15,17,17,11,14,17,17,11,10,15,17,17,16,17,17, +}; + +static const static_codebook _huff_book_line_128x7_class1 = { + 1, 256, + (char *)_huff_lengthlist_line_128x7_class1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x7_0sub1[] = { + 0, 3, 3, 3, 3, 3, 3, 3, 3, +}; + +static const static_codebook _huff_book_line_128x7_0sub1 = { + 1, 9, + (char *)_huff_lengthlist_line_128x7_0sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x7_0sub2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 4, 4, 4, 4, + 5, 4, 5, 4, 5, 4, 6, 4, 6, +}; + +static const static_codebook _huff_book_line_128x7_0sub2 = { + 1, 25, + (char *)_huff_lengthlist_line_128x7_0sub2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x7_0sub3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 3, 5, 3, 5, 4, + 5, 4, 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, + 7, 8, 9,11,13,13,13,13,13,13,13,13,13,13,13,13, +}; + +static const static_codebook _huff_book_line_128x7_0sub3 = { + 1, 64, + (char *)_huff_lengthlist_line_128x7_0sub3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x7_1sub1[] = { + 0, 3, 3, 2, 3, 3, 4, 3, 4, +}; + +static const static_codebook _huff_book_line_128x7_1sub1 = { + 1, 9, + (char *)_huff_lengthlist_line_128x7_1sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x7_1sub2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 3, 6, 3, 6, 3, + 6, 3, 7, 3, 8, 4, 9, 4, 9, +}; + +static const static_codebook _huff_book_line_128x7_1sub2 = { + 1, 25, + (char *)_huff_lengthlist_line_128x7_1sub2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x7_1sub3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7, 2, 7, 3, 8, 4, + 9, 5, 9, 8,10,11,11,12,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,13,13,13,13, +}; + +static const static_codebook _huff_book_line_128x7_1sub3 = { + 1, 64, + (char *)_huff_lengthlist_line_128x7_1sub3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x11_class1[] = { + 1, 6, 3, 7, 2, 4, 5, 7, +}; + +static const static_codebook _huff_book_line_128x11_class1 = { + 1, 8, + (char *)_huff_lengthlist_line_128x11_class1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x11_class2[] = { + 1, 6,12,16, 4,12,15,16, 9,15,16,16,16,16,16,16, + 2, 5,11,16, 5,11,13,16, 9,13,16,16,16,16,16,16, + 4, 8,12,16, 5, 9,12,16, 9,13,15,16,16,16,16,16, + 15,16,16,16,11,14,13,16,12,15,16,16,16,16,16,15, +}; + +static const static_codebook _huff_book_line_128x11_class2 = { + 1, 64, + (char *)_huff_lengthlist_line_128x11_class2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x11_class3[] = { + 7, 6, 9,17, 7, 6, 8,17,12, 9,11,16,16,16,16,16, + 5, 4, 7,16, 5, 3, 6,14, 9, 6, 8,15,16,16,16,16, + 5, 4, 6,13, 3, 2, 4,11, 7, 4, 6,13,16,11,10,14, + 12,12,12,16, 9, 7,10,15,12, 9,11,16,16,15,15,16, +}; + +static const static_codebook _huff_book_line_128x11_class3 = { + 1, 64, + (char *)_huff_lengthlist_line_128x11_class3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x11_0sub0[] = { + 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, + 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 6, 6, 6, 7, 6, + 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 8, 6, 8, 6, 8, 7, + 8, 7, 8, 7, 8, 7, 9, 7, 9, 8, 9, 8, 9, 8,10, 8, + 10, 9,10, 9,10, 9,11, 9,11, 9,10,10,11,10,11,10, + 11,11,11,11,11,11,12,13,14,14,14,15,15,16,16,16, + 17,15,16,15,16,16,17,17,16,17,17,17,17,17,17,17, + 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, +}; + +static const static_codebook _huff_book_line_128x11_0sub0 = { + 1, 128, + (char *)_huff_lengthlist_line_128x11_0sub0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x11_1sub0[] = { + 2, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, + 6, 5, 6, 5, 6, 5, 7, 6, 7, 6, 7, 6, 8, 6, 8, 6, +}; + +static const static_codebook _huff_book_line_128x11_1sub0 = { + 1, 32, + (char *)_huff_lengthlist_line_128x11_1sub0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x11_1sub1[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 3, 5, 3, 6, 4, 6, 4, 7, 4, 7, 4, 7, 4, 8, 4, + 8, 4, 9, 5, 9, 5, 9, 5, 9, 6,10, 6,10, 6,11, 7, + 10, 7,10, 8,11, 9,11, 9,11,10,11,11,12,11,11,12, + 15,15,12,14,11,14,12,14,11,14,13,14,12,14,11,14, + 11,14,12,14,11,14,11,14,13,13,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, +}; + +static const static_codebook _huff_book_line_128x11_1sub1 = { + 1, 128, + (char *)_huff_lengthlist_line_128x11_1sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x11_2sub1[] = { + 0, 4, 5, 4, 5, 4, 5, 3, 5, 3, 5, 3, 5, 4, 4, 4, + 5, 5, +}; + +static const static_codebook _huff_book_line_128x11_2sub1 = { + 1, 18, + (char *)_huff_lengthlist_line_128x11_2sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x11_2sub2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 3, 4, 4, 4, 4, 5, 4, 5, 4, 6, 5, 7, + 5, 7, 6, 8, 6, 8, 6, 9, 7, 9, 7,10, 7, 9, 8,11, + 8,11, +}; + +static const static_codebook _huff_book_line_128x11_2sub2 = { + 1, 50, + (char *)_huff_lengthlist_line_128x11_2sub2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x11_2sub3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 8, 3, 8, 4, 8, 4, 8, 6, 8, 5, 8, 4, 8, + 4, 8, 6, 8, 7, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +}; + +static const static_codebook _huff_book_line_128x11_2sub3 = { + 1, 128, + (char *)_huff_lengthlist_line_128x11_2sub3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x11_3sub1[] = { + 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, + 5, 4, +}; + +static const static_codebook _huff_book_line_128x11_3sub1 = { + 1, 18, + (char *)_huff_lengthlist_line_128x11_3sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x11_3sub2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 3, 5, 4, 6, 4, 6, 4, 7, 4, 7, 4, 8, 4, + 8, 4, 9, 4, 9, 4,10, 4,10, 5,10, 5,11, 5,12, 6, + 12, 6, +}; + +static const static_codebook _huff_book_line_128x11_3sub2 = { + 1, 50, + (char *)_huff_lengthlist_line_128x11_3sub2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x11_3sub3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 7, 1, 6, 3, 7, 3, 8, 4, 8, 5, 8, 8, 8, 9, + 7, 8, 8, 7, 7, 7, 8, 9,10, 9, 9,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, +}; + +static const static_codebook _huff_book_line_128x11_3sub3 = { + 1, 128, + (char *)_huff_lengthlist_line_128x11_3sub3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x17_class1[] = { + 1, 3, 4, 7, 2, 5, 6, 7, +}; + +static const static_codebook _huff_book_line_128x17_class1 = { + 1, 8, + (char *)_huff_lengthlist_line_128x17_class1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x17_class2[] = { + 1, 4,10,19, 3, 8,13,19, 7,12,19,19,19,19,19,19, + 2, 6,11,19, 8,13,19,19, 9,11,19,19,19,19,19,19, + 6, 7,13,19, 9,13,19,19,10,13,18,18,18,18,18,18, + 18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18, +}; + +static const static_codebook _huff_book_line_128x17_class2 = { + 1, 64, + (char *)_huff_lengthlist_line_128x17_class2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x17_class3[] = { + 3, 6,10,17, 4, 8,11,20, 8,10,11,20,20,20,20,20, + 2, 4, 8,18, 4, 6, 8,17, 7, 8,10,20,20,17,20,20, + 3, 5, 8,17, 3, 4, 6,17, 8, 8,10,17,17,12,16,20, + 13,13,15,20,10,10,12,20,15,14,15,20,20,20,19,19, +}; + +static const static_codebook _huff_book_line_128x17_class3 = { + 1, 64, + (char *)_huff_lengthlist_line_128x17_class3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x17_0sub0[] = { + 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, + 7, 5, 7, 5, 7, 5, 7, 5, 7, 5, 7, 5, 8, 5, 8, 5, + 8, 5, 8, 5, 8, 6, 8, 6, 8, 6, 9, 6, 9, 6, 9, 6, + 9, 6, 9, 7, 9, 7, 9, 7, 9, 7,10, 7,10, 8,10, 8, + 10, 8,10, 8,10, 8,11, 8,11, 8,11, 8,11, 8,11, 9, + 12, 9,12, 9,12, 9,12, 9,12,10,12,10,13,11,13,11, + 14,12,14,13,15,14,16,14,17,15,18,16,20,20,20,20, + 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20, +}; + +static const static_codebook _huff_book_line_128x17_0sub0 = { + 1, 128, + (char *)_huff_lengthlist_line_128x17_0sub0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x17_1sub0[] = { + 2, 5, 5, 4, 5, 4, 5, 4, 5, 5, 5, 5, 5, 5, 6, 5, + 6, 5, 6, 5, 7, 6, 7, 6, 7, 6, 8, 6, 9, 7, 9, 7, +}; + +static const static_codebook _huff_book_line_128x17_1sub0 = { + 1, 32, + (char *)_huff_lengthlist_line_128x17_1sub0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x17_1sub1[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 3, 5, 3, 5, 3, 6, 3, 6, 4, 6, 4, 7, 4, 7, 5, + 8, 5, 8, 6, 9, 7, 9, 7, 9, 8,10, 9,10, 9,11,10, + 11,11,11,11,11,11,12,12,12,13,12,13,12,14,12,15, + 12,14,12,16,13,17,13,17,14,17,14,16,13,17,14,17, + 14,17,15,17,15,15,16,17,17,17,17,17,17,17,17,17, + 17,17,17,17,17,17,16,16,16,16,16,16,16,16,16,16, +}; + +static const static_codebook _huff_book_line_128x17_1sub1 = { + 1, 128, + (char *)_huff_lengthlist_line_128x17_1sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x17_2sub1[] = { + 0, 4, 5, 4, 6, 4, 8, 3, 9, 3, 9, 2, 9, 3, 8, 4, + 9, 4, +}; + +static const static_codebook _huff_book_line_128x17_2sub1 = { + 1, 18, + (char *)_huff_lengthlist_line_128x17_2sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x17_2sub2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 1, 5, 3, 5, 3, 5, 4, 7, 5,10, 7,10, 7, + 12,10,14,10,14, 9,14,11,14,14,14,13,13,13,13,13, + 13,13, +}; + +static const static_codebook _huff_book_line_128x17_2sub2 = { + 1, 50, + (char *)_huff_lengthlist_line_128x17_2sub2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x17_2sub3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, +}; + +static const static_codebook _huff_book_line_128x17_2sub3 = { + 1, 128, + (char *)_huff_lengthlist_line_128x17_2sub3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x17_3sub1[] = { + 0, 4, 4, 4, 4, 4, 4, 4, 5, 3, 5, 3, 5, 4, 6, 4, + 6, 4, +}; + +static const static_codebook _huff_book_line_128x17_3sub1 = { + 1, 18, + (char *)_huff_lengthlist_line_128x17_3sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x17_3sub2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 5, 3, 6, 3, 6, 4, 7, 4, 7, 4, 7, 4, 8, 4, + 8, 4, 8, 4, 8, 4, 9, 4, 9, 5,10, 5,10, 7,10, 8, + 10, 8, +}; + +static const static_codebook _huff_book_line_128x17_3sub2 = { + 1, 50, + (char *)_huff_lengthlist_line_128x17_3sub2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_128x17_3sub3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 2, 4, 3, 4, 4, 4, 5, 4, 7, 5, 8, 5,11, + 6,10, 6,12, 7,12, 7,12, 8,12, 8,12,10,12,12,12, + 12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, +}; + +static const static_codebook _huff_book_line_128x17_3sub3 = { + 1, 128, + (char *)_huff_lengthlist_line_128x17_3sub3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_1024x27_class1[] = { + 2,10, 8,14, 7,12,11,14, 1, 5, 3, 7, 4, 9, 7,13, +}; + +static const static_codebook _huff_book_line_1024x27_class1 = { + 1, 16, + (char *)_huff_lengthlist_line_1024x27_class1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_1024x27_class2[] = { + 1, 4, 2, 6, 3, 7, 5, 7, +}; + +static const static_codebook _huff_book_line_1024x27_class2 = { + 1, 8, + (char *)_huff_lengthlist_line_1024x27_class2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_1024x27_class3[] = { + 1, 5, 7,21, 5, 8, 9,21,10, 9,12,20,20,16,20,20, + 4, 8, 9,20, 6, 8, 9,20,11,11,13,20,20,15,17,20, + 9,11,14,20, 8,10,15,20,11,13,15,20,20,20,20,20, + 20,20,20,20,13,20,20,20,18,18,20,20,20,20,20,20, + 3, 6, 8,20, 6, 7, 9,20,10, 9,12,20,20,20,20,20, + 5, 7, 9,20, 6, 6, 9,20,10, 9,12,20,20,20,20,20, + 8,10,13,20, 8, 9,12,20,11,10,12,20,20,20,20,20, + 18,20,20,20,15,17,18,20,18,17,18,20,20,20,20,20, + 7,10,12,20, 8, 9,11,20,14,13,14,20,20,20,20,20, + 6, 9,12,20, 7, 8,11,20,12,11,13,20,20,20,20,20, + 9,11,15,20, 8,10,14,20,12,11,14,20,20,20,20,20, + 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20, + 11,16,18,20,15,15,17,20,20,17,20,20,20,20,20,20, + 9,14,16,20,12,12,15,20,17,15,18,20,20,20,20,20, + 16,19,18,20,15,16,20,20,17,17,20,20,20,20,20,20, + 20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20, +}; + +static const static_codebook _huff_book_line_1024x27_class3 = { + 1, 256, + (char *)_huff_lengthlist_line_1024x27_class3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_1024x27_class4[] = { + 2, 3, 7,13, 4, 4, 7,15, 8, 6, 9,17,21,16,15,21, + 2, 5, 7,11, 5, 5, 7,14, 9, 7,10,16,17,15,16,21, + 4, 7,10,17, 7, 7, 9,15,11, 9,11,16,21,18,15,21, + 18,21,21,21,15,17,17,19,21,19,18,20,21,21,21,20, +}; + +static const static_codebook _huff_book_line_1024x27_class4 = { + 1, 64, + (char *)_huff_lengthlist_line_1024x27_class4, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_1024x27_0sub0[] = { + 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, + 6, 5, 6, 5, 6, 5, 6, 5, 7, 5, 7, 5, 7, 5, 7, 5, + 8, 6, 8, 6, 8, 6, 9, 6, 9, 6,10, 6,10, 6,11, 6, + 11, 7,11, 7,12, 7,12, 7,12, 7,12, 7,12, 7,12, 7, + 12, 7,12, 8,13, 8,12, 8,12, 8,13, 8,13, 9,13, 9, + 13, 9,13, 9,12,10,12,10,13,10,14,11,14,12,14,13, + 14,13,14,14,15,16,15,15,15,14,15,17,21,22,22,21, + 22,22,22,22,22,22,21,21,21,21,21,21,21,21,21,21, +}; + +static const static_codebook _huff_book_line_1024x27_0sub0 = { + 1, 128, + (char *)_huff_lengthlist_line_1024x27_0sub0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_1024x27_1sub0[] = { + 2, 5, 5, 4, 5, 4, 5, 4, 5, 4, 6, 5, 6, 5, 6, 5, + 6, 5, 7, 5, 7, 6, 8, 6, 8, 6, 8, 6, 9, 6, 9, 6, +}; + +static const static_codebook _huff_book_line_1024x27_1sub0 = { + 1, 32, + (char *)_huff_lengthlist_line_1024x27_1sub0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_1024x27_1sub1[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8, 5, 8, 4, 9, 4, 9, 4, 9, 4, 9, 4, 9, 4, 9, 4, + 9, 4, 9, 4, 9, 4, 8, 4, 8, 4, 9, 5, 9, 5, 9, 5, + 9, 5, 9, 6,10, 6,10, 7,10, 8,11, 9,11,11,12,13, + 12,14,13,15,13,15,14,16,14,17,15,17,15,15,16,16, + 15,16,16,16,15,18,16,15,17,17,19,19,19,19,19,19, + 19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19, +}; + +static const static_codebook _huff_book_line_1024x27_1sub1 = { + 1, 128, + (char *)_huff_lengthlist_line_1024x27_1sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_1024x27_2sub0[] = { + 1, 5, 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, + 6, 6, 7, 7, 7, 7, 8, 7, 8, 8, 9, 8,10, 9,10, 9, +}; + +static const static_codebook _huff_book_line_1024x27_2sub0 = { + 1, 32, + (char *)_huff_lengthlist_line_1024x27_2sub0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_1024x27_2sub1[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 3, 4, 3, 4, 4, 5, 4, 5, 4, 5, 5, 6, 5, 6, 5, + 7, 5, 7, 6, 7, 6, 8, 7, 8, 7, 8, 7, 9, 8, 9, 9, + 9, 9,10,10,10,11, 9,12, 9,12, 9,15,10,14, 9,13, + 10,13,10,12,10,12,10,13,10,12,11,13,11,14,12,13, + 13,14,14,13,14,15,14,16,13,13,14,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,15,15, +}; + +static const static_codebook _huff_book_line_1024x27_2sub1 = { + 1, 128, + (char *)_huff_lengthlist_line_1024x27_2sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_1024x27_3sub1[] = { + 0, 4, 5, 4, 5, 3, 5, 3, 5, 3, 5, 4, 4, 4, 4, 5, + 5, 5, +}; + +static const static_codebook _huff_book_line_1024x27_3sub1 = { + 1, 18, + (char *)_huff_lengthlist_line_1024x27_3sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_1024x27_3sub2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 4, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, + 5, 7, 5, 8, 6, 8, 6, 9, 7,10, 7,10, 8,10, 8,11, + 9,11, +}; + +static const static_codebook _huff_book_line_1024x27_3sub2 = { + 1, 50, + (char *)_huff_lengthlist_line_1024x27_3sub2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_1024x27_3sub3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 7, 3, 8, 3,10, 3, 8, 3, 9, 3, 8, 4, 9, + 4, 9, 5, 9, 6,10, 6, 9, 7,11, 7,12, 9,13,10,13, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, +}; + +static const static_codebook _huff_book_line_1024x27_3sub3 = { + 1, 128, + (char *)_huff_lengthlist_line_1024x27_3sub3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_1024x27_4sub1[] = { + 0, 4, 5, 4, 5, 4, 5, 4, 5, 3, 5, 3, 5, 3, 5, 4, + 5, 4, +}; + +static const static_codebook _huff_book_line_1024x27_4sub1 = { + 1, 18, + (char *)_huff_lengthlist_line_1024x27_4sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_1024x27_4sub2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 2, 4, 2, 5, 3, 5, 4, 6, 6, 6, 7, 7, 8, + 7, 8, 7, 8, 7, 9, 8, 9, 8, 9, 8,10, 8,11, 9,12, + 9,12, +}; + +static const static_codebook _huff_book_line_1024x27_4sub2 = { + 1, 50, + (char *)_huff_lengthlist_line_1024x27_4sub2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_1024x27_4sub3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 2, 5, 2, 6, 3, 6, 4, 7, 4, 7, 5, 9, 5,11, + 6,11, 6,11, 7,11, 6,11, 6,11, 9,11, 8,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,10,10,10,10,10,10, +}; + +static const static_codebook _huff_book_line_1024x27_4sub3 = { + 1, 128, + (char *)_huff_lengthlist_line_1024x27_4sub3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_2048x27_class1[] = { + 2, 6, 8, 9, 7,11,13,13, 1, 3, 5, 5, 6, 6,12,10, +}; + +static const static_codebook _huff_book_line_2048x27_class1 = { + 1, 16, + (char *)_huff_lengthlist_line_2048x27_class1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_2048x27_class2[] = { + 1, 2, 3, 6, 4, 7, 5, 7, +}; + +static const static_codebook _huff_book_line_2048x27_class2 = { + 1, 8, + (char *)_huff_lengthlist_line_2048x27_class2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_2048x27_class3[] = { + 3, 3, 6,16, 5, 5, 7,16, 9, 8,11,16,16,16,16,16, + 5, 5, 8,16, 5, 5, 7,16, 8, 7, 9,16,16,16,16,16, + 9, 9,12,16, 6, 8,11,16, 9,10,11,16,16,16,16,16, + 16,16,16,16,13,16,16,16,15,16,16,16,16,16,16,16, + 5, 4, 7,16, 6, 5, 8,16, 9, 8,10,16,16,16,16,16, + 5, 5, 7,15, 5, 4, 6,15, 7, 6, 8,16,16,16,16,16, + 9, 9,11,15, 7, 7, 9,16, 8, 8, 9,16,16,16,16,16, + 16,16,16,16,15,15,15,16,15,15,14,16,16,16,16,16, + 8, 8,11,16, 8, 9,10,16,11,10,14,16,16,16,16,16, + 6, 8,10,16, 6, 7,10,16, 8, 8,11,16,14,16,16,16, + 10,11,14,16, 9, 9,11,16,10,10,11,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,15,16,16,16,16,16,16,16,16,16,16,16, + 12,16,15,16,12,14,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, +}; + +static const static_codebook _huff_book_line_2048x27_class3 = { + 1, 256, + (char *)_huff_lengthlist_line_2048x27_class3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_2048x27_class4[] = { + 2, 4, 7,13, 4, 5, 7,15, 8, 7,10,16,16,14,16,16, + 2, 4, 7,16, 3, 4, 7,14, 8, 8,10,16,16,16,15,16, + 6, 8,11,16, 7, 7, 9,16,11, 9,13,16,16,16,15,16, + 16,16,16,16,14,16,16,16,16,16,16,16,16,16,16,16, +}; + +static const static_codebook _huff_book_line_2048x27_class4 = { + 1, 64, + (char *)_huff_lengthlist_line_2048x27_class4, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_2048x27_0sub0[] = { + 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, + 6, 5, 7, 5, 7, 5, 7, 5, 8, 5, 8, 5, 8, 5, 9, 5, + 9, 6,10, 6,10, 6,11, 6,11, 6,11, 6,11, 6,11, 6, + 11, 6,11, 6,12, 7,11, 7,11, 7,11, 7,11, 7,10, 7, + 11, 7,11, 7,12, 7,11, 8,11, 8,11, 8,11, 8,13, 8, + 12, 9,11, 9,11, 9,11,10,12,10,12, 9,12,10,12,11, + 14,12,16,12,12,11,14,16,17,17,17,17,17,17,17,17, + 17,17,17,17,17,17,17,17,17,17,17,17,16,16,16,16, +}; + +static const static_codebook _huff_book_line_2048x27_0sub0 = { + 1, 128, + (char *)_huff_lengthlist_line_2048x27_0sub0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_2048x27_1sub0[] = { + 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 6, 6, 6, 6, 6, 6, 7, 6, 7, 6, 7, 6, 7, 6, +}; + +static const static_codebook _huff_book_line_2048x27_1sub0 = { + 1, 32, + (char *)_huff_lengthlist_line_2048x27_1sub0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_2048x27_1sub1[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 6, 5, 7, 5, 7, 4, 7, 4, 8, 4, 8, 4, 8, 4, 8, 3, + 8, 4, 9, 4, 9, 4, 9, 4, 9, 4, 9, 5, 9, 5, 9, 6, + 9, 7, 9, 8, 9, 9, 9,10, 9,11, 9,14, 9,15,10,15, + 10,15,10,15,10,15,11,15,10,14,12,14,11,14,13,14, + 13,15,15,15,12,15,15,15,13,15,13,15,13,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,14, +}; + +static const static_codebook _huff_book_line_2048x27_1sub1 = { + 1, 128, + (char *)_huff_lengthlist_line_2048x27_1sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_2048x27_2sub0[] = { + 2, 4, 5, 4, 5, 4, 5, 4, 5, 5, 5, 5, 5, 5, 6, 5, + 6, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, +}; + +static const static_codebook _huff_book_line_2048x27_2sub0 = { + 1, 32, + (char *)_huff_lengthlist_line_2048x27_2sub0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_2048x27_2sub1[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3, 4, 3, 4, 3, 4, 4, 5, 4, 5, 5, 5, 6, 6, 6, 7, + 6, 8, 6, 8, 6, 9, 7,10, 7,10, 7,10, 7,12, 7,12, + 7,12, 9,12,11,12,10,12,10,12,11,12,12,12,10,12, + 10,12,10,12, 9,12,11,12,12,12,12,12,11,12,11,12, + 12,12,12,12,12,12,12,12,10,10,12,12,12,12,12,10, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, +}; + +static const static_codebook _huff_book_line_2048x27_2sub1 = { + 1, 128, + (char *)_huff_lengthlist_line_2048x27_2sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_2048x27_3sub1[] = { + 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 5, 5, +}; + +static const static_codebook _huff_book_line_2048x27_3sub1 = { + 1, 18, + (char *)_huff_lengthlist_line_2048x27_3sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_2048x27_3sub2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, + 6, 7, 6, 7, 6, 8, 6, 9, 7, 9, 7, 9, 9,11, 9,12, + 10,12, +}; + +static const static_codebook _huff_book_line_2048x27_3sub2 = { + 1, 50, + (char *)_huff_lengthlist_line_2048x27_3sub2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_2048x27_3sub3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 6, 3, 7, 3, 7, 5, 7, 7, 7, 7, 7, 6, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +}; + +static const static_codebook _huff_book_line_2048x27_3sub3 = { + 1, 128, + (char *)_huff_lengthlist_line_2048x27_3sub3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_2048x27_4sub1[] = { + 0, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 5, 4, 5, 4, + 4, 5, +}; + +static const static_codebook _huff_book_line_2048x27_4sub1 = { + 1, 18, + (char *)_huff_lengthlist_line_2048x27_4sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_2048x27_4sub2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 2, 4, 3, 4, 4, 4, 5, 5, 6, 5, 6, 5, 7, + 6, 6, 6, 7, 7, 7, 8, 9, 9, 9,12,10,11,10,10,12, + 10,10, +}; + +static const static_codebook _huff_book_line_2048x27_4sub2 = { + 1, 50, + (char *)_huff_lengthlist_line_2048x27_4sub2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_2048x27_4sub3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 3, 6, 5, 7, 5, 7, 7, 7, 7, 7, 5, 7, 5, 7, + 5, 7, 5, 7, 7, 7, 7, 7, 4, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, +}; + +static const static_codebook _huff_book_line_2048x27_4sub3 = { + 1, 128, + (char *)_huff_lengthlist_line_2048x27_4sub3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_256x4low_class0[] = { + 4, 5, 6,11, 5, 5, 6,10, 7, 7, 6, 6,14,13, 9, 9, + 6, 6, 6,10, 6, 6, 6, 9, 8, 7, 7, 9,14,12, 8,11, + 8, 7, 7,11, 8, 8, 7,11, 9, 9, 7, 9,13,11, 9,13, + 19,19,18,19,15,16,16,19,11,11,10,13,10,10, 9,15, + 5, 5, 6,13, 6, 6, 6,11, 8, 7, 6, 7,14,11,10,11, + 6, 6, 6,12, 7, 6, 6,11, 8, 7, 7,11,13,11, 9,11, + 9, 7, 6,12, 8, 7, 6,12, 9, 8, 8,11,13,10, 7,13, + 19,19,17,19,17,14,14,19,12,10, 8,12,13,10, 9,16, + 7, 8, 7,12, 7, 7, 7,11, 8, 7, 7, 8,12,12,11,11, + 8, 8, 7,12, 8, 7, 6,11, 8, 7, 7,10,10,11,10,11, + 9, 8, 8,13, 9, 8, 7,12,10, 9, 7,11, 9, 8, 7,11, + 18,18,15,18,18,16,17,18,15,11,10,18,11, 9, 9,18, + 16,16,13,16,12,11,10,16,12,11, 9, 6,15,12,11,13, + 16,16,14,14,13,11,12,16,12, 9, 9,13,13,10,10,12, + 17,18,17,17,14,15,14,16,14,12,14,15,12,10,11,12, + 18,18,18,18,18,18,18,18,18,12,13,18,16,11, 9,18, +}; + +static const static_codebook _huff_book_line_256x4low_class0 = { + 1, 256, + (char *)_huff_lengthlist_line_256x4low_class0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_256x4low_0sub0[] = { + 1, 3, 2, 3, +}; + +static const static_codebook _huff_book_line_256x4low_0sub0 = { + 1, 4, + (char *)_huff_lengthlist_line_256x4low_0sub0, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_256x4low_0sub1[] = { + 0, 0, 0, 0, 2, 3, 2, 3, 3, 3, +}; + +static const static_codebook _huff_book_line_256x4low_0sub1 = { + 1, 10, + (char *)_huff_lengthlist_line_256x4low_0sub1, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_256x4low_0sub2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 4, 3, 4, + 4, 4, 4, 4, 5, 5, 5, 6, 6, +}; + +static const static_codebook _huff_book_line_256x4low_0sub2 = { + 1, 25, + (char *)_huff_lengthlist_line_256x4low_0sub2, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist_line_256x4low_0sub3[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 2, 4, 3, 5, 4, + 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 8, 6, 9, + 7,12,11,16,13,16,12,15,13,15,12,14,12,15,15,15, +}; + +static const static_codebook _huff_book_line_256x4low_0sub3 = { + 1, 64, + (char *)_huff_lengthlist_line_256x4low_0sub3, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + diff --git a/code/libvorbis-1.3.4/lib/books/uncoupled/res_books_uncoupled.h b/code/libvorbis-1.3.4/lib/books/uncoupled/res_books_uncoupled.h new file mode 100644 index 00000000..736353b6 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/books/uncoupled/res_books_uncoupled.h @@ -0,0 +1,7758 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: static codebooks autogenerated by huff/huffbuld + last modified: $Id: res_books_uncoupled.h 19057 2014-01-22 12:32:31Z xiphmont $ + + ********************************************************************/ + +#include "codebook.h" + +static const long _vq_quantlist__16u0__p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__16u0__p1_0[] = { + 1, 4, 4, 5, 7, 7, 5, 7, 8, 5, 8, 8, 8,10,10, 8, + 10,11, 5, 8, 8, 8,10,10, 8,10,10, 4, 9, 9, 9,12, + 11, 8,11,11, 8,12,11,10,12,14,10,13,13, 7,11,11, + 10,14,12,11,14,14, 4, 9, 9, 8,11,11, 9,11,12, 7, + 11,11,10,13,14,10,12,14, 8,11,12,10,14,14,10,13, + 12, +}; + +static const static_codebook _16u0__p1_0 = { + 4, 81, + (char *)_vq_lengthlist__16u0__p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__16u0__p1_0, + 0 +}; + +static const long _vq_quantlist__16u0__p2_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__16u0__p2_0[] = { + 2, 4, 4, 5, 6, 6, 5, 6, 6, 5, 7, 7, 7, 8, 9, 7, + 8, 9, 5, 7, 7, 7, 9, 8, 7, 9, 7, 4, 7, 7, 7, 9, + 9, 7, 8, 8, 6, 9, 8, 7, 8,11, 9,11,10, 6, 8, 9, + 8,11, 8, 9,10,11, 4, 7, 7, 7, 8, 8, 7, 9, 9, 6, + 9, 8, 9,11,10, 8, 8,11, 6, 8, 9, 9,10,11, 8,11, + 8, +}; + +static const static_codebook _16u0__p2_0 = { + 4, 81, + (char *)_vq_lengthlist__16u0__p2_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__16u0__p2_0, + 0 +}; + +static const long _vq_quantlist__16u0__p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__16u0__p3_0[] = { + 1, 5, 5, 7, 7, 6, 7, 7, 8, 8, 6, 7, 8, 8, 8, 8, + 9, 9,11,11, 8, 9, 9,11,11, 6, 9, 8,10,10, 8,10, + 10,11,11, 8,10,10,11,11,10,11,10,13,12, 9,11,10, + 13,13, 6, 8, 9,10,10, 8,10,10,11,11, 8,10,10,11, + 11, 9,10,11,13,12,10,10,11,12,12, 8,11,11,14,13, + 10,12,11,15,13, 9,12,11,15,14,12,14,13,16,14,12, + 13,13,17,14, 8,11,11,13,14, 9,11,12,14,15,10,11, + 12,13,15,11,13,13,14,16,12,13,14,14,16, 5, 9, 9, + 11,11, 9,11,11,12,12, 8,11,11,12,12,11,12,12,15, + 14,10,12,12,15,15, 8,11,11,13,12,10,12,12,13,13, + 10,12,12,14,13,12,12,13,14,15,11,13,13,17,16, 7, + 11,11,13,13,10,12,12,14,13,10,12,12,13,14,12,13, + 12,15,14,11,13,13,15,14, 9,12,12,16,15,11,13,13, + 17,16,10,13,13,16,16,13,14,15,15,16,13,15,14,19, + 17, 9,12,12,14,16,11,13,13,15,16,10,13,13,17,16, + 13,14,13,17,15,12,15,15,16,17, 5, 9, 9,11,11, 8, + 11,11,13,12, 9,11,11,12,12,10,12,12,14,15,11,12, + 12,14,14, 7,11,10,13,12,10,12,12,14,13,10,11,12, + 13,13,11,13,13,15,16,12,12,13,15,15, 7,11,11,13, + 13,10,13,13,14,14,10,12,12,13,13,11,13,13,16,15, + 12,13,13,15,14, 9,12,12,15,15,10,13,13,17,16,11, + 12,13,15,15,12,15,14,18,18,13,14,14,16,17, 9,12, + 12,15,16,10,13,13,15,16,11,13,13,15,16,13,15,15, + 17,17,13,15,14,16,15, 7,11,11,15,16,10,13,12,16, + 17,10,12,13,15,17,15,16,16,18,17,13,15,15,17,18, + 8,12,12,16,16,11,13,14,17,18,11,13,13,18,16,15, + 17,16,17,19,14,15,15,17,16, 8,12,12,16,15,11,14, + 13,18,17,11,13,14,18,17,15,16,16,18,17,13,16,16, + 18,18,11,15,14,18,17,13,14,15,18, 0,12,15,15, 0, + 17,17,16,17,17,18,14,16,18,18, 0,11,14,14,17, 0, + 12,15,14,17,19,12,15,14,18, 0,15,18,16, 0,17,14, + 18,16,18, 0, 7,11,11,16,15,10,12,12,18,16,10,13, + 13,16,15,13,15,14,17,17,14,16,16,19,18, 8,12,12, + 16,16,11,13,13,18,16,11,13,14,17,16,14,15,15,19, + 18,15,16,16, 0,19, 8,12,12,16,17,11,13,13,17,17, + 11,14,13,17,17,13,15,15,17,19,15,17,17,19, 0,11, + 14,15,19,17,12,15,16,18,18,12,14,15,19,17,14,16, + 17, 0,18,16,16,19,17, 0,11,14,14,18,19,12,15,14, + 17,17,13,16,14,17,16,14,17,16,18,18,15,18,15, 0, + 18, +}; + +static const static_codebook _16u0__p3_0 = { + 4, 625, + (char *)_vq_lengthlist__16u0__p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__16u0__p3_0, + 0 +}; + +static const long _vq_quantlist__16u0__p4_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__16u0__p4_0[] = { + 3, 5, 5, 8, 8, 6, 6, 6, 9, 9, 6, 6, 6, 9, 9, 9, + 10, 9,11,11, 9, 9, 9,11,11, 6, 7, 7,10,10, 7, 7, + 8,10,10, 7, 7, 8,10,10,10,10,10,11,12, 9,10,10, + 11,12, 6, 7, 7,10,10, 7, 8, 7,10,10, 7, 8, 7,10, + 10,10,11,10,12,11,10,10,10,13,10, 9,10,10,12,12, + 10,11,10,14,12, 9,11,11,13,13,11,12,13,13,13,11, + 12,12,15,13, 9,10,10,12,13, 9,11,10,12,13,10,10, + 11,12,13,11,12,12,12,13,11,12,12,13,13, 5, 7, 7, + 10,10, 7, 8, 8,10,10, 7, 8, 8,10,10,10,11,10,12, + 13,10,10,11,12,12, 6, 8, 8,11,10, 7, 8, 9,10,12, + 8, 9, 9,11,11,11,10,11,11,12,10,11,11,13,12, 7, + 8, 8,10,11, 8, 9, 8,11,10, 8, 9, 9,11,11,10,12, + 10,13,11,10,11,11,13,13,10,11,10,14,13,10,10,11, + 13,13,10,12,11,14,13,12,11,13,12,13,13,12,13,14, + 14,10,11,11,13,13,10,11,10,12,13,10,12,12,12,14, + 12,12,12,14,12,12,13,12,17,15, 5, 7, 7,10,10, 7, + 8, 8,10,10, 7, 8, 8,11,10,10,10,11,12,12,10,11, + 11,12,13, 6, 8, 8,11,10, 8, 9, 9,11,11, 7, 8, 9, + 10,11,11,11,11,12,12,10,10,11,12,13, 6, 8, 8,10, + 11, 8, 9, 9,11,11, 7, 9, 7,11,10,10,12,12,13,13, + 11,11,10,13,11, 9,11,10,14,13,11,11,11,15,13,10, + 10,11,13,13,12,13,13,14,14,12,11,12,12,13,10,11, + 11,12,13,10,11,12,13,13,10,11,10,13,12,12,12,13, + 14, 0,12,13,11,13,11, 8,10,10,13,13,10,11,11,14, + 13,10,11,11,13,12,13,14,14,14,15,12,12,12,15,14, + 9,11,10,13,12,10,10,11,13,14,11,11,11,15,12,13, + 12,14,15,16,13,13,13,14,13, 9,11,11,12,12,10,12, + 11,13,13,10,11,11,13,14,13,13,13,15,15,13,13,14, + 17,15,11,12,12,14,14,10,11,12,13,15,12,13,13, 0, + 15,13,11,14,12,16,14,16,14, 0,15,11,12,12,14,16, + 11,13,12,16,15,12,13,13,14,15,12,14,12,15,13,15, + 14,14,16,16, 8,10,10,13,13,10,11,10,13,14,10,11, + 11,13,13,13,13,12,14,14,14,13,13,16,17, 9,10,10, + 12,14,10,12,11,14,13,10,11,12,13,14,12,12,12,15, + 15,13,13,13,14,14, 9,10,10,13,13,10,11,12,12,14, + 10,11,10,13,13,13,13,13,14,16,13,13,13,14,14,11, + 12,13,15,13,12,14,13,14,16,12,12,13,13,14,13,14, + 14,17,15,13,12,17,13,16,11,12,13,14,15,12,13,14, + 14,17,11,12,11,14,14,13,16,14,16, 0,14,15,11,15, + 11, +}; + +static const static_codebook _16u0__p4_0 = { + 4, 625, + (char *)_vq_lengthlist__16u0__p4_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__16u0__p4_0, + 0 +}; + +static const long _vq_quantlist__16u0__p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__16u0__p5_0[] = { + 1, 4, 4, 7, 7, 7, 7, 9, 9, 4, 6, 6, 8, 8, 8, 8, + 9, 9, 4, 6, 6, 8, 8, 8, 8, 9, 9, 7, 8, 8, 9, 9, + 9, 9,11,10, 7, 8, 8, 9, 9, 9, 9,10,11, 7, 8, 8, + 9, 9,10,10,11,11, 7, 8, 8, 9, 9,10,10,11,11, 9, + 9, 9,10,10,11,11,12,12, 9, 9, 9,10,10,11,11,12, + 12, +}; + +static const static_codebook _16u0__p5_0 = { + 2, 81, + (char *)_vq_lengthlist__16u0__p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__16u0__p5_0, + 0 +}; + +static const long _vq_quantlist__16u0__p6_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__16u0__p6_0[] = { + 1, 4, 4, 7, 7,10,10,12,12,13,13,18,17, 3, 6, 6, + 9, 9,11,11,13,13,14,14,18,17, 3, 6, 6, 9, 9,11, + 11,13,13,14,14,17,18, 7, 9, 9,11,11,13,13,14,14, + 15,15, 0, 0, 7, 9, 9,11,11,13,13,14,14,15,16,19, + 18,10,11,11,13,13,14,14,16,15,17,18, 0, 0,10,11, + 11,13,13,14,14,15,15,16,18, 0, 0,11,13,13,14,14, + 15,15,17,17, 0,19, 0, 0,11,13,13,14,14,14,15,16, + 18, 0,19, 0, 0,13,14,14,15,15,18,17,18,18, 0,19, + 0, 0,13,14,14,15,16,16,16,18,18,19, 0, 0, 0,16, + 17,17, 0,17,19,19, 0,19, 0, 0, 0, 0,16,19,16,17, + 18, 0,19, 0, 0, 0, 0, 0, 0, +}; + +static const static_codebook _16u0__p6_0 = { + 2, 169, + (char *)_vq_lengthlist__16u0__p6_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__16u0__p6_0, + 0 +}; + +static const long _vq_quantlist__16u0__p6_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__16u0__p6_1[] = { + 1, 4, 5, 6, 6, 4, 6, 6, 6, 6, 4, 6, 6, 6, 6, 6, + 6, 6, 7, 7, 6, 6, 6, 7, 7, +}; + +static const static_codebook _16u0__p6_1 = { + 2, 25, + (char *)_vq_lengthlist__16u0__p6_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__16u0__p6_1, + 0 +}; + +static const long _vq_quantlist__16u0__p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__16u0__p7_0[] = { + 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, +}; + +static const static_codebook _16u0__p7_0 = { + 4, 81, + (char *)_vq_lengthlist__16u0__p7_0, + 1, -518803456, 1628680192, 2, 0, + (long *)_vq_quantlist__16u0__p7_0, + 0 +}; + +static const long _vq_quantlist__16u0__p7_1[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__16u0__p7_1[] = { + 1, 5, 5, 6, 5, 9,10,11,11,10,10,10,10,10,10, 5, + 8, 8, 8,10,10,10,10,10,10,10,10,10,10,10, 5, 8, + 9, 9, 9,10,10,10,10,10,10,10,10,10,10, 5,10, 8, + 10,10,10,10,10,10,10,10,10,10,10,10, 4, 8, 9,10, + 10,10,10,10,10,10,10,10,10,10,10, 9,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10, 9,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10, +}; + +static const static_codebook _16u0__p7_1 = { + 2, 225, + (char *)_vq_lengthlist__16u0__p7_1, + 1, -520986624, 1620377600, 4, 0, + (long *)_vq_quantlist__16u0__p7_1, + 0 +}; + +static const long _vq_quantlist__16u0__p7_2[] = { + 10, + 9, + 11, + 8, + 12, + 7, + 13, + 6, + 14, + 5, + 15, + 4, + 16, + 3, + 17, + 2, + 18, + 1, + 19, + 0, + 20, +}; + +static const char _vq_lengthlist__16u0__p7_2[] = { + 1, 6, 6, 7, 8, 7, 7,10, 9,10, 9,11,10, 9,11,10, + 9, 9, 9, 9,10, 6, 8, 7, 9, 9, 8, 8,10,10, 9,11, + 11,12,12,10, 9,11, 9,12,10, 9, 6, 9, 8, 9,12, 8, + 8,11, 9,11,11,12,11,12,12,10,11,11,10,10,11, 7, + 10, 9, 9, 9, 9, 9,10, 9,10, 9,10,10,12,10,10,10, + 11,12,10,10, 7, 9, 9, 9,10, 9, 9,10,10, 9, 9, 9, + 11,11,10,10,10,10, 9, 9,12, 7, 9,10, 9,11, 9,10, + 9,10,11,11,11,10,11,12, 9,12,11,10,10,10, 7, 9, + 9, 9, 9,10,12,10, 9,11,12,10,11,12,12,11, 9,10, + 11,10,11, 7, 9,10,10,11,10, 9,10,11,11,11,10,12, + 12,12,11,11,10,11,11,12, 8, 9,10,12,11,10,10,12, + 12,12,12,12,10,11,11, 9,11,10,12,11,11, 8, 9,10, + 10,11,12,11,11,10,10,10,12,12,12, 9,10,12,12,12, + 12,12, 8,10,11,10,10,12, 9,11,12,12,11,12,12,12, + 12,10,12,10,10,10,10, 8,12,11,11,11,10,10,11,12, + 12,12,12,11,12,12,12,11,11,11,12,10, 9,10,10,12, + 10,12,10,12,12,10,10,10,11,12,12,12,11,12,12,12, + 11,10,11,12,12,12,11,12,12,11,12,12,11,12,12,12, + 12,11,12,12,10,10,10,10,11,11,12,11,12,12,12,12, + 12,12,12,11,12,11,10,11,11,12,11,11, 9,10,10,10, + 12,10,10,11, 9,11,12,11,12,11,12,12,10,11,10,12, + 9, 9, 9,12,11,10,11,10,12,10,12,10,12,12,12,11, + 11,11,11,11,10, 9,10,10,11,10,11,11,12,11,10,11, + 12,12,12,11,11, 9,12,10,12, 9,10,12,10,10,11,10, + 11,11,12,11,10,11,10,11,11,11,11,12,11,11,10, 9, + 10,10,10, 9,11,11,10, 9,12,10,11,12,11,12,12,11, + 12,11,12,11,10,11,10,12,11,12,11,12,11,12,10,11, + 10,10,12,11,10,11,11,11,10, +}; + +static const static_codebook _16u0__p7_2 = { + 2, 441, + (char *)_vq_lengthlist__16u0__p7_2, + 1, -529268736, 1611661312, 5, 0, + (long *)_vq_quantlist__16u0__p7_2, + 0 +}; + +static const char _huff_lengthlist__16u0__single[] = { + 3, 5, 8, 7,14, 8, 9,19, 5, 2, 5, 5, 9, 6, 9,19, + 8, 4, 5, 7, 8, 9,13,19, 7, 4, 6, 5, 9, 6, 9,19, + 12, 8, 7, 9,10,11,13,19, 8, 5, 8, 6, 9, 6, 7,19, + 8, 8,10, 7, 7, 4, 5,19,12,17,19,15,18,13,11,18, +}; + +static const static_codebook _huff_book__16u0__single = { + 2, 64, + (char *)_huff_lengthlist__16u0__single, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__16u1__long[] = { + 3, 6,10, 8,12, 8,14, 8,14,19, 5, 3, 5, 5, 7, 6, + 11, 7,16,19, 7, 5, 6, 7, 7, 9,11,12,19,19, 6, 4, + 7, 5, 7, 6,10, 7,18,18, 8, 6, 7, 7, 7, 7, 8, 9, + 18,18, 7, 5, 8, 5, 7, 5, 8, 6,18,18,12, 9,10, 9, + 9, 9, 8, 9,18,18, 8, 7,10, 6, 8, 5, 6, 4,11,18, + 11,15,16,12,11, 8, 8, 6, 9,18,14,18,18,18,16,16, + 16,13,16,18, +}; + +static const static_codebook _huff_book__16u1__long = { + 2, 100, + (char *)_huff_lengthlist__16u1__long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__16u1__p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__16u1__p1_0[] = { + 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 8, 7, 7,10,10, 7, + 9,10, 5, 7, 8, 7,10, 9, 7,10,10, 5, 8, 8, 8,10, + 10, 8,10,10, 7,10,10,10,11,12,10,12,13, 7,10,10, + 9,13,11,10,12,13, 5, 8, 8, 8,10,10, 8,10,10, 7, + 10,10,10,12,12, 9,11,12, 7,10,11,10,12,12,10,13, + 11, +}; + +static const static_codebook _16u1__p1_0 = { + 4, 81, + (char *)_vq_lengthlist__16u1__p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__16u1__p1_0, + 0 +}; + +static const long _vq_quantlist__16u1__p2_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__16u1__p2_0[] = { + 3, 4, 4, 5, 6, 6, 5, 6, 6, 5, 6, 6, 6, 7, 8, 6, + 7, 8, 5, 6, 6, 6, 8, 7, 6, 8, 7, 5, 6, 6, 6, 8, + 8, 6, 8, 8, 6, 8, 8, 7, 7,10, 8, 9, 9, 6, 8, 8, + 7, 9, 8, 8, 9,10, 5, 6, 6, 6, 8, 8, 7, 8, 8, 6, + 8, 8, 8,10, 9, 7, 8, 9, 6, 8, 8, 8, 9, 9, 7,10, + 8, +}; + +static const static_codebook _16u1__p2_0 = { + 4, 81, + (char *)_vq_lengthlist__16u1__p2_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__16u1__p2_0, + 0 +}; + +static const long _vq_quantlist__16u1__p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__16u1__p3_0[] = { + 1, 5, 5, 8, 8, 6, 7, 7, 9, 9, 5, 7, 7, 9, 9, 9, + 10, 9,11,11, 9, 9,10,11,11, 6, 8, 8,10,10, 8, 9, + 10,11,11, 8, 9,10,11,11,10,11,11,12,13,10,11,11, + 13,13, 6, 8, 8,10,10, 8,10, 9,11,11, 8,10, 9,11, + 11,10,11,11,13,13,10,11,11,13,12, 9,11,11,14,13, + 10,12,12,15,14,10,12,11,14,13,12,13,13,15,15,12, + 13,13,16,14, 9,11,11,13,14,10,11,12,14,14,10,12, + 12,14,15,12,13,13,14,15,12,13,14,15,16, 5, 8, 8, + 11,11, 8,10,10,12,12, 8,10,10,12,12,11,12,12,14, + 14,11,12,12,14,14, 8,10,10,12,12, 9,11,12,12,13, + 10,12,12,13,13,12,12,13,14,15,11,13,13,15,15, 7, + 10,10,12,12, 9,12,11,13,12,10,11,12,13,13,12,13, + 12,15,14,11,12,13,15,15,10,12,12,15,14,11,13,13, + 16,15,11,13,13,16,15,14,13,14,15,16,13,15,15,17, + 17,10,12,12,14,15,11,12,12,15,15,11,13,13,15,16, + 13,15,13,16,15,13,15,15,16,17, 5, 8, 8,11,11, 8, + 10,10,12,12, 8,10,10,12,12,11,12,12,14,14,11,12, + 12,14,14, 7,10,10,12,12,10,12,12,14,13, 9,11,12, + 12,13,12,13,13,15,15,12,12,13,13,15, 7,10,10,12, + 13,10,11,12,13,13,10,12,11,13,13,11,13,13,15,15, + 12,13,12,15,14, 9,12,12,15,14,11,13,13,15,15,11, + 12,13,15,15,13,14,14,17,19,13,13,14,16,16,10,12, + 12,14,15,11,13,13,15,16,11,13,12,16,15,13,15,15, + 17,18,14,15,13,16,15, 8,11,11,15,14,10,12,12,16, + 15,10,12,12,16,16,14,15,15,18,17,13,14,15,16,18, + 9,12,12,15,15,11,12,14,16,17,11,13,13,16,15,15, + 15,15,17,18,14,15,16,17,17, 9,12,12,15,15,11,14, + 13,16,16,11,13,13,16,16,15,16,15,17,18,14,16,15, + 17,16,12,14,14,17,16,12,14,15,18,17,13,15,15,17, + 17,15,15,18,16,20,15,16,17,18,18,11,14,14,16,17, + 13,15,14,18,17,13,15,15,17,17,15,17,15,18,17,15, + 17,16,19,18, 8,11,11,14,15,10,12,12,15,15,10,12, + 12,16,16,13,14,14,17,16,14,15,15,17,17, 9,12,12, + 15,16,11,13,13,16,16,11,12,13,16,16,14,16,15,20, + 17,14,16,16,17,17, 9,12,12,15,16,11,13,13,16,17, + 11,13,13,17,16,14,15,15,17,18,15,15,15,18,18,11, + 14,14,17,16,13,15,15,17,17,13,14,14,18,17,15,16, + 16,18,19,15,15,17,17,19,11,14,14,16,17,13,15,14, + 17,19,13,15,14,18,17,15,17,16,18,18,15,17,15,18, + 16, +}; + +static const static_codebook _16u1__p3_0 = { + 4, 625, + (char *)_vq_lengthlist__16u1__p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__16u1__p3_0, + 0 +}; + +static const long _vq_quantlist__16u1__p4_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__16u1__p4_0[] = { + 4, 5, 5, 8, 8, 6, 6, 7, 9, 9, 6, 6, 6, 9, 9, 9, + 10, 9,11,11, 9, 9,10,11,11, 6, 7, 7,10, 9, 7, 7, + 8, 9,10, 7, 7, 8,10,10,10,10,10,10,12, 9, 9,10, + 11,12, 6, 7, 7, 9, 9, 7, 8, 7,10,10, 7, 8, 7,10, + 10, 9,10, 9,12,11,10,10, 9,12,10, 9,10,10,12,11, + 10,10,10,12,12, 9,10,10,12,12,12,11,12,13,13,11, + 11,12,12,13, 9,10,10,11,12, 9,10,10,12,12,10,10, + 10,12,12,11,12,11,14,13,11,12,12,14,13, 5, 7, 7, + 10,10, 7, 8, 8,10,10, 7, 8, 7,10,10,10,10,10,12, + 12,10,10,10,12,12, 6, 8, 7,10,10, 7, 7, 9,10,11, + 8, 9, 9,11,10,10,10,11,11,13,10,10,11,12,13, 6, + 8, 8,10,10, 7, 9, 8,11,10, 8, 9, 9,10,11,10,11, + 10,13,11,10,11,10,12,12,10,11,10,12,11,10,10,10, + 12,13,10,11,11,13,12,11,11,13,11,14,12,12,13,14, + 14, 9,10,10,12,13,10,11,10,13,12,10,11,11,12,13, + 11,12,11,14,12,12,13,13,15,14, 5, 7, 7,10,10, 7, + 7, 8,10,10, 7, 8, 8,10,10,10,10,10,11,12,10,10, + 10,12,12, 7, 8, 8,10,10, 8, 9, 8,11,10, 7, 8, 9, + 10,11,10,11,11,12,12,10,10,11,11,13, 7, 7, 8,10, + 10, 8, 8, 9,10,11, 7, 9, 7,11,10,10,11,11,13,12, + 11,11,10,13,11, 9,10,10,12,12,10,11,11,13,12,10, + 10,11,12,12,12,13,13,14,14,11,11,12,12,14,10,10, + 11,12,12,10,11,11,12,13,10,10,10,13,12,12,13,13, + 15,14,12,13,10,14,11, 8,10,10,12,12,10,11,10,13, + 13, 9,10,10,12,12,12,13,13,15,14,11,12,12,13,13, + 9,10,10,13,12,10,10,11,13,13,10,11,10,13,12,12, + 12,13,14,15,12,13,12,15,13, 9,10,10,12,13,10,11, + 10,13,12,10,10,11,12,13,12,14,12,15,13,12,12,13, + 14,15,11,12,11,14,13,11,11,12,14,15,12,13,12,15, + 14,13,11,15,11,16,13,14,14,16,15,11,12,12,14,14, + 11,12,11,14,13,12,12,13,14,15,13,14,12,16,12,14, + 14,14,15,15, 8,10,10,12,12, 9,10,10,12,12,10,10, + 11,13,13,11,12,12,13,13,12,13,13,14,15, 9,10,10, + 13,12,10,11,11,13,12,10,10,11,13,13,12,13,12,15, + 14,12,12,13,13,16, 9, 9,10,12,13,10,10,11,12,13, + 10,11,10,13,13,12,12,13,13,15,13,13,12,15,13,11, + 12,12,14,14,12,13,12,15,14,11,11,12,13,14,14,14, + 14,16,15,13,12,15,12,16,11,11,12,13,14,12,13,13, + 14,15,10,12,11,14,13,14,15,14,16,16,13,14,11,15, + 11, +}; + +static const static_codebook _16u1__p4_0 = { + 4, 625, + (char *)_vq_lengthlist__16u1__p4_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__16u1__p4_0, + 0 +}; + +static const long _vq_quantlist__16u1__p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__16u1__p5_0[] = { + 1, 4, 4, 7, 7, 7, 7, 9, 9, 4, 6, 6, 8, 8, 8, 8, + 10,10, 4, 5, 6, 8, 8, 8, 8,10,10, 7, 8, 8, 9, 9, + 9, 9,11,11, 7, 8, 8, 9, 9, 9, 9,11,11, 7, 8, 8, + 10, 9,11,11,12,11, 7, 8, 8, 9, 9,11,11,12,12, 9, + 10,10,11,11,12,12,13,12, 9,10,10,11,11,12,12,12, + 13, +}; + +static const static_codebook _16u1__p5_0 = { + 2, 81, + (char *)_vq_lengthlist__16u1__p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__16u1__p5_0, + 0 +}; + +static const long _vq_quantlist__16u1__p6_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__16u1__p6_0[] = { + 3, 4, 4, 6, 6, 7, 7, 9, 9, 4, 4, 4, 6, 6, 8, 8, + 9, 9, 4, 4, 4, 6, 6, 7, 7, 9, 9, 6, 6, 6, 7, 7, + 8, 8,10, 9, 6, 6, 6, 7, 7, 8, 8, 9,10, 7, 8, 7, + 8, 8, 9, 9,10,10, 7, 8, 8, 8, 8, 9, 9,10,10, 9, + 9, 9,10,10,10,10,11,11, 9, 9, 9,10,10,10,10,11, + 11, +}; + +static const static_codebook _16u1__p6_0 = { + 2, 81, + (char *)_vq_lengthlist__16u1__p6_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__16u1__p6_0, + 0 +}; + +static const long _vq_quantlist__16u1__p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__16u1__p7_0[] = { + 1, 4, 4, 4, 8, 8, 4, 8, 8, 5,11, 9, 8,12,11, 8, + 12,11, 5,10,11, 8,11,12, 8,11,12, 4,11,11,11,14, + 13,10,13,13, 8,14,13,12,14,16,12,16,15, 8,14,14, + 13,16,14,12,15,16, 4,11,11,10,14,13,11,14,14, 8, + 15,14,12,15,15,12,14,16, 8,14,14,11,16,15,12,15, + 13, +}; + +static const static_codebook _16u1__p7_0 = { + 4, 81, + (char *)_vq_lengthlist__16u1__p7_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__16u1__p7_0, + 0 +}; + +static const long _vq_quantlist__16u1__p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__16u1__p7_1[] = { + 2, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 4, 6, 5, 7, 7, + 8, 8, 8, 8, 8, 8, 4, 5, 6, 7, 7, 8, 8, 8, 8, 8, + 8, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 6, 7, 7, 8, + 8, 8, 8, 9, 9, 9, 9, 7, 8, 8, 8, 8, 9, 9, 9,10, + 9,10, 7, 8, 8, 8, 8, 9, 9, 9, 9,10, 9, 8, 8, 8, + 9, 9,10,10,10,10,10,10, 8, 8, 8, 9, 9, 9, 9,10, + 10,10,10, 8, 8, 8, 9, 9, 9,10,10,10,10,10, 8, 8, + 8, 9, 9,10,10,10,10,10,10, +}; + +static const static_codebook _16u1__p7_1 = { + 2, 121, + (char *)_vq_lengthlist__16u1__p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__16u1__p7_1, + 0 +}; + +static const long _vq_quantlist__16u1__p8_0[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__16u1__p8_0[] = { + 1, 4, 4, 5, 5, 8, 8,10,10,12,12, 4, 7, 7, 8, 8, + 9, 9,12,11,14,13, 4, 7, 7, 7, 8, 9,10,11,11,13, + 12, 5, 8, 8, 9, 9,11,11,12,13,15,14, 5, 7, 8, 9, + 9,11,11,13,13,17,15, 8, 9,10,11,11,12,13,17,14, + 17,16, 8,10, 9,11,11,12,12,13,15,15,17,10,11,11, + 12,13,14,15,15,16,16,17, 9,11,11,12,12,14,15,17, + 15,15,16,11,14,12,14,15,16,15,16,16,16,15,11,13, + 13,14,14,15,15,16,16,15,16, +}; + +static const static_codebook _16u1__p8_0 = { + 2, 121, + (char *)_vq_lengthlist__16u1__p8_0, + 1, -524582912, 1618345984, 4, 0, + (long *)_vq_quantlist__16u1__p8_0, + 0 +}; + +static const long _vq_quantlist__16u1__p8_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__16u1__p8_1[] = { + 2, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 4, 6, 6, 7, 7, + 8, 7, 8, 8, 8, 8, 4, 6, 6, 7, 7, 7, 7, 8, 8, 8, + 8, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 6, 7, 7, 7, + 7, 8, 8, 8, 8, 9, 9, 7, 7, 7, 8, 8, 8, 8, 9, 9, + 9, 9, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 8, 8, 8, + 8, 8, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 8, 8, 8, 9, 8, 9, 9, 9, 9, 9, 9, 8, 8, + 8, 9, 9, 9, 9, 9, 9, 9, 9, +}; + +static const static_codebook _16u1__p8_1 = { + 2, 121, + (char *)_vq_lengthlist__16u1__p8_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__16u1__p8_1, + 0 +}; + +static const long _vq_quantlist__16u1__p9_0[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__16u1__p9_0[] = { + 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, +}; + +static const static_codebook _16u1__p9_0 = { + 2, 225, + (char *)_vq_lengthlist__16u1__p9_0, + 1, -514071552, 1627381760, 4, 0, + (long *)_vq_quantlist__16u1__p9_0, + 0 +}; + +static const long _vq_quantlist__16u1__p9_1[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__16u1__p9_1[] = { + 1, 6, 5, 9, 9,10,10, 6, 7, 9, 9,10,10,10,10, 5, + 10, 8,10, 8,10,10, 8, 8,10, 9,10,10,10,10, 5, 8, + 9,10,10,10,10, 8,10,10,10,10,10,10,10, 9,10,10, + 10,10,10,10, 9, 9,10,10,10,10,10,10, 9, 9, 8, 9, + 10,10,10, 9,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10, 8,10,10,10,10, + 10,10,10,10,10,10,10,10,10, 6, 8, 8,10,10,10, 8, + 10,10,10,10,10,10,10,10, 5, 8, 8,10,10,10, 9, 9, + 10,10,10,10,10,10,10,10, 9,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, +}; + +static const static_codebook _16u1__p9_1 = { + 2, 225, + (char *)_vq_lengthlist__16u1__p9_1, + 1, -522338304, 1620115456, 4, 0, + (long *)_vq_quantlist__16u1__p9_1, + 0 +}; + +static const long _vq_quantlist__16u1__p9_2[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__16u1__p9_2[] = { + 1, 6, 6, 7, 8, 8,11,10, 9, 9,11, 9,10, 9,11,11, + 9, 6, 7, 6,11, 8,11, 9,10,10,11, 9,11,10,10,10, + 11, 9, 5, 7, 7, 8, 8,10,11, 8, 8,11, 9, 9,10,11, + 9,10,11, 8, 9, 6, 8, 8, 9, 9,10,10,11,11,11, 9, + 11,10, 9,11, 8, 8, 8, 9, 8, 9,10,11, 9, 9,11,11, + 10, 9, 9,11,10, 8,11, 8, 9, 8,11, 9,10, 9,10,11, + 11,10,10, 9,10,10, 8, 8, 9,10,10,10, 9,11, 9,10, + 11,11,11,11,10, 9,11, 9, 9,11,11,10, 8,11,11,11, + 9,10,10,11,10,11,11, 9,11,10, 9,11,10,10,10,10, + 9,11,10,11,10, 9, 9,10,11, 9, 8,10,11,11,10,10, + 11, 9,11,10,11,11,10,11, 9, 9, 8,10, 8, 9,11, 9, + 8,10,10, 9,11,10,11,10,11, 9,11, 8,10,11,11,11, + 11,10,10,11,11,11,11,10,11,11,10, 9, 8,10,10, 9, + 11,10,11,11,11, 9, 9, 9,11,11,11,10,10, 9, 9,10, + 9,11,11,11,11, 8,10,11,10,11,11,10,11,11, 9, 9, + 9,10, 9,11, 9,11,11,11,11,11,10,11,11,10,11,10, + 11,11, 9,11,10,11,10, 9,10, 9,10,10,11,11,11,11, + 9,10, 9,10,11,11,10,11,11,11,11,11,11,10,11,11, + 10, +}; + +static const static_codebook _16u1__p9_2 = { + 2, 289, + (char *)_vq_lengthlist__16u1__p9_2, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__16u1__p9_2, + 0 +}; + +static const char _huff_lengthlist__16u1__short[] = { + 5, 7,10, 9,11,10,15,11,13,16, 6, 4, 6, 6, 7, 7, + 10, 9,12,16,10, 6, 5, 6, 6, 7,10,11,16,16, 9, 6, + 7, 6, 7, 7,10, 8,14,16,11, 6, 5, 4, 5, 6, 8, 9, + 15,16, 9, 6, 6, 5, 6, 6, 9, 8,14,16,12, 7, 6, 6, + 5, 6, 6, 7,13,16, 8, 6, 7, 6, 5, 5, 4, 4,11,16, + 9, 8, 9, 9, 7, 7, 6, 5,13,16,14,14,16,15,16,15, + 16,16,16,16, +}; + +static const static_codebook _huff_book__16u1__short = { + 2, 100, + (char *)_huff_lengthlist__16u1__short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__16u2__long[] = { + 5, 8,10,10,10,11,11,12,14,18, 7, 5, 5, 6, 8, 9, + 10,12,14,17, 9, 5, 4, 5, 6, 8,10,11,13,19, 9, 5, + 4, 4, 5, 6, 9,10,12,17, 8, 6, 5, 4, 4, 5, 7,10, + 11,15, 8, 7, 7, 6, 5, 5, 6, 9,11,14, 8, 9, 8, 7, + 6, 5, 6, 7,11,14, 9,11,11, 9, 7, 6, 6, 6, 9,14, + 11,14,15,13, 9, 8, 7, 7, 9,14,13,15,19,17,12,11, + 10, 9,10,14, +}; + +static const static_codebook _huff_book__16u2__long = { + 2, 100, + (char *)_huff_lengthlist__16u2__long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__16u2_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__16u2_p1_0[] = { + 1, 5, 5, 5, 7, 7, 5, 7, 7, 5, 7, 7, 7, 9, 9, 7, + 9, 9, 5, 7, 7, 7, 9, 9, 8, 9, 9, 5, 7, 7, 8, 9, + 9, 7, 9, 9, 7, 9, 9, 9,10,11, 9,10,10, 7, 9, 9, + 9,10, 9, 9,10,11, 5, 8, 7, 7, 9, 9, 8, 9, 9, 7, + 9, 9, 9,11,10, 9, 9,10, 7, 9, 9, 9,10,10, 9,11, + 10, +}; + +static const static_codebook _16u2_p1_0 = { + 4, 81, + (char *)_vq_lengthlist__16u2_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__16u2_p1_0, + 0 +}; + +static const long _vq_quantlist__16u2_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__16u2_p2_0[] = { + 3, 5, 5, 8, 8, 5, 7, 7, 9, 9, 5, 7, 7, 9, 9, 9, + 10, 9,11,11, 9, 9, 9,11,11, 5, 7, 7, 9, 9, 7, 8, + 8,10,10, 7, 8, 8,10,10,10,10,10,12,12, 9,10,10, + 11,12, 5, 7, 7, 9, 9, 7, 8, 8,10,10, 7, 8, 8,10, + 10, 9,10,10,12,11,10,10,10,12,12, 9,10,10,12,12, + 10,10,10,12,12, 9,10,10,12,12,12,12,12,14,14,11, + 12,12,13,14, 9,10,10,12,12, 9,10,10,12,12,10,10, + 10,12,12,11,12,12,14,13,12,12,12,14,13, 5, 7, 7, + 9, 9, 7, 8, 8,10,10, 7, 8, 8,10,10,10,10,10,12, + 12,10,10,10,12,12, 7, 8, 8,11,10, 8, 9, 9,11,11, + 8, 9, 9,11,11,10,11,11,12,13,10,11,11,12,13, 7, + 8, 8,10,10, 8, 9, 8,11,10, 8, 9, 9,11,11,10,11, + 10,13,12,10,11,11,13,13,10,11,10,13,12,10,11,11, + 13,13,10,11,11,13,13,12,12,13,13,14,12,13,13,14, + 14, 9,10,10,12,12,10,11,10,13,12,10,11,11,13,13, + 12,13,12,14,13,12,13,13,14,15, 5, 7, 7, 9,10, 7, + 8, 8,10,10, 7, 8, 8,10,10,10,10,10,12,12,10,10, + 11,12,12, 7, 8, 8,10,10, 8, 9, 9,11,11, 8, 8, 9, + 10,11,10,11,11,13,13,10,10,11,12,13, 7, 8, 8,10, + 10, 8, 9, 9,11,11, 8, 9, 9,11,11,10,11,11,13,12, + 10,11,11,13,12, 9,10,10,12,12,10,11,11,13,13,10, + 10,11,12,13,12,13,13,15,14,12,12,13,12,14, 9,10, + 11,12,13,10,11,11,13,13,10,11,11,13,13,12,13,13, + 14,14,12,13,12,14,13, 8,10,10,12,12, 9,11,10,13, + 12, 9,10,10,12,13,12,13,13,14,14,12,12,12,14,14, + 9,10,10,13,13,10,11,11,13,13,10,11,11,13,13,13, + 13,13,14,15,12,13,13,14,15, 9,10,10,12,13,10,11, + 10,13,13,10,11,11,12,13,12,13,12,15,14,12,13,13, + 14,15,11,12,12,15,14,12,12,13,14,15,12,13,13,15, + 14,13,13,15,14,16,14,14,14,16,15,11,12,12,14,14, + 11,12,12,14,14,12,13,13,14,15,13,14,13,15,13,14, + 14,14,15,16, 8, 9,10,12,12, 9,10,10,13,12, 9,10, + 11,12,13,12,12,12,14,14,12,13,13,14,14, 9,10,10, + 13,12,10,11,11,13,13,10,10,11,13,13,12,13,13,15, + 14,12,12,13,14,15, 9,10,10,13,13,10,11,11,13,13, + 10,11,11,13,13,12,13,13,14,14,13,13,13,15,15,11, + 12,12,14,13,12,13,13,15,14,11,12,12,14,14,14,14, + 14,16,15,13,13,14,13,16,11,12,12,14,14,12,13,13, + 14,15,12,13,12,14,14,14,14,14,16,16,14,15,13,16, + 14, +}; + +static const static_codebook _16u2_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__16u2_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__16u2_p2_0, + 0 +}; + +static const long _vq_quantlist__16u2_p3_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__16u2_p3_0[] = { + 2, 4, 4, 6, 6, 7, 7, 9, 9, 4, 5, 5, 6, 6, 8, 7, + 9, 9, 4, 5, 5, 6, 6, 7, 8, 9, 9, 6, 6, 6, 7, 7, + 8, 8,10,10, 6, 6, 6, 7, 7, 8, 8,10,10, 7, 8, 7, + 8, 8, 9, 9,11,10, 7, 7, 8, 8, 8, 9, 9,10,11, 9, + 9, 9,10,10,11,10,11,11, 9, 9, 9,10,10,10,11,11, + 11, +}; + +static const static_codebook _16u2_p3_0 = { + 2, 81, + (char *)_vq_lengthlist__16u2_p3_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__16u2_p3_0, + 0 +}; + +static const long _vq_quantlist__16u2_p4_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__16u2_p4_0[] = { + 2, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11,11,11, + 11, 5, 5, 5, 7, 6, 8, 7, 9, 9, 9, 9,10,10,11,11, + 12,12, 5, 5, 5, 6, 6, 7, 8, 8, 9, 9, 9,10,10,11, + 11,12,12, 6, 7, 6, 7, 7, 8, 8, 9, 9, 9, 9,10,10, + 11,11,12,12, 6, 6, 7, 7, 7, 8, 8, 9, 9, 9, 9,10, + 10,11,11,12,12, 7, 8, 8, 8, 8, 9, 9, 9, 9,10,10, + 11,11,11,11,12,12, 7, 7, 8, 8, 8, 9, 9, 9, 9,10, + 10,11,11,11,11,12,12, 8, 9, 9, 9, 9, 9, 9,10,10, + 10,10,11,11,12,12,12,12, 8, 9, 9, 9, 9, 9, 9,10, + 10,10,10,11,11,12,12,12,12, 9, 9, 9, 9, 9,10,10, + 10,10,10,11,11,11,12,12,13,13, 9, 9, 9, 9, 9,10, + 10,10,10,11,10,11,11,12,12,13,13,10,10,10,10,10, + 11,11,11,11,11,11,11,12,12,12,13,13,10,10,10,10, + 10,11,11,11,11,11,11,12,11,12,12,13,13,11,11,11, + 11,11,11,11,12,12,12,12,12,12,13,13,13,13,11,11, + 11,11,11,11,11,12,12,12,12,13,12,13,13,13,13,11, + 12,12,12,12,12,12,12,12,13,13,13,13,13,13,14,14, + 11,12,12,12,12,12,12,12,13,13,13,13,13,13,13,14, + 14, +}; + +static const static_codebook _16u2_p4_0 = { + 2, 289, + (char *)_vq_lengthlist__16u2_p4_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__16u2_p4_0, + 0 +}; + +static const long _vq_quantlist__16u2_p5_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__16u2_p5_0[] = { + 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 8, 8, 7, 9, 9, 7, + 9,10, 5, 8, 8, 7,10, 9, 7,10, 9, 5, 8, 8, 8,11, + 10, 8,10,10, 7,10,10, 9, 9,12,10,12,12, 7,10,10, + 9,12,10,10,11,12, 5, 8, 8, 8,10,10, 8,11,11, 7, + 11,10,10,12,11, 9,10,12, 7,10,11,10,12,12, 9,12, + 9, +}; + +static const static_codebook _16u2_p5_0 = { + 4, 81, + (char *)_vq_lengthlist__16u2_p5_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__16u2_p5_0, + 0 +}; + +static const long _vq_quantlist__16u2_p5_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__16u2_p5_1[] = { + 2, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 5, 6, 6, 7, 7, + 7, 7, 8, 8, 8, 8, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, + 8, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 6, 7, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 7, 7, 7, 8, 8, 8, 8, 8, 8, + 8, 8, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 9, 9, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 8, 8, + 8, 8, 8, 8, 8, 9, 9, 9, 9, +}; + +static const static_codebook _16u2_p5_1 = { + 2, 121, + (char *)_vq_lengthlist__16u2_p5_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__16u2_p5_1, + 0 +}; + +static const long _vq_quantlist__16u2_p6_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__16u2_p6_0[] = { + 1, 5, 4, 7, 7, 8, 8, 8, 8,10,10,11,11, 4, 6, 6, + 7, 7, 9, 9, 9, 9,10,10,11,11, 4, 6, 6, 7, 7, 9, + 9, 9, 9,10,10,11,11, 7, 8, 8, 9, 9, 9, 9,10,10, + 11,11,12,12, 7, 7, 7, 9, 8,10, 9,10,10,11,11,12, + 12, 8, 9, 9, 9,10,10,10,11,11,12,12,13,13, 8, 9, + 9,10, 9,10,10,11,11,12,12,13,13, 8, 9, 9,10,10, + 11,11,11,11,12,12,13,13, 8, 9, 9,10,10,11,11,12, + 11,12,12,13,13,10,10,10,11,11,12,12,12,12,13,13, + 14,14,10,10,10,11,11,12,12,12,12,13,13,14,14,11, + 11,11,12,12,13,13,13,13,14,14,14,14,11,11,11,12, + 12,13,13,13,13,14,14,14,14, +}; + +static const static_codebook _16u2_p6_0 = { + 2, 169, + (char *)_vq_lengthlist__16u2_p6_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__16u2_p6_0, + 0 +}; + +static const long _vq_quantlist__16u2_p6_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__16u2_p6_1[] = { + 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _16u2_p6_1 = { + 2, 25, + (char *)_vq_lengthlist__16u2_p6_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__16u2_p6_1, + 0 +}; + +static const long _vq_quantlist__16u2_p7_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__16u2_p7_0[] = { + 1, 4, 4, 7, 7, 8, 8, 8, 8, 9, 9,10,10, 4, 6, 6, + 8, 8, 9, 9, 9, 9,10,10,11,10, 4, 6, 6, 8, 8, 9, + 9, 9, 9,10,10,11,11, 7, 8, 8,10, 9,10,10,10,10, + 11,11,12,12, 7, 8, 8,10,10,10,10,10,10,11,11,12, + 12, 8, 9, 9,10,10,11,11,11,11,12,12,13,13, 8, 9, + 9,10,10,11,11,11,11,12,12,13,13, 8, 9, 9,11,10, + 11,11,12,12,13,13,14,13, 8, 9, 9,10,10,11,11,12, + 12,13,13,13,13, 9,10,10,11,11,12,12,13,13,13,13, + 14,14, 9,10,10,11,11,12,12,13,13,13,13,14,14,10, + 11,11,12,12,13,13,14,13,14,14,15,14,10,11,11,12, + 12,13,13,14,13,14,14,15,14, +}; + +static const static_codebook _16u2_p7_0 = { + 2, 169, + (char *)_vq_lengthlist__16u2_p7_0, + 1, -523206656, 1618345984, 4, 0, + (long *)_vq_quantlist__16u2_p7_0, + 0 +}; + +static const long _vq_quantlist__16u2_p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__16u2_p7_1[] = { + 2, 5, 5, 7, 7, 7, 7, 7, 7, 8, 8, 5, 6, 6, 7, 7, + 7, 7, 8, 8, 8, 8, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, + 8, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 7, 7, 7, 8, 8, 8, 8, 8, 8, + 8, 8, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, +}; + +static const static_codebook _16u2_p7_1 = { + 2, 121, + (char *)_vq_lengthlist__16u2_p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__16u2_p7_1, + 0 +}; + +static const long _vq_quantlist__16u2_p8_0[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__16u2_p8_0[] = { + 1, 4, 4, 7, 7, 8, 8, 7, 7, 9, 8,10, 9,11,11, 4, + 7, 6, 9, 8, 9, 9, 9, 9,10, 9,11, 9,12, 9, 4, 6, + 7, 8, 8, 9, 9, 9, 9,10,10,10,11,11,12, 7, 9, 8, + 10,10,11,11,10,10,11,11,12,12,13,12, 7, 8, 8,10, + 10,10,11,10,10,11,11,11,12,12,13, 8, 9, 9,11,11, + 11,11,11,11,12,12,13,13,13,13, 8, 9, 9,11,11,11, + 11,11,11,12,12,13,13,13,14, 8, 9, 9,10,10,11,11, + 12,11,13,13,14,13,14,14, 8, 9, 9,10,10,11,11,12, + 12,12,12,13,13,14,14, 9,10,10,11,11,12,12,13,12, + 13,13,14,14,15,15, 9,10,10,11,11,12,12,12,13,13, + 13,14,14,14,15,10,11,11,12,12,13,13,14,13,14,14, + 15,14,15,15,10,11,11,12,12,13,12,13,14,14,14,14, + 14,15,15,11,12,12,13,13,13,13,14,14,15,14,15,15, + 16,16,11,12,12,13,13,13,13,14,14,14,15,15,15,16, + 16, +}; + +static const static_codebook _16u2_p8_0 = { + 2, 225, + (char *)_vq_lengthlist__16u2_p8_0, + 1, -520986624, 1620377600, 4, 0, + (long *)_vq_quantlist__16u2_p8_0, + 0 +}; + +static const long _vq_quantlist__16u2_p8_1[] = { + 10, + 9, + 11, + 8, + 12, + 7, + 13, + 6, + 14, + 5, + 15, + 4, + 16, + 3, + 17, + 2, + 18, + 1, + 19, + 0, + 20, +}; + +static const char _vq_lengthlist__16u2_p8_1[] = { + 3, 5, 5, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9,10,10,10,10, 5, 6, 6, 7, 7, 8, + 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, + 7, 7, 8, 8, 9, 8, 9, 9, 9, 9, 9, 9,10,10,10,10, + 10,10,10,10, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, 9, + 9,10, 9,10,10,10, 9,10, 9, 8, 8, 8, 9, 8, 9, 9, + 9, 9,10, 9,10,10,10,10,10,10,10,10,10,10, 8, 8, + 8, 8, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10, + 10,10,10, 8, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10,10, + 10,10,10,10,10,10,10,10, 8, 9, 9, 9, 9, 9, 9, 9, + 10,10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, + 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10, 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10, 9, 9, 9, 9, 9,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, + 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10, 9, 9, 9,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10, 9, 9,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10, 9,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10, 9,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, 9, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10, 9,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10, +}; + +static const static_codebook _16u2_p8_1 = { + 2, 441, + (char *)_vq_lengthlist__16u2_p8_1, + 1, -529268736, 1611661312, 5, 0, + (long *)_vq_quantlist__16u2_p8_1, + 0 +}; + +static const long _vq_quantlist__16u2_p9_0[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__16u2_p9_0[] = { + 1, 5, 3, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 5, + 7, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 5, 7, + 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10, +}; + +static const static_codebook _16u2_p9_0 = { + 2, 225, + (char *)_vq_lengthlist__16u2_p9_0, + 1, -510036736, 1631393792, 4, 0, + (long *)_vq_quantlist__16u2_p9_0, + 0 +}; + +static const long _vq_quantlist__16u2_p9_1[] = { + 9, + 8, + 10, + 7, + 11, + 6, + 12, + 5, + 13, + 4, + 14, + 3, + 15, + 2, + 16, + 1, + 17, + 0, + 18, +}; + +static const char _vq_lengthlist__16u2_p9_1[] = { + 1, 4, 4, 7, 7, 7, 7, 7, 6, 9, 7,10, 8,12,12,13, + 13,14,14, 4, 7, 7, 9, 9, 9, 8, 9, 8,10, 9,11, 9, + 14, 9,14,10,13,11, 4, 7, 7, 9, 9, 9, 9, 8, 9,10, + 10,11,11,12,13,12,13,14,15, 7, 9, 9,10,11,10,10, + 10,10,11,12,13,13,13,14,17,14,15,16, 7, 9, 9,10, + 10,10,10,10,10,11,12,13,13,14,14,15,15,18,18, 8, + 9, 9,11,10,11,11,11,12,13,12,14,14,16,15,15,17, + 18,15, 8, 9, 9,10,10,11,11,11,11,13,13,14,14,15, + 15,15,16,16,18, 7, 9, 8,10,10,11,11,12,12,14,14, + 15,15,16,16,15,17,16,18, 8, 9, 9,10,10,11,12,12, + 12,13,13,16,15,17,16,17,18,17,18, 9,10,10,12,11, + 13,13,14,13,14,14,15,17,16,18,17,18,17,18, 9,10, + 10,12,11,12,13,13,14,15,16,14,15,16,18,18,18,18, + 17,11,11,11,13,13,14,14,16,15,15,15,16,15,15,18, + 18,18,17,16,11,11,12,13,13,15,14,15,16,16,16,17, + 16,15,18,17,18,16,18,12,13,13,15,15,15,16,18,16, + 17,16,17,16,17,17,17,18,18,17,13,13,13,15,13,16, + 15,17,16,16,16,18,18,18,18,16,17,17,18,13,15,14, + 15,15,18,17,18,18,18,16,18,17,18,17,18,16,17,17, + 14,14,14,15,16,17,16,18,18,18,17,18,17,18,18,18, + 16,16,16,14,17,16,17,15,16,18,18,17,18,17,18,17, + 18,18,18,17,18,17,15,16,15,18,15,18,17,16,18,18, + 18,18,18,18,17,18,16,18,17, +}; + +static const static_codebook _16u2_p9_1 = { + 2, 361, + (char *)_vq_lengthlist__16u2_p9_1, + 1, -518287360, 1622704128, 5, 0, + (long *)_vq_quantlist__16u2_p9_1, + 0 +}; + +static const long _vq_quantlist__16u2_p9_2[] = { + 24, + 23, + 25, + 22, + 26, + 21, + 27, + 20, + 28, + 19, + 29, + 18, + 30, + 17, + 31, + 16, + 32, + 15, + 33, + 14, + 34, + 13, + 35, + 12, + 36, + 11, + 37, + 10, + 38, + 9, + 39, + 8, + 40, + 7, + 41, + 6, + 42, + 5, + 43, + 4, + 44, + 3, + 45, + 2, + 46, + 1, + 47, + 0, + 48, +}; + +static const char _vq_lengthlist__16u2_p9_2[] = { + 2, 3, 4, 4, 4, 5, 5, 6, 5, 6, 6, 6, 6, 6, 6, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 7, 8, 8, 8, 8, 8, + 8, +}; + +static const static_codebook _16u2_p9_2 = { + 1, 49, + (char *)_vq_lengthlist__16u2_p9_2, + 1, -526909440, 1611661312, 6, 0, + (long *)_vq_quantlist__16u2_p9_2, + 0 +}; + +static const char _huff_lengthlist__16u2__short[] = { + 8,11,13,13,15,16,19,19,19,19,11, 8, 8, 9, 9,11, + 13,15,19,20,14, 8, 7, 7, 8, 9,12,13,15,20,15, 9, + 6, 5, 5, 7,10,12,14,18,14, 9, 7, 5, 3, 4, 7,10, + 12,16,13,10, 8, 6, 3, 3, 5, 8,11,14,11,10, 9, 7, + 5, 4, 4, 6,11,14,10,10,10, 8, 6, 5, 5, 6,10,14, + 10,10,10, 9, 8, 7, 7, 7,10,14,11,12,12,12,11,10, + 10,10,12,16, +}; + +static const static_codebook _huff_book__16u2__short = { + 2, 100, + (char *)_huff_lengthlist__16u2__short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__8u0__p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__8u0__p1_0[] = { + 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 8, 8, 8,10,10, 7, + 10,10, 5, 8, 8, 7,10,10, 8,10,10, 4, 9, 8, 8,11, + 11, 8,11,11, 7,11,11,10,11,13,10,13,13, 7,11,11, + 10,13,12,10,13,13, 5, 9, 8, 8,11,11, 8,11,11, 7, + 11,11, 9,13,13,10,12,13, 7,11,11,10,13,13,10,13, + 11, +}; + +static const static_codebook _8u0__p1_0 = { + 4, 81, + (char *)_vq_lengthlist__8u0__p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__8u0__p1_0, + 0 +}; + +static const long _vq_quantlist__8u0__p2_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__8u0__p2_0[] = { + 2, 4, 4, 5, 6, 6, 5, 6, 6, 5, 7, 7, 6, 7, 8, 6, + 7, 8, 5, 7, 7, 6, 8, 8, 7, 9, 7, 5, 7, 7, 7, 9, + 9, 7, 8, 8, 6, 9, 8, 7, 7,10, 8,10,10, 6, 8, 8, + 8,10, 8, 8,10,10, 5, 7, 7, 7, 8, 8, 7, 8, 9, 6, + 8, 8, 8,10,10, 8, 8,10, 6, 8, 9, 8,10,10, 7,10, + 8, +}; + +static const static_codebook _8u0__p2_0 = { + 4, 81, + (char *)_vq_lengthlist__8u0__p2_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__8u0__p2_0, + 0 +}; + +static const long _vq_quantlist__8u0__p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__8u0__p3_0[] = { + 1, 5, 5, 7, 7, 6, 7, 7, 9, 9, 6, 7, 7, 9, 9, 8, + 10, 9,11,11, 8, 9, 9,11,11, 6, 8, 8,10,10, 8,10, + 10,11,11, 8,10,10,11,11,10,11,11,12,12,10,11,11, + 12,13, 6, 8, 8,10,10, 8,10,10,11,11, 8,10,10,11, + 11, 9,10,11,12,12,10,11,11,12,12, 8,11,11,14,13, + 10,12,11,15,13,10,12,11,14,14,12,13,12,16,14,12, + 14,12,16,15, 8,11,11,13,14,10,11,12,13,15,10,11, + 12,13,15,11,12,13,14,15,12,12,14,14,16, 5, 8, 8, + 11,11, 9,11,11,12,12, 8,10,11,12,12,11,12,12,15, + 14,11,12,12,14,14, 7,11,10,13,12,10,11,12,13,14, + 10,12,12,14,13,12,13,13,14,15,12,13,13,15,15, 7, + 10,11,12,13,10,12,11,14,13,10,12,13,13,15,12,13, + 12,14,14,11,13,13,15,16, 9,12,12,15,14,11,13,13, + 15,16,11,13,13,16,16,13,14,15,15,15,12,14,15,17, + 16, 9,12,12,14,15,11,13,13,15,16,11,13,13,16,18, + 13,14,14,17,16,13,15,15,17,18, 5, 8, 9,11,11, 8, + 11,11,12,12, 8,10,11,12,12,11,12,12,14,14,11,12, + 12,14,15, 7,11,10,12,13,10,12,12,14,13,10,11,12, + 13,14,11,13,13,15,14,12,13,13,14,15, 7,10,11,13, + 13,10,12,12,13,14,10,12,12,13,13,11,13,13,16,16, + 12,13,13,15,14, 9,12,12,16,15,10,13,13,15,15,11, + 13,13,17,15,12,15,15,18,17,13,14,14,15,16, 9,12, + 12,15,15,11,13,13,15,16,11,13,13,15,15,12,15,15, + 16,16,13,15,14,17,15, 7,11,11,15,15,10,13,13,16, + 15,10,13,13,15,16,14,15,15,17,19,13,15,14,15,18, + 9,12,12,16,16,11,13,14,17,16,11,13,13,17,16,15, + 15,16,17,19,13,15,16, 0,18, 9,12,12,16,15,11,14, + 13,17,17,11,13,14,16,16,15,16,16,19,18,13,15,15, + 17,19,11,14,14,19,16,12,14,15, 0,18,12,16,15,18, + 17,15,15,18,16,19,14,15,17,19,19,11,14,14,18,19, + 13,15,14,19,19,12,16,15,18,17,15,17,15, 0,16,14, + 17,16,19, 0, 7,11,11,14,14,10,12,12,15,15,10,13, + 13,16,15,13,15,15,17, 0,14,15,15,16,19, 9,12,12, + 16,16,11,14,14,16,16,11,13,13,16,16,14,17,16,19, + 0,14,18,17,17,19, 9,12,12,15,16,11,13,13,15,17, + 12,14,13,19,16,13,15,15,17,19,15,17,16,17,19,11, + 14,14,19,16,12,15,15,19,17,13,14,15,17,19,14,16, + 17,19,19,16,15,16,17,19,11,15,14,16,16,12,15,15, + 19, 0,12,14,15,19,19,14,16,16, 0,18,15,19,14,18, + 16, +}; + +static const static_codebook _8u0__p3_0 = { + 4, 625, + (char *)_vq_lengthlist__8u0__p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__8u0__p3_0, + 0 +}; + +static const long _vq_quantlist__8u0__p4_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__8u0__p4_0[] = { + 3, 5, 5, 8, 8, 5, 6, 7, 9, 9, 6, 7, 6, 9, 9, 9, + 9, 9,10,11, 9, 9, 9,11,10, 6, 7, 7,10,10, 7, 7, + 8,10,10, 7, 8, 8,10,10,10,10,10,10,11, 9,10,10, + 11,12, 6, 7, 7,10,10, 7, 8, 8,10,10, 7, 8, 7,10, + 10, 9,10,10,12,11,10,10,10,11,10, 9,10,10,12,11, + 10,10,10,13,11, 9,10,10,12,12,11,11,12,12,13,11, + 11,11,12,13, 9,10,10,12,12,10,10,11,12,12,10,10, + 11,12,12,11,11,11,13,13,11,12,12,13,13, 5, 7, 7, + 10,10, 7, 8, 8,10,10, 7, 8, 8,10,10,10,11,11,12, + 12,10,11,10,12,12, 7, 8, 8,11,11, 7, 8, 9,10,11, + 8, 9, 9,11,11,11,10,11,10,12,10,11,11,12,13, 7, + 8, 8,10,11, 8, 9, 8,12,10, 8, 9, 9,11,12,10,11, + 10,13,11,10,11,11,13,12, 9,11,10,13,12,10,10,11, + 12,12,10,11,11,13,13,12,10,13,11,14,11,12,12,15, + 13, 9,11,11,13,13,10,11,11,13,12,10,11,11,12,14, + 12,13,11,14,12,12,12,12,14,14, 5, 7, 7,10,10, 7, + 8, 8,10,10, 7, 8, 8,11,10,10,11,11,12,12,10,11, + 10,12,12, 7, 8, 8,10,11, 8, 9, 9,12,11, 8, 8, 9, + 10,11,10,11,11,12,13,11,10,11,11,13, 6, 8, 8,10, + 11, 8, 9, 9,11,11, 7, 9, 7,11,10,10,11,11,12,12, + 10,11,10,13,10, 9,11,10,13,12,10,12,11,13,13,10, + 10,11,12,13,11,12,13,15,14,11,11,13,12,13, 9,10, + 11,12,13,10,11,11,12,13,10,11,10,13,12,12,13,13, + 13,14,12,12,11,14,11, 8,10,10,12,13,10,11,11,13, + 13,10,11,10,13,13,12,13,14,15,14,12,12,12,14,13, + 9,10,10,13,12,10,10,12,13,13,10,11,11,15,12,12, + 12,13,15,14,12,13,13,15,13, 9,10,11,12,13,10,12, + 10,13,12,10,11,11,12,13,12,14,12,15,13,12,12,12, + 15,14,11,12,11,14,13,11,11,12,14,14,12,13,13,14, + 13,13,11,15,11,15,14,14,14,16,15,11,12,12,13,14, + 11,13,11,14,14,12,12,13,14,15,12,14,12,15,12,13, + 15,14,16,15, 8,10,10,12,12,10,10,10,12,13,10,11, + 11,13,13,12,12,12,13,14,13,13,13,15,15, 9,10,10, + 12,12,10,11,11,13,12,10,10,11,13,13,12,12,12,14, + 14,12,12,13,15,14, 9,10,10,13,12,10,10,12,12,13, + 10,11,10,13,13,12,13,13,14,14,12,13,12,14,13,11, + 12,12,14,13,12,13,12,14,14,10,12,12,14,14,14,14, + 14,16,14,13,12,14,12,15,10,12,12,14,15,12,13,13, + 14,16,11,12,11,15,14,13,14,14,14,15,13,14,11,14, + 12, +}; + +static const static_codebook _8u0__p4_0 = { + 4, 625, + (char *)_vq_lengthlist__8u0__p4_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__8u0__p4_0, + 0 +}; + +static const long _vq_quantlist__8u0__p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__8u0__p5_0[] = { + 1, 4, 4, 7, 7, 7, 7, 9, 9, 4, 6, 6, 8, 7, 8, 8, + 10,10, 4, 6, 6, 8, 8, 8, 8,10,10, 6, 8, 8, 9, 9, + 9, 9,11,11, 7, 8, 8, 9, 9, 9, 9,11,11, 7, 8, 8, + 9, 9,10,10,12,11, 7, 8, 8, 9, 9,10,10,11,11, 9, + 10,10,11,11,11,12,12,12, 9,10,10,11,11,12,12,12, + 12, +}; + +static const static_codebook _8u0__p5_0 = { + 2, 81, + (char *)_vq_lengthlist__8u0__p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__8u0__p5_0, + 0 +}; + +static const long _vq_quantlist__8u0__p6_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__8u0__p6_0[] = { + 1, 4, 4, 7, 7, 9, 9,11,11,12,12,16,16, 3, 6, 6, + 9, 9,11,11,12,12,13,14,18,16, 3, 6, 7, 9, 9,11, + 11,13,12,14,14,17,16, 7, 9, 9,11,11,12,12,14,14, + 14,14,17,16, 7, 9, 9,11,11,13,12,13,13,14,14,17, + 0, 9,11,11,12,13,14,14,14,13,15,14,17,17, 9,11, + 11,12,12,14,14,13,14,14,15, 0, 0,11,12,12,15,14, + 15,14,15,14,15,16,17, 0,11,12,13,13,13,14,14,15, + 14,15,15, 0, 0,12,14,14,15,15,14,16,15,15,17,16, + 0,18,13,14,14,15,14,15,14,15,16,17,16, 0, 0,17, + 17,18, 0,16,18,16, 0, 0, 0,17, 0, 0,16, 0, 0,16, + 16, 0,15, 0,17, 0, 0, 0, 0, +}; + +static const static_codebook _8u0__p6_0 = { + 2, 169, + (char *)_vq_lengthlist__8u0__p6_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__8u0__p6_0, + 0 +}; + +static const long _vq_quantlist__8u0__p6_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__8u0__p6_1[] = { + 1, 4, 4, 6, 6, 4, 6, 5, 7, 7, 4, 5, 6, 7, 7, 6, + 7, 7, 7, 7, 6, 7, 7, 7, 7, +}; + +static const static_codebook _8u0__p6_1 = { + 2, 25, + (char *)_vq_lengthlist__8u0__p6_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__8u0__p6_1, + 0 +}; + +static const long _vq_quantlist__8u0__p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__8u0__p7_0[] = { + 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, +}; + +static const static_codebook _8u0__p7_0 = { + 4, 81, + (char *)_vq_lengthlist__8u0__p7_0, + 1, -518803456, 1628680192, 2, 0, + (long *)_vq_quantlist__8u0__p7_0, + 0 +}; + +static const long _vq_quantlist__8u0__p7_1[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__8u0__p7_1[] = { + 1, 5, 5, 5, 5,10,10,11,11,11,11,11,11,11,11, 5, + 7, 6, 8, 8, 9,10,11,11,11,11,11,11,11,11, 6, 6, + 7, 9, 7,11,10,11,11,11,11,11,11,11,11, 5, 6, 6, + 11, 8,11,11,11,11,11,11,11,11,11,11, 5, 6, 6, 9, + 10,11,10,11,11,11,11,11,11,11,11, 7,10,10,11,11, + 11,11,11,11,11,11,11,11,11,11, 7,11, 8,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10, +}; + +static const static_codebook _8u0__p7_1 = { + 2, 225, + (char *)_vq_lengthlist__8u0__p7_1, + 1, -520986624, 1620377600, 4, 0, + (long *)_vq_quantlist__8u0__p7_1, + 0 +}; + +static const long _vq_quantlist__8u0__p7_2[] = { + 10, + 9, + 11, + 8, + 12, + 7, + 13, + 6, + 14, + 5, + 15, + 4, + 16, + 3, + 17, + 2, + 18, + 1, + 19, + 0, + 20, +}; + +static const char _vq_lengthlist__8u0__p7_2[] = { + 1, 6, 5, 7, 7, 9, 9, 9, 9,10,12,12,10,11,11,10, + 11,11,11,10,11, 6, 8, 8, 9, 9,10,10, 9,10,11,11, + 10,11,11,11,11,10,11,11,11,11, 6, 7, 8, 9, 9, 9, + 10,11,10,11,12,11,10,11,11,11,11,11,11,12,10, 8, + 9, 9,10, 9,10,10, 9,10,10,10,10,10, 9,10,10,10, + 10, 9,10,10, 9, 9, 9, 9,10,10, 9, 9,10,10,11,10, + 9,12,10,11,10, 9,10,10,10, 8, 9, 9,10, 9,10, 9, + 9,10,10, 9,10, 9,11,10,10,10,10,10, 9,10, 8, 8, + 9, 9,10, 9,11, 9, 8, 9, 9,10,11,10,10,10,11,12, + 9, 9,11, 8, 9, 8,11,10,11,10,10, 9,11,10,10,10, + 10,10,10,10,11,11,11,11, 8, 9, 9, 9,10,10,10,11, + 11,12,11,12,11,10,10,10,12,11,11,11,10, 8,10, 9, + 11,10,10,11,12,10,11,12,11,11,12,11,12,12,10,11, + 11,10, 9, 9,10,11,12,10,10,10,11,10,11,11,10,12, + 12,10,11,10,11,12,10, 9,10,10,11,10,11,11,11,11, + 11,12,11,11,11, 9,11,10,11,10,11,10, 9, 9,10,11, + 11,11,10,10,11,12,12,11,12,11,11,11,12,12,12,12, + 11, 9,11,11,12,10,11,11,11,11,11,11,12,11,11,12, + 11,11,11,10,11,11, 9,11,10,11,11,11,10,10,10,11, + 11,11,12,10,11,10,11,11,11,11,12, 9,11,10,11,11, + 10,10,11,11, 9,11,11,12,10,10,10,10,10,11,11,10, + 9,10,11,11,12,11,10,10,12,11,11,12,11,12,11,11, + 10,10,11,11,10,12,11,10,11,10,11,10,10,10,11,11, + 10,10,11,11,11,11,10,10,10,12,11,11,11,11,10, 9, + 10,11,11,11,12,11,11,11,12,10,11,11,11, 9,10,11, + 11,11,11,11,11,10,10,11,11,12,11,10,11,12,11,10, + 10,11, 9,10,11,11,11,11,11,10,11,11,10,12,11,11, + 11,12,11,11,11,10,10,11,11, +}; + +static const static_codebook _8u0__p7_2 = { + 2, 441, + (char *)_vq_lengthlist__8u0__p7_2, + 1, -529268736, 1611661312, 5, 0, + (long *)_vq_quantlist__8u0__p7_2, + 0 +}; + +static const char _huff_lengthlist__8u0__single[] = { + 4, 7,11, 9,12, 8, 7,10, 6, 4, 5, 5, 7, 5, 6,16, + 9, 5, 5, 6, 7, 7, 9,16, 7, 4, 6, 5, 7, 5, 7,17, + 10, 7, 7, 8, 7, 7, 8,18, 7, 5, 6, 4, 5, 4, 5,15, + 7, 6, 7, 5, 6, 4, 5,15,12,13,18,12,17,11, 9,17, +}; + +static const static_codebook _huff_book__8u0__single = { + 2, 64, + (char *)_huff_lengthlist__8u0__single, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__8u1__p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__8u1__p1_0[] = { + 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 8, 8, 7, 9,10, 7, + 9, 9, 5, 8, 8, 7,10, 9, 7, 9, 9, 5, 8, 8, 8,10, + 10, 8,10,10, 7,10,10, 9,10,12,10,12,12, 7,10,10, + 9,12,11,10,12,12, 5, 8, 8, 8,10,10, 8,10,10, 7, + 10,10,10,12,12, 9,11,12, 7,10,10,10,12,12, 9,12, + 10, +}; + +static const static_codebook _8u1__p1_0 = { + 4, 81, + (char *)_vq_lengthlist__8u1__p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__8u1__p1_0, + 0 +}; + +static const long _vq_quantlist__8u1__p2_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__8u1__p2_0[] = { + 3, 4, 5, 5, 6, 6, 5, 6, 6, 5, 7, 6, 6, 7, 8, 6, + 7, 8, 5, 6, 6, 6, 8, 7, 6, 8, 7, 5, 6, 6, 7, 8, + 8, 6, 7, 7, 6, 8, 7, 7, 7, 9, 8, 9, 9, 6, 7, 8, + 7, 9, 7, 8, 9, 9, 5, 6, 6, 6, 7, 7, 7, 8, 8, 6, + 8, 7, 8, 9, 9, 7, 7, 9, 6, 7, 8, 8, 9, 9, 7, 9, + 7, +}; + +static const static_codebook _8u1__p2_0 = { + 4, 81, + (char *)_vq_lengthlist__8u1__p2_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__8u1__p2_0, + 0 +}; + +static const long _vq_quantlist__8u1__p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__8u1__p3_0[] = { + 1, 5, 5, 7, 7, 6, 7, 7, 9, 9, 6, 7, 7, 9, 9, 8, + 10, 9,11,11, 9, 9, 9,11,11, 6, 8, 8,10,10, 8,10, + 10,11,11, 8, 9,10,11,11,10,11,11,12,12,10,11,11, + 12,13, 6, 8, 8,10,10, 8,10, 9,11,11, 8,10, 9,11, + 11,10,11,11,12,12,10,11,11,12,12, 9,11,11,14,13, + 10,12,11,14,14,10,12,11,14,13,12,13,13,15,14,12, + 13,13,15,14, 8,11,11,13,14,10,11,12,13,15,10,11, + 12,14,14,12,13,13,14,15,12,13,13,14,15, 5, 8, 8, + 11,11, 8,10,10,12,12, 8,10,10,12,12,11,12,12,14, + 13,11,12,12,13,14, 8,10,10,12,12, 9,11,12,13,14, + 10,12,12,13,13,12,12,13,14,14,11,13,13,15,15, 7, + 10,10,12,12, 9,12,11,14,12,10,11,12,13,14,12,13, + 12,14,14,12,13,13,15,16,10,12,12,15,14,11,12,13, + 15,15,11,13,13,15,16,14,14,15,15,16,13,14,15,17, + 15, 9,12,12,14,15,11,13,12,15,15,11,13,13,15,15, + 13,14,13,15,14,13,14,14,17, 0, 5, 8, 8,11,11, 8, + 10,10,12,12, 8,10,10,12,12,11,12,12,14,14,11,12, + 12,14,14, 7,10,10,12,12,10,12,12,13,13, 9,11,12, + 12,13,11,12,13,15,15,11,12,13,14,15, 8,10,10,12, + 12,10,12,11,13,13,10,12,11,13,13,11,13,13,15,14, + 12,13,12,15,13, 9,12,12,14,14,11,13,13,16,15,11, + 12,13,16,15,13,14,15,16,16,13,13,15,15,16,10,12, + 12,15,14,11,13,13,14,16,11,13,13,15,16,13,15,15, + 16,17,13,15,14,16,15, 8,11,11,14,15,10,12,12,15, + 15,10,12,12,15,16,14,15,15,16,17,13,14,14,16,16, + 9,12,12,15,15,11,13,14,15,17,11,13,13,15,16,14, + 15,16,19,17,13,15,15, 0,17, 9,12,12,15,15,11,14, + 13,16,15,11,13,13,15,16,15,15,15,18,17,13,15,15, + 17,17,11,15,14,18,16,12,14,15,17,17,12,15,15,18, + 18,15,15,16,15,19,14,16,16, 0, 0,11,14,14,16,17, + 12,15,14,18,17,12,15,15,18,18,15,17,15,18,16,14, + 16,16,18,18, 7,11,11,14,14,10,12,12,15,15,10,12, + 13,15,15,13,14,15,16,16,14,15,15,18,18, 9,12,12, + 15,15,11,13,13,16,15,11,12,13,16,16,14,15,15,17, + 16,15,16,16,17,17, 9,12,12,15,15,11,13,13,15,17, + 11,14,13,16,15,13,15,15,17,17,15,15,15,18,17,11, + 14,14,17,15,12,14,15,17,18,13,13,15,17,17,14,16, + 16,19,18,16,15,17,17, 0,11,14,14,17,17,12,15,15, + 18, 0,12,15,14,18,16,14,17,17,19, 0,16,18,15, 0, + 16, +}; + +static const static_codebook _8u1__p3_0 = { + 4, 625, + (char *)_vq_lengthlist__8u1__p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__8u1__p3_0, + 0 +}; + +static const long _vq_quantlist__8u1__p4_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__8u1__p4_0[] = { + 4, 5, 5, 9, 9, 6, 7, 7, 9, 9, 6, 7, 7, 9, 9, 9, + 9, 9,11,11, 9, 9, 9,11,11, 6, 7, 7, 9, 9, 7, 7, + 8, 9,10, 7, 7, 8, 9,10, 9, 9,10,10,11, 9, 9,10, + 10,12, 6, 7, 7, 9, 9, 7, 8, 7,10, 9, 7, 8, 7,10, + 9, 9,10, 9,12,11,10,10, 9,12,10, 9,10,10,12,11, + 9,10,10,12,11, 9,10,10,12,12,11,11,12,12,13,11, + 11,12,12,13, 9, 9,10,12,11, 9,10,10,12,12,10,10, + 10,12,12,11,12,11,13,12,11,12,11,13,12, 6, 7, 7, + 9, 9, 7, 8, 8,10,10, 7, 8, 7,10, 9,10,10,10,12, + 12,10,10,10,12,11, 7, 8, 7,10,10, 7, 7, 9,10,11, + 8, 9, 9,11,10,10,10,11,10,12,10,10,11,12,12, 7, + 8, 8,10,10, 7, 9, 8,11,10, 8, 8, 9,11,11,10,11, + 10,12,11,10,11,11,12,12, 9,10,10,12,12, 9,10,10, + 12,12,10,11,11,13,12,11,10,12,10,14,12,12,12,13, + 14, 9,10,10,12,12, 9,11,10,12,12,10,11,11,12,12, + 11,12,11,14,12,12,12,12,14,14, 5, 7, 7, 9, 9, 7, + 7, 7, 9,10, 7, 8, 8,10,10,10,10,10,11,11,10,10, + 10,12,12, 7, 8, 8,10,10, 8, 9, 8,11,10, 7, 8, 9, + 10,11,10,10,10,11,12,10,10,11,11,13, 6, 7, 8,10, + 10, 8, 9, 9,10,10, 7, 9, 7,11,10,10,11,10,12,12, + 10,11,10,12,10, 9,10,10,12,12,10,11,11,13,12, 9, + 10,10,12,12,12,12,12,14,13,11,11,12,11,14, 9,10, + 10,11,12,10,11,11,12,13, 9,10,10,12,12,12,12,12, + 14,13,11,12,10,14,11, 9, 9,10,11,12, 9,10,10,12, + 12, 9,10,10,12,12,12,12,12,14,14,11,12,12,13,12, + 9,10, 9,12,12, 9,10,11,12,13,10,11,10,13,11,12, + 12,13,13,14,12,12,12,13,13, 9,10,10,12,12,10,11, + 10,13,12,10,10,11,12,13,12,13,12,14,13,12,12,12, + 13,14,11,12,11,14,13,10,10,11,13,13,12,12,12,14, + 13,12,10,14,10,15,13,14,14,14,14,11,11,12,13,14, + 10,12,11,13,13,12,12,12,13,15,12,13,11,15,12,13, + 13,14,14,14, 9,10, 9,12,12, 9,10,10,12,12,10,10, + 10,12,12,11,11,12,12,13,12,12,12,14,14, 9,10,10, + 12,12,10,11,10,13,12,10,10,11,12,13,12,12,12,14, + 13,12,12,13,13,14, 9,10,10,12,13,10,10,11,11,12, + 9,11,10,13,12,12,12,12,13,14,12,13,12,14,13,11, + 12,11,13,13,12,13,12,14,13,10,11,12,13,13,13,13, + 13,14,15,12,11,14,12,14,11,11,12,12,13,12,12,12, + 13,14,10,12,10,14,13,13,13,13,14,15,12,14,11,15, + 10, +}; + +static const static_codebook _8u1__p4_0 = { + 4, 625, + (char *)_vq_lengthlist__8u1__p4_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__8u1__p4_0, + 0 +}; + +static const long _vq_quantlist__8u1__p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__8u1__p5_0[] = { + 1, 4, 4, 7, 7, 7, 7, 9, 9, 4, 6, 5, 8, 7, 8, 8, + 10,10, 4, 6, 6, 8, 8, 8, 8,10,10, 7, 8, 8, 9, 9, + 9, 9,11,11, 7, 8, 8, 9, 9, 9, 9,11,11, 8, 8, 8, + 9, 9,10,10,12,11, 8, 8, 8, 9, 9,10,10,11,11, 9, + 10,10,11,11,11,11,13,12, 9,10,10,11,11,12,12,12, + 13, +}; + +static const static_codebook _8u1__p5_0 = { + 2, 81, + (char *)_vq_lengthlist__8u1__p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__8u1__p5_0, + 0 +}; + +static const long _vq_quantlist__8u1__p6_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__8u1__p6_0[] = { + 3, 4, 4, 6, 6, 7, 7, 9, 9, 4, 4, 5, 6, 6, 7, 7, + 9, 9, 4, 4, 4, 6, 6, 7, 7, 9, 9, 6, 6, 6, 7, 7, + 8, 8, 9, 9, 6, 6, 6, 7, 7, 8, 8, 9, 9, 7, 7, 7, + 8, 8, 8, 9,10,10, 7, 7, 7, 8, 8, 9, 8,10,10, 9, + 9, 9, 9, 9,10,10,10,10, 9, 9, 9, 9, 9,10,10,10, + 10, +}; + +static const static_codebook _8u1__p6_0 = { + 2, 81, + (char *)_vq_lengthlist__8u1__p6_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__8u1__p6_0, + 0 +}; + +static const long _vq_quantlist__8u1__p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__8u1__p7_0[] = { + 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 9, 9, 8,10,10, 8, + 10,10, 5, 9, 9, 7,10,10, 8,10,10, 4,10,10, 9,12, + 12, 9,11,11, 7,12,11,10,11,13,10,13,13, 7,12,12, + 10,13,12,10,13,13, 4,10,10, 9,12,12, 9,12,12, 7, + 12,12,10,13,13,10,12,13, 7,11,12,10,13,13,10,13, + 11, +}; + +static const static_codebook _8u1__p7_0 = { + 4, 81, + (char *)_vq_lengthlist__8u1__p7_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__8u1__p7_0, + 0 +}; + +static const long _vq_quantlist__8u1__p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__8u1__p7_1[] = { + 2, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 4, 5, 5, 7, 7, + 8, 8, 9, 9, 9, 9, 4, 5, 5, 7, 7, 8, 8, 9, 9, 9, + 9, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 6, 7, 7, 8, + 8, 8, 8, 9, 9, 9, 9, 8, 8, 8, 8, 8, 9, 9, 9, 9, + 9, 9, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 8, 9, 9, + 9, 9, 9, 9,10,10,10,10, 8, 9, 9, 9, 9, 9, 9,10, + 10,10,10, 8, 9, 9, 9, 9, 9, 9,10,10,10,10, 8, 9, + 9, 9, 9, 9, 9,10,10,10,10, +}; + +static const static_codebook _8u1__p7_1 = { + 2, 121, + (char *)_vq_lengthlist__8u1__p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__8u1__p7_1, + 0 +}; + +static const long _vq_quantlist__8u1__p8_0[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__8u1__p8_0[] = { + 1, 4, 4, 6, 6, 8, 8,10,10,11,11, 4, 6, 6, 7, 7, + 9, 9,11,11,13,12, 4, 6, 6, 7, 7, 9, 9,11,11,12, + 12, 6, 7, 7, 9, 9,11,11,12,12,13,13, 6, 7, 7, 9, + 9,11,11,12,12,13,13, 8, 9, 9,11,11,12,12,13,13, + 14,14, 8, 9, 9,11,11,12,12,13,13,14,14, 9,11,11, + 12,12,13,13,14,14,15,15, 9,11,11,12,12,13,13,14, + 14,15,14,11,12,12,13,13,14,14,15,15,16,16,11,12, + 12,13,13,14,14,15,15,15,15, +}; + +static const static_codebook _8u1__p8_0 = { + 2, 121, + (char *)_vq_lengthlist__8u1__p8_0, + 1, -524582912, 1618345984, 4, 0, + (long *)_vq_quantlist__8u1__p8_0, + 0 +}; + +static const long _vq_quantlist__8u1__p8_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__8u1__p8_1[] = { + 2, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 5, 6, 6, 7, 7, + 7, 7, 8, 8, 8, 8, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, + 8, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 6, 7, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 7, 7, 7, 8, 8, 8, 8, 8, 8, + 8, 8, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 9, 8, 9, 9, 7, 8, 8, 8, 8, 8, 8, 9, + 8, 9, 9, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 8, 8, + 8, 8, 8, 8, 8, 9, 9, 9, 9, +}; + +static const static_codebook _8u1__p8_1 = { + 2, 121, + (char *)_vq_lengthlist__8u1__p8_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__8u1__p8_1, + 0 +}; + +static const long _vq_quantlist__8u1__p9_0[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__8u1__p9_0[] = { + 1, 4, 4,11,11,11,11,11,11,11,11,11,11,11,11, 3, + 11, 8,11,11,11,11,11,11,11,11,11,11,11,11, 3, 9, + 9,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10, +}; + +static const static_codebook _8u1__p9_0 = { + 2, 225, + (char *)_vq_lengthlist__8u1__p9_0, + 1, -514071552, 1627381760, 4, 0, + (long *)_vq_quantlist__8u1__p9_0, + 0 +}; + +static const long _vq_quantlist__8u1__p9_1[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__8u1__p9_1[] = { + 1, 4, 4, 7, 7, 9, 9, 7, 7, 8, 8,10,10,11,11, 4, + 7, 7, 9, 9,10,10, 8, 8,10,10,10,11,10,11, 4, 7, + 7, 9, 9,10,10, 8, 8,10, 9,11,11,11,11, 7, 9, 9, + 12,12,11,12,10,10,11,10,12,11,11,11, 7, 9, 9,11, + 11,13,12, 9, 9,11,10,11,11,12,11, 9,10,10,12,12, + 14,14,10,10,11,12,12,11,11,11, 9,10,11,11,13,14, + 13,10,11,11,11,12,11,12,12, 7, 8, 8,10, 9,11,10, + 11,12,12,11,12,14,12,13, 7, 8, 8, 9,10,10,11,12, + 12,12,11,12,12,12,13, 9, 9, 9,11,11,13,12,12,12, + 12,11,12,12,13,12, 8,10,10,11,10,11,12,12,12,12, + 12,12,14,12,12, 9,11,11,11,12,12,12,12,13,13,12, + 12,13,13,12,10,11,11,12,11,12,12,12,11,12,13,12, + 12,12,13,11,11,12,12,12,13,12,12,11,12,13,13,12, + 12,13,12,11,12,12,13,13,12,13,12,13,13,13,13,14, + 13, +}; + +static const static_codebook _8u1__p9_1 = { + 2, 225, + (char *)_vq_lengthlist__8u1__p9_1, + 1, -522338304, 1620115456, 4, 0, + (long *)_vq_quantlist__8u1__p9_1, + 0 +}; + +static const long _vq_quantlist__8u1__p9_2[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__8u1__p9_2[] = { + 2, 5, 4, 6, 6, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, + 9, 5, 6, 6, 7, 7, 8, 8, 9, 8, 9, 9, 9, 9, 9, 9, + 9, 9, 5, 6, 6, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, + 9,10,10, 9, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9,10,10, 8, 8, 8, 9, 9, 9, 9,10,10,10, 9, + 10,10,10,10,10,10, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, + 10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9,10, + 10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9,10,10,10, + 10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9,10, + 10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9,10, + 10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9,10, + 10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, + 9,10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10, 9,10, + 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10,10, 9, + 10, 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 9, 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10, +}; + +static const static_codebook _8u1__p9_2 = { + 2, 289, + (char *)_vq_lengthlist__8u1__p9_2, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__8u1__p9_2, + 0 +}; + +static const char _huff_lengthlist__8u1__single[] = { + 4, 7,13, 9,15, 9,16, 8,10,13, 7, 5, 8, 6, 9, 7, + 10, 7,10,11,11, 6, 7, 8, 8, 9, 9, 9,12,16, 8, 5, + 8, 6, 8, 6, 9, 7,10,12,11, 7, 7, 7, 6, 7, 7, 7, + 11,15, 7, 5, 8, 6, 7, 5, 7, 6, 9,13,13, 9, 9, 8, + 6, 6, 5, 5, 9,14, 8, 6, 8, 6, 6, 4, 5, 3, 5,13, + 9, 9,11, 8,10, 7, 8, 4, 5,12,11,16,17,15,17,12, + 13, 8, 8,15, +}; + +static const static_codebook _huff_book__8u1__single = { + 2, 100, + (char *)_huff_lengthlist__8u1__single, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44u0__long[] = { + 5, 8,13,10,17,11,11,15, 7, 2, 4, 5, 8, 7, 9,16, + 13, 4, 3, 5, 6, 8,11,20,10, 4, 5, 5, 7, 6, 8,18, + 15, 7, 6, 7, 8,10,14,20,10, 6, 7, 6, 9, 7, 8,17, + 9, 8,10, 8,10, 5, 4,11,12,17,19,14,16,10, 7,12, +}; + +static const static_codebook _huff_book__44u0__long = { + 2, 64, + (char *)_huff_lengthlist__44u0__long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44u0__p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u0__p1_0[] = { + 1, 4, 4, 5, 8, 7, 5, 7, 8, 5, 8, 8, 8,11,11, 8, + 10,10, 5, 8, 8, 8,11,10, 8,11,11, 4, 8, 8, 8,11, + 11, 8,11,11, 8,12,11,11,13,13,11,13,14, 7,11,11, + 10,13,12,11,13,14, 4, 8, 8, 8,11,11, 8,11,12, 8, + 11,11,11,13,13,10,12,13, 8,11,11,11,14,13,11,14, + 13, +}; + +static const static_codebook _44u0__p1_0 = { + 4, 81, + (char *)_vq_lengthlist__44u0__p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u0__p1_0, + 0 +}; + +static const long _vq_quantlist__44u0__p2_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u0__p2_0[] = { + 2, 4, 4, 5, 6, 6, 5, 6, 6, 5, 7, 7, 7, 8, 8, 6, + 8, 8, 5, 7, 7, 6, 8, 8, 7, 8, 8, 4, 7, 7, 7, 8, + 8, 7, 8, 8, 7, 8, 8, 8, 9,10, 8,10,10, 6, 8, 8, + 8,10, 8, 8,10,10, 5, 7, 7, 7, 8, 8, 7, 8, 8, 6, + 8, 8, 8,10,10, 8, 8,10, 6, 8, 8, 8,10,10, 8,10, + 9, +}; + +static const static_codebook _44u0__p2_0 = { + 4, 81, + (char *)_vq_lengthlist__44u0__p2_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u0__p2_0, + 0 +}; + +static const long _vq_quantlist__44u0__p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u0__p3_0[] = { + 1, 5, 5, 8, 8, 5, 8, 7, 9, 9, 5, 7, 8, 9, 9, 9, + 10, 9,12,12, 9, 9,10,12,12, 6, 8, 8,11,10, 8,10, + 10,11,11, 8, 9,10,11,11,10,11,11,14,13,10,11,11, + 13,13, 5, 8, 8,10,10, 8,10,10,11,11, 8,10,10,11, + 11,10,11,11,13,13,10,11,11,13,13, 9,11,11,15,14, + 10,12,12,15,14,10,12,11,15,14,13,14,14,16,16,12, + 14,13,17,15, 9,11,11,14,15,10,11,12,14,16,10,11, + 12,14,16,12,13,14,16,16,13,13,15,15,18, 5, 8, 8, + 11,11, 8,10,10,12,12, 8,10,10,12,13,11,12,12,14, + 14,11,12,12,15,15, 8,10,10,13,13,10,12,12,13,13, + 10,12,12,14,14,12,13,13,15,15,12,13,13,16,16, 7, + 10,10,12,12,10,12,11,13,13,10,12,12,13,14,12,13, + 12,15,14,12,13,13,16,16,10,12,12,17,16,12,13,13, + 16,15,11,13,13,17,17,15,15,15,16,17,14,15,15,19, + 19,10,12,12,15,16,11,13,12,15,18,11,13,13,16,16, + 14,15,15,17,17,14,15,15,17,19, 5, 8, 8,11,11, 8, + 10,10,12,12, 8,10,10,12,12,11,12,12,16,15,11,12, + 12,14,15, 7,10,10,13,13,10,12,12,14,13,10,11,12, + 13,13,12,13,13,16,16,12,12,13,15,15, 8,10,10,13, + 13,10,12,12,14,14,10,12,12,13,13,12,13,13,16,16, + 12,13,13,15,15,10,12,12,16,15,11,13,13,17,16,11, + 12,13,16,15,13,15,15,19,17,14,15,14,17,16,10,12, + 12,16,16,11,13,13,16,17,12,13,13,15,17,14,15,15, + 17,19,14,15,15,17,17, 8,11,11,16,16,10,13,12,17, + 17,10,12,13,16,16,15,17,16,20,19,14,15,17,18,19, + 9,12,12,16,17,11,13,14,17,18,11,13,13,19,18,16, + 17,18,19,19,15,16,16,19,19, 9,12,12,16,17,11,14, + 13,18,17,11,13,13,17,17,16,17,16,20,19,14,16,16, + 18,18,12,15,15,19,17,14,15,16, 0,20,13,15,16,20, + 17,18,16,20, 0, 0,15,16,19,20, 0,12,15,14,18,19, + 13,16,15,20,19,13,16,15,20,18,17,18,17, 0,20,16, + 17,16, 0, 0, 8,11,11,16,15,10,12,12,17,17,10,13, + 13,17,16,14,16,15,18,20,15,16,16,19,19, 9,12,12, + 16,16,11,13,13,17,16,11,13,14,17,18,15,15,16,20, + 20,16,16,17,19,19, 9,13,12,16,17,11,14,13,17,17, + 11,14,14,18,17,14,16,15,18,19,16,17,18,18,19,12, + 14,15,19,18,13,15,16,18, 0,13,14,15, 0, 0,16,16, + 17,20, 0,17,17,20,20, 0,12,15,15,19,20,13,15,15, + 0, 0,14,16,15, 0, 0,15,18,16, 0, 0,17,18,16, 0, + 19, +}; + +static const static_codebook _44u0__p3_0 = { + 4, 625, + (char *)_vq_lengthlist__44u0__p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u0__p3_0, + 0 +}; + +static const long _vq_quantlist__44u0__p4_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u0__p4_0[] = { + 4, 5, 5, 9, 9, 5, 6, 6, 9, 9, 5, 6, 6, 9, 9, 9, + 10, 9,12,12, 9, 9,10,12,12, 5, 7, 7,10,10, 7, 7, + 8,10,10, 6, 7, 8,10,10,10,10,10,11,13,10, 9,10, + 12,13, 5, 7, 7,10,10, 6, 8, 7,10,10, 7, 8, 7,10, + 10, 9,10,10,12,12,10,10,10,13,11, 9,10,10,13,13, + 10,11,10,13,13,10,10,10,13,13,12,12,13,14,14,12, + 12,13,14,14, 9,10,10,13,13,10,10,10,13,13,10,10, + 10,13,13,12,13,12,15,14,12,13,12,15,15, 5, 7, 6, + 10,10, 7, 8, 8,10,10, 7, 8, 8,10,10,10,11,10,13, + 13,10,10,10,12,12, 7, 8, 8,11,10, 8, 8, 9,10,11, + 8, 9, 9,11,11,11,10,11,11,14,11,11,11,13,13, 6, + 8, 8,10,10, 7, 9, 8,11,10, 8, 9, 9,11,11,10,11, + 10,14,11,10,11,11,13,13,10,11,11,14,13,10,10,11, + 14,13,10,11,11,14,14,12,11,13,12,16,13,14,14,15, + 15,10,10,11,13,14,10,11,10,14,13,10,11,11,14,14, + 12,13,12,15,13,13,13,14,15,16, 5, 7, 7,10,10, 7, + 8, 8,10,10, 7, 8, 8,10,10,10,10,10,13,13,10,10, + 11,12,13, 6, 8, 8,11,10, 8, 9, 9,11,11, 7, 8, 9, + 10,11,10,11,11,13,13,10,10,11,11,13, 6, 8, 8,10, + 11, 8, 9, 9,11,11, 8, 9, 8,12,10,10,11,11,13,13, + 10,11,10,14,11,10,10,10,14,13,10,11,11,14,13,10, + 10,11,13,13,12,14,14,16,16,12,12,13,13,15,10,11, + 11,13,14,10,11,11,14,15,10,11,10,13,13,13,14,13, + 16,16,12,13,11,15,12, 9,10,10,13,13,10,11,11,14, + 13,10,10,11,13,14,13,14,13,16,16,13,13,13,15,16, + 9,10,10,13,13,10,10,11,13,14,10,11,11,15,13,13, + 13,14,14,18,13,13,14,16,15, 9,10,10,13,14,10,11, + 10,14,13,10,11,11,13,14,13,14,13,16,15,13,13,14, + 15,16,12,13,12,16,14,11,11,13,15,15,13,14,13,16, + 15,15,12,16,12,17,14,15,15,17,17,12,13,13,14,16, + 11,13,11,16,15,12,13,14,15,16,14,15,13, 0,14,14, + 16,16, 0, 0, 9,10,10,13,13,10,11,10,14,14,10,11, + 11,13,13,12,13,13,14,16,13,14,14,16,16, 9,10,10, + 14,14,11,11,11,14,13,10,10,11,14,14,13,13,13,16, + 16,13,13,14,14,17, 9,10,10,13,14,10,11,11,13,15, + 10,11,10,14,14,13,13,13,14,17,13,14,13,17,14,12, + 13,13,16,14,13,14,13,16,15,12,12,13,15,16,15,15, + 16,18,16,15,13,15,14, 0,12,12,13,14,16,13,13,14, + 15,16,11,12,11,16,14,15,16,16,17,17,14,15,12,17, + 12, +}; + +static const static_codebook _44u0__p4_0 = { + 4, 625, + (char *)_vq_lengthlist__44u0__p4_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u0__p4_0, + 0 +}; + +static const long _vq_quantlist__44u0__p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44u0__p5_0[] = { + 1, 4, 4, 7, 7, 7, 7, 9, 9, 4, 6, 6, 8, 8, 8, 8, + 9, 9, 4, 6, 6, 8, 8, 8, 8, 9, 9, 7, 8, 8, 9, 9, + 9, 9,11,10, 7, 8, 8, 9, 9, 9, 9,10,10, 7, 8, 8, + 9, 9,10,10,11,11, 7, 8, 8, 9, 9,10,10,11,11, 9, + 9, 9,10,10,11,11,12,12, 9, 9, 9,10,11,11,11,12, + 12, +}; + +static const static_codebook _44u0__p5_0 = { + 2, 81, + (char *)_vq_lengthlist__44u0__p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44u0__p5_0, + 0 +}; + +static const long _vq_quantlist__44u0__p6_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u0__p6_0[] = { + 1, 4, 4, 6, 6, 8, 8,10, 9,11,10,14,13, 4, 6, 5, + 8, 8, 9, 9,11,10,11,11,14,14, 4, 5, 6, 8, 8, 9, + 9,10,10,11,11,14,14, 6, 8, 8, 9, 9,10,10,11,11, + 12,12,16,15, 7, 8, 8, 9, 9,10,10,11,11,12,12,15, + 15, 9,10,10,10,10,11,11,12,12,12,12,15,15, 9,10, + 9,10,11,11,11,12,12,12,13,15,15,10,10,11,11,11, + 12,12,13,12,13,13,16,15,10,11,11,11,11,12,12,13, + 12,13,13,16,17,11,11,12,12,12,13,13,13,14,14,15, + 17,17,11,11,12,12,12,13,13,13,14,14,14,16,18,14, + 15,15,15,15,16,16,16,16,17,18, 0, 0,14,15,15,15, + 15,17,16,17,18,17,17,18, 0, +}; + +static const static_codebook _44u0__p6_0 = { + 2, 169, + (char *)_vq_lengthlist__44u0__p6_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44u0__p6_0, + 0 +}; + +static const long _vq_quantlist__44u0__p6_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u0__p6_1[] = { + 2, 4, 4, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, + 6, 6, 6, 6, 5, 6, 6, 6, 6, +}; + +static const static_codebook _44u0__p6_1 = { + 2, 25, + (char *)_vq_lengthlist__44u0__p6_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u0__p6_1, + 0 +}; + +static const long _vq_quantlist__44u0__p7_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u0__p7_0[] = { + 1, 4, 4,11,11, 9,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11, 9,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,10,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10, +}; + +static const static_codebook _44u0__p7_0 = { + 4, 625, + (char *)_vq_lengthlist__44u0__p7_0, + 1, -518709248, 1626677248, 3, 0, + (long *)_vq_quantlist__44u0__p7_0, + 0 +}; + +static const long _vq_quantlist__44u0__p7_1[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u0__p7_1[] = { + 1, 4, 4, 6, 6, 6, 6, 7, 7, 8, 8, 9, 9, 5, 7, 7, + 8, 7, 7, 7, 9, 8,10, 9,10,11, 5, 7, 7, 8, 8, 7, + 7, 8, 9,10,10,11,11, 6, 8, 8, 9, 9, 9, 9,11,10, + 12,12,15,12, 6, 8, 8, 9, 9, 9, 9,11,11,12,11,14, + 12, 7, 8, 8,10,10,12,12,13,13,13,15,13,13, 7, 8, + 8,10,10,11,11,13,12,14,15,15,15, 9,10,10,11,12, + 13,13,14,15,14,15,14,15, 8,10,10,12,12,14,14,15, + 14,14,15,15,14,10,12,12,14,14,15,14,15,15,15,14, + 15,15,10,12,12,13,14,15,14,15,15,14,15,15,15,12, + 15,13,15,14,15,15,15,15,15,15,15,15,13,13,15,15, + 15,15,15,15,15,15,15,15,15, +}; + +static const static_codebook _44u0__p7_1 = { + 2, 169, + (char *)_vq_lengthlist__44u0__p7_1, + 1, -523010048, 1618608128, 4, 0, + (long *)_vq_quantlist__44u0__p7_1, + 0 +}; + +static const long _vq_quantlist__44u0__p7_2[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u0__p7_2[] = { + 2, 5, 4, 6, 6, 7, 7, 8, 8, 8, 8, 9, 8, 5, 5, 6, + 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 5, 6, 5, 7, 7, 8, + 8, 8, 8, 9, 9, 9, 9, 6, 7, 7, 8, 8, 8, 8, 9, 8, + 9, 9, 9, 9, 6, 7, 7, 8, 7, 8, 8, 9, 9, 9, 9, 9, + 9, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 7, 8, + 8, 9, 8, 9, 8, 9, 9, 9, 9, 9, 9, 8, 9, 8, 9, 9, + 9, 9, 9, 9, 9, 9,10,10, 8, 8, 9, 9, 9, 9, 9, 9, + 9, 9,10, 9,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9,10,10,10, 9, 9, 9, 9, 9, + 9, 9, 9,10, 9, 9,10,10, 9, +}; + +static const static_codebook _44u0__p7_2 = { + 2, 169, + (char *)_vq_lengthlist__44u0__p7_2, + 1, -531103744, 1611661312, 4, 0, + (long *)_vq_quantlist__44u0__p7_2, + 0 +}; + +static const char _huff_lengthlist__44u0__short[] = { + 12,13,14,13,17,12,15,17, 5, 5, 6,10,10,11,15,16, + 4, 3, 3, 7, 5, 7,10,16, 7, 7, 7,10, 9,11,12,16, + 6, 5, 5, 9, 5, 6,10,16, 8, 7, 7, 9, 6, 7, 9,16, + 11, 7, 3, 6, 4, 5, 8,16,12, 9, 4, 8, 5, 7, 9,16, +}; + +static const static_codebook _huff_book__44u0__short = { + 2, 64, + (char *)_huff_lengthlist__44u0__short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44u1__long[] = { + 5, 8,13,10,17,11,11,15, 7, 2, 4, 5, 8, 7, 9,16, + 13, 4, 3, 5, 6, 8,11,20,10, 4, 5, 5, 7, 6, 8,18, + 15, 7, 6, 7, 8,10,14,20,10, 6, 7, 6, 9, 7, 8,17, + 9, 8,10, 8,10, 5, 4,11,12,17,19,14,16,10, 7,12, +}; + +static const static_codebook _huff_book__44u1__long = { + 2, 64, + (char *)_huff_lengthlist__44u1__long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44u1__p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u1__p1_0[] = { + 1, 4, 4, 5, 8, 7, 5, 7, 8, 5, 8, 8, 8,11,11, 8, + 10,10, 5, 8, 8, 8,11,10, 8,11,11, 4, 8, 8, 8,11, + 11, 8,11,11, 8,12,11,11,13,13,11,13,14, 7,11,11, + 10,13,12,11,13,14, 4, 8, 8, 8,11,11, 8,11,12, 8, + 11,11,11,13,13,10,12,13, 8,11,11,11,14,13,11,14, + 13, +}; + +static const static_codebook _44u1__p1_0 = { + 4, 81, + (char *)_vq_lengthlist__44u1__p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u1__p1_0, + 0 +}; + +static const long _vq_quantlist__44u1__p2_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u1__p2_0[] = { + 2, 4, 4, 5, 6, 6, 5, 6, 6, 5, 7, 7, 7, 8, 8, 6, + 8, 8, 5, 7, 7, 6, 8, 8, 7, 8, 8, 4, 7, 7, 7, 8, + 8, 7, 8, 8, 7, 8, 8, 8, 9,10, 8,10,10, 6, 8, 8, + 8,10, 8, 8,10,10, 5, 7, 7, 7, 8, 8, 7, 8, 8, 6, + 8, 8, 8,10,10, 8, 8,10, 6, 8, 8, 8,10,10, 8,10, + 9, +}; + +static const static_codebook _44u1__p2_0 = { + 4, 81, + (char *)_vq_lengthlist__44u1__p2_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u1__p2_0, + 0 +}; + +static const long _vq_quantlist__44u1__p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u1__p3_0[] = { + 1, 5, 5, 8, 8, 5, 8, 7, 9, 9, 5, 7, 8, 9, 9, 9, + 10, 9,12,12, 9, 9,10,12,12, 6, 8, 8,11,10, 8,10, + 10,11,11, 8, 9,10,11,11,10,11,11,14,13,10,11,11, + 13,13, 5, 8, 8,10,10, 8,10,10,11,11, 8,10,10,11, + 11,10,11,11,13,13,10,11,11,13,13, 9,11,11,15,14, + 10,12,12,15,14,10,12,11,15,14,13,14,14,16,16,12, + 14,13,17,15, 9,11,11,14,15,10,11,12,14,16,10,11, + 12,14,16,12,13,14,16,16,13,13,15,15,18, 5, 8, 8, + 11,11, 8,10,10,12,12, 8,10,10,12,13,11,12,12,14, + 14,11,12,12,15,15, 8,10,10,13,13,10,12,12,13,13, + 10,12,12,14,14,12,13,13,15,15,12,13,13,16,16, 7, + 10,10,12,12,10,12,11,13,13,10,12,12,13,14,12,13, + 12,15,14,12,13,13,16,16,10,12,12,17,16,12,13,13, + 16,15,11,13,13,17,17,15,15,15,16,17,14,15,15,19, + 19,10,12,12,15,16,11,13,12,15,18,11,13,13,16,16, + 14,15,15,17,17,14,15,15,17,19, 5, 8, 8,11,11, 8, + 10,10,12,12, 8,10,10,12,12,11,12,12,16,15,11,12, + 12,14,15, 7,10,10,13,13,10,12,12,14,13,10,11,12, + 13,13,12,13,13,16,16,12,12,13,15,15, 8,10,10,13, + 13,10,12,12,14,14,10,12,12,13,13,12,13,13,16,16, + 12,13,13,15,15,10,12,12,16,15,11,13,13,17,16,11, + 12,13,16,15,13,15,15,19,17,14,15,14,17,16,10,12, + 12,16,16,11,13,13,16,17,12,13,13,15,17,14,15,15, + 17,19,14,15,15,17,17, 8,11,11,16,16,10,13,12,17, + 17,10,12,13,16,16,15,17,16,20,19,14,15,17,18,19, + 9,12,12,16,17,11,13,14,17,18,11,13,13,19,18,16, + 17,18,19,19,15,16,16,19,19, 9,12,12,16,17,11,14, + 13,18,17,11,13,13,17,17,16,17,16,20,19,14,16,16, + 18,18,12,15,15,19,17,14,15,16, 0,20,13,15,16,20, + 17,18,16,20, 0, 0,15,16,19,20, 0,12,15,14,18,19, + 13,16,15,20,19,13,16,15,20,18,17,18,17, 0,20,16, + 17,16, 0, 0, 8,11,11,16,15,10,12,12,17,17,10,13, + 13,17,16,14,16,15,18,20,15,16,16,19,19, 9,12,12, + 16,16,11,13,13,17,16,11,13,14,17,18,15,15,16,20, + 20,16,16,17,19,19, 9,13,12,16,17,11,14,13,17,17, + 11,14,14,18,17,14,16,15,18,19,16,17,18,18,19,12, + 14,15,19,18,13,15,16,18, 0,13,14,15, 0, 0,16,16, + 17,20, 0,17,17,20,20, 0,12,15,15,19,20,13,15,15, + 0, 0,14,16,15, 0, 0,15,18,16, 0, 0,17,18,16, 0, + 19, +}; + +static const static_codebook _44u1__p3_0 = { + 4, 625, + (char *)_vq_lengthlist__44u1__p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u1__p3_0, + 0 +}; + +static const long _vq_quantlist__44u1__p4_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u1__p4_0[] = { + 4, 5, 5, 9, 9, 5, 6, 6, 9, 9, 5, 6, 6, 9, 9, 9, + 10, 9,12,12, 9, 9,10,12,12, 5, 7, 7,10,10, 7, 7, + 8,10,10, 6, 7, 8,10,10,10,10,10,11,13,10, 9,10, + 12,13, 5, 7, 7,10,10, 6, 8, 7,10,10, 7, 8, 7,10, + 10, 9,10,10,12,12,10,10,10,13,11, 9,10,10,13,13, + 10,11,10,13,13,10,10,10,13,13,12,12,13,14,14,12, + 12,13,14,14, 9,10,10,13,13,10,10,10,13,13,10,10, + 10,13,13,12,13,12,15,14,12,13,12,15,15, 5, 7, 6, + 10,10, 7, 8, 8,10,10, 7, 8, 8,10,10,10,11,10,13, + 13,10,10,10,12,12, 7, 8, 8,11,10, 8, 8, 9,10,11, + 8, 9, 9,11,11,11,10,11,11,14,11,11,11,13,13, 6, + 8, 8,10,10, 7, 9, 8,11,10, 8, 9, 9,11,11,10,11, + 10,14,11,10,11,11,13,13,10,11,11,14,13,10,10,11, + 14,13,10,11,11,14,14,12,11,13,12,16,13,14,14,15, + 15,10,10,11,13,14,10,11,10,14,13,10,11,11,14,14, + 12,13,12,15,13,13,13,14,15,16, 5, 7, 7,10,10, 7, + 8, 8,10,10, 7, 8, 8,10,10,10,10,10,13,13,10,10, + 11,12,13, 6, 8, 8,11,10, 8, 9, 9,11,11, 7, 8, 9, + 10,11,10,11,11,13,13,10,10,11,11,13, 6, 8, 8,10, + 11, 8, 9, 9,11,11, 8, 9, 8,12,10,10,11,11,13,13, + 10,11,10,14,11,10,10,10,14,13,10,11,11,14,13,10, + 10,11,13,13,12,14,14,16,16,12,12,13,13,15,10,11, + 11,13,14,10,11,11,14,15,10,11,10,13,13,13,14,13, + 16,16,12,13,11,15,12, 9,10,10,13,13,10,11,11,14, + 13,10,10,11,13,14,13,14,13,16,16,13,13,13,15,16, + 9,10,10,13,13,10,10,11,13,14,10,11,11,15,13,13, + 13,14,14,18,13,13,14,16,15, 9,10,10,13,14,10,11, + 10,14,13,10,11,11,13,14,13,14,13,16,15,13,13,14, + 15,16,12,13,12,16,14,11,11,13,15,15,13,14,13,16, + 15,15,12,16,12,17,14,15,15,17,17,12,13,13,14,16, + 11,13,11,16,15,12,13,14,15,16,14,15,13, 0,14,14, + 16,16, 0, 0, 9,10,10,13,13,10,11,10,14,14,10,11, + 11,13,13,12,13,13,14,16,13,14,14,16,16, 9,10,10, + 14,14,11,11,11,14,13,10,10,11,14,14,13,13,13,16, + 16,13,13,14,14,17, 9,10,10,13,14,10,11,11,13,15, + 10,11,10,14,14,13,13,13,14,17,13,14,13,17,14,12, + 13,13,16,14,13,14,13,16,15,12,12,13,15,16,15,15, + 16,18,16,15,13,15,14, 0,12,12,13,14,16,13,13,14, + 15,16,11,12,11,16,14,15,16,16,17,17,14,15,12,17, + 12, +}; + +static const static_codebook _44u1__p4_0 = { + 4, 625, + (char *)_vq_lengthlist__44u1__p4_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u1__p4_0, + 0 +}; + +static const long _vq_quantlist__44u1__p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44u1__p5_0[] = { + 1, 4, 4, 7, 7, 7, 7, 9, 9, 4, 6, 6, 8, 8, 8, 8, + 9, 9, 4, 6, 6, 8, 8, 8, 8, 9, 9, 7, 8, 8, 9, 9, + 9, 9,11,10, 7, 8, 8, 9, 9, 9, 9,10,10, 7, 8, 8, + 9, 9,10,10,11,11, 7, 8, 8, 9, 9,10,10,11,11, 9, + 9, 9,10,10,11,11,12,12, 9, 9, 9,10,11,11,11,12, + 12, +}; + +static const static_codebook _44u1__p5_0 = { + 2, 81, + (char *)_vq_lengthlist__44u1__p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44u1__p5_0, + 0 +}; + +static const long _vq_quantlist__44u1__p6_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u1__p6_0[] = { + 1, 4, 4, 6, 6, 8, 8,10, 9,11,10,14,13, 4, 6, 5, + 8, 8, 9, 9,11,10,11,11,14,14, 4, 5, 6, 8, 8, 9, + 9,10,10,11,11,14,14, 6, 8, 8, 9, 9,10,10,11,11, + 12,12,16,15, 7, 8, 8, 9, 9,10,10,11,11,12,12,15, + 15, 9,10,10,10,10,11,11,12,12,12,12,15,15, 9,10, + 9,10,11,11,11,12,12,12,13,15,15,10,10,11,11,11, + 12,12,13,12,13,13,16,15,10,11,11,11,11,12,12,13, + 12,13,13,16,17,11,11,12,12,12,13,13,13,14,14,15, + 17,17,11,11,12,12,12,13,13,13,14,14,14,16,18,14, + 15,15,15,15,16,16,16,16,17,18, 0, 0,14,15,15,15, + 15,17,16,17,18,17,17,18, 0, +}; + +static const static_codebook _44u1__p6_0 = { + 2, 169, + (char *)_vq_lengthlist__44u1__p6_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44u1__p6_0, + 0 +}; + +static const long _vq_quantlist__44u1__p6_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u1__p6_1[] = { + 2, 4, 4, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, + 6, 6, 6, 6, 5, 6, 6, 6, 6, +}; + +static const static_codebook _44u1__p6_1 = { + 2, 25, + (char *)_vq_lengthlist__44u1__p6_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u1__p6_1, + 0 +}; + +static const long _vq_quantlist__44u1__p7_0[] = { + 3, + 2, + 4, + 1, + 5, + 0, + 6, +}; + +static const char _vq_lengthlist__44u1__p7_0[] = { + 1, 3, 2, 9, 9, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, +}; + +static const static_codebook _44u1__p7_0 = { + 2, 49, + (char *)_vq_lengthlist__44u1__p7_0, + 1, -518017024, 1626677248, 3, 0, + (long *)_vq_quantlist__44u1__p7_0, + 0 +}; + +static const long _vq_quantlist__44u1__p7_1[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u1__p7_1[] = { + 1, 4, 4, 6, 6, 6, 6, 7, 7, 8, 8, 9, 9, 5, 7, 7, + 8, 7, 7, 7, 9, 8,10, 9,10,11, 5, 7, 7, 8, 8, 7, + 7, 8, 9,10,10,11,11, 6, 8, 8, 9, 9, 9, 9,11,10, + 12,12,15,12, 6, 8, 8, 9, 9, 9, 9,11,11,12,11,14, + 12, 7, 8, 8,10,10,12,12,13,13,13,15,13,13, 7, 8, + 8,10,10,11,11,13,12,14,15,15,15, 9,10,10,11,12, + 13,13,14,15,14,15,14,15, 8,10,10,12,12,14,14,15, + 14,14,15,15,14,10,12,12,14,14,15,14,15,15,15,14, + 15,15,10,12,12,13,14,15,14,15,15,14,15,15,15,12, + 15,13,15,14,15,15,15,15,15,15,15,15,13,13,15,15, + 15,15,15,15,15,15,15,15,15, +}; + +static const static_codebook _44u1__p7_1 = { + 2, 169, + (char *)_vq_lengthlist__44u1__p7_1, + 1, -523010048, 1618608128, 4, 0, + (long *)_vq_quantlist__44u1__p7_1, + 0 +}; + +static const long _vq_quantlist__44u1__p7_2[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u1__p7_2[] = { + 2, 5, 4, 6, 6, 7, 7, 8, 8, 8, 8, 9, 8, 5, 5, 6, + 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 5, 6, 5, 7, 7, 8, + 8, 8, 8, 9, 9, 9, 9, 6, 7, 7, 8, 8, 8, 8, 9, 8, + 9, 9, 9, 9, 6, 7, 7, 8, 7, 8, 8, 9, 9, 9, 9, 9, + 9, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 7, 8, + 8, 9, 8, 9, 8, 9, 9, 9, 9, 9, 9, 8, 9, 8, 9, 9, + 9, 9, 9, 9, 9, 9,10,10, 8, 8, 9, 9, 9, 9, 9, 9, + 9, 9,10, 9,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9,10,10,10, 9, 9, 9, 9, 9, + 9, 9, 9,10, 9, 9,10,10, 9, +}; + +static const static_codebook _44u1__p7_2 = { + 2, 169, + (char *)_vq_lengthlist__44u1__p7_2, + 1, -531103744, 1611661312, 4, 0, + (long *)_vq_quantlist__44u1__p7_2, + 0 +}; + +static const char _huff_lengthlist__44u1__short[] = { + 12,13,14,13,17,12,15,17, 5, 5, 6,10,10,11,15,16, + 4, 3, 3, 7, 5, 7,10,16, 7, 7, 7,10, 9,11,12,16, + 6, 5, 5, 9, 5, 6,10,16, 8, 7, 7, 9, 6, 7, 9,16, + 11, 7, 3, 6, 4, 5, 8,16,12, 9, 4, 8, 5, 7, 9,16, +}; + +static const static_codebook _huff_book__44u1__short = { + 2, 64, + (char *)_huff_lengthlist__44u1__short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44u2__long[] = { + 5, 9,14,12,15,13,10,13, 7, 4, 5, 6, 8, 7, 8,12, + 13, 4, 3, 5, 5, 6, 9,15,12, 6, 5, 6, 6, 6, 7,14, + 14, 7, 4, 6, 4, 6, 8,15,12, 6, 6, 5, 5, 5, 6,14, + 9, 7, 8, 6, 7, 5, 4,10,10,13,14,14,15,10, 6, 8, +}; + +static const static_codebook _huff_book__44u2__long = { + 2, 64, + (char *)_huff_lengthlist__44u2__long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44u2__p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u2__p1_0[] = { + 1, 4, 4, 5, 8, 7, 5, 7, 8, 5, 8, 8, 8,11,11, 8, + 10,11, 5, 8, 8, 8,11,10, 8,11,11, 4, 8, 8, 8,11, + 11, 8,11,11, 8,11,11,11,13,14,11,13,13, 7,11,11, + 10,13,12,11,14,14, 4, 8, 8, 8,11,11, 8,11,11, 8, + 11,11,11,14,13,10,12,13, 8,11,11,11,13,13,11,13, + 13, +}; + +static const static_codebook _44u2__p1_0 = { + 4, 81, + (char *)_vq_lengthlist__44u2__p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u2__p1_0, + 0 +}; + +static const long _vq_quantlist__44u2__p2_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u2__p2_0[] = { + 2, 5, 5, 5, 6, 6, 5, 6, 6, 5, 6, 6, 7, 8, 8, 6, + 8, 8, 5, 6, 6, 6, 8, 7, 7, 8, 8, 5, 6, 6, 7, 8, + 8, 6, 8, 8, 6, 8, 8, 8, 9,10, 8,10,10, 6, 8, 8, + 7,10, 8, 8,10,10, 5, 6, 6, 6, 8, 8, 7, 8, 8, 6, + 8, 8, 8,10,10, 8, 8,10, 6, 8, 8, 8,10,10, 8,10, + 9, +}; + +static const static_codebook _44u2__p2_0 = { + 4, 81, + (char *)_vq_lengthlist__44u2__p2_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u2__p2_0, + 0 +}; + +static const long _vq_quantlist__44u2__p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u2__p3_0[] = { + 2, 4, 4, 7, 8, 5, 7, 7, 9, 9, 5, 7, 7, 9, 9, 8, + 9, 9,12,11, 8, 9, 9,11,12, 5, 7, 7,10,10, 7, 9, + 9,11,11, 7, 9, 9,10,11,10,11,11,13,13, 9,10,11, + 12,13, 5, 7, 7,10,10, 7, 9, 9,11,10, 7, 9, 9,11, + 11, 9,11,10,13,13,10,11,11,13,13, 8,10,10,14,13, + 10,11,11,15,14, 9,11,11,15,14,13,14,13,16,14,12, + 13,13,15,16, 8,10,10,13,14, 9,11,11,14,15,10,11, + 11,14,15,12,13,13,15,15,12,13,14,15,16, 5, 7, 7, + 10,10, 7, 9, 9,11,11, 7, 9, 9,11,12,10,11,11,14, + 13,10,11,11,14,14, 7, 9, 9,12,12, 9,11,11,13,13, + 9,11,11,13,13,12,13,12,14,14,11,12,13,15,15, 7, + 9, 9,12,12, 8,11,10,13,12, 9,11,11,13,13,11,13, + 12,15,13,11,13,13,15,16, 9,12,11,15,15,11,12,12, + 16,15,11,12,13,16,16,13,14,15,16,15,13,15,15,17, + 17, 9,11,11,14,15,10,12,12,15,15,11,13,12,15,16, + 13,15,14,16,16,13,15,15,17,19, 5, 7, 7,10,10, 7, + 9, 9,12,11, 7, 9, 9,11,11,10,11,11,14,14,10,11, + 11,13,14, 7, 9, 9,12,12, 9,11,11,13,13, 9,10,11, + 12,13,11,13,12,16,15,11,12,12,14,15, 7, 9, 9,12, + 12, 9,11,11,13,13, 9,11,11,13,12,11,13,12,15,16, + 12,13,13,15,14, 9,11,11,15,14,11,13,12,16,15,10, + 11,12,15,15,13,14,14,18,17,13,14,14,15,17,10,11, + 11,14,15,11,13,12,15,17,11,13,12,15,16,13,15,14, + 18,17,14,15,15,16,18, 7,10,10,14,14,10,12,12,15, + 15,10,12,12,15,15,14,15,15,18,17,13,15,15,16,16, + 9,11,11,16,15,11,13,13,16,18,11,13,13,16,16,15, + 16,16, 0, 0,14,15,16,18,17, 9,11,11,15,15,10,13, + 12,17,16,11,12,13,16,17,14,15,16,19,19,14,15,15, + 0,20,12,14,14, 0, 0,13,14,16,19,18,13,15,16,20, + 17,16,18, 0, 0, 0,15,16,17,18,19,11,14,14, 0,19, + 12,15,14,17,17,13,15,15, 0, 0,16,17,15,20,19,15, + 17,16,19, 0, 8,10,10,14,15,10,12,11,15,15,10,11, + 12,16,15,13,14,14,19,17,14,15,15, 0, 0, 9,11,11, + 16,15,11,13,13,17,16,10,12,13,16,17,14,15,15,18, + 18,14,15,16,20,19, 9,12,12, 0,15,11,13,13,16,17, + 11,13,13,19,17,14,16,16,18,17,15,16,16,17,19,11, + 14,14,18,18,13,14,15, 0, 0,12,14,15,19,18,15,16, + 19, 0,19,15,16,19,19,17,12,14,14,16,19,13,15,15, + 0,17,13,15,14,18,18,15,16,15, 0,18,16,17,17, 0, + 0, +}; + +static const static_codebook _44u2__p3_0 = { + 4, 625, + (char *)_vq_lengthlist__44u2__p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u2__p3_0, + 0 +}; + +static const long _vq_quantlist__44u2__p4_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u2__p4_0[] = { + 4, 5, 5, 8, 8, 5, 7, 6, 9, 9, 5, 6, 7, 9, 9, 9, + 9, 9,11,11, 9, 9, 9,11,11, 5, 7, 7, 9, 9, 7, 8, + 8,10,10, 7, 7, 8,10,10,10,10,10,11,12, 9,10,10, + 11,12, 5, 7, 7, 9, 9, 6, 8, 7,10,10, 7, 8, 8,10, + 10, 9,10,10,12,11, 9,10,10,12,11, 9,10,10,12,12, + 10,10,10,13,12, 9,10,10,12,13,12,12,12,14,14,11, + 12,12,13,14, 9,10,10,12,12, 9,10,10,12,13,10,10, + 10,12,13,11,12,12,14,13,12,12,12,14,13, 5, 7, 7, + 10, 9, 7, 8, 8,10,10, 7, 8, 8,10,10,10,10,10,12, + 12,10,10,10,12,12, 7, 8, 8,11,10, 8, 8, 9,11,11, + 8, 9, 9,11,11,10,11,11,12,13,10,11,11,13,13, 6, + 8, 8,10,10, 7, 9, 8,11,10, 8, 9, 9,11,11,10,11, + 10,13,11,10,11,11,13,13, 9,10,10,13,13,10,11,11, + 13,13,10,11,11,14,13,12,11,13,12,15,12,13,13,15, + 15, 9,10,10,12,13,10,11,10,13,13,10,11,11,13,13, + 12,13,11,15,13,12,13,13,15,15, 5, 7, 7, 9,10, 7, + 8, 8,10,10, 7, 8, 8,10,10,10,10,10,12,12,10,10, + 11,12,12, 6, 8, 8,10,10, 8, 9, 9,11,11, 7, 8, 9, + 10,11,10,11,11,13,13,10,10,11,11,13, 7, 8, 8,10, + 11, 8, 9, 9,11,11, 8, 9, 8,11,11,10,11,11,13,13, + 10,11,11,13,12, 9,10,10,13,12,10,11,11,14,13,10, + 10,11,13,13,12,13,13,15,15,12,11,13,12,14, 9,10, + 10,12,13,10,11,11,13,14,10,11,11,13,13,12,13,13, + 15,15,12,13,12,15,12, 8, 9, 9,12,12, 9,11,10,13, + 13, 9,10,10,13,13,12,13,13,15,15,12,12,12,14,14, + 9,10,10,13,13,10,11,11,13,14,10,11,11,14,12,13, + 13,14,14,16,12,13,13,15,14, 9,10,10,13,13,10,11, + 10,14,13,10,11,11,13,14,12,14,13,16,14,13,13,13, + 14,15,11,13,12,15,14,11,12,13,14,15,12,13,13,16, + 15,14,12,15,12,16,14,15,15,17,16,11,12,12,14,15, + 11,13,11,15,14,12,13,13,15,16,13,15,12,17,13,14, + 15,15,16,16, 8, 9, 9,12,12, 9,10,10,13,13, 9,10, + 10,13,13,12,13,12,14,14,12,13,13,15,15, 9,10,10, + 13,13,10,11,11,14,13,10,10,11,13,14,12,13,13,15, + 14,12,12,14,14,16, 9,10,10,13,13,10,11,11,13,14, + 10,11,11,14,13,13,13,13,15,15,13,14,13,16,14,11, + 12,12,14,14,12,13,13,16,15,11,12,13,14,15,14,15, + 15,16,16,14,13,15,13,17,11,12,12,14,15,12,13,13, + 15,16,11,13,12,15,15,14,15,14,16,16,14,15,12,17, + 13, +}; + +static const static_codebook _44u2__p4_0 = { + 4, 625, + (char *)_vq_lengthlist__44u2__p4_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u2__p4_0, + 0 +}; + +static const long _vq_quantlist__44u2__p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44u2__p5_0[] = { + 1, 4, 4, 7, 7, 8, 8, 9, 9, 4, 6, 5, 8, 8, 8, 8, + 10,10, 4, 5, 6, 8, 8, 8, 8,10,10, 7, 8, 8, 9, 9, + 9, 9,11,11, 7, 8, 8, 9, 9, 9, 9,11,11, 8, 8, 8, + 9, 9,10,11,12,12, 8, 8, 8, 9, 9,10,10,12,12,10, + 10,10,11,11,12,12,13,13,10,10,10,11,11,12,12,13, + 13, +}; + +static const static_codebook _44u2__p5_0 = { + 2, 81, + (char *)_vq_lengthlist__44u2__p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44u2__p5_0, + 0 +}; + +static const long _vq_quantlist__44u2__p6_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u2__p6_0[] = { + 1, 4, 4, 6, 6, 8, 8,10,10,11,11,14,13, 4, 6, 5, + 8, 8, 9, 9,11,10,12,11,15,14, 4, 5, 6, 8, 8, 9, + 9,11,11,11,11,14,14, 6, 8, 8,10, 9,11,11,11,11, + 12,12,15,15, 6, 8, 8, 9, 9,11,11,11,12,12,12,15, + 15, 8,10,10,11,11,11,11,12,12,13,13,15,16, 8,10, + 10,11,11,11,11,12,12,13,13,16,16,10,11,11,12,12, + 12,12,13,13,13,13,17,16,10,11,11,12,12,12,12,13, + 13,13,14,16,17,11,12,12,13,13,13,13,14,14,15,14, + 18,17,11,12,12,13,13,13,13,14,14,14,15,19,18,14, + 15,15,15,15,16,16,18,19,18,18, 0, 0,14,15,15,16, + 15,17,17,16,18,17,18, 0, 0, +}; + +static const static_codebook _44u2__p6_0 = { + 2, 169, + (char *)_vq_lengthlist__44u2__p6_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44u2__p6_0, + 0 +}; + +static const long _vq_quantlist__44u2__p6_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u2__p6_1[] = { + 2, 4, 4, 5, 5, 4, 5, 5, 6, 5, 4, 5, 5, 5, 6, 5, + 6, 5, 6, 6, 5, 5, 6, 6, 6, +}; + +static const static_codebook _44u2__p6_1 = { + 2, 25, + (char *)_vq_lengthlist__44u2__p6_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u2__p6_1, + 0 +}; + +static const long _vq_quantlist__44u2__p7_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44u2__p7_0[] = { + 1, 3, 2,12,12,12,12,12,12, 4,12,12,12,12,12,12, + 12,12, 5,12,12,12,12,12,12,12,12,12,12,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11, +}; + +static const static_codebook _44u2__p7_0 = { + 2, 81, + (char *)_vq_lengthlist__44u2__p7_0, + 1, -516612096, 1626677248, 4, 0, + (long *)_vq_quantlist__44u2__p7_0, + 0 +}; + +static const long _vq_quantlist__44u2__p7_1[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u2__p7_1[] = { + 1, 4, 4, 7, 6, 7, 6, 8, 7, 9, 7, 9, 8, 4, 7, 6, + 8, 8, 9, 8,10, 9,10,10,11,11, 4, 7, 7, 8, 8, 8, + 8, 9,10,11,11,11,11, 6, 8, 8,10,10,10,10,11,11, + 12,12,12,12, 7, 8, 8,10,10,10,10,11,11,12,12,13, + 13, 7, 9, 9,11,10,12,12,13,13,14,13,14,14, 7, 9, + 9,10,11,11,12,13,13,13,13,16,14, 9,10,10,12,12, + 13,13,14,14,15,16,15,16, 9,10,10,12,12,12,13,14, + 14,14,15,16,15,10,12,12,13,13,15,13,16,16,15,17, + 17,17,10,11,11,12,14,14,14,15,15,17,17,15,17,11, + 12,12,14,14,14,15,15,15,17,16,17,17,10,12,12,13, + 14,14,14,17,15,17,17,17,17, +}; + +static const static_codebook _44u2__p7_1 = { + 2, 169, + (char *)_vq_lengthlist__44u2__p7_1, + 1, -523010048, 1618608128, 4, 0, + (long *)_vq_quantlist__44u2__p7_1, + 0 +}; + +static const long _vq_quantlist__44u2__p7_2[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u2__p7_2[] = { + 2, 5, 5, 6, 6, 7, 7, 8, 7, 8, 8, 8, 8, 5, 6, 6, + 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 5, 6, 6, 7, 7, 8, + 7, 8, 8, 8, 8, 8, 8, 6, 7, 7, 7, 8, 8, 8, 8, 8, + 9, 9, 9, 9, 6, 7, 7, 8, 7, 8, 8, 9, 9, 9, 9, 9, + 9, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 7, 8, + 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, +}; + +static const static_codebook _44u2__p7_2 = { + 2, 169, + (char *)_vq_lengthlist__44u2__p7_2, + 1, -531103744, 1611661312, 4, 0, + (long *)_vq_quantlist__44u2__p7_2, + 0 +}; + +static const char _huff_lengthlist__44u2__short[] = { + 13,15,17,17,15,15,12,17,11, 9, 7,10,10, 9,12,17, + 10, 6, 3, 6, 5, 7,10,17,15,10, 6, 9, 8, 9,11,17, + 15, 8, 4, 7, 3, 5, 9,16,16,10, 5, 8, 4, 5, 8,16, + 13,11, 5, 8, 3, 3, 5,14,13,12, 7,10, 5, 5, 7,14, +}; + +static const static_codebook _huff_book__44u2__short = { + 2, 64, + (char *)_huff_lengthlist__44u2__short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44u3__long[] = { + 6, 9,13,12,14,11,10,13, 8, 4, 5, 7, 8, 7, 8,12, + 11, 4, 3, 5, 5, 7, 9,14,11, 6, 5, 6, 6, 6, 7,13, + 13, 7, 5, 6, 4, 5, 7,14,11, 7, 6, 6, 5, 5, 6,13, + 9, 7, 8, 6, 7, 5, 3, 9, 9,12,13,12,14,10, 6, 7, +}; + +static const static_codebook _huff_book__44u3__long = { + 2, 64, + (char *)_huff_lengthlist__44u3__long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44u3__p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u3__p1_0[] = { + 1, 4, 4, 5, 8, 7, 5, 7, 8, 5, 8, 8, 8,10,11, 8, + 10,11, 5, 8, 8, 8,11,10, 8,11,11, 4, 8, 8, 8,11, + 11, 8,11,11, 8,11,11,11,13,14,11,14,14, 8,11,11, + 10,14,12,11,14,14, 4, 8, 8, 8,11,11, 8,11,11, 7, + 11,11,11,14,14,10,12,14, 8,11,11,11,14,14,11,14, + 13, +}; + +static const static_codebook _44u3__p1_0 = { + 4, 81, + (char *)_vq_lengthlist__44u3__p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u3__p1_0, + 0 +}; + +static const long _vq_quantlist__44u3__p2_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u3__p2_0[] = { + 2, 5, 4, 5, 6, 6, 5, 6, 6, 5, 6, 6, 7, 8, 8, 6, + 8, 8, 5, 6, 6, 6, 8, 8, 7, 8, 8, 5, 7, 6, 7, 8, + 8, 6, 8, 8, 7, 8, 8, 8, 9,10, 8,10,10, 6, 8, 8, + 8,10, 8, 8,10,10, 5, 6, 6, 6, 8, 8, 7, 8, 8, 6, + 8, 8, 8,10,10, 8, 8,10, 7, 8, 8, 8,10,10, 8,10, + 9, +}; + +static const static_codebook _44u3__p2_0 = { + 4, 81, + (char *)_vq_lengthlist__44u3__p2_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u3__p2_0, + 0 +}; + +static const long _vq_quantlist__44u3__p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u3__p3_0[] = { + 2, 4, 4, 7, 7, 5, 7, 7, 9, 9, 5, 7, 7, 9, 9, 8, + 9, 9,12,12, 8, 9, 9,11,12, 5, 7, 7,10,10, 7, 9, + 9,11,11, 7, 9, 9,10,11,10,11,11,13,13, 9,10,11, + 13,13, 5, 7, 7,10,10, 7, 9, 9,11,10, 7, 9, 9,11, + 11, 9,11,10,13,13,10,11,11,14,13, 8,10,10,14,13, + 10,11,11,15,14, 9,11,11,14,14,13,14,13,16,16,12, + 13,13,15,15, 8,10,10,13,14, 9,11,11,14,14,10,11, + 11,14,15,12,13,13,15,15,13,14,14,15,16, 5, 7, 7, + 10,10, 7, 9, 9,11,11, 7, 9, 9,11,12,10,11,11,14, + 14,10,11,11,14,14, 7, 9, 9,12,12, 9,11,11,13,13, + 9,11,11,13,13,12,12,13,15,15,11,12,13,15,16, 7, + 9, 9,11,11, 8,11,10,13,12, 9,11,11,13,13,11,13, + 12,15,13,11,13,13,15,16, 9,12,11,15,14,11,12,13, + 16,15,11,13,13,15,16,14,14,15,17,16,13,15,16, 0, + 17, 9,11,11,15,15,10,13,12,15,15,11,13,13,15,16, + 13,15,13,16,15,14,16,15, 0,19, 5, 7, 7,10,10, 7, + 9, 9,11,11, 7, 9, 9,11,11,10,12,11,14,14,10,11, + 12,14,14, 7, 9, 9,12,12, 9,11,11,14,13, 9,10,11, + 12,13,11,13,13,16,16,11,12,13,13,16, 7, 9, 9,12, + 12, 9,11,11,13,13, 9,11,11,13,13,11,13,13,15,15, + 12,13,12,15,14, 9,11,11,15,14,11,13,12,16,16,10, + 12,12,15,15,13,15,15,17,19,13,14,15,16,17,10,12, + 12,15,15,11,13,13,16,16,11,13,13,15,16,13,15,15, + 0, 0,14,15,15,16,16, 8,10,10,14,14,10,12,12,15, + 15,10,12,11,15,16,14,15,15,19,20,13,14,14,18,16, + 9,11,11,15,15,11,13,13,17,16,11,13,13,16,16,15, + 17,17,20,20,14,15,16,17,20, 9,11,11,15,15,10,13, + 12,16,15,11,13,13,15,17,14,16,15,18, 0,14,16,15, + 18,20,12,14,14, 0, 0,14,14,16, 0, 0,13,16,15, 0, + 0,17,17,18, 0, 0,16,17,19,19, 0,12,14,14,18, 0, + 12,16,14, 0,17,13,15,15,18, 0,16,18,17, 0,17,16, + 18,17, 0, 0, 7,10,10,14,14,10,12,11,15,15,10,12, + 12,16,15,13,15,15,18, 0,14,15,15,17, 0, 9,11,11, + 15,15,11,13,13,16,16,11,12,13,16,16,14,15,16,17, + 17,14,16,16,16,18, 9,11,12,16,16,11,13,13,17,17, + 11,14,13,20,17,15,16,16,19, 0,15,16,17, 0,19,11, + 13,14,17,16,14,15,15,20,18,13,14,15,17,19,16,18, + 18, 0,20,16,16,19,17, 0,12,15,14,17, 0,14,15,15, + 18,19,13,16,15,19,20,15,18,18, 0,20,17, 0,16, 0, + 0, +}; + +static const static_codebook _44u3__p3_0 = { + 4, 625, + (char *)_vq_lengthlist__44u3__p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u3__p3_0, + 0 +}; + +static const long _vq_quantlist__44u3__p4_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u3__p4_0[] = { + 4, 5, 5, 8, 8, 5, 7, 6, 9, 9, 5, 6, 7, 9, 9, 9, + 9, 9,11,11, 9, 9, 9,11,11, 5, 7, 7, 9, 9, 7, 8, + 8,10,10, 7, 7, 8,10,10, 9,10,10,11,12, 9,10,10, + 11,12, 5, 7, 7, 9, 9, 7, 8, 7,10,10, 7, 8, 8,10, + 10, 9,10, 9,12,11, 9,10,10,12,11, 9,10, 9,12,12, + 9,10,10,13,12, 9,10,10,12,13,12,12,12,14,14,11, + 12,12,13,14, 9, 9,10,12,12, 9,10,10,12,12, 9,10, + 10,12,13,11,12,11,14,13,12,12,12,14,13, 5, 7, 7, + 9, 9, 7, 8, 8,10,10, 7, 8, 8,10,10,10,10,10,12, + 12, 9,10,10,12,12, 7, 8, 8,11,10, 8, 8, 9,11,11, + 8, 9, 9,11,11,11,11,11,12,13,10,11,11,13,13, 6, + 8, 8,10,10, 7, 9, 8,11,10, 8, 9, 9,11,11,10,11, + 10,13,11,10,11,11,13,13, 9,11,10,13,12,10,11,11, + 13,13,10,11,11,13,13,12,12,13,12,15,12,13,13,15, + 15, 9,10,10,12,13,10,11,10,13,12,10,11,11,13,14, + 12,13,11,15,13,12,13,13,15,15, 5, 7, 7, 9, 9, 7, + 8, 8,10,10, 7, 8, 8,10,10, 9,10,10,12,12,10,10, + 11,12,12, 6, 8, 8,10,10, 8, 9, 9,11,11, 7, 8, 9, + 10,11,10,11,11,13,13,10,10,11,11,13, 7, 8, 8,10, + 10, 8, 9, 9,11,11, 8, 9, 9,11,11,10,11,11,13,13, + 11,11,11,13,12, 9,10,10,13,12,10,11,11,14,13,10, + 10,11,12,13,12,13,13,15,15,12,11,13,13,14, 9,10, + 11,12,13,10,11,11,13,13,10,11,11,13,13,12,13,13, + 15,15,12,13,12,15,12, 8, 9, 9,12,12, 9,11,10,13, + 13, 9,10,10,13,13,12,13,13,15,14,12,12,12,14,13, + 9,10,10,13,12,10,11,11,13,13,10,11,11,14,12,13, + 13,14,14,16,12,13,13,15,15, 9,10,10,13,13,10,11, + 10,14,13,10,11,11,13,14,12,14,13,15,14,13,13,13, + 15,15,11,13,12,15,14,11,12,13,14,15,12,13,13,16, + 14,14,12,15,12,16,14,15,15,17,15,11,12,12,14,14, + 11,13,11,15,14,12,13,13,15,15,13,15,12,17,13,14, + 15,15,16,16, 8, 9, 9,12,12, 9,10,10,12,13, 9,10, + 10,13,13,12,12,12,14,14,12,13,13,15,15, 9,10,10, + 13,12,10,11,11,14,13,10,10,11,13,14,12,13,13,15, + 15,12,12,13,14,16, 9,10,10,13,13,10,11,11,13,14, + 10,11,11,14,13,12,13,13,14,15,13,14,13,16,14,11, + 12,12,14,14,12,13,13,15,14,11,12,13,14,15,14,15, + 15,16,16,13,13,15,13,16,11,12,12,14,15,12,13,13, + 14,15,11,13,12,15,14,14,15,15,16,16,14,15,12,16, + 13, +}; + +static const static_codebook _44u3__p4_0 = { + 4, 625, + (char *)_vq_lengthlist__44u3__p4_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u3__p4_0, + 0 +}; + +static const long _vq_quantlist__44u3__p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44u3__p5_0[] = { + 2, 3, 3, 6, 6, 7, 7, 9, 9, 4, 5, 5, 7, 7, 8, 8, + 10,10, 4, 5, 5, 7, 7, 8, 8,10,10, 6, 7, 7, 8, 8, + 9, 9,11,10, 6, 7, 7, 8, 8, 9, 9,10,10, 7, 8, 8, + 9, 9,10,10,11,11, 7, 8, 8, 9, 9,10,10,11,11, 9, + 10,10,11,10,11,11,12,12, 9,10,10,10,10,11,11,12, + 12, +}; + +static const static_codebook _44u3__p5_0 = { + 2, 81, + (char *)_vq_lengthlist__44u3__p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44u3__p5_0, + 0 +}; + +static const long _vq_quantlist__44u3__p6_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u3__p6_0[] = { + 1, 4, 4, 6, 6, 8, 8, 9, 9,10,11,13,14, 4, 6, 5, + 8, 8, 9, 9,10,10,11,11,14,14, 4, 6, 6, 8, 8, 9, + 9,10,10,11,11,14,14, 6, 8, 8, 9, 9,10,10,11,11, + 12,12,15,15, 6, 8, 8, 9, 9,10,11,11,11,12,12,15, + 15, 8, 9, 9,11,10,11,11,12,12,13,13,15,16, 8, 9, + 9,10,11,11,11,12,12,13,13,16,16,10,10,11,11,11, + 12,12,13,13,13,14,17,16, 9,10,11,12,11,12,12,13, + 13,13,13,16,18,11,12,11,12,12,13,13,13,14,15,14, + 17,17,11,11,12,12,12,13,13,13,14,14,15,18,17,14, + 15,15,15,15,16,16,17,17,19,18, 0,20,14,15,14,15, + 15,16,16,16,17,18,16,20,18, +}; + +static const static_codebook _44u3__p6_0 = { + 2, 169, + (char *)_vq_lengthlist__44u3__p6_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44u3__p6_0, + 0 +}; + +static const long _vq_quantlist__44u3__p6_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u3__p6_1[] = { + 2, 4, 4, 5, 5, 4, 5, 5, 6, 5, 4, 5, 5, 5, 6, 5, + 6, 5, 6, 6, 5, 5, 6, 6, 6, +}; + +static const static_codebook _44u3__p6_1 = { + 2, 25, + (char *)_vq_lengthlist__44u3__p6_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u3__p6_1, + 0 +}; + +static const long _vq_quantlist__44u3__p7_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44u3__p7_0[] = { + 1, 3, 3,10,10,10,10,10,10, 4,10,10,10,10,10,10, + 10,10, 4,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, +}; + +static const static_codebook _44u3__p7_0 = { + 2, 81, + (char *)_vq_lengthlist__44u3__p7_0, + 1, -515907584, 1627381760, 4, 0, + (long *)_vq_quantlist__44u3__p7_0, + 0 +}; + +static const long _vq_quantlist__44u3__p7_1[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__44u3__p7_1[] = { + 1, 4, 4, 6, 6, 7, 6, 8, 7, 9, 8,10, 9,11,11, 4, + 7, 7, 8, 7, 9, 9,10,10,11,11,11,11,12,12, 4, 7, + 7, 7, 7, 9, 9,10,10,11,11,12,12,12,11, 6, 8, 8, + 9, 9,10,10,11,11,12,12,13,12,13,13, 6, 8, 8, 9, + 9,10,11,11,11,12,12,13,14,13,13, 8, 9, 9,11,11, + 12,12,12,13,14,13,14,14,14,15, 8, 9, 9,11,11,11, + 12,13,14,13,14,15,17,14,15, 9,10,10,12,12,13,13, + 13,14,15,15,15,16,16,16, 9,11,11,12,12,13,13,14, + 14,14,15,16,16,16,16,10,12,12,13,13,14,14,15,15, + 15,16,17,17,17,17,10,12,11,13,13,15,14,15,14,16, + 17,16,16,16,16,11,13,12,14,14,14,14,15,16,17,16, + 17,17,17,17,11,13,12,14,14,14,15,17,16,17,17,17, + 17,17,17,12,13,13,15,16,15,16,17,17,16,16,17,17, + 17,17,12,13,13,15,15,15,16,17,17,17,16,17,16,17, + 17, +}; + +static const static_codebook _44u3__p7_1 = { + 2, 225, + (char *)_vq_lengthlist__44u3__p7_1, + 1, -522338304, 1620115456, 4, 0, + (long *)_vq_quantlist__44u3__p7_1, + 0 +}; + +static const long _vq_quantlist__44u3__p7_2[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44u3__p7_2[] = { + 2, 5, 5, 7, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, + 10,10, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9, 8, 9, 9, 9, + 9,10, 9, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, + 10,10,10,10, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9,10, + 9,10,10,10,10, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, + 10,10,10,10,10,10, 7, 8, 8, 9, 8, 9, 9, 9, 9,10, + 9,10,10,10,10,10,10, 8, 8, 8, 9, 9, 9, 9, 9, 9, + 9,10,10,10,10,10,10,10, 8, 9, 8, 9, 9, 9, 9,10, + 9,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9,10, + 9,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9,10, + 9,10,10,10,10,10,10,10,10,10,10, 9, 9, 9,10, 9, + 10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, + 10,10,10,10,10,10,10,10,10,10,10,10,10,11, 9,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,11, 9, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 9,10,10,10,10,10,10,10,10,10,10,10,11,11,11,10, + 11, +}; + +static const static_codebook _44u3__p7_2 = { + 2, 289, + (char *)_vq_lengthlist__44u3__p7_2, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44u3__p7_2, + 0 +}; + +static const char _huff_lengthlist__44u3__short[] = { + 14,14,14,15,13,15,12,16,10, 8, 7, 9, 9, 8,12,16, + 10, 5, 4, 6, 5, 6, 9,16,14, 8, 6, 8, 7, 8,10,16, + 14, 7, 4, 6, 3, 5, 8,16,15, 9, 5, 7, 4, 4, 7,16, + 13,10, 6, 7, 4, 3, 4,13,13,12, 7, 9, 5, 5, 6,12, +}; + +static const static_codebook _huff_book__44u3__short = { + 2, 64, + (char *)_huff_lengthlist__44u3__short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44u4__long[] = { + 3, 8,12,12,13,12,11,13, 5, 4, 6, 7, 8, 8, 9,13, + 9, 5, 4, 5, 5, 7, 9,13, 9, 6, 5, 6, 6, 7, 8,12, + 12, 7, 5, 6, 4, 5, 8,13,11, 7, 6, 6, 5, 5, 6,12, + 10, 8, 8, 7, 7, 5, 3, 8,10,12,13,12,12, 9, 6, 7, +}; + +static const static_codebook _huff_book__44u4__long = { + 2, 64, + (char *)_huff_lengthlist__44u4__long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44u4__p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u4__p1_0[] = { + 1, 4, 4, 5, 8, 7, 5, 7, 8, 5, 8, 8, 8,10,11, 8, + 10,11, 5, 8, 8, 8,11,10, 8,11,11, 4, 8, 8, 8,11, + 11, 8,11,11, 8,11,11,11,13,14,11,15,14, 8,11,11, + 10,13,12,11,14,14, 4, 8, 8, 8,11,11, 8,11,11, 7, + 11,11,11,15,14,10,12,14, 8,11,11,11,14,14,11,14, + 13, +}; + +static const static_codebook _44u4__p1_0 = { + 4, 81, + (char *)_vq_lengthlist__44u4__p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u4__p1_0, + 0 +}; + +static const long _vq_quantlist__44u4__p2_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u4__p2_0[] = { + 2, 5, 5, 5, 6, 6, 5, 6, 6, 5, 6, 6, 7, 8, 8, 6, + 8, 8, 5, 6, 6, 6, 8, 8, 7, 8, 8, 5, 7, 6, 6, 8, + 8, 6, 8, 8, 6, 8, 8, 8, 9,10, 8,10,10, 6, 8, 8, + 8,10, 8, 8,10,10, 5, 6, 6, 6, 8, 8, 6, 8, 8, 6, + 8, 8, 8,10,10, 8, 8,10, 6, 8, 8, 8,10,10, 8,10, + 9, +}; + +static const static_codebook _44u4__p2_0 = { + 4, 81, + (char *)_vq_lengthlist__44u4__p2_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u4__p2_0, + 0 +}; + +static const long _vq_quantlist__44u4__p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u4__p3_0[] = { + 2, 4, 4, 8, 8, 5, 7, 7, 9, 9, 5, 7, 7, 9, 9, 8, + 10, 9,12,12, 8, 9,10,12,12, 5, 7, 7,10,10, 7, 9, + 9,11,11, 7, 9, 9,11,11,10,12,11,14,14, 9,10,11, + 13,14, 5, 7, 7,10,10, 7, 9, 9,11,11, 7, 9, 9,11, + 11, 9,11,10,14,13,10,11,11,14,14, 8,10,10,14,13, + 10,12,12,15,14, 9,11,11,15,14,13,14,14,17,17,12, + 14,14,16,16, 8,10,10,14,14, 9,11,11,14,15,10,12, + 12,14,15,12,14,13,16,16,13,14,15,15,18, 4, 7, 7, + 10,10, 7, 9, 9,12,11, 7, 9, 9,11,12,10,12,11,15, + 14,10,11,12,14,15, 7, 9, 9,12,12, 9,11,12,13,13, + 9,11,12,13,13,12,13,13,15,16,11,13,13,15,16, 7, + 9, 9,12,12, 9,11,10,13,12, 9,11,12,13,14,11,13, + 12,16,14,12,13,13,15,16,10,12,12,16,15,11,13,13, + 17,16,11,13,13,17,16,14,15,15,17,17,14,16,16,18, + 20, 9,11,11,15,16,11,13,12,16,16,11,13,13,16,17, + 14,15,14,18,16,14,16,16,17,20, 5, 7, 7,10,10, 7, + 9, 9,12,11, 7, 9,10,11,12,10,12,11,15,15,10,12, + 12,14,14, 7, 9, 9,12,12, 9,12,11,14,13, 9,10,11, + 12,13,12,13,14,16,16,11,12,13,14,16, 7, 9, 9,12, + 12, 9,12,11,13,13, 9,12,11,13,13,11,13,13,16,16, + 12,13,13,16,15, 9,11,11,16,14,11,13,13,16,16,11, + 12,13,16,16,14,16,16,17,17,13,14,15,16,17,10,12, + 12,15,15,11,13,13,16,17,11,13,13,16,16,14,16,15, + 19,19,14,15,15,17,18, 8,10,10,14,14,10,12,12,15, + 15,10,12,12,16,16,14,16,15,20,19,13,15,15,17,16, + 9,12,12,16,16,11,13,13,16,18,11,14,13,16,17,16, + 17,16,20, 0,15,16,18,18,20, 9,11,11,15,15,11,14, + 12,17,16,11,13,13,17,17,15,17,15,20,20,14,16,16, + 17, 0,13,15,14,18,16,14,15,16, 0,18,14,16,16, 0, + 0,18,16, 0, 0,20,16,18,18, 0, 0,12,14,14,17,18, + 13,15,14,20,18,14,16,15,19,19,16,20,16, 0,18,16, + 19,17,19, 0, 8,10,10,14,14,10,12,12,16,15,10,12, + 12,16,16,13,15,15,18,17,14,16,16,19, 0, 9,11,11, + 16,15,11,14,13,18,17,11,12,13,17,18,14,17,16,18, + 18,15,16,17,18,18, 9,12,12,16,16,11,13,13,16,18, + 11,14,13,17,17,15,16,16,18,20,16,17,17,20,20,12, + 14,14,18,17,14,16,16, 0,19,13,14,15,18, 0,16, 0, + 0, 0, 0,16,16, 0,19,20,13,15,14, 0, 0,14,16,16, + 18,19,14,16,15, 0,20,16,20,18, 0,20,17,20,17, 0, + 0, +}; + +static const static_codebook _44u4__p3_0 = { + 4, 625, + (char *)_vq_lengthlist__44u4__p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u4__p3_0, + 0 +}; + +static const long _vq_quantlist__44u4__p4_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u4__p4_0[] = { + 4, 5, 5, 8, 8, 5, 7, 6, 9, 9, 5, 6, 7, 9, 9, 9, + 9, 9,11,11, 8, 9, 9,11,11, 5, 7, 7, 9, 9, 7, 8, + 8,10,10, 7, 7, 8,10,10, 9,10,10,11,12, 9,10,10, + 11,12, 5, 7, 7, 9, 9, 7, 8, 7,10,10, 7, 8, 8,10, + 10, 9,10,10,12,11, 9,10,10,12,11, 9,10, 9,12,12, + 9,10,10,13,12, 9,10,10,12,12,12,12,12,14,14,11, + 12,12,13,14, 9, 9,10,12,12, 9,10,10,13,13, 9,10, + 10,12,13,11,12,12,14,13,11,12,12,14,14, 5, 7, 7, + 9, 9, 7, 8, 8,10,10, 7, 8, 8,10,10,10,10,10,12, + 12, 9,10,10,12,12, 7, 8, 8,11,10, 8, 8, 9,11,11, + 8, 9, 9,11,11,11,11,11,12,13,10,11,11,13,13, 6, + 8, 8,10,10, 7, 9, 8,11,10, 8, 9, 9,11,11,10,11, + 10,13,11,10,11,11,13,13, 9,11,10,13,12,10,11,11, + 13,14,10,11,11,14,13,12,12,13,12,15,12,13,13,15, + 15, 9,10,10,12,13,10,11,10,13,12,10,11,11,13,14, + 12,13,11,15,13,13,13,13,15,15, 5, 7, 7, 9, 9, 7, + 8, 8,10,10, 7, 8, 8,10,10, 9,10,10,12,12,10,10, + 11,12,13, 6, 8, 8,10,10, 8, 9, 9,11,11, 7, 8, 9, + 10,11,10,11,11,13,13,10,10,11,11,13, 7, 8, 8,10, + 11, 8, 9, 9,11,11, 8, 9, 8,11,11,10,11,11,13,13, + 11,12,11,13,12, 9,10,10,13,12,10,11,11,14,13,10, + 10,11,12,13,12,13,13,15,15,12,11,13,13,14, 9,10, + 11,12,13,10,11,11,13,14,10,11,11,13,13,12,13,13, + 15,15,12,13,12,15,12, 8, 9, 9,12,12, 9,11,10,13, + 13, 9,10,10,13,13,12,13,13,15,15,12,12,12,14,14, + 9,10,10,13,13,10,11,11,13,14,10,11,11,14,13,13, + 13,14,14,16,13,13,13,15,15, 9,10,10,13,13,10,11, + 10,14,13,10,11,11,13,14,12,14,13,16,14,12,13,13, + 14,15,11,12,12,15,14,11,12,13,14,15,12,13,13,16, + 15,14,12,15,12,16,14,15,15,16,16,11,12,12,14,14, + 11,13,12,15,14,12,13,13,15,16,13,15,13,17,13,14, + 15,15,16,17, 8, 9, 9,12,12, 9,10,10,12,13, 9,10, + 10,13,13,12,12,12,14,14,12,13,13,15,15, 9,10,10, + 13,12,10,11,11,14,13,10,10,11,13,14,13,13,13,15, + 15,12,13,14,14,16, 9,10,10,13,13,10,11,11,13,14, + 10,11,11,14,14,13,13,13,15,15,13,14,13,16,14,11, + 12,12,15,14,12,13,13,16,15,11,12,13,14,15,14,15, + 15,17,16,13,13,15,13,16,11,12,13,14,15,13,13,13, + 15,16,11,13,12,15,14,14,15,15,16,16,14,15,12,17, + 13, +}; + +static const static_codebook _44u4__p4_0 = { + 4, 625, + (char *)_vq_lengthlist__44u4__p4_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u4__p4_0, + 0 +}; + +static const long _vq_quantlist__44u4__p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44u4__p5_0[] = { + 2, 3, 3, 6, 6, 7, 7, 9, 9, 4, 5, 5, 7, 7, 8, 8, + 10, 9, 4, 5, 5, 7, 7, 8, 8,10,10, 6, 7, 7, 8, 8, + 9, 9,11,10, 6, 7, 7, 8, 8, 9, 9,10,11, 7, 8, 8, + 9, 9,10,10,11,11, 7, 8, 8, 9, 9,10,10,11,11, 9, + 10,10,11,10,11,11,12,12, 9,10,10,10,11,11,11,12, + 12, +}; + +static const static_codebook _44u4__p5_0 = { + 2, 81, + (char *)_vq_lengthlist__44u4__p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44u4__p5_0, + 0 +}; + +static const long _vq_quantlist__44u4__p6_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u4__p6_0[] = { + 1, 4, 4, 6, 6, 8, 8, 9, 9,11,10,13,13, 4, 6, 5, + 8, 8, 9, 9,10,10,11,11,14,14, 4, 6, 6, 8, 8, 9, + 9,10,10,11,11,14,14, 6, 8, 8, 9, 9,10,10,11,11, + 12,12,15,15, 6, 8, 8, 9, 9,10,11,11,11,12,12,15, + 15, 8, 9, 9,11,10,11,11,12,12,13,13,16,16, 8, 9, + 9,10,10,11,11,12,12,13,13,16,16,10,10,10,12,11, + 12,12,13,13,14,14,16,16,10,10,10,11,12,12,12,13, + 13,13,14,16,17,11,12,11,12,12,13,13,14,14,15,14, + 18,17,11,11,12,12,12,13,13,14,14,14,15,19,18,14, + 15,14,15,15,17,16,17,17,17,17,21, 0,14,15,15,16, + 16,16,16,17,17,18,17,20,21, +}; + +static const static_codebook _44u4__p6_0 = { + 2, 169, + (char *)_vq_lengthlist__44u4__p6_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44u4__p6_0, + 0 +}; + +static const long _vq_quantlist__44u4__p6_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u4__p6_1[] = { + 2, 4, 4, 5, 5, 4, 5, 5, 6, 5, 4, 5, 5, 5, 6, 5, + 6, 5, 6, 6, 5, 5, 6, 6, 6, +}; + +static const static_codebook _44u4__p6_1 = { + 2, 25, + (char *)_vq_lengthlist__44u4__p6_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u4__p6_1, + 0 +}; + +static const long _vq_quantlist__44u4__p7_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u4__p7_0[] = { + 1, 3, 3,12,12,12,12,12,12,12,12,12,12, 3,12,11, + 12,12,12,12,12,12,12,12,12,12, 4,11,10,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11, +}; + +static const static_codebook _44u4__p7_0 = { + 2, 169, + (char *)_vq_lengthlist__44u4__p7_0, + 1, -514332672, 1627381760, 4, 0, + (long *)_vq_quantlist__44u4__p7_0, + 0 +}; + +static const long _vq_quantlist__44u4__p7_1[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__44u4__p7_1[] = { + 1, 4, 4, 6, 6, 7, 7, 9, 8,10, 8,10, 9,11,11, 4, + 7, 6, 8, 7, 9, 9,10,10,11,10,11,10,12,10, 4, 6, + 7, 8, 8, 9, 9,10,10,11,11,11,11,12,12, 6, 8, 8, + 10, 9,11,10,12,11,12,12,12,12,13,13, 6, 8, 8,10, + 10,10,11,11,11,12,12,13,12,13,13, 8, 9, 9,11,11, + 12,11,12,12,13,13,13,13,13,13, 8, 9, 9,11,11,11, + 12,12,12,13,13,13,13,13,13, 9,10,10,12,11,13,13, + 13,13,14,13,13,14,14,14, 9,10,11,11,12,12,13,13, + 13,13,13,14,15,14,14,10,11,11,12,12,13,13,14,14, + 14,14,14,15,16,16,10,11,11,12,13,13,13,13,15,14, + 14,15,16,15,16,10,12,12,13,13,14,14,14,15,15,15, + 15,15,15,16,11,12,12,13,13,14,14,14,15,15,15,16, + 15,17,16,11,12,12,13,13,13,15,15,14,16,16,16,16, + 16,17,11,12,12,13,13,14,14,15,14,15,15,17,17,16, + 16, +}; + +static const static_codebook _44u4__p7_1 = { + 2, 225, + (char *)_vq_lengthlist__44u4__p7_1, + 1, -522338304, 1620115456, 4, 0, + (long *)_vq_quantlist__44u4__p7_1, + 0 +}; + +static const long _vq_quantlist__44u4__p7_2[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44u4__p7_2[] = { + 2, 5, 5, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, + 9, 9, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, + 10,10,10,10, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9,10, + 9,10, 9,10,10, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, + 10,10,10,10,10,10, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, + 9,10,10,10,10,10,10, 8, 9, 8, 9, 9, 9, 9, 9, 9, + 10,10,10,10,10,10,10,10, 8, 8, 8, 9, 9, 9, 9, 9, + 10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9,10,10, + 10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9,10, + 10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9,10, + 10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, + 10,10,10,10,10,10,10,10,10,11,10,10,10, 9, 9, 9, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, + 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10, 9, + 10, 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 9,10, 9,10,10,10,10,10,10,10,10,10,10,11,10,10, + 10, +}; + +static const static_codebook _44u4__p7_2 = { + 2, 289, + (char *)_vq_lengthlist__44u4__p7_2, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44u4__p7_2, + 0 +}; + +static const char _huff_lengthlist__44u4__short[] = { + 14,17,15,17,16,14,13,16,10, 7, 7,10,13,10,15,16, + 9, 4, 4, 6, 5, 7, 9,16,12, 8, 7, 8, 8, 8,11,16, + 14, 7, 4, 6, 3, 5, 8,15,13, 8, 5, 7, 4, 5, 7,16, + 12, 9, 6, 8, 3, 3, 5,16,14,13, 7,10, 5, 5, 7,15, +}; + +static const static_codebook _huff_book__44u4__short = { + 2, 64, + (char *)_huff_lengthlist__44u4__short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44u5__long[] = { + 3, 8,13,12,14,12,16,11,13,14, 5, 4, 5, 6, 7, 8, + 10, 9,12,15,10, 5, 5, 5, 6, 8, 9, 9,13,15,10, 5, + 5, 6, 6, 7, 8, 8,11,13,12, 7, 5, 6, 4, 6, 7, 7, + 11,14,11, 7, 7, 6, 6, 6, 7, 6,10,14,14, 9, 8, 8, + 6, 7, 7, 7,11,16,11, 8, 8, 7, 6, 6, 7, 4, 7,12, + 10,10,12,10,10, 9,10, 5, 6, 9,10,12,15,13,14,14, + 14, 8, 7, 8, +}; + +static const static_codebook _huff_book__44u5__long = { + 2, 100, + (char *)_huff_lengthlist__44u5__long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44u5__p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u5__p1_0[] = { + 1, 4, 4, 5, 8, 7, 5, 7, 7, 5, 8, 8, 8,10,10, 7, + 9,10, 5, 8, 8, 7,10, 9, 8,10,10, 5, 8, 8, 8,10, + 10, 8,10,10, 8,10,10,10,12,13,10,13,13, 7,10,10, + 10,13,11,10,13,13, 4, 8, 8, 8,11,10, 8,10,10, 7, + 10,10,10,13,13,10,11,13, 8,10,11,10,13,13,10,13, + 12, +}; + +static const static_codebook _44u5__p1_0 = { + 4, 81, + (char *)_vq_lengthlist__44u5__p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u5__p1_0, + 0 +}; + +static const long _vq_quantlist__44u5__p2_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u5__p2_0[] = { + 3, 4, 4, 5, 6, 6, 5, 6, 6, 5, 6, 6, 6, 8, 8, 6, + 7, 8, 5, 6, 6, 6, 8, 7, 6, 8, 8, 5, 6, 6, 6, 8, + 8, 6, 8, 8, 6, 8, 8, 8, 9, 9, 8, 9, 9, 6, 8, 7, + 7, 9, 8, 8, 9, 9, 5, 6, 6, 6, 8, 7, 6, 8, 8, 6, + 8, 7, 8, 9, 9, 7, 8, 9, 6, 8, 8, 8, 9, 9, 8, 9, + 9, +}; + +static const static_codebook _44u5__p2_0 = { + 4, 81, + (char *)_vq_lengthlist__44u5__p2_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u5__p2_0, + 0 +}; + +static const long _vq_quantlist__44u5__p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u5__p3_0[] = { + 2, 4, 5, 8, 8, 5, 7, 6, 9, 9, 5, 6, 7, 9, 9, 8, + 10, 9,13,12, 8, 9,10,12,12, 5, 7, 7,10,10, 7, 9, + 9,11,11, 6, 8, 9,11,11,10,11,11,14,14, 9,10,11, + 13,14, 5, 7, 7, 9,10, 7, 9, 8,11,11, 7, 9, 9,11, + 11, 9,11,10,14,13,10,11,11,14,14, 8,10,10,13,13, + 10,11,11,15,14, 9,11,11,14,14,13,14,14,17,16,12, + 13,13,15,16, 8,10,10,13,13, 9,11,11,14,15,10,11, + 11,14,15,12,14,13,16,16,13,15,14,15,17, 5, 7, 7, + 10,10, 7, 9, 9,11,11, 7, 9, 9,11,11,10,11,11,14, + 14,10,11,12,14,14, 7, 9, 9,12,11, 9,11,11,13,13, + 9,11,11,13,13,12,13,13,15,16,11,12,13,15,16, 6, + 9, 9,11,11, 8,11,10,13,12, 9,11,11,13,14,11,13, + 12,16,14,11,13,13,16,17,10,12,11,15,15,11,13,13, + 16,16,11,13,13,17,16,14,15,15,17,17,14,16,16,17, + 18, 9,11,11,14,15,10,12,12,15,15,11,13,13,16,17, + 13,15,13,17,15,14,15,16,18, 0, 5, 7, 7,10,10, 7, + 9, 9,11,11, 7, 9, 9,11,11,10,11,11,14,14,10,11, + 12,14,15, 6, 9, 9,12,11, 9,11,11,13,13, 8,10,11, + 12,13,11,13,13,16,15,11,12,13,14,15, 7, 9, 9,11, + 12, 9,11,11,13,13, 9,11,11,13,13,11,13,13,15,16, + 11,13,13,15,14, 9,11,11,15,14,11,13,13,17,15,10, + 12,12,15,15,14,16,16,17,17,13,13,15,15,17,10,11, + 12,15,15,11,13,13,16,16,11,13,13,15,15,14,15,15, + 18,18,14,15,15,17,17, 8,10,10,13,13,10,12,11,15, + 15,10,11,12,15,15,14,15,15,18,18,13,14,14,18,18, + 9,11,11,15,16,11,13,13,17,17,11,13,13,16,16,15, + 15,16,17, 0,14,15,17, 0, 0, 9,11,11,15,15,10,13, + 12,18,16,11,13,13,15,16,14,16,15,20,20,14,15,16, + 17, 0,13,14,14,20,16,14,15,16,19,18,14,15,15,19, + 0,18,16, 0,20,20,16,18,18, 0, 0,12,14,14,18,18, + 13,15,14,18,16,14,15,16,18,20,16,19,16, 0,17,17, + 18,18,19, 0, 8,10,10,14,14,10,11,11,14,15,10,11, + 12,15,15,13,15,14,19,17,13,15,15,17, 0, 9,11,11, + 16,15,11,13,13,16,16,10,12,13,15,17,14,16,16,18, + 18,14,15,15,18, 0, 9,11,11,15,15,11,13,13,16,17, + 11,13,13,18,17,14,18,16,18,18,15,17,17,18, 0,12, + 14,14,18,18,14,15,15,20, 0,13,14,15,17, 0,16,18, + 17, 0, 0,16,16, 0,17,20,12,14,14,18,18,14,16,15, + 0,18,14,16,15,18, 0,16,19,17, 0, 0,17,18,16, 0, + 0, +}; + +static const static_codebook _44u5__p3_0 = { + 4, 625, + (char *)_vq_lengthlist__44u5__p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u5__p3_0, + 0 +}; + +static const long _vq_quantlist__44u5__p4_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u5__p4_0[] = { + 4, 5, 5, 8, 8, 6, 7, 6, 9, 9, 6, 6, 7, 9, 9, 8, + 9, 9,11,11, 8, 9, 9,11,11, 6, 7, 7, 9, 9, 7, 8, + 8,10,10, 6, 7, 8, 9,10, 9,10,10,11,12, 9, 9,10, + 11,12, 6, 7, 7, 9, 9, 6, 8, 7,10, 9, 7, 8, 8,10, + 10, 9,10, 9,12,11, 9,10,10,12,11, 8, 9, 9,12,11, + 9,10,10,12,12, 9,10,10,12,12,11,12,12,13,14,11, + 11,12,13,14, 8, 9, 9,11,12, 9,10,10,12,12, 9,10, + 10,12,12,11,12,11,14,13,11,12,12,13,13, 5, 7, 7, + 9, 9, 7, 8, 8,10,10, 7, 8, 8,10,10, 9,10,10,12, + 12, 9,10,10,12,12, 7, 8, 8,10,10, 8, 8, 9,10,11, + 8, 9, 9,11,11,10,10,11,11,13,10,11,11,12,13, 6, + 7, 8,10,10, 7, 9, 8,11,10, 8, 9, 9,11,11,10,11, + 10,13,11,10,11,11,12,12, 9,10,10,12,12,10,10,11, + 12,13,10,11,11,13,13,12,11,13,12,15,12,13,13,14, + 15, 9,10,10,12,12, 9,11,10,13,12,10,11,11,13,13, + 11,13,11,14,12,12,13,13,14,15, 5, 7, 7, 9, 9, 7, + 8, 8,10,10, 7, 8, 8,10,10, 9,10,10,12,12, 9,10, + 10,12,12, 6, 8, 7,10,10, 8, 9, 9,11,11, 7, 8, 9, + 10,11,10,11,11,12,12,10,10,11,11,13, 7, 8, 8,10, + 10, 8, 9, 9,11,11, 8, 9, 8,11,10,10,11,11,13,12, + 10,11,10,13,11, 9,10,10,12,12,10,11,11,13,12, 9, + 10,10,12,13,12,13,13,14,15,11,11,13,12,14, 9,10, + 10,12,12,10,11,11,13,13,10,11,10,13,12,12,13,13, + 14,14,12,13,11,14,12, 8, 9, 9,12,12, 9,10,10,12, + 12, 9,10,10,12,12,12,12,12,14,14,11,12,12,14,13, + 9,10,10,12,12,10,11,11,13,13,10,11,11,13,12,12, + 12,13,14,15,12,13,13,15,14, 9,10,10,12,12,10,11, + 10,13,12,10,11,11,12,13,12,13,12,15,13,12,13,13, + 14,15,11,12,12,14,13,11,12,12,14,15,12,13,13,15, + 14,13,12,14,12,16,13,14,14,15,15,11,11,12,14,14, + 11,12,11,14,13,12,13,13,14,15,13,14,12,16,12,14, + 14,15,16,16, 8, 9, 9,11,12, 9,10,10,12,12, 9,10, + 10,12,13,11,12,12,13,13,12,12,13,14,14, 9,10,10, + 12,12,10,11,10,13,12,10,10,11,12,13,12,13,13,15, + 14,12,12,13,13,15, 9,10,10,12,13,10,11,11,12,13, + 10,11,11,13,13,12,13,13,14,15,12,13,12,15,14,11, + 12,11,14,13,12,13,13,15,14,11,11,12,13,14,14,15, + 14,16,15,13,12,14,13,16,11,12,12,13,14,12,13,13, + 14,15,11,12,11,14,14,14,14,14,15,16,13,15,12,16, + 12, +}; + +static const static_codebook _44u5__p4_0 = { + 4, 625, + (char *)_vq_lengthlist__44u5__p4_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u5__p4_0, + 0 +}; + +static const long _vq_quantlist__44u5__p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44u5__p5_0[] = { + 2, 3, 3, 6, 6, 8, 8,10,10, 4, 5, 5, 8, 7, 8, 8, + 11,10, 3, 5, 5, 7, 8, 8, 8,10,11, 6, 8, 7,10, 9, + 10,10,11,11, 6, 7, 8, 9, 9, 9,10,11,12, 8, 8, 8, + 10,10,11,11,13,12, 8, 8, 9, 9,10,11,11,12,13,10, + 11,10,12,11,13,12,14,14,10,10,11,11,12,12,13,14, + 14, +}; + +static const static_codebook _44u5__p5_0 = { + 2, 81, + (char *)_vq_lengthlist__44u5__p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44u5__p5_0, + 0 +}; + +static const long _vq_quantlist__44u5__p6_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44u5__p6_0[] = { + 3, 4, 4, 5, 5, 7, 7, 9, 9, 4, 5, 4, 6, 6, 7, 7, + 9, 9, 4, 4, 5, 6, 6, 7, 7, 9, 9, 5, 6, 6, 7, 7, + 8, 8,10,10, 6, 6, 6, 7, 7, 8, 8,10,10, 7, 7, 7, + 8, 8, 9, 9,11,10, 7, 7, 7, 8, 8, 9, 9,10,11, 9, + 9, 9,10,10,11,10,11,11, 9, 9, 9,10,10,11,10,11, + 11, +}; + +static const static_codebook _44u5__p6_0 = { + 2, 81, + (char *)_vq_lengthlist__44u5__p6_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44u5__p6_0, + 0 +}; + +static const long _vq_quantlist__44u5__p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u5__p7_0[] = { + 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 9, 9, 8,11,10, 7, + 11,10, 5, 9, 9, 7,10,10, 8,10,11, 4, 9, 9, 9,12, + 12, 9,12,12, 8,12,12,11,12,12,10,12,13, 7,12,12, + 11,12,12,10,12,13, 4, 9, 9, 9,12,12, 9,12,12, 7, + 12,11,10,13,13,11,12,12, 7,12,12,10,13,13,11,12, + 12, +}; + +static const static_codebook _44u5__p7_0 = { + 4, 81, + (char *)_vq_lengthlist__44u5__p7_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44u5__p7_0, + 0 +}; + +static const long _vq_quantlist__44u5__p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44u5__p7_1[] = { + 2, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 4, 5, 5, 7, 7, + 8, 8, 9, 8, 8, 9, 4, 5, 5, 7, 7, 8, 8, 9, 9, 8, + 9, 6, 7, 7, 8, 8, 9, 8, 9, 9, 9, 9, 6, 7, 7, 8, + 8, 9, 9, 9, 9, 9, 9, 7, 8, 8, 9, 9, 9, 9, 9, 9, + 9, 9, 7, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, + 9, 9, 9, 9,10,10,10,10, 8, 9, 9, 9, 9, 9, 9,10, + 10,10,10, 8, 9, 9, 9, 9, 9, 9,10,10,10,10, 8, 9, + 9, 9, 9, 9, 9,10,10,10,10, +}; + +static const static_codebook _44u5__p7_1 = { + 2, 121, + (char *)_vq_lengthlist__44u5__p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44u5__p7_1, + 0 +}; + +static const long _vq_quantlist__44u5__p8_0[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44u5__p8_0[] = { + 1, 4, 4, 6, 6, 8, 8, 9, 9,10,10, 4, 6, 6, 7, 7, + 9, 9,10,10,11,11, 4, 6, 6, 7, 7, 9, 9,10,10,11, + 11, 6, 8, 7, 9, 9,10,10,11,11,13,12, 6, 8, 8, 9, + 9,10,10,11,11,12,13, 8, 9, 9,10,10,12,12,13,12, + 14,13, 8, 9, 9,10,10,12,12,13,13,14,14, 9,11,11, + 12,12,13,13,14,14,15,14, 9,11,11,12,12,13,13,14, + 14,15,14,11,12,12,13,13,14,14,15,14,15,14,11,11, + 12,13,13,14,14,14,14,15,15, +}; + +static const static_codebook _44u5__p8_0 = { + 2, 121, + (char *)_vq_lengthlist__44u5__p8_0, + 1, -524582912, 1618345984, 4, 0, + (long *)_vq_quantlist__44u5__p8_0, + 0 +}; + +static const long _vq_quantlist__44u5__p8_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44u5__p8_1[] = { + 3, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 5, 6, 5, 7, 6, + 7, 7, 8, 8, 8, 8, 5, 5, 5, 6, 6, 7, 7, 8, 8, 8, + 8, 6, 7, 6, 7, 7, 8, 8, 8, 8, 8, 8, 6, 6, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 7, 7, 7, 8, 8, 8, 8, 8, 8, + 8, 8, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, +}; + +static const static_codebook _44u5__p8_1 = { + 2, 121, + (char *)_vq_lengthlist__44u5__p8_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44u5__p8_1, + 0 +}; + +static const long _vq_quantlist__44u5__p9_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u5__p9_0[] = { + 1, 3, 2,12,10,13,13,13,13,13,13,13,13, 4, 9, 9, + 13,13,13,13,13,13,13,13,13,13, 5,10, 9,13,13,13, + 13,13,13,13,13,13,13,12,13,13,13,13,13,13,13,13, + 13,13,13,13,11,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12, +}; + +static const static_codebook _44u5__p9_0 = { + 2, 169, + (char *)_vq_lengthlist__44u5__p9_0, + 1, -514332672, 1627381760, 4, 0, + (long *)_vq_quantlist__44u5__p9_0, + 0 +}; + +static const long _vq_quantlist__44u5__p9_1[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__44u5__p9_1[] = { + 1, 4, 4, 7, 7, 8, 8, 8, 7, 8, 7, 9, 8, 9, 9, 4, + 7, 6, 9, 8,10,10, 9, 8, 9, 9, 9, 9, 9, 8, 5, 6, + 6, 8, 9,10,10, 9, 9, 9,10,10,10,10,11, 7, 8, 8, + 10,10,11,11,10,10,11,11,11,12,11,11, 7, 8, 8,10, + 10,11,11,10,10,11,11,12,11,11,11, 8, 9, 9,11,11, + 12,12,11,11,12,11,12,12,12,12, 8, 9,10,11,11,12, + 12,11,11,12,12,12,12,12,12, 8, 9, 9,10,10,12,11, + 12,12,12,12,12,12,12,13, 8, 9, 9,11,11,11,11,12, + 12,12,12,13,12,13,13, 9,10,10,11,11,12,12,12,13, + 12,13,13,13,14,13, 9,10,10,11,11,12,12,12,13,13, + 12,13,13,14,13, 9,11,10,12,11,13,12,12,13,13,13, + 13,13,13,14, 9,10,10,12,12,12,12,12,13,13,13,13, + 13,14,14,10,11,11,12,12,12,13,13,13,14,14,13,14, + 14,14,10,11,11,12,12,12,12,13,12,13,14,13,14,14, + 14, +}; + +static const static_codebook _44u5__p9_1 = { + 2, 225, + (char *)_vq_lengthlist__44u5__p9_1, + 1, -522338304, 1620115456, 4, 0, + (long *)_vq_quantlist__44u5__p9_1, + 0 +}; + +static const long _vq_quantlist__44u5__p9_2[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44u5__p9_2[] = { + 2, 5, 5, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 5, 6, 6, 7, 7, 8, 8, 9, 8, 9, 9, 9, 9, 9, 9, + 9, 9, 5, 6, 6, 7, 7, 8, 8, 9, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 7, 7, 7, 8, 8, 9, 8, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 7, 7, 7, 8, 8, 9, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, + 9,10, 9,10,10,10, 8, 8, 8, 9, 8, 9, 9, 9, 9, 9, + 9, 9,10, 9,10, 9,10, 8, 9, 9, 9, 9, 9, 9, 9, 9, + 9,10, 9,10,10,10,10,10, 8, 9, 9, 9, 9, 9, 9,10, + 9,10, 9,10,10,10,10,10,10, 9, 9, 9, 9, 9,10, 9, + 10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9, + 9,10, 9,10, 9,10,10,10,10,10,10, 9, 9, 9, 9, 9, + 10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, + 9, 9,10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, + 9,10,10, 9,10,10,10,10,10,10,10,10,10,10, 9, 9, + 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10,10, 9, + 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10,10, + 9, 9, 9,10, 9,10,10,10,10,10,10,10,10,10,10,10, + 10, +}; + +static const static_codebook _44u5__p9_2 = { + 2, 289, + (char *)_vq_lengthlist__44u5__p9_2, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44u5__p9_2, + 0 +}; + +static const char _huff_lengthlist__44u5__short[] = { + 4,10,17,13,17,13,17,17,17,17, 3, 6, 8, 9,11, 9, + 15,12,16,17, 6, 5, 5, 7, 7, 8,10,11,17,17, 7, 8, + 7, 9, 9,10,13,13,17,17, 8, 6, 5, 7, 4, 7, 5, 8, + 14,17, 9, 9, 8, 9, 7, 9, 8,10,16,17,12,10, 7, 8, + 4, 7, 4, 7,16,17,12,11, 9,10, 6, 9, 5, 7,14,17, + 14,13,10,15, 4, 8, 3, 5,14,17,17,14,11,15, 6,10, + 6, 8,15,17, +}; + +static const static_codebook _huff_book__44u5__short = { + 2, 100, + (char *)_huff_lengthlist__44u5__short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44u6__long[] = { + 3, 9,14,13,14,13,16,12,13,14, 5, 4, 6, 6, 8, 9, + 11,10,12,15,10, 5, 5, 6, 6, 8,10,10,13,16,10, 6, + 6, 6, 6, 8, 9, 9,12,14,13, 7, 6, 6, 4, 6, 6, 7, + 11,14,10, 7, 7, 7, 6, 6, 6, 7,10,13,15,10, 9, 8, + 5, 6, 5, 6,10,14,10, 9, 8, 8, 6, 6, 5, 4, 6,11, + 11,11,12,11,10, 9, 9, 5, 5, 9,10,12,15,13,13,13, + 13, 8, 7, 7, +}; + +static const static_codebook _huff_book__44u6__long = { + 2, 100, + (char *)_huff_lengthlist__44u6__long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44u6__p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u6__p1_0[] = { + 1, 4, 4, 4, 8, 7, 5, 7, 7, 5, 8, 8, 8,10,10, 7, + 9,10, 5, 8, 8, 7,10, 9, 8,10,10, 5, 8, 8, 8,10, + 10, 8,10,10, 8,10,10,10,12,13,10,13,13, 7,10,10, + 10,13,11,10,13,13, 5, 8, 8, 8,11,10, 8,10,10, 7, + 10,10,10,13,13,10,11,13, 8,10,11,10,13,13,10,13, + 12, +}; + +static const static_codebook _44u6__p1_0 = { + 4, 81, + (char *)_vq_lengthlist__44u6__p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u6__p1_0, + 0 +}; + +static const long _vq_quantlist__44u6__p2_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u6__p2_0[] = { + 3, 4, 4, 5, 6, 6, 5, 6, 6, 5, 6, 6, 6, 8, 8, 6, + 7, 8, 5, 6, 6, 6, 8, 7, 6, 8, 8, 5, 6, 6, 6, 8, + 8, 6, 8, 8, 6, 8, 8, 8, 9, 9, 8, 9, 9, 6, 7, 7, + 7, 9, 8, 8, 9, 9, 5, 6, 6, 6, 8, 7, 6, 8, 8, 6, + 8, 8, 8, 9, 9, 7, 8, 9, 6, 8, 8, 8, 9, 9, 8, 9, + 9, +}; + +static const static_codebook _44u6__p2_0 = { + 4, 81, + (char *)_vq_lengthlist__44u6__p2_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u6__p2_0, + 0 +}; + +static const long _vq_quantlist__44u6__p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u6__p3_0[] = { + 2, 5, 4, 8, 8, 5, 7, 6, 9, 9, 5, 6, 7, 9, 9, 8, + 9, 9,13,12, 8, 9,10,12,13, 5, 7, 7,10, 9, 7, 9, + 9,11,11, 7, 8, 9,11,11,10,11,11,14,14, 9,10,11, + 13,14, 5, 7, 7, 9,10, 6, 9, 8,11,11, 7, 9, 9,11, + 11, 9,11,10,14,13,10,11,11,14,13, 8,10,10,13,13, + 10,11,11,15,15, 9,11,11,14,14,13,14,14,17,16,12, + 13,14,16,16, 8,10,10,13,14, 9,11,11,14,15,10,11, + 12,14,15,12,14,13,16,15,13,14,14,15,17, 5, 7, 7, + 10,10, 7, 9, 9,11,11, 7, 9, 9,11,11,10,12,11,14, + 14,10,11,11,14,14, 7, 9, 9,12,11, 9,11,11,13,13, + 9,11,11,13,13,11,13,13,14,15,11,12,13,15,16, 6, + 9, 9,11,12, 8,11,10,13,12, 9,11,11,13,14,11,13, + 12,16,14,11,13,13,15,16,10,12,11,14,15,11,13,13, + 15,17,11,13,13,17,16,15,15,16,17,16,14,15,16,18, + 0, 9,11,11,14,15,10,12,12,16,15,11,13,13,16,16, + 13,15,14,18,15,14,16,16, 0, 0, 5, 7, 7,10,10, 7, + 9, 9,11,11, 7, 9, 9,11,11,10,11,11,14,14,10,11, + 12,14,14, 6, 9, 9,11,11, 9,11,11,13,13, 8,10,11, + 12,13,11,13,13,16,15,11,12,13,14,16, 7, 9, 9,11, + 12, 9,11,11,13,13, 9,11,11,13,13,11,13,13,16,15, + 11,13,12,15,15, 9,11,11,15,14,11,13,13,17,16,10, + 12,13,15,16,14,16,16, 0,18,14,14,15,15,17,10,11, + 12,15,15,11,13,13,16,16,11,13,13,16,16,14,16,16, + 19,17,14,15,15,17,17, 8,10,10,14,14,10,12,11,15, + 15,10,11,12,16,15,14,15,15,18,20,13,14,16,17,18, + 9,11,11,15,16,11,13,13,17,17,11,13,13,17,16,15, + 16,16, 0, 0,15,16,16, 0, 0, 9,11,11,15,15,10,13, + 12,17,15,11,13,13,17,16,15,17,15,20,19,15,16,16, + 19, 0,13,15,14, 0,17,14,15,16, 0,20,15,16,16, 0, + 19,17,18, 0, 0, 0,16,17,18, 0, 0,12,14,14,19,18, + 13,15,14, 0,17,14,15,16,19,19,16,18,16, 0,19,19, + 20,17,20, 0, 8,10,10,13,14,10,11,11,15,15,10,12, + 12,15,16,14,15,14,19,16,14,15,15, 0,18, 9,11,11, + 16,15,11,13,13, 0,16,11,12,13,16,17,14,16,17, 0, + 19,15,16,16,18, 0, 9,11,11,15,16,11,13,13,16,16, + 11,14,13,18,17,15,16,16,18,20,15,17,19, 0, 0,12, + 14,14,17,17,14,16,15, 0, 0,13,14,15,19, 0,16,18, + 20, 0, 0,16,16,18,18, 0,12,14,14,17,20,14,16,16, + 19, 0,14,16,14, 0,20,16,20,17, 0, 0,17, 0,15, 0, + 19, +}; + +static const static_codebook _44u6__p3_0 = { + 4, 625, + (char *)_vq_lengthlist__44u6__p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u6__p3_0, + 0 +}; + +static const long _vq_quantlist__44u6__p4_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u6__p4_0[] = { + 4, 5, 5, 8, 8, 6, 7, 6, 9, 9, 6, 6, 7, 9, 9, 8, + 9, 9,11,11, 8, 9, 9,11,11, 6, 7, 7, 9, 9, 7, 8, + 8,10,10, 7, 7, 8, 9,10, 9,10,10,11,11, 9, 9,10, + 11,12, 6, 7, 7, 9, 9, 7, 8, 7,10, 9, 7, 8, 8,10, + 10, 9,10, 9,12,11, 9,10,10,12,11, 8, 9, 9,11,11, + 9,10,10,12,12, 9,10,10,12,12,11,12,12,14,13,11, + 11,12,13,13, 8, 9, 9,11,11, 9,10,10,12,12, 9,10, + 10,12,12,11,12,11,13,12,11,12,12,13,13, 5, 7, 7, + 9, 9, 7, 8, 7,10,10, 7, 7, 8,10,10, 9,10,10,12, + 11, 9,10,10,11,12, 7, 8, 8,10,10, 8, 8, 9,11,11, + 8, 9, 9,11,11,10,10,11,12,13,10,10,11,12,12, 6, + 7, 7,10,10, 7, 9, 8,11,10, 8, 8, 9,10,11,10,11, + 10,13,11,10,11,11,12,12, 9,10,10,12,12,10,10,11, + 13,13,10,11,11,12,13,12,12,12,13,14,12,12,13,14, + 14, 9,10,10,12,12, 9,10,10,13,12,10,11,11,13,13, + 11,12,11,14,12,12,13,13,14,14, 6, 7, 7, 9, 9, 7, + 8, 7,10,10, 7, 8, 8,10,10, 9,10,10,12,11, 9,10, + 10,11,12, 6, 7, 7,10,10, 8, 9, 8,11,10, 7, 8, 9, + 10,11,10,11,11,12,12,10,10,11,11,13, 7, 8, 8,10, + 10, 8, 9, 9,11,11, 8, 9, 8,11,11,10,11,10,13,12, + 10,11,11,13,12, 9,10,10,12,12,10,11,11,13,12, 9, + 10,10,12,13,12,13,12,14,14,11,11,12,12,14, 9,10, + 10,12,12,10,11,11,13,13,10,11,10,13,12,12,12,12, + 14,14,12,13,12,14,13, 8, 9, 9,11,11, 9,10,10,12, + 12, 9,10,10,12,12,11,12,12,14,13,11,12,12,13,14, + 9,10,10,12,12,10,11,11,13,13,10,11,11,13,13,12, + 12,13,14,15,12,12,13,14,14, 9,10,10,12,12, 9,11, + 10,13,12,10,10,11,12,13,12,13,12,14,13,12,12,13, + 14,15,11,12,12,14,13,11,12,12,14,14,12,13,13,14, + 14,13,13,14,14,16,13,14,14,15,15,11,12,11,13,13, + 11,12,11,14,13,12,12,13,14,15,12,14,12,15,12,13, + 14,15,15,16, 8, 9, 9,11,11, 9,10,10,12,12, 9,10, + 10,12,12,11,12,12,14,13,11,12,12,13,13, 9,10,10, + 12,12,10,11,10,13,12, 9,10,11,12,13,12,13,12,14, + 14,12,12,13,13,14, 9,10,10,12,12,10,11,11,13,13, + 10,11,11,13,13,12,13,12,14,14,12,13,13,14,14,11, + 11,11,13,13,12,13,12,14,14,11,11,12,13,14,14,14, + 14,16,15,12,12,14,12,15,11,12,12,13,14,12,13,13, + 14,15,11,12,12,14,14,13,14,14,16,16,13,14,13,16, + 13, +}; + +static const static_codebook _44u6__p4_0 = { + 4, 625, + (char *)_vq_lengthlist__44u6__p4_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u6__p4_0, + 0 +}; + +static const long _vq_quantlist__44u6__p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44u6__p5_0[] = { + 2, 3, 3, 6, 6, 8, 8,10,10, 4, 5, 5, 8, 7, 8, 8, + 11,11, 3, 5, 5, 7, 8, 8, 8,11,11, 6, 8, 7, 9, 9, + 10, 9,12,11, 6, 7, 8, 9, 9, 9,10,11,12, 8, 8, 8, + 10, 9,12,11,13,13, 8, 8, 9, 9,10,11,12,13,13,10, + 11,11,12,12,13,13,14,14,10,10,11,11,12,13,13,14, + 14, +}; + +static const static_codebook _44u6__p5_0 = { + 2, 81, + (char *)_vq_lengthlist__44u6__p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44u6__p5_0, + 0 +}; + +static const long _vq_quantlist__44u6__p6_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44u6__p6_0[] = { + 3, 4, 4, 5, 5, 7, 7, 9, 9, 4, 5, 4, 6, 6, 7, 7, + 9, 9, 4, 4, 5, 6, 6, 7, 8, 9, 9, 5, 6, 6, 7, 7, + 8, 8,10,10, 5, 6, 6, 7, 7, 8, 8,10,10, 7, 8, 7, + 8, 8,10, 9,11,11, 7, 7, 8, 8, 8, 9,10,10,11, 9, + 9, 9,10,10,11,11,12,11, 9, 9, 9,10,10,11,11,11, + 12, +}; + +static const static_codebook _44u6__p6_0 = { + 2, 81, + (char *)_vq_lengthlist__44u6__p6_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44u6__p6_0, + 0 +}; + +static const long _vq_quantlist__44u6__p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u6__p7_0[] = { + 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 9, 8, 7,10,10, 8, + 10,10, 5, 8, 9, 7,10,10, 7,10, 9, 4, 8, 8, 9,11, + 11, 8,11,11, 7,11,11,10,10,13,10,13,13, 7,11,11, + 10,13,12,10,13,13, 5, 9, 8, 8,11,11, 9,11,11, 7, + 11,11,10,13,13,10,12,13, 7,11,11,10,13,13, 9,13, + 10, +}; + +static const static_codebook _44u6__p7_0 = { + 4, 81, + (char *)_vq_lengthlist__44u6__p7_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44u6__p7_0, + 0 +}; + +static const long _vq_quantlist__44u6__p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44u6__p7_1[] = { + 3, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 4, 5, 5, 7, 6, + 8, 8, 8, 8, 8, 8, 4, 5, 5, 6, 7, 8, 8, 8, 8, 8, + 8, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 6, 7, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 7, 8, 8, 8, 8, 8, 8, 9, 9, + 9, 9, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 8, 8, 8, + 8, 8, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 8, 8, + 8, 8, 8, 9, 9, 9, 9, 9, 9, +}; + +static const static_codebook _44u6__p7_1 = { + 2, 121, + (char *)_vq_lengthlist__44u6__p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44u6__p7_1, + 0 +}; + +static const long _vq_quantlist__44u6__p8_0[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44u6__p8_0[] = { + 1, 4, 4, 6, 6, 8, 8, 9, 9,10,10, 4, 6, 6, 7, 7, + 9, 9,10,10,11,11, 4, 6, 6, 7, 7, 9, 9,10,10,11, + 11, 6, 8, 8, 9, 9,10,10,11,11,12,12, 6, 8, 8, 9, + 9,10,10,11,11,12,12, 8, 9, 9,10,10,11,11,12,12, + 13,13, 8, 9, 9,10,10,11,11,12,12,13,13,10,10,10, + 11,11,13,13,13,13,15,14, 9,10,10,12,11,12,13,13, + 13,14,15,11,12,12,13,13,13,13,15,14,15,15,11,11, + 12,13,13,14,14,14,15,15,15, +}; + +static const static_codebook _44u6__p8_0 = { + 2, 121, + (char *)_vq_lengthlist__44u6__p8_0, + 1, -524582912, 1618345984, 4, 0, + (long *)_vq_quantlist__44u6__p8_0, + 0 +}; + +static const long _vq_quantlist__44u6__p8_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44u6__p8_1[] = { + 3, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 5, 6, 5, 7, 7, + 7, 7, 8, 7, 8, 8, 5, 5, 6, 6, 7, 7, 7, 7, 7, 8, + 8, 6, 7, 7, 7, 7, 8, 7, 8, 8, 8, 8, 6, 6, 7, 7, + 7, 7, 8, 8, 8, 8, 8, 7, 7, 7, 8, 8, 8, 8, 8, 8, + 8, 8, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, + 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, +}; + +static const static_codebook _44u6__p8_1 = { + 2, 121, + (char *)_vq_lengthlist__44u6__p8_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44u6__p8_1, + 0 +}; + +static const long _vq_quantlist__44u6__p9_0[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__44u6__p9_0[] = { + 1, 3, 2, 9, 8,15,15,15,15,15,15,15,15,15,15, 4, + 8, 9,13,14,14,14,14,14,14,14,14,14,14,14, 5, 8, + 9,14,14,14,14,14,14,14,14,14,14,14,14,11,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,11,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14, +}; + +static const static_codebook _44u6__p9_0 = { + 2, 225, + (char *)_vq_lengthlist__44u6__p9_0, + 1, -514071552, 1627381760, 4, 0, + (long *)_vq_quantlist__44u6__p9_0, + 0 +}; + +static const long _vq_quantlist__44u6__p9_1[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__44u6__p9_1[] = { + 1, 4, 4, 7, 7, 8, 9, 8, 8, 9, 8, 9, 8, 9, 9, 4, + 7, 6, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 4, 7, + 6, 9, 9,10,10, 9, 9,10,10,10,10,11,11, 7, 9, 8, + 10,10,11,11,10,10,11,11,11,11,11,11, 7, 8, 9,10, + 10,11,11,10,10,11,11,11,11,11,12, 8,10,10,11,11, + 12,12,11,11,12,12,12,12,13,12, 8,10,10,11,11,12, + 11,11,11,11,12,12,12,12,13, 8, 9, 9,11,10,11,11, + 12,12,12,12,13,12,13,12, 8, 9, 9,11,11,11,11,12, + 12,12,12,12,13,13,13, 9,10,10,11,12,12,12,12,12, + 13,13,13,13,13,13, 9,10,10,11,11,12,12,12,12,13, + 13,13,13,14,13,10,10,10,12,11,12,12,13,13,13,13, + 13,13,13,13,10,10,11,11,11,12,12,13,13,13,13,13, + 13,13,13,10,11,11,12,12,13,12,12,13,13,13,13,13, + 13,14,10,11,11,12,12,13,12,13,13,13,14,13,13,14, + 13, +}; + +static const static_codebook _44u6__p9_1 = { + 2, 225, + (char *)_vq_lengthlist__44u6__p9_1, + 1, -522338304, 1620115456, 4, 0, + (long *)_vq_quantlist__44u6__p9_1, + 0 +}; + +static const long _vq_quantlist__44u6__p9_2[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44u6__p9_2[] = { + 3, 5, 5, 7, 7, 8, 8, 8, 8, 8, 8, 9, 8, 8, 9, 9, + 9, 5, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, + 9, 9, 5, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9,10, 9, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9,10, 9, 9, 9,10, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9,10, 9, 9, 9,10, 9, 9,10, 9, + 9, 9, 9, 9, 9, 9, 9, 9,10,10,10, 9,10, 9,10,10, + 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10, 9,10,10, 9, 9, + 10, +}; + +static const static_codebook _44u6__p9_2 = { + 2, 289, + (char *)_vq_lengthlist__44u6__p9_2, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44u6__p9_2, + 0 +}; + +static const char _huff_lengthlist__44u6__short[] = { + 4,11,16,13,17,13,17,16,17,17, 4, 7, 9, 9,13,10, + 16,12,16,17, 7, 6, 5, 7, 8, 9,12,12,16,17, 6, 9, + 7, 9,10,10,15,15,17,17, 6, 7, 5, 7, 5, 7, 7,10, + 16,17, 7, 9, 8, 9, 8,10,11,11,15,17, 7, 7, 7, 8, + 5, 8, 8, 9,15,17, 8, 7, 9, 9, 7, 8, 7, 2, 7,15, + 14,13,13,15, 5,10, 4, 3, 6,17,17,15,13,17, 7,11, + 7, 6, 9,16, +}; + +static const static_codebook _huff_book__44u6__short = { + 2, 100, + (char *)_huff_lengthlist__44u6__short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44u7__long[] = { + 3, 9,14,13,15,14,16,13,13,14, 5, 5, 7, 7, 8, 9, + 11,10,12,15,10, 6, 5, 6, 6, 9,10,10,13,16,10, 6, + 6, 6, 6, 8, 9, 9,12,15,14, 7, 6, 6, 5, 6, 6, 8, + 12,15,10, 8, 7, 7, 6, 7, 7, 7,11,13,14,10, 9, 8, + 5, 6, 4, 5, 9,12,10, 9, 9, 8, 6, 6, 5, 3, 6,11, + 12,11,12,12,10, 9, 8, 5, 5, 8,10,11,15,13,13,13, + 12, 8, 6, 7, +}; + +static const static_codebook _huff_book__44u7__long = { + 2, 100, + (char *)_huff_lengthlist__44u7__long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44u7__p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u7__p1_0[] = { + 1, 4, 4, 4, 7, 7, 5, 7, 7, 5, 8, 8, 8,10,10, 7, + 10,10, 5, 8, 8, 7,10,10, 8,10,10, 5, 8, 8, 8,11, + 10, 8,10,10, 8,10,10,10,12,13,10,13,13, 7,10,10, + 10,13,12,10,13,13, 5, 8, 8, 8,11,10, 8,10,11, 7, + 10,10,10,13,13,10,12,13, 8,11,11,10,13,13,10,13, + 12, +}; + +static const static_codebook _44u7__p1_0 = { + 4, 81, + (char *)_vq_lengthlist__44u7__p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u7__p1_0, + 0 +}; + +static const long _vq_quantlist__44u7__p2_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u7__p2_0[] = { + 3, 4, 4, 5, 6, 6, 5, 6, 6, 5, 6, 6, 6, 8, 8, 6, + 7, 8, 5, 6, 6, 6, 8, 7, 6, 8, 8, 5, 6, 6, 6, 8, + 7, 6, 8, 8, 6, 8, 8, 8, 9, 9, 8, 9, 9, 6, 8, 7, + 7, 9, 8, 8, 9, 9, 5, 6, 6, 6, 8, 7, 6, 8, 8, 6, + 8, 8, 8, 9, 9, 7, 8, 9, 6, 8, 8, 8, 9, 9, 8, 9, + 9, +}; + +static const static_codebook _44u7__p2_0 = { + 4, 81, + (char *)_vq_lengthlist__44u7__p2_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u7__p2_0, + 0 +}; + +static const long _vq_quantlist__44u7__p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u7__p3_0[] = { + 2, 5, 4, 8, 8, 5, 7, 6, 9, 9, 5, 6, 7, 9, 9, 8, + 9, 9,13,12, 8, 9,10,12,13, 5, 7, 7,10, 9, 7, 9, + 9,11,11, 6, 8, 9,11,11,10,11,11,14,14, 9,10,11, + 13,14, 5, 7, 7, 9, 9, 7, 9, 8,11,11, 7, 9, 9,11, + 11, 9,11,10,14,13,10,11,11,14,14, 8,10,10,14,13, + 10,11,12,15,14, 9,11,11,15,14,13,14,14,16,16,12, + 13,14,17,16, 8,10,10,13,13, 9,11,11,14,15,10,11, + 12,14,15,12,14,13,16,16,13,14,15,15,17, 5, 7, 7, + 10,10, 7, 9, 9,11,11, 7, 9, 9,11,11,10,12,11,15, + 14,10,11,12,14,14, 7, 9, 9,12,12, 9,11,11,13,13, + 9,11,11,13,13,11,13,13,14,17,11,13,13,15,16, 6, + 9, 9,11,11, 8,11,10,13,12, 9,11,11,13,13,11,13, + 12,16,14,11,13,13,16,16,10,12,12,15,15,11,13,13, + 16,16,11,13,13,16,15,14,16,17,17,19,14,16,16,18, + 0, 9,11,11,14,15,10,13,12,16,15,11,13,13,16,16, + 14,15,14, 0,16,14,16,16,18, 0, 5, 7, 7,10,10, 7, + 9, 9,12,11, 7, 9, 9,11,12,10,11,11,15,14,10,11, + 12,14,14, 6, 9, 9,11,11, 9,11,11,13,13, 8,10,11, + 12,13,11,13,13,17,15,11,12,13,14,15, 7, 9, 9,11, + 12, 9,11,11,13,13, 9,11,11,13,13,11,13,12,16,16, + 11,13,13,15,14, 9,11,11,14,15,11,13,13,16,15,10, + 12,13,16,16,15,16,16, 0, 0,14,13,15,16,18,10,11, + 11,15,15,11,13,14,16,18,11,13,13,16,15,15,16,16, + 19, 0,14,15,15,16,16, 8,10,10,13,13,10,12,11,16, + 15,10,11,11,16,15,13,15,16,18, 0,13,14,15,17,17, + 9,11,11,15,15,11,13,13,16,18,11,13,13,16,17,15, + 16,16, 0, 0,15,18,16, 0,17, 9,11,11,15,15,11,13, + 12,17,15,11,13,14,16,17,15,18,15, 0,17,15,16,16, + 18,19,13,15,14, 0,18,14,16,16,19,18,14,16,15,19, + 19,16,18,19, 0, 0,16,17, 0, 0, 0,12,14,14,17,17, + 13,16,14, 0,18,14,16,15,18, 0,16,18,16,19,17,18, + 19,17, 0, 0, 8,10,10,14,14, 9,12,11,15,15,10,11, + 12,15,17,13,15,15,18,16,14,16,15,18,17, 9,11,11, + 16,15,11,13,13, 0,16,11,12,13,16,15,15,16,16, 0, + 17,15,15,16,18,17, 9,12,11,15,17,11,13,13,16,16, + 11,14,13,16,16,15,15,16,18,19,16,18,16, 0, 0,12, + 14,14, 0,16,14,16,16, 0,18,13,14,15,16, 0,17,16, + 18, 0, 0,16,16,17,19, 0,13,14,14,17, 0,14,17,16, + 0,19,14,15,15,18,19,17,16,18, 0, 0,15,19,16, 0, + 0, +}; + +static const static_codebook _44u7__p3_0 = { + 4, 625, + (char *)_vq_lengthlist__44u7__p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u7__p3_0, + 0 +}; + +static const long _vq_quantlist__44u7__p4_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u7__p4_0[] = { + 4, 5, 5, 8, 8, 6, 7, 6, 9, 9, 6, 6, 7, 9, 9, 8, + 9, 9,11,11, 8, 9, 9,10,11, 6, 7, 7, 9, 9, 7, 8, + 8,10,10, 6, 7, 8, 9,10, 9,10,10,12,12, 9, 9,10, + 11,12, 6, 7, 7, 9, 9, 6, 8, 7,10, 9, 7, 8, 8,10, + 10, 9,10, 9,12,11, 9,10,10,12,11, 8, 9, 9,11,11, + 9,10,10,12,12, 9,10,10,12,12,11,12,12,13,14,11, + 11,12,13,13, 8, 9, 9,11,11, 9,10,10,12,11, 9,10, + 10,12,12,11,12,11,13,13,11,12,12,13,13, 6, 7, 7, + 9, 9, 7, 8, 7,10,10, 7, 7, 8,10,10, 9,10,10,12, + 11, 9,10,10,12,12, 7, 8, 8,10,10, 8, 8, 9,11,11, + 8, 9, 9,11,11,10,11,11,12,12,10,10,11,12,13, 6, + 7, 7,10,10, 7, 9, 8,11,10, 8, 8, 9,10,11,10,11, + 10,13,11,10,11,11,12,12, 9,10,10,12,12,10,10,11, + 13,13,10,11,11,13,12,12,12,13,13,14,12,12,13,14, + 14, 9,10,10,12,12, 9,10,10,12,12,10,11,11,13,13, + 11,12,11,14,12,12,13,13,14,14, 6, 7, 7, 9, 9, 7, + 8, 7,10,10, 7, 7, 8,10,10, 9,10,10,12,11, 9,10, + 10,11,12, 6, 7, 7,10,10, 8, 9, 8,11,10, 7, 8, 9, + 10,11,10,11,11,13,12,10,10,11,11,13, 7, 8, 8,10, + 10, 8, 9, 9,11,11, 8, 9, 9,11,11,10,11,10,13,12, + 10,11,11,12,12, 9,10,10,12,12,10,11,11,13,12, 9, + 10,10,12,13,12,13,12,14,14,11,11,12,12,14, 9,10, + 10,12,12,10,11,11,13,13,10,11,11,13,13,12,13,12, + 14,14,12,13,12,14,13, 8, 9, 9,11,11, 9,10,10,12, + 12, 9,10,10,12,12,11,12,12,14,13,11,12,12,13,13, + 9,10,10,12,12,10,11,11,13,13,10,11,11,13,12,12, + 13,13,14,14,12,12,13,14,14, 9,10,10,12,12, 9,11, + 10,13,12,10,10,11,12,13,11,13,12,14,13,12,12,13, + 14,14,11,12,12,13,13,11,12,13,14,14,12,13,13,14, + 14,13,13,14,14,16,13,14,14,16,16,11,11,11,13,13, + 11,12,11,14,13,12,12,13,14,15,13,14,12,16,13,14, + 14,14,15,16, 8, 9, 9,11,11, 9,10,10,12,12, 9,10, + 10,12,12,11,12,12,14,13,11,12,12,13,14, 9,10,10, + 12,12,10,11,10,13,12, 9,10,11,12,13,12,13,12,14, + 14,12,12,13,13,14, 9,10,10,12,12,10,11,11,12,13, + 10,11,11,13,13,12,13,12,14,14,12,13,13,14,14,11, + 12,12,13,13,12,13,12,14,14,11,11,12,13,14,13,15, + 14,16,15,13,12,14,13,16,11,12,12,13,13,12,13,13, + 14,14,12,12,12,14,14,13,14,14,15,15,13,14,13,16, + 14, +}; + +static const static_codebook _44u7__p4_0 = { + 4, 625, + (char *)_vq_lengthlist__44u7__p4_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u7__p4_0, + 0 +}; + +static const long _vq_quantlist__44u7__p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44u7__p5_0[] = { + 2, 3, 3, 6, 6, 7, 8,10,10, 4, 5, 5, 8, 7, 8, 8, + 11,11, 3, 5, 5, 7, 7, 8, 9,11,11, 6, 8, 7, 9, 9, + 10,10,12,12, 6, 7, 8, 9,10,10,10,12,12, 8, 8, 8, + 10,10,12,11,13,13, 8, 8, 9,10,10,11,11,13,13,10, + 11,11,12,12,13,13,14,14,10,11,11,12,12,13,13,14, + 14, +}; + +static const static_codebook _44u7__p5_0 = { + 2, 81, + (char *)_vq_lengthlist__44u7__p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44u7__p5_0, + 0 +}; + +static const long _vq_quantlist__44u7__p6_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44u7__p6_0[] = { + 3, 4, 4, 5, 5, 7, 7, 9, 9, 4, 5, 4, 6, 6, 8, 7, + 9, 9, 4, 4, 5, 6, 6, 7, 7, 9, 9, 5, 6, 6, 7, 7, + 8, 8,10,10, 5, 6, 6, 7, 7, 8, 8,10,10, 7, 8, 7, + 8, 8,10, 9,11,11, 7, 7, 8, 8, 8, 9,10,11,11, 9, + 9, 9,10,10,11,10,12,11, 9, 9, 9,10,10,11,11,11, + 12, +}; + +static const static_codebook _44u7__p6_0 = { + 2, 81, + (char *)_vq_lengthlist__44u7__p6_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44u7__p6_0, + 0 +}; + +static const long _vq_quantlist__44u7__p7_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u7__p7_0[] = { + 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 9, 8, 8, 9, 9, 7, + 10,10, 5, 8, 9, 7, 9,10, 8, 9, 9, 4, 9, 9, 9,11, + 10, 8,10,10, 7,11,10,10,10,12,10,12,12, 7,10,10, + 10,12,11,10,12,12, 5, 9, 9, 8,10,10, 9,11,11, 7, + 11,10,10,12,12,10,11,12, 7,10,11,10,12,12,10,12, + 10, +}; + +static const static_codebook _44u7__p7_0 = { + 4, 81, + (char *)_vq_lengthlist__44u7__p7_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44u7__p7_0, + 0 +}; + +static const long _vq_quantlist__44u7__p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44u7__p7_1[] = { + 3, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8, 4, 5, 5, 6, 6, + 8, 7, 8, 8, 8, 8, 4, 5, 5, 6, 6, 7, 8, 8, 8, 8, + 8, 6, 7, 6, 7, 7, 8, 8, 9, 9, 9, 9, 6, 6, 7, 7, + 7, 8, 8, 9, 9, 9, 9, 7, 8, 7, 8, 8, 9, 9, 9, 9, + 9, 9, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 9, 8, 8, 8, + 9, 9, 9, 9,10, 9, 9, 9, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9,10, 8, 8, 8, 9, 9, 9, 9,10, 9,10,10, 8, 8, + 8, 9, 9, 9, 9, 9,10,10,10, +}; + +static const static_codebook _44u7__p7_1 = { + 2, 121, + (char *)_vq_lengthlist__44u7__p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44u7__p7_1, + 0 +}; + +static const long _vq_quantlist__44u7__p8_0[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44u7__p8_0[] = { + 1, 4, 4, 6, 6, 8, 8,10,10,11,11, 4, 6, 6, 7, 7, + 9, 9,11,10,12,12, 5, 6, 5, 7, 7, 9, 9,10,11,12, + 12, 6, 7, 7, 8, 8,10,10,11,11,13,13, 6, 7, 7, 8, + 8,10,10,11,12,13,13, 8, 9, 9,10,10,11,11,12,12, + 14,14, 8, 9, 9,10,10,11,11,12,12,14,14,10,10,10, + 11,11,13,12,14,14,15,15,10,10,10,12,12,13,13,14, + 14,15,15,11,12,12,13,13,14,14,15,14,16,15,11,12, + 12,13,13,14,14,15,15,15,16, +}; + +static const static_codebook _44u7__p8_0 = { + 2, 121, + (char *)_vq_lengthlist__44u7__p8_0, + 1, -524582912, 1618345984, 4, 0, + (long *)_vq_quantlist__44u7__p8_0, + 0 +}; + +static const long _vq_quantlist__44u7__p8_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44u7__p8_1[] = { + 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 5, 6, 6, 7, 7, + 7, 7, 7, 7, 7, 7, 5, 6, 6, 6, 7, 7, 7, 7, 7, 7, + 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 7, 7, 7, 7, 7, 8, 7, 8, 8, + 8, 8, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 7, 7, 7, + 7, 7, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 8, 8, 8, + 8, 8, 8, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 8, 8, +}; + +static const static_codebook _44u7__p8_1 = { + 2, 121, + (char *)_vq_lengthlist__44u7__p8_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44u7__p8_1, + 0 +}; + +static const long _vq_quantlist__44u7__p9_0[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44u7__p9_0[] = { + 1, 3, 3,10,10,10,10,10,10,10,10, 4,10,10,10,10, + 10,10,10,10,10,10, 4,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, +}; + +static const static_codebook _44u7__p9_0 = { + 2, 121, + (char *)_vq_lengthlist__44u7__p9_0, + 1, -512171520, 1630791680, 4, 0, + (long *)_vq_quantlist__44u7__p9_0, + 0 +}; + +static const long _vq_quantlist__44u7__p9_1[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u7__p9_1[] = { + 1, 4, 4, 6, 5, 8, 6, 9, 8,10, 9,11,10, 4, 6, 6, + 8, 8, 9, 9,11,10,11,11,11,11, 4, 6, 6, 8, 8,10, + 9,11,11,11,11,11,12, 6, 8, 8,10,10,11,11,12,12, + 13,12,13,13, 6, 8, 8,10,10,11,11,12,12,12,13,14, + 13, 8,10,10,11,11,12,13,14,14,14,14,15,15, 8,10, + 10,11,12,12,13,13,14,14,14,14,15, 9,11,11,13,13, + 14,14,15,14,16,15,17,15, 9,11,11,12,13,14,14,15, + 14,15,15,15,16,10,12,12,13,14,15,15,15,15,16,17, + 16,17,10,13,12,13,14,14,16,16,16,16,15,16,17,11, + 13,13,14,15,14,17,15,16,17,17,17,17,11,13,13,14, + 15,15,15,15,17,17,16,17,16, +}; + +static const static_codebook _44u7__p9_1 = { + 2, 169, + (char *)_vq_lengthlist__44u7__p9_1, + 1, -518889472, 1622704128, 4, 0, + (long *)_vq_quantlist__44u7__p9_1, + 0 +}; + +static const long _vq_quantlist__44u7__p9_2[] = { + 24, + 23, + 25, + 22, + 26, + 21, + 27, + 20, + 28, + 19, + 29, + 18, + 30, + 17, + 31, + 16, + 32, + 15, + 33, + 14, + 34, + 13, + 35, + 12, + 36, + 11, + 37, + 10, + 38, + 9, + 39, + 8, + 40, + 7, + 41, + 6, + 42, + 5, + 43, + 4, + 44, + 3, + 45, + 2, + 46, + 1, + 47, + 0, + 48, +}; + +static const char _vq_lengthlist__44u7__p9_2[] = { + 2, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, + 8, +}; + +static const static_codebook _44u7__p9_2 = { + 1, 49, + (char *)_vq_lengthlist__44u7__p9_2, + 1, -526909440, 1611661312, 6, 0, + (long *)_vq_quantlist__44u7__p9_2, + 0 +}; + +static const char _huff_lengthlist__44u7__short[] = { + 5,12,17,16,16,17,17,17,17,17, 4, 7,11,11,12, 9, + 17,10,17,17, 7, 7, 8, 9, 7, 9,11,10,15,17, 7, 9, + 10,11,10,12,14,12,16,17, 7, 8, 5, 7, 4, 7, 7, 8, + 16,16, 6,10, 9,10, 7,10,11,11,16,17, 6, 8, 8, 9, + 5, 7, 5, 8,16,17, 5, 5, 8, 7, 6, 7, 7, 6, 6,14, + 12,10,12,11, 7,11, 4, 4, 2, 7,17,15,15,15, 8,15, + 6, 8, 5, 9, +}; + +static const static_codebook _huff_book__44u7__short = { + 2, 100, + (char *)_huff_lengthlist__44u7__short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44u8__long[] = { + 3, 9,13,14,14,15,14,14,15,15, 5, 4, 6, 8,10,12, + 12,14,15,15, 9, 5, 4, 5, 8,10,11,13,16,16,10, 7, + 4, 3, 5, 7, 9,11,13,13,10, 9, 7, 4, 4, 6, 8,10, + 12,14,13,11, 9, 6, 5, 5, 6, 8,12,14,13,11,10, 8, + 7, 6, 6, 7,10,14,13,11,12,10, 8, 7, 6, 6, 9,13, + 12,11,14,12,11, 9, 8, 7, 9,11,11,12,14,13,14,11, + 10, 8, 8, 9, +}; + +static const static_codebook _huff_book__44u8__long = { + 2, 100, + (char *)_huff_lengthlist__44u8__long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44u8__short[] = { + 6,14,18,18,17,17,17,17,17,17, 4, 7, 9, 9,10,13, + 15,17,17,17, 6, 7, 5, 6, 8,11,16,17,16,17, 5, 7, + 5, 4, 6,10,14,17,17,17, 6, 6, 6, 5, 7,10,13,16, + 17,17, 7, 6, 7, 7, 7, 8, 7,10,15,16,12, 9, 9, 6, + 6, 5, 3, 5,11,15,14,14,13, 5, 5, 7, 3, 4, 8,15, + 17,17,13, 7, 7,10, 6, 6,10,15,17,17,16,10,11,14, + 10,10,15,17, +}; + +static const static_codebook _huff_book__44u8__short = { + 2, 100, + (char *)_huff_lengthlist__44u8__short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44u8_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u8_p1_0[] = { + 1, 5, 5, 5, 7, 7, 5, 7, 7, 5, 7, 7, 8, 9, 9, 7, + 9, 9, 5, 7, 7, 7, 9, 9, 8, 9, 9, 5, 7, 7, 7, 9, + 9, 7, 9, 9, 7, 9, 9, 9,10,11, 9,11,10, 7, 9, 9, + 9,11,10, 9,10,11, 5, 7, 7, 7, 9, 9, 7, 9, 9, 7, + 9, 9, 9,11,10, 9,10,10, 8, 9, 9, 9,11,11, 9,11, + 10, +}; + +static const static_codebook _44u8_p1_0 = { + 4, 81, + (char *)_vq_lengthlist__44u8_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u8_p1_0, + 0 +}; + +static const long _vq_quantlist__44u8_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u8_p2_0[] = { + 4, 5, 5, 8, 8, 5, 7, 6, 9, 9, 5, 6, 7, 9, 9, 8, + 9, 9,11,11, 8, 9, 9,11,11, 5, 7, 7, 9, 9, 7, 8, + 8,10,10, 7, 8, 8,10,10, 9,10,10,12,12, 9,10,10, + 11,12, 5, 7, 7, 9, 9, 7, 8, 7,10,10, 7, 8, 8,10, + 10, 9,10, 9,12,11, 9,10,10,12,12, 8, 9, 9,12,11, + 9,10,10,12,12, 9,10,10,12,12,11,12,12,14,14,11, + 11,12,13,14, 8, 9, 9,11,11, 9,10,10,12,12, 9,10, + 10,12,12,11,12,11,13,13,11,12,12,14,14, 5, 7, 7, + 9, 9, 7, 8, 8,10,10, 7, 8, 8,10,10, 9,10,10,12, + 12, 9,10,10,11,12, 7, 8, 8,10,10, 8, 9, 9,11,11, + 8, 9, 9,11,11,10,11,11,12,13,10,11,11,12,13, 6, + 8, 8,10,10, 8, 9, 8,11,10, 8, 9, 9,11,11,10,11, + 10,13,12,10,11,11,13,13, 9,10,10,12,12,10,11,11, + 13,13,10,11,11,13,13,12,12,13,13,14,12,13,13,14, + 14, 9,10,10,12,12,10,11,10,13,12,10,11,11,13,13, + 11,13,12,14,13,12,13,13,14,14, 5, 7, 7, 9, 9, 7, + 8, 8,10,10, 7, 8, 8,10,10, 9,10,10,12,12, 9,10, + 10,12,12, 7, 8, 8,10,10, 8, 9, 9,11,11, 8, 8, 9, + 10,11,10,11,11,13,13,10,10,11,12,13, 7, 8, 8,10, + 10, 8, 9, 9,11,11, 8, 9, 9,11,11,10,11,11,13,13, + 10,11,11,13,12, 9,10,10,12,12,10,11,11,13,13,10, + 10,11,12,13,12,13,13,14,14,12,12,13,13,14, 9,10, + 10,12,12,10,11,11,13,13,10,11,11,13,13,12,13,13, + 15,14,12,13,13,14,13, 8, 9, 9,11,11, 9,10,10,12, + 12, 9,10,10,12,12,12,12,12,14,13,11,12,12,14,14, + 9,10,10,12,12,10,11,11,13,13,10,11,11,13,13,12, + 13,13,14,15,12,13,13,14,15, 9,10,10,12,12,10,11, + 10,13,12,10,11,11,13,13,12,13,12,15,14,12,13,13, + 14,15,11,12,12,14,14,12,13,13,14,14,12,13,13,15, + 14,14,14,14,14,16,14,14,15,16,16,11,12,12,14,14, + 11,12,12,14,14,12,13,13,14,15,13,14,13,16,14,14, + 14,14,16,16, 8, 9, 9,11,11, 9,10,10,12,12, 9,10, + 10,12,12,11,12,12,14,13,11,12,12,14,14, 9,10,10, + 12,12,10,11,11,13,13,10,10,11,12,13,12,13,13,15, + 14,12,12,13,13,14, 9,10,10,12,12,10,11,11,13,13, + 10,11,11,13,13,12,13,13,14,14,12,13,13,15,14,11, + 12,12,14,13,12,13,13,15,14,11,12,12,13,14,14,15, + 14,16,15,13,13,14,13,16,11,12,12,14,14,12,13,13, + 14,15,12,13,12,15,14,14,14,14,16,15,14,15,13,16, + 14, +}; + +static const static_codebook _44u8_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__44u8_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u8_p2_0, + 0 +}; + +static const long _vq_quantlist__44u8_p3_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44u8_p3_0[] = { + 3, 4, 4, 5, 5, 7, 7, 9, 9, 4, 5, 4, 6, 6, 7, 7, + 9, 9, 4, 4, 5, 6, 6, 7, 7, 9, 9, 5, 6, 6, 7, 7, + 8, 8,10,10, 6, 6, 6, 7, 7, 8, 8,10,10, 7, 7, 7, + 8, 8, 9, 9,11,10, 7, 7, 7, 8, 8, 9, 9,10,11, 9, + 9, 9,10,10,11,10,12,11, 9, 9, 9, 9,10,11,11,11, + 12, +}; + +static const static_codebook _44u8_p3_0 = { + 2, 81, + (char *)_vq_lengthlist__44u8_p3_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44u8_p3_0, + 0 +}; + +static const long _vq_quantlist__44u8_p4_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44u8_p4_0[] = { + 4, 4, 4, 6, 6, 7, 7, 8, 8, 8, 8,10,10,11,11,11, + 11, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11,11, + 12,12, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,10,10,11, + 11,12,12, 6, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9,10,10, + 11,11,12,12, 6, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9,10, + 10,11,11,12,12, 7, 7, 7, 8, 8, 9, 8,10, 9,10, 9, + 11,10,12,11,13,12, 7, 7, 7, 8, 8, 8, 9, 9,10, 9, + 10,10,11,11,12,12,13, 8, 8, 8, 9, 9, 9, 9,10,10, + 11,10,11,11,12,12,13,13, 8, 8, 8, 9, 9, 9,10,10, + 10,10,11,11,11,12,12,12,13, 8, 9, 9, 9, 9,10, 9, + 11,10,11,11,12,11,13,12,13,13, 8, 9, 9, 9, 9, 9, + 10,10,11,11,11,11,12,12,13,13,13,10,10,10,10,10, + 11,10,11,11,12,11,13,12,13,13,14,13,10,10,10,10, + 10,10,11,11,11,11,12,12,13,13,13,13,14,11,11,11, + 11,11,12,11,12,12,13,12,13,13,14,13,14,14,11,11, + 11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,11, + 12,12,12,12,13,12,13,12,13,13,14,13,14,14,14,14, + 11,12,12,12,12,12,12,13,13,13,13,13,14,14,14,14, + 14, +}; + +static const static_codebook _44u8_p4_0 = { + 2, 289, + (char *)_vq_lengthlist__44u8_p4_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44u8_p4_0, + 0 +}; + +static const long _vq_quantlist__44u8_p5_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u8_p5_0[] = { + 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 8, 8, 8, 9, 9, 7, + 9, 9, 5, 8, 8, 7, 9, 9, 8, 9, 9, 5, 8, 8, 8,10, + 10, 8,10,10, 7,10,10, 9,10,12, 9,12,11, 7,10,10, + 9,11,10, 9,11,12, 5, 8, 8, 8,10,10, 8,10,10, 7, + 10,10, 9,11,11, 9,10,11, 7,10,10, 9,11,11,10,12, + 10, +}; + +static const static_codebook _44u8_p5_0 = { + 4, 81, + (char *)_vq_lengthlist__44u8_p5_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44u8_p5_0, + 0 +}; + +static const long _vq_quantlist__44u8_p5_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44u8_p5_1[] = { + 4, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 5, 5, 5, 6, 6, + 7, 7, 8, 8, 8, 8, 5, 5, 5, 6, 6, 7, 7, 7, 8, 8, + 8, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 6, 6, 6, 7, + 7, 7, 7, 8, 8, 8, 8, 7, 7, 7, 7, 7, 8, 8, 8, 8, + 8, 8, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 7, 8, 7, + 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 9, 9, +}; + +static const static_codebook _44u8_p5_1 = { + 2, 121, + (char *)_vq_lengthlist__44u8_p5_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44u8_p5_1, + 0 +}; + +static const long _vq_quantlist__44u8_p6_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u8_p6_0[] = { + 2, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10, 4, 6, 5, + 7, 7, 8, 8, 8, 8, 9, 9,10,10, 4, 6, 6, 7, 7, 8, + 8, 8, 8, 9, 9,10,10, 6, 7, 7, 7, 8, 8, 8, 8, 9, + 9,10,10,10, 6, 7, 7, 8, 8, 8, 8, 9, 8,10, 9,11, + 10, 7, 8, 8, 8, 8, 8, 9, 9, 9,10,10,11,11, 7, 8, + 8, 8, 8, 9, 8, 9, 9,10,10,11,11, 8, 8, 8, 9, 9, + 9, 9, 9,10,10,10,11,11, 8, 8, 8, 9, 9, 9, 9,10, + 9,10,10,11,11, 9, 9, 9, 9,10,10,10,10,10,10,11, + 11,12, 9, 9, 9,10, 9,10,10,10,10,11,10,12,11,10, + 10,10,10,10,11,11,11,11,11,12,12,12,10,10,10,10, + 11,11,11,11,11,12,11,12,12, +}; + +static const static_codebook _44u8_p6_0 = { + 2, 169, + (char *)_vq_lengthlist__44u8_p6_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44u8_p6_0, + 0 +}; + +static const long _vq_quantlist__44u8_p6_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u8_p6_1[] = { + 3, 4, 4, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44u8_p6_1 = { + 2, 25, + (char *)_vq_lengthlist__44u8_p6_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u8_p6_1, + 0 +}; + +static const long _vq_quantlist__44u8_p7_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u8_p7_0[] = { + 1, 4, 5, 6, 6, 7, 7, 8, 8,10,10,11,11, 5, 6, 6, + 7, 7, 8, 8, 9, 9,11,10,12,11, 5, 6, 6, 7, 7, 8, + 8, 9, 9,10,11,11,12, 6, 7, 7, 8, 8, 9, 9,10,10, + 11,11,12,12, 6, 7, 7, 8, 8, 9, 9,10,10,11,12,13, + 12, 7, 8, 8, 9, 9,10,10,11,11,12,12,13,13, 8, 8, + 8, 9, 9,10,10,11,11,12,12,13,13, 9, 9, 9,10,10, + 11,11,12,12,13,13,14,14, 9, 9, 9,10,10,11,11,12, + 12,13,13,14,14,10,11,11,12,11,13,12,13,13,14,14, + 15,15,10,11,11,11,12,12,13,13,14,14,14,15,15,11, + 12,12,13,13,14,13,15,14,15,15,16,15,11,11,12,13, + 13,13,14,14,14,15,15,15,16, +}; + +static const static_codebook _44u8_p7_0 = { + 2, 169, + (char *)_vq_lengthlist__44u8_p7_0, + 1, -523206656, 1618345984, 4, 0, + (long *)_vq_quantlist__44u8_p7_0, + 0 +}; + +static const long _vq_quantlist__44u8_p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44u8_p7_1[] = { + 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 5, 6, 6, 7, 7, + 7, 7, 7, 7, 7, 7, 5, 6, 6, 7, 7, 7, 7, 7, 7, 7, + 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 8, 7, 7, 7, 7, 7, 7, 7, 8, 8, + 8, 8, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 7, 7, 7, + 8, 7, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 8, 8, 8, + 8, 8, 8, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 8, 8, +}; + +static const static_codebook _44u8_p7_1 = { + 2, 121, + (char *)_vq_lengthlist__44u8_p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44u8_p7_1, + 0 +}; + +static const long _vq_quantlist__44u8_p8_0[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__44u8_p8_0[] = { + 1, 4, 4, 7, 7, 8, 8, 8, 7, 9, 8,10, 9,11,10, 4, + 6, 6, 8, 8,10, 9, 9, 9,10,10,11,10,12,10, 4, 6, + 6, 8, 8,10,10, 9, 9,10,10,11,11,11,12, 7, 8, 8, + 10,10,11,11,11,10,12,11,12,12,13,11, 7, 8, 8,10, + 10,11,11,10,10,11,11,12,12,13,13, 8,10,10,11,11, + 12,11,12,11,13,12,13,12,14,13, 8,10, 9,11,11,12, + 12,12,12,12,12,13,13,14,13, 8, 9, 9,11,10,12,11, + 13,12,13,13,14,13,14,13, 8, 9, 9,10,11,12,12,12, + 12,13,13,14,15,14,14, 9,10,10,12,11,13,12,13,13, + 14,13,14,14,14,14, 9,10,10,12,12,12,12,13,13,14, + 14,14,15,14,14,10,11,11,13,12,13,12,14,14,14,14, + 14,14,15,15,10,11,11,12,12,13,13,14,14,14,15,15, + 14,16,15,11,12,12,13,12,14,14,14,13,15,14,15,15, + 15,17,11,12,12,13,13,14,14,14,15,15,14,15,15,14, + 17, +}; + +static const static_codebook _44u8_p8_0 = { + 2, 225, + (char *)_vq_lengthlist__44u8_p8_0, + 1, -520986624, 1620377600, 4, 0, + (long *)_vq_quantlist__44u8_p8_0, + 0 +}; + +static const long _vq_quantlist__44u8_p8_1[] = { + 10, + 9, + 11, + 8, + 12, + 7, + 13, + 6, + 14, + 5, + 15, + 4, + 16, + 3, + 17, + 2, + 18, + 1, + 19, + 0, + 20, +}; + +static const char _vq_lengthlist__44u8_p8_1[] = { + 4, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 5, 6, 6, 7, 7, 8, + 8, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, + 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10, 9,10, 8, 8, + 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9,10, + 10, 9,10, 8, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9,10, 9, + 10,10,10,10,10,10,10,10, 8, 9, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9,10,10,10,10, 9,10,10, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9,10, 9,10,10,10,10,10,10, + 10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9,10, + 10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9,10, 9, + 10,10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10, + 10, 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9, + 9, 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10, 9, 9, 9,10, 9,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9,10, + 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10, 9, + 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10, 9, 9, 9,10, 9,10, 9,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10, +}; + +static const static_codebook _44u8_p8_1 = { + 2, 441, + (char *)_vq_lengthlist__44u8_p8_1, + 1, -529268736, 1611661312, 5, 0, + (long *)_vq_quantlist__44u8_p8_1, + 0 +}; + +static const long _vq_quantlist__44u8_p9_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44u8_p9_0[] = { + 1, 3, 3, 9, 9, 9, 9, 9, 9, 4, 9, 9, 9, 9, 9, 9, + 9, 9, 5, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, + 8, +}; + +static const static_codebook _44u8_p9_0 = { + 2, 81, + (char *)_vq_lengthlist__44u8_p9_0, + 1, -511895552, 1631393792, 4, 0, + (long *)_vq_quantlist__44u8_p9_0, + 0 +}; + +static const long _vq_quantlist__44u8_p9_1[] = { + 9, + 8, + 10, + 7, + 11, + 6, + 12, + 5, + 13, + 4, + 14, + 3, + 15, + 2, + 16, + 1, + 17, + 0, + 18, +}; + +static const char _vq_lengthlist__44u8_p9_1[] = { + 1, 4, 4, 7, 7, 8, 7, 8, 6, 9, 7,10, 8,11,10,11, + 11,11,11, 4, 7, 6, 9, 9,10, 9, 9, 9,10,10,11,10, + 11,10,11,11,13,11, 4, 7, 7, 9, 9, 9, 9, 9, 9,10, + 10,11,10,11,11,11,12,11,12, 7, 9, 8,11,11,11,11, + 10,10,11,11,12,12,12,12,12,12,14,13, 7, 8, 9,10, + 11,11,11,10,10,11,11,11,11,12,12,14,12,13,14, 8, + 9, 9,11,11,11,11,11,11,12,12,14,12,15,14,14,14, + 15,14, 8, 9, 9,11,11,11,11,12,11,12,12,13,13,13, + 13,13,13,14,14, 8, 9, 9,11,10,12,11,12,12,13,13, + 13,13,15,14,14,14,16,16, 8, 9, 9,10,11,11,12,12, + 12,13,13,13,14,14,14,15,16,15,15, 9,10,10,11,12, + 12,13,13,13,14,14,16,14,14,16,16,16,16,15, 9,10, + 10,11,11,12,13,13,14,15,14,16,14,15,16,16,16,16, + 15,10,11,11,12,13,13,14,15,15,15,15,15,16,15,16, + 15,16,15,15,10,11,11,13,13,14,13,13,15,14,15,15, + 16,15,15,15,16,15,16,10,12,12,14,14,14,14,14,16, + 16,15,15,15,16,16,16,16,16,16,11,12,12,14,14,14, + 14,15,15,16,15,16,15,16,15,16,16,16,16,12,12,13, + 14,14,15,16,16,16,16,16,16,15,16,16,16,16,16,16, + 12,13,13,14,14,14,14,15,16,15,16,16,16,16,16,16, + 16,16,16,12,13,14,14,14,16,15,16,15,16,16,16,16, + 16,16,16,16,16,16,12,14,13,14,15,15,15,16,15,16, + 16,15,16,16,16,16,16,16,16, +}; + +static const static_codebook _44u8_p9_1 = { + 2, 361, + (char *)_vq_lengthlist__44u8_p9_1, + 1, -518287360, 1622704128, 5, 0, + (long *)_vq_quantlist__44u8_p9_1, + 0 +}; + +static const long _vq_quantlist__44u8_p9_2[] = { + 24, + 23, + 25, + 22, + 26, + 21, + 27, + 20, + 28, + 19, + 29, + 18, + 30, + 17, + 31, + 16, + 32, + 15, + 33, + 14, + 34, + 13, + 35, + 12, + 36, + 11, + 37, + 10, + 38, + 9, + 39, + 8, + 40, + 7, + 41, + 6, + 42, + 5, + 43, + 4, + 44, + 3, + 45, + 2, + 46, + 1, + 47, + 0, + 48, +}; + +static const char _vq_lengthlist__44u8_p9_2[] = { + 2, 3, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, +}; + +static const static_codebook _44u8_p9_2 = { + 1, 49, + (char *)_vq_lengthlist__44u8_p9_2, + 1, -526909440, 1611661312, 6, 0, + (long *)_vq_quantlist__44u8_p9_2, + 0 +}; + +static const char _huff_lengthlist__44u9__long[] = { + 3, 9,13,13,14,15,14,14,15,15, 5, 5, 9,10,12,12, + 13,14,16,15,10, 6, 6, 6, 8,11,12,13,16,15,11, 7, + 5, 3, 5, 8,10,12,15,15,10,10, 7, 4, 3, 5, 8,10, + 12,12,12,12, 9, 7, 5, 4, 6, 8,10,13,13,12,11, 9, + 7, 5, 5, 6, 9,12,14,12,12,10, 8, 6, 6, 6, 7,11, + 13,12,14,13,10, 8, 7, 7, 7,10,11,11,12,13,12,11, + 10, 8, 8, 9, +}; + +static const static_codebook _huff_book__44u9__long = { + 2, 100, + (char *)_huff_lengthlist__44u9__long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const char _huff_lengthlist__44u9__short[] = { + 9,16,18,18,17,17,17,17,17,17, 5, 8,11,12,11,12, + 17,17,16,16, 6, 6, 8, 8, 9,10,14,15,16,16, 6, 7, + 7, 4, 6, 9,13,16,16,16, 6, 6, 7, 4, 5, 8,11,15, + 17,16, 7, 6, 7, 6, 6, 8, 9,10,14,16,11, 8, 8, 7, + 6, 6, 3, 4,10,15,14,12,12,10, 5, 6, 3, 3, 8,13, + 15,17,15,11, 6, 8, 6, 6, 9,14,17,15,15,12, 8,10, + 9, 9,12,15, +}; + +static const static_codebook _huff_book__44u9__short = { + 2, 100, + (char *)_huff_lengthlist__44u9__short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44u9_p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u9_p1_0[] = { + 1, 5, 5, 5, 7, 7, 5, 7, 7, 5, 7, 7, 7, 9, 9, 7, + 9, 9, 5, 7, 7, 7, 9, 9, 7, 9, 9, 5, 7, 7, 7, 9, + 9, 7, 9, 9, 8, 9, 9, 9,10,11, 9,11,11, 7, 9, 9, + 9,11,10, 9,11,11, 5, 7, 7, 7, 9, 9, 8, 9,10, 7, + 9, 9, 9,11,11, 9,10,11, 7, 9,10, 9,11,11, 9,11, + 10, +}; + +static const static_codebook _44u9_p1_0 = { + 4, 81, + (char *)_vq_lengthlist__44u9_p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44u9_p1_0, + 0 +}; + +static const long _vq_quantlist__44u9_p2_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u9_p2_0[] = { + 3, 5, 5, 8, 8, 5, 7, 7, 9, 9, 6, 7, 7, 9, 9, 8, + 9, 9,11,10, 8, 9, 9,11,11, 6, 7, 7, 9, 9, 7, 8, + 8,10,10, 7, 8, 8, 9,10, 9,10,10,11,11, 9, 9,10, + 11,11, 6, 7, 7, 9, 9, 7, 8, 8,10, 9, 7, 8, 8,10, + 10, 9,10, 9,11,11, 9,10,10,11,11, 8, 9, 9,11,11, + 9,10,10,12,11, 9,10,10,11,12,11,11,11,13,13,11, + 11,11,12,13, 8, 9, 9,11,11, 9,10,10,11,11, 9,10, + 10,12,11,11,12,11,13,12,11,11,12,13,13, 6, 7, 7, + 9, 9, 7, 8, 8,10,10, 7, 8, 8,10,10, 9,10,10,12, + 11, 9,10,10,11,12, 7, 8, 8,10,10, 8, 9, 9,11,11, + 8, 9, 9,10,10,10,11,11,12,12,10,10,11,12,12, 7, + 8, 8,10,10, 8, 9, 8,10,10, 8, 9, 9,10,10,10,11, + 10,12,11,10,10,11,12,12, 9,10,10,11,12,10,11,11, + 12,12,10,11,10,12,12,12,12,12,13,13,11,12,12,13, + 13, 9,10,10,11,11, 9,10,10,12,12,10,11,11,12,13, + 11,12,11,13,12,12,12,12,13,14, 6, 7, 7, 9, 9, 7, + 8, 8,10,10, 7, 8, 8,10,10, 9,10,10,11,11, 9,10, + 10,11,12, 7, 8, 8,10,10, 8, 9, 9,11,10, 8, 8, 9, + 10,10,10,11,10,12,12,10,10,11,11,12, 7, 8, 8,10, + 10, 8, 9, 9,10,10, 8, 9, 9,10,10,10,11,10,12,12, + 10,11,10,12,12, 9,10,10,12,11,10,11,11,12,12, 9, + 10,10,12,12,12,12,12,13,13,11,11,12,12,14, 9,10, + 10,11,12,10,11,11,12,12,10,11,11,12,12,11,12,12, + 14,14,12,12,12,13,13, 8, 9, 9,11,11, 9,10,10,12, + 11, 9,10,10,12,12,11,12,11,13,13,11,11,12,13,13, + 9,10,10,12,12,10,11,11,12,12,10,11,11,12,12,12, + 12,12,14,14,12,12,12,13,13, 9,10,10,12,11,10,11, + 10,12,12,10,11,11,12,12,11,12,12,14,13,12,12,12, + 13,14,11,12,11,13,13,11,12,12,13,13,12,12,12,14, + 14,13,13,13,13,15,13,13,14,15,15,11,11,11,13,13, + 11,12,11,13,13,11,12,12,13,13,12,13,12,15,13,13, + 13,14,14,15, 8, 9, 9,11,11, 9,10,10,11,12, 9,10, + 10,11,12,11,12,11,13,13,11,12,12,13,13, 9,10,10, + 11,12,10,11,10,12,12,10,10,11,12,13,12,12,12,14, + 13,11,12,12,13,14, 9,10,10,12,12,10,11,11,12,12, + 10,11,11,12,12,12,12,12,14,13,12,12,12,14,13,11, + 11,11,13,13,11,12,12,14,13,11,11,12,13,13,13,13, + 13,15,14,12,12,13,13,15,11,12,12,13,13,12,12,12, + 13,14,11,12,12,13,13,13,13,14,14,15,13,13,13,14, + 14, +}; + +static const static_codebook _44u9_p2_0 = { + 4, 625, + (char *)_vq_lengthlist__44u9_p2_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u9_p2_0, + 0 +}; + +static const long _vq_quantlist__44u9_p3_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44u9_p3_0[] = { + 3, 4, 4, 5, 5, 7, 7, 8, 8, 4, 5, 5, 6, 6, 7, 7, + 9, 9, 4, 4, 5, 6, 6, 7, 7, 9, 9, 5, 6, 6, 7, 7, + 8, 8, 9, 9, 5, 6, 6, 7, 7, 8, 8, 9, 9, 7, 7, 7, + 8, 8, 9, 9,10,10, 7, 7, 7, 8, 8, 9, 9,10,10, 8, + 9, 9,10, 9,10,10,11,11, 8, 9, 9, 9,10,10,10,11, + 11, +}; + +static const static_codebook _44u9_p3_0 = { + 2, 81, + (char *)_vq_lengthlist__44u9_p3_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44u9_p3_0, + 0 +}; + +static const long _vq_quantlist__44u9_p4_0[] = { + 8, + 7, + 9, + 6, + 10, + 5, + 11, + 4, + 12, + 3, + 13, + 2, + 14, + 1, + 15, + 0, + 16, +}; + +static const char _vq_lengthlist__44u9_p4_0[] = { + 4, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,10,11, + 11, 5, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,10, + 11,11, 5, 5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9,10, + 10,11,11, 6, 6, 6, 7, 6, 7, 7, 8, 8, 9, 9,10,10, + 11,11,12,11, 6, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9,10, + 10,11,11,11,12, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, + 10,10,11,11,12,12, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, + 9,10,10,11,11,12,12, 8, 8, 8, 8, 8, 9, 8,10, 9, + 10,10,11,10,12,11,13,12, 8, 8, 8, 8, 8, 9, 9, 9, + 10,10,10,10,11,11,12,12,12, 8, 8, 8, 9, 9, 9, 9, + 10,10,11,10,12,11,12,12,13,12, 8, 8, 8, 9, 9, 9, + 9,10,10,10,11,11,11,12,12,12,13, 9, 9, 9,10,10, + 10,10,11,10,11,11,12,11,13,12,13,13, 9, 9,10,10, + 10,10,10,10,11,11,11,11,12,12,13,13,13,10,11,10, + 11,11,11,11,12,11,12,12,13,12,13,13,14,13,10,10, + 10,11,11,11,11,11,12,12,12,12,13,13,13,13,14,11, + 11,11,12,11,12,12,12,12,13,13,13,13,14,13,14,14, + 11,11,11,11,12,12,12,12,12,12,13,13,13,13,14,14, + 14, +}; + +static const static_codebook _44u9_p4_0 = { + 2, 289, + (char *)_vq_lengthlist__44u9_p4_0, + 1, -529530880, 1611661312, 5, 0, + (long *)_vq_quantlist__44u9_p4_0, + 0 +}; + +static const long _vq_quantlist__44u9_p5_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44u9_p5_0[] = { + 1, 4, 4, 5, 7, 7, 5, 7, 7, 5, 8, 8, 8, 9, 9, 7, + 9, 9, 5, 8, 8, 7, 9, 9, 8, 9, 9, 5, 8, 8, 8,10, + 10, 8,10,10, 7,10,10, 9,10,12, 9,11,11, 7,10,10, + 9,11,10, 9,11,12, 5, 8, 8, 8,10,10, 8,10,10, 7, + 10,10, 9,12,11, 9,10,11, 7,10,10, 9,11,11,10,12, + 10, +}; + +static const static_codebook _44u9_p5_0 = { + 4, 81, + (char *)_vq_lengthlist__44u9_p5_0, + 1, -529137664, 1618345984, 2, 0, + (long *)_vq_quantlist__44u9_p5_0, + 0 +}; + +static const long _vq_quantlist__44u9_p5_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44u9_p5_1[] = { + 5, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 5, 6, 6, 6, 6, + 7, 7, 7, 7, 8, 7, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, + 7, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 6, 6, 6, 7, + 7, 7, 7, 7, 7, 8, 8, 7, 7, 7, 7, 7, 8, 7, 8, 8, + 8, 8, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 7, 7, 7, + 8, 7, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 8, 8, 8, 8, + 8, 8, 8, 7, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 7, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, +}; + +static const static_codebook _44u9_p5_1 = { + 2, 121, + (char *)_vq_lengthlist__44u9_p5_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44u9_p5_1, + 0 +}; + +static const long _vq_quantlist__44u9_p6_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u9_p6_0[] = { + 2, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10, 4, 6, 5, + 7, 7, 8, 8, 8, 8, 9, 9,10,10, 4, 5, 6, 7, 7, 8, + 8, 8, 8, 9, 9,10,10, 6, 7, 7, 8, 8, 8, 8, 9, 9, + 10,10,10,10, 6, 7, 7, 8, 8, 8, 8, 9, 9,10,10,10, + 10, 7, 8, 8, 8, 8, 9, 9, 9, 9,10,10,11,11, 7, 8, + 8, 8, 8, 9, 9, 9, 9,10,10,11,11, 8, 8, 8, 9, 9, + 9, 9, 9,10,10,10,11,11, 8, 8, 8, 9, 9, 9, 9,10, + 9,10,10,11,11, 9, 9, 9,10,10,10,10,10,11,11,11, + 11,12, 9, 9, 9,10,10,10,10,10,10,11,10,12,11,10, + 10,10,10,10,11,11,11,11,11,12,12,12,10,10,10,10, + 10,11,11,11,11,12,11,12,12, +}; + +static const static_codebook _44u9_p6_0 = { + 2, 169, + (char *)_vq_lengthlist__44u9_p6_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44u9_p6_0, + 0 +}; + +static const long _vq_quantlist__44u9_p6_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44u9_p6_1[] = { + 4, 4, 4, 5, 5, 4, 5, 4, 5, 5, 4, 4, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const static_codebook _44u9_p6_1 = { + 2, 25, + (char *)_vq_lengthlist__44u9_p6_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44u9_p6_1, + 0 +}; + +static const long _vq_quantlist__44u9_p7_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44u9_p7_0[] = { + 1, 4, 5, 6, 6, 7, 7, 8, 9,10,10,11,11, 5, 6, 6, + 7, 7, 8, 8, 9, 9,10,10,11,11, 5, 6, 6, 7, 7, 8, + 8, 9, 9,10,10,11,11, 6, 7, 7, 8, 8, 9, 9,10,10, + 11,11,12,12, 6, 7, 7, 8, 8, 9, 9,10,10,11,11,12, + 12, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13, 8, 8, + 8, 9, 9,10,10,11,11,12,12,13,13, 9, 9, 9,10,10, + 11,11,12,12,13,13,13,13, 9, 9, 9,10,10,11,11,12, + 12,13,13,14,14,10,10,10,11,11,12,12,13,13,14,13, + 15,14,10,10,10,11,11,12,12,13,13,14,14,14,14,11, + 11,12,12,12,13,13,14,14,14,14,15,15,11,11,12,12, + 12,13,13,14,14,14,15,15,15, +}; + +static const static_codebook _44u9_p7_0 = { + 2, 169, + (char *)_vq_lengthlist__44u9_p7_0, + 1, -523206656, 1618345984, 4, 0, + (long *)_vq_quantlist__44u9_p7_0, + 0 +}; + +static const long _vq_quantlist__44u9_p7_1[] = { + 5, + 4, + 6, + 3, + 7, + 2, + 8, + 1, + 9, + 0, + 10, +}; + +static const char _vq_lengthlist__44u9_p7_1[] = { + 5, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 7, 7, + 7, 7, 7, 7, 7, 7, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 8, 8, 7, 7, 7, 7, 7, 7, 7, 8, 7, 8, 8, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 8, 8, +}; + +static const static_codebook _44u9_p7_1 = { + 2, 121, + (char *)_vq_lengthlist__44u9_p7_1, + 1, -531365888, 1611661312, 4, 0, + (long *)_vq_quantlist__44u9_p7_1, + 0 +}; + +static const long _vq_quantlist__44u9_p8_0[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__44u9_p8_0[] = { + 1, 4, 4, 7, 7, 8, 8, 8, 8, 9, 9,10, 9,11,10, 4, + 6, 6, 8, 8, 9, 9, 9, 9,10,10,11,10,12,10, 4, 6, + 6, 8, 8, 9,10, 9, 9,10,10,11,11,12,12, 7, 8, 8, + 10,10,11,11,10,10,11,11,12,12,13,12, 7, 8, 8,10, + 10,11,11,10,10,11,11,12,12,12,13, 8,10, 9,11,11, + 12,12,11,11,12,12,13,13,14,13, 8, 9, 9,11,11,12, + 12,11,12,12,12,13,13,14,13, 8, 9, 9,10,10,12,11, + 13,12,13,13,14,13,15,14, 8, 9, 9,10,10,11,12,12, + 12,13,13,13,14,14,14, 9,10,10,12,11,13,12,13,13, + 14,13,14,14,14,15, 9,10,10,11,12,12,12,13,13,14, + 14,14,15,15,15,10,11,11,12,12,13,13,14,14,14,14, + 15,14,16,15,10,11,11,12,12,13,13,13,14,14,14,14, + 14,15,16,11,12,12,13,13,14,13,14,14,15,14,15,16, + 16,16,11,12,12,13,13,14,13,14,14,15,15,15,16,15, + 15, +}; + +static const static_codebook _44u9_p8_0 = { + 2, 225, + (char *)_vq_lengthlist__44u9_p8_0, + 1, -520986624, 1620377600, 4, 0, + (long *)_vq_quantlist__44u9_p8_0, + 0 +}; + +static const long _vq_quantlist__44u9_p8_1[] = { + 10, + 9, + 11, + 8, + 12, + 7, + 13, + 6, + 14, + 5, + 15, + 4, + 16, + 3, + 17, + 2, + 18, + 1, + 19, + 0, + 20, +}; + +static const char _vq_lengthlist__44u9_p8_1[] = { + 4, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 6, 6, 6, 7, 7, 8, + 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, + 7, 7, 8, 8, 8, 8, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9,10, 9,10,10,10, 8, 8, + 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9,10,10, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 10, 9,10, 9,10,10,10,10, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9,10,10, 9,10,10,10,10,10, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9,10, 9,10,10,10,10,10,10, + 10,10, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,10,10,10, + 10,10,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9,10,10,10,10,10,10,10,10,10, + 10, 9, 9, 9, 9, 9, 9, 9,10, 9,10,10,10,10,10,10, + 10,10,10,10,10,10, 9, 9, 9, 9, 9, 9, 9, 9,10,10, + 10,10,10,10,10,10,10,10,10,10,10, 9, 9, 9, 9, 9, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 9, 9, 9, 9,10, 9, 9,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10, 9, 9, 9,10, 9,10, 9,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10, 9, 9, 9,10, 9,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, 9, + 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10, 9, 9, 9,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10, +}; + +static const static_codebook _44u9_p8_1 = { + 2, 441, + (char *)_vq_lengthlist__44u9_p8_1, + 1, -529268736, 1611661312, 5, 0, + (long *)_vq_quantlist__44u9_p8_1, + 0 +}; + +static const long _vq_quantlist__44u9_p9_0[] = { + 7, + 6, + 8, + 5, + 9, + 4, + 10, + 3, + 11, + 2, + 12, + 1, + 13, + 0, + 14, +}; + +static const char _vq_lengthlist__44u9_p9_0[] = { + 1, 3, 3,11,11,11,11,11,11,11,11,11,11,11,11, 4, + 10,11,11,11,11,11,11,11,11,11,11,11,11,11, 4,10, + 10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10, +}; + +static const static_codebook _44u9_p9_0 = { + 2, 225, + (char *)_vq_lengthlist__44u9_p9_0, + 1, -510036736, 1631393792, 4, 0, + (long *)_vq_quantlist__44u9_p9_0, + 0 +}; + +static const long _vq_quantlist__44u9_p9_1[] = { + 9, + 8, + 10, + 7, + 11, + 6, + 12, + 5, + 13, + 4, + 14, + 3, + 15, + 2, + 16, + 1, + 17, + 0, + 18, +}; + +static const char _vq_lengthlist__44u9_p9_1[] = { + 1, 4, 4, 7, 7, 8, 7, 8, 7, 9, 8,10, 9,10,10,11, + 11,12,12, 4, 7, 6, 9, 9,10, 9, 9, 8,10,10,11,10, + 12,10,13,12,13,12, 4, 6, 6, 9, 9, 9, 9, 9, 9,10, + 10,11,11,11,12,12,12,12,12, 7, 9, 8,11,10,10,10, + 11,10,11,11,12,12,13,12,13,13,13,13, 7, 8, 9,10, + 10,11,11,10,10,11,11,11,12,13,13,13,13,14,14, 8, + 9, 9,11,11,12,11,12,12,13,12,12,13,13,14,15,14, + 14,14, 8, 9, 9,10,11,11,11,12,12,13,12,13,13,14, + 14,14,15,14,16, 8, 9, 9,11,10,12,12,12,12,15,13, + 13,13,17,14,15,15,15,14, 8, 9, 9,10,11,11,12,13, + 12,13,13,13,14,15,14,14,14,16,15, 9,11,10,12,12, + 13,13,13,13,14,14,16,15,14,14,14,15,15,17, 9,10, + 10,11,11,13,13,13,14,14,13,15,14,15,14,15,16,15, + 16,10,11,11,12,12,13,14,15,14,15,14,14,15,17,16, + 15,15,17,17,10,12,11,13,12,14,14,13,14,15,15,15, + 15,16,17,17,15,17,16,11,12,12,14,13,15,14,15,16, + 17,15,17,15,17,15,15,16,17,15,11,11,12,14,14,14, + 14,14,15,15,16,15,17,17,17,16,17,16,15,12,12,13, + 14,14,14,15,14,15,15,16,16,17,16,17,15,17,17,16, + 12,14,12,14,14,15,15,15,14,14,16,16,16,15,16,16, + 15,17,15,12,13,13,14,15,14,15,17,15,17,16,17,17, + 17,16,17,16,17,17,12,13,13,14,16,15,15,15,16,15, + 17,17,15,17,15,17,16,16,17, +}; + +static const static_codebook _44u9_p9_1 = { + 2, 361, + (char *)_vq_lengthlist__44u9_p9_1, + 1, -518287360, 1622704128, 5, 0, + (long *)_vq_quantlist__44u9_p9_1, + 0 +}; + +static const long _vq_quantlist__44u9_p9_2[] = { + 24, + 23, + 25, + 22, + 26, + 21, + 27, + 20, + 28, + 19, + 29, + 18, + 30, + 17, + 31, + 16, + 32, + 15, + 33, + 14, + 34, + 13, + 35, + 12, + 36, + 11, + 37, + 10, + 38, + 9, + 39, + 8, + 40, + 7, + 41, + 6, + 42, + 5, + 43, + 4, + 44, + 3, + 45, + 2, + 46, + 1, + 47, + 0, + 48, +}; + +static const char _vq_lengthlist__44u9_p9_2[] = { + 2, 4, 4, 5, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 7, 6, 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, +}; + +static const static_codebook _44u9_p9_2 = { + 1, 49, + (char *)_vq_lengthlist__44u9_p9_2, + 1, -526909440, 1611661312, 6, 0, + (long *)_vq_quantlist__44u9_p9_2, + 0 +}; + +static const char _huff_lengthlist__44un1__long[] = { + 5, 6,12, 9,14, 9, 9,19, 6, 1, 5, 5, 8, 7, 9,19, + 12, 4, 4, 7, 7, 9,11,18, 9, 5, 6, 6, 8, 7, 8,17, + 14, 8, 7, 8, 8,10,12,18, 9, 6, 8, 6, 8, 6, 8,18, + 9, 8,11, 8,11, 7, 5,15,16,18,18,18,17,15,11,18, +}; + +static const static_codebook _huff_book__44un1__long = { + 2, 64, + (char *)_huff_lengthlist__44un1__long, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + +static const long _vq_quantlist__44un1__p1_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44un1__p1_0[] = { + 1, 4, 4, 5, 8, 7, 5, 7, 8, 5, 8, 8, 8,10,11, 8, + 10,11, 5, 8, 8, 8,11,10, 8,11,10, 4, 9, 9, 8,11, + 11, 8,11,11, 8,12,11,10,12,14,11,13,13, 7,11,11, + 10,13,11,11,13,14, 4, 8, 9, 8,11,11, 8,11,12, 7, + 11,11,11,14,13,10,11,13, 8,11,12,11,13,13,10,14, + 12, +}; + +static const static_codebook _44un1__p1_0 = { + 4, 81, + (char *)_vq_lengthlist__44un1__p1_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44un1__p1_0, + 0 +}; + +static const long _vq_quantlist__44un1__p2_0[] = { + 1, + 0, + 2, +}; + +static const char _vq_lengthlist__44un1__p2_0[] = { + 2, 4, 4, 5, 6, 6, 5, 6, 6, 5, 7, 7, 7, 8, 8, 6, + 7, 9, 5, 7, 7, 6, 8, 7, 7, 9, 8, 4, 7, 7, 7, 9, + 8, 7, 8, 8, 7, 9, 8, 8, 8,10, 9,10,10, 6, 8, 8, + 7,10, 8, 9,10,10, 5, 7, 7, 7, 8, 8, 7, 8, 9, 6, + 8, 8, 9,10,10, 7, 8,10, 6, 8, 9, 9,10,10, 8,10, + 8, +}; + +static const static_codebook _44un1__p2_0 = { + 4, 81, + (char *)_vq_lengthlist__44un1__p2_0, + 1, -535822336, 1611661312, 2, 0, + (long *)_vq_quantlist__44un1__p2_0, + 0 +}; + +static const long _vq_quantlist__44un1__p3_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44un1__p3_0[] = { + 1, 5, 5, 8, 8, 5, 8, 7, 9, 9, 5, 7, 8, 9, 9, 9, + 10, 9,12,12, 9, 9,10,11,12, 6, 8, 8,10,10, 8,10, + 10,11,11, 8, 9,10,11,11,10,11,11,13,13,10,11,11, + 12,13, 6, 8, 8,10,10, 8,10, 9,11,11, 8,10,10,11, + 11,10,11,11,13,12,10,11,11,13,12, 9,11,11,15,13, + 10,12,11,15,13,10,11,11,15,14,12,14,13,16,15,12, + 13,13,17,16, 9,11,11,13,15,10,11,12,14,15,10,11, + 12,14,15,12,13,13,15,16,12,13,13,16,16, 5, 8, 8, + 11,11, 8,10,10,12,12, 8,10,10,12,12,11,12,12,14, + 14,11,12,12,14,14, 8,11,10,13,12,10,11,12,12,13, + 10,12,12,13,13,12,12,13,13,15,11,12,13,15,14, 7, + 10,10,12,12, 9,12,11,13,12,10,12,12,13,14,12,13, + 12,15,13,11,13,12,14,15,10,12,12,16,14,11,12,12, + 16,15,11,13,12,17,16,13,13,15,15,17,13,15,15,20, + 17,10,12,12,14,16,11,12,12,15,15,11,13,13,15,18, + 13,14,13,15,15,13,15,14,16,16, 5, 8, 8,11,11, 8, + 10,10,12,12, 8,10,10,12,12,11,12,12,14,14,11,12, + 12,14,15, 7,10,10,13,12,10,12,12,14,13, 9,10,12, + 12,13,11,13,13,15,15,11,12,13,13,15, 8,10,10,12, + 13,10,12,12,13,13,10,12,11,13,13,11,13,12,15,15, + 12,13,12,15,13,10,12,12,16,14,11,12,12,16,15,10, + 12,12,16,14,14,15,14,18,16,13,13,14,15,16,10,12, + 12,14,16,11,13,13,16,16,11,13,12,14,16,13,15,15, + 18,18,13,15,13,16,14, 8,11,11,16,16,10,13,13,17, + 16,10,12,12,16,15,14,16,15,20,17,13,14,14,17,17, + 9,12,12,16,16,11,13,14,16,17,11,13,13,16,16,15, + 15,19,18, 0,14,15,15,18,18, 9,12,12,17,16,11,13, + 12,17,16,11,12,13,15,17,15,16,15, 0,19,14,15,14, + 19,18,12,14,14, 0,16,13,14,14,19,18,13,15,16,17, + 16,15,15,17,18, 0,14,16,16,19, 0,12,14,14,16,18, + 13,15,13,17,18,13,15,14,17,18,15,18,14,18,18,16, + 17,16, 0,17, 8,11,11,15,15,10,12,12,16,16,10,13, + 13,16,16,13,15,14,17,17,14,15,17,17,18, 9,12,12, + 16,15,11,13,13,16,16,11,12,13,17,17,14,14,15,17, + 17,14,15,16, 0,18, 9,12,12,16,17,11,13,13,16,17, + 11,14,13,18,17,14,16,14,17,17,15,17,17,18,18,12, + 14,14, 0,16,13,15,15,19, 0,12,13,15, 0, 0,14,17, + 16,19, 0,16,15,18,18, 0,12,14,14,17, 0,13,14,14, + 17, 0,13,15,14, 0,18,15,16,16, 0,18,15,18,15, 0, + 17, +}; + +static const static_codebook _44un1__p3_0 = { + 4, 625, + (char *)_vq_lengthlist__44un1__p3_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44un1__p3_0, + 0 +}; + +static const long _vq_quantlist__44un1__p4_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44un1__p4_0[] = { + 3, 5, 5, 9, 9, 5, 6, 6,10, 9, 5, 6, 6, 9,10,10, + 10,10,12,11, 9,10,10,12,12, 5, 7, 7,10,10, 7, 7, + 8,10,11, 7, 7, 8,10,11,10,10,11,11,13,10,10,11, + 11,13, 6, 7, 7,10,10, 7, 8, 7,11,10, 7, 8, 7,10, + 10,10,11, 9,13,11,10,11,10,13,11,10,10,10,14,13, + 10,11,11,14,13,10,10,11,13,14,12,12,13,15,15,12, + 12,13,13,14,10,10,10,12,13,10,11,10,13,13,10,11, + 11,13,13,12,13,12,14,13,12,13,13,14,13, 5, 7, 7, + 10,10, 7, 8, 8,11,10, 7, 8, 8,10,10,11,11,11,13, + 13,10,11,11,12,12, 7, 8, 8,11,11, 7, 8, 9,10,12, + 8, 9, 9,11,11,11,10,12,11,14,11,11,12,13,13, 6, + 8, 8,10,11, 7, 9, 7,12,10, 8, 9,10,11,12,10,12, + 10,14,11,11,12,11,13,13,10,11,11,14,14,10,10,11, + 13,14,11,12,12,15,13,12,11,14,12,16,12,13,14,15, + 16,10,10,11,13,14,10,11,10,14,12,11,12,12,13,14, + 12,13,11,15,12,14,14,14,15,15, 5, 7, 7,10,10, 7, + 8, 8,10,10, 7, 8, 8,10,11,10,11,10,12,12,10,11, + 11,12,13, 6, 8, 8,11,11, 8, 9, 9,12,11, 7, 7, 9, + 10,12,11,11,11,12,13,11,10,12,11,15, 7, 8, 8,11, + 11, 8, 9, 9,11,11, 7, 9, 8,12,10,11,12,11,13,12, + 11,12,10,15,11,10,11,10,14,12,11,12,11,14,13,10, + 10,11,13,14,13,13,13,17,15,12,11,14,12,15,10,10, + 11,13,14,11,12,12,14,14,10,11,10,14,13,13,14,13, + 16,17,12,14,11,16,12, 9,10,10,14,13,10,11,10,14, + 14,10,11,11,13,13,13,14,14,16,15,12,13,13,14,14, + 9,11,10,14,13,10,10,12,13,14,11,12,11,14,13,13, + 14,14,14,15,13,14,14,15,15, 9,10,11,13,14,10,11, + 10,15,13,11,11,12,12,15,13,14,12,15,14,13,13,14, + 14,15,12,13,12,16,14,11,11,12,15,14,13,15,13,16, + 14,13,12,15,12,17,15,16,15,16,16,12,12,13,13,15, + 11,13,11,15,14,13,13,14,15,17,13,14,12, 0,13,14, + 15,14,15, 0, 9,10,10,13,13,10,11,11,13,13,10,11, + 11,13,13,12,13,12,14,14,13,14,14,15,17, 9,10,10, + 13,13,11,12,11,15,12,10,10,11,13,16,13,14,13,15, + 14,13,13,14,15,16,10,10,11,13,14,11,11,12,13,14, + 10,12,11,14,14,13,13,13,14,15,13,15,13,16,15,12, + 13,12,15,13,12,15,13,15,15,11,11,13,14,15,15,15, + 15,15,17,13,12,14,13,17,12,12,14,14,15,13,13,14, + 14,16,11,13,11,16,15,14,16,16,17, 0,14,13,11,16, + 12, +}; + +static const static_codebook _44un1__p4_0 = { + 4, 625, + (char *)_vq_lengthlist__44un1__p4_0, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44un1__p4_0, + 0 +}; + +static const long _vq_quantlist__44un1__p5_0[] = { + 4, + 3, + 5, + 2, + 6, + 1, + 7, + 0, + 8, +}; + +static const char _vq_lengthlist__44un1__p5_0[] = { + 1, 4, 4, 7, 7, 8, 8, 9, 9, 4, 6, 5, 8, 7, 8, 8, + 10, 9, 4, 6, 6, 8, 8, 8, 8,10,10, 7, 8, 7, 9, 9, + 9, 9,11,10, 7, 8, 8, 9, 9, 9, 9,10,11, 8, 8, 8, + 9, 9,10,10,11,11, 8, 8, 8, 9, 9,10,10,11,11, 9, + 10,10,11,10,11,11,12,12, 9,10,10,10,11,11,11,12, + 12, +}; + +static const static_codebook _44un1__p5_0 = { + 2, 81, + (char *)_vq_lengthlist__44un1__p5_0, + 1, -531628032, 1611661312, 4, 0, + (long *)_vq_quantlist__44un1__p5_0, + 0 +}; + +static const long _vq_quantlist__44un1__p6_0[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44un1__p6_0[] = { + 1, 4, 4, 6, 6, 8, 8,10,10,11,11,15,15, 4, 5, 5, + 8, 8, 9, 9,11,11,12,12,16,16, 4, 5, 6, 8, 8, 9, + 9,11,11,12,12,14,14, 7, 8, 8, 9, 9,10,10,11,12, + 13,13,16,17, 7, 8, 8, 9, 9,10,10,12,12,12,13,15, + 15, 9,10,10,10,10,11,11,12,12,13,13,15,16, 9, 9, + 9,10,10,11,11,13,12,13,13,17,17,10,11,11,11,12, + 12,12,13,13,14,15, 0,18,10,11,11,12,12,12,13,14, + 13,14,14,17,16,11,12,12,13,13,14,14,14,14,15,16, + 17,16,11,12,12,13,13,14,14,14,14,15,15,17,17,14, + 15,15,16,16,16,17,17,16, 0,17, 0,18,14,15,15,16, + 16, 0,15,18,18, 0,16, 0, 0, +}; + +static const static_codebook _44un1__p6_0 = { + 2, 169, + (char *)_vq_lengthlist__44un1__p6_0, + 1, -526516224, 1616117760, 4, 0, + (long *)_vq_quantlist__44un1__p6_0, + 0 +}; + +static const long _vq_quantlist__44un1__p6_1[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44un1__p6_1[] = { + 2, 4, 4, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 6, 5, 5, + 6, 5, 6, 6, 5, 6, 6, 6, 6, +}; + +static const static_codebook _44un1__p6_1 = { + 2, 25, + (char *)_vq_lengthlist__44un1__p6_1, + 1, -533725184, 1611661312, 3, 0, + (long *)_vq_quantlist__44un1__p6_1, + 0 +}; + +static const long _vq_quantlist__44un1__p7_0[] = { + 2, + 1, + 3, + 0, + 4, +}; + +static const char _vq_lengthlist__44un1__p7_0[] = { + 1, 5, 3,11,11,11,11,11,11,11, 8,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,10,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,10,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11, 8,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11, 7,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,10,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10, +}; + +static const static_codebook _44un1__p7_0 = { + 4, 625, + (char *)_vq_lengthlist__44un1__p7_0, + 1, -518709248, 1626677248, 3, 0, + (long *)_vq_quantlist__44un1__p7_0, + 0 +}; + +static const long _vq_quantlist__44un1__p7_1[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44un1__p7_1[] = { + 1, 4, 4, 6, 6, 6, 6, 9, 8, 9, 8, 8, 8, 5, 7, 7, + 7, 7, 8, 8, 8,10, 8,10, 8, 9, 5, 7, 7, 8, 7, 7, + 8,10,10,11,10,12,11, 7, 8, 8, 9, 9, 9,10,11,11, + 11,11,11,11, 7, 8, 8, 8, 9, 9, 9,10,10,10,11,11, + 12, 7, 8, 8, 9, 9,10,11,11,12,11,12,11,11, 7, 8, + 8, 9, 9,10,10,11,11,11,12,12,11, 8,10,10,10,10, + 11,11,14,11,12,12,12,13, 9,10,10,10,10,12,11,14, + 11,14,11,12,13,10,11,11,11,11,13,11,14,14,13,13, + 13,14,11,11,11,12,11,12,12,12,13,14,14,13,14,12, + 11,12,12,12,12,13,13,13,14,13,14,14,11,12,12,14, + 12,13,13,12,13,13,14,14,14, +}; + +static const static_codebook _44un1__p7_1 = { + 2, 169, + (char *)_vq_lengthlist__44un1__p7_1, + 1, -523010048, 1618608128, 4, 0, + (long *)_vq_quantlist__44un1__p7_1, + 0 +}; + +static const long _vq_quantlist__44un1__p7_2[] = { + 6, + 5, + 7, + 4, + 8, + 3, + 9, + 2, + 10, + 1, + 11, + 0, + 12, +}; + +static const char _vq_lengthlist__44un1__p7_2[] = { + 3, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9, 9, 8, 4, 5, 5, + 6, 6, 8, 8, 9, 8, 9, 9, 9, 9, 4, 5, 5, 7, 6, 8, + 8, 8, 8, 9, 8, 9, 8, 6, 7, 7, 7, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, + 9, 7, 8, 8, 8, 8, 9, 8, 9, 9,10, 9, 9,10, 7, 8, + 8, 8, 8, 9, 9, 9, 9, 9, 9,10,10, 8, 9, 9, 9, 9, + 9, 9, 9, 9,10,10, 9,10, 8, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9,10,10, 9, 9, 9,10, 9, 9,10, 9, 9,10,10, + 10,10, 9, 9, 9, 9, 9, 9, 9,10, 9,10,10,10,10, 9, + 9, 9,10, 9, 9,10,10, 9,10,10,10,10, 9, 9, 9,10, + 9, 9, 9,10,10,10,10,10,10, +}; + +static const static_codebook _44un1__p7_2 = { + 2, 169, + (char *)_vq_lengthlist__44un1__p7_2, + 1, -531103744, 1611661312, 4, 0, + (long *)_vq_quantlist__44un1__p7_2, + 0 +}; + +static const char _huff_lengthlist__44un1__short[] = { + 12,12,14,12,14,14,14,14,12, 6, 6, 8, 9, 9,11,14, + 12, 4, 2, 6, 6, 7,11,14,13, 6, 5, 7, 8, 9,11,14, + 13, 8, 5, 8, 6, 8,12,14,12, 7, 7, 8, 8, 8,10,14, + 12, 6, 3, 4, 4, 4, 7,14,11, 7, 4, 6, 6, 6, 8,14, +}; + +static const static_codebook _huff_book__44un1__short = { + 2, 64, + (char *)_huff_lengthlist__44un1__short, + 0, 0, 0, 0, 0, + NULL, + 0 +}; + diff --git a/code/libvorbis-1.3.4/lib/codebook.c b/code/libvorbis-1.3.4/lib/codebook.c new file mode 100644 index 00000000..72e514a4 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/codebook.c @@ -0,0 +1,484 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: basic codebook pack/unpack/code/decode operations + last mod: $Id: codebook.c 19057 2014-01-22 12:32:31Z xiphmont $ + + ********************************************************************/ + +#include +#include +#include +#include +#include "vorbis/codec.h" +#include "codebook.h" +#include "scales.h" +#include "misc.h" +#include "os.h" + +/* packs the given codebook into the bitstream **************************/ + +int vorbis_staticbook_pack(const static_codebook *c,oggpack_buffer *opb){ + long i,j; + int ordered=0; + + /* first the basic parameters */ + oggpack_write(opb,0x564342,24); + oggpack_write(opb,c->dim,16); + oggpack_write(opb,c->entries,24); + + /* pack the codewords. There are two packings; length ordered and + length random. Decide between the two now. */ + + for(i=1;ientries;i++) + if(c->lengthlist[i-1]==0 || c->lengthlist[i]lengthlist[i-1])break; + if(i==c->entries)ordered=1; + + if(ordered){ + /* length ordered. We only need to say how many codewords of + each length. The actual codewords are generated + deterministically */ + + long count=0; + oggpack_write(opb,1,1); /* ordered */ + oggpack_write(opb,c->lengthlist[0]-1,5); /* 1 to 32 */ + + for(i=1;ientries;i++){ + char this=c->lengthlist[i]; + char last=c->lengthlist[i-1]; + if(this>last){ + for(j=last;jentries-count)); + count=i; + } + } + } + oggpack_write(opb,i-count,_ilog(c->entries-count)); + + }else{ + /* length random. Again, we don't code the codeword itself, just + the length. This time, though, we have to encode each length */ + oggpack_write(opb,0,1); /* unordered */ + + /* algortihmic mapping has use for 'unused entries', which we tag + here. The algorithmic mapping happens as usual, but the unused + entry has no codeword. */ + for(i=0;ientries;i++) + if(c->lengthlist[i]==0)break; + + if(i==c->entries){ + oggpack_write(opb,0,1); /* no unused entries */ + for(i=0;ientries;i++) + oggpack_write(opb,c->lengthlist[i]-1,5); + }else{ + oggpack_write(opb,1,1); /* we have unused entries; thus we tag */ + for(i=0;ientries;i++){ + if(c->lengthlist[i]==0){ + oggpack_write(opb,0,1); + }else{ + oggpack_write(opb,1,1); + oggpack_write(opb,c->lengthlist[i]-1,5); + } + } + } + } + + /* is the entry number the desired return value, or do we have a + mapping? If we have a mapping, what type? */ + oggpack_write(opb,c->maptype,4); + switch(c->maptype){ + case 0: + /* no mapping */ + break; + case 1:case 2: + /* implicitly populated value mapping */ + /* explicitly populated value mapping */ + + if(!c->quantlist){ + /* no quantlist? error */ + return(-1); + } + + /* values that define the dequantization */ + oggpack_write(opb,c->q_min,32); + oggpack_write(opb,c->q_delta,32); + oggpack_write(opb,c->q_quant-1,4); + oggpack_write(opb,c->q_sequencep,1); + + { + int quantvals; + switch(c->maptype){ + case 1: + /* a single column of (c->entries/c->dim) quantized values for + building a full value list algorithmically (square lattice) */ + quantvals=_book_maptype1_quantvals(c); + break; + case 2: + /* every value (c->entries*c->dim total) specified explicitly */ + quantvals=c->entries*c->dim; + break; + default: /* NOT_REACHABLE */ + quantvals=-1; + } + + /* quantized values */ + for(i=0;iquantlist[i]),c->q_quant); + + } + break; + default: + /* error case; we don't have any other map types now */ + return(-1); + } + + return(0); +} + +/* unpacks a codebook from the packet buffer into the codebook struct, + readies the codebook auxiliary structures for decode *************/ +static_codebook *vorbis_staticbook_unpack(oggpack_buffer *opb){ + long i,j; + static_codebook *s=_ogg_calloc(1,sizeof(*s)); + s->allocedp=1; + + /* make sure alignment is correct */ + if(oggpack_read(opb,24)!=0x564342)goto _eofout; + + /* first the basic parameters */ + s->dim=oggpack_read(opb,16); + s->entries=oggpack_read(opb,24); + if(s->entries==-1)goto _eofout; + + if(_ilog(s->dim)+_ilog(s->entries)>24)goto _eofout; + + /* codeword ordering.... length ordered or unordered? */ + switch((int)oggpack_read(opb,1)){ + case 0:{ + long unused; + /* allocated but unused entries? */ + unused=oggpack_read(opb,1); + if((s->entries*(unused?1:5)+7)>>3>opb->storage-oggpack_bytes(opb)) + goto _eofout; + /* unordered */ + s->lengthlist=_ogg_malloc(sizeof(*s->lengthlist)*s->entries); + + /* allocated but unused entries? */ + if(unused){ + /* yes, unused entries */ + + for(i=0;ientries;i++){ + if(oggpack_read(opb,1)){ + long num=oggpack_read(opb,5); + if(num==-1)goto _eofout; + s->lengthlist[i]=num+1; + }else + s->lengthlist[i]=0; + } + }else{ + /* all entries used; no tagging */ + for(i=0;ientries;i++){ + long num=oggpack_read(opb,5); + if(num==-1)goto _eofout; + s->lengthlist[i]=num+1; + } + } + + break; + } + case 1: + /* ordered */ + { + long length=oggpack_read(opb,5)+1; + if(length==0)goto _eofout; + s->lengthlist=_ogg_malloc(sizeof(*s->lengthlist)*s->entries); + + for(i=0;ientries;){ + long num=oggpack_read(opb,_ilog(s->entries-i)); + if(num==-1)goto _eofout; + if(length>32 || num>s->entries-i || + (num>0 && (num-1)>>(length-1)>1)){ + goto _errout; + } + if(length>32)goto _errout; + for(j=0;jlengthlist[i]=length; + length++; + } + } + break; + default: + /* EOF */ + goto _eofout; + } + + /* Do we have a mapping to unpack? */ + switch((s->maptype=oggpack_read(opb,4))){ + case 0: + /* no mapping */ + break; + case 1: case 2: + /* implicitly populated value mapping */ + /* explicitly populated value mapping */ + + s->q_min=oggpack_read(opb,32); + s->q_delta=oggpack_read(opb,32); + s->q_quant=oggpack_read(opb,4)+1; + s->q_sequencep=oggpack_read(opb,1); + if(s->q_sequencep==-1)goto _eofout; + + { + int quantvals=0; + switch(s->maptype){ + case 1: + quantvals=(s->dim==0?0:_book_maptype1_quantvals(s)); + break; + case 2: + quantvals=s->entries*s->dim; + break; + } + + /* quantized values */ + if(((quantvals*s->q_quant+7)>>3)>opb->storage-oggpack_bytes(opb)) + goto _eofout; + s->quantlist=_ogg_malloc(sizeof(*s->quantlist)*quantvals); + for(i=0;iquantlist[i]=oggpack_read(opb,s->q_quant); + + if(quantvals&&s->quantlist[quantvals-1]==-1)goto _eofout; + } + break; + default: + goto _errout; + } + + /* all set */ + return(s); + + _errout: + _eofout: + vorbis_staticbook_destroy(s); + return(NULL); +} + +/* returns the number of bits ************************************************/ +int vorbis_book_encode(codebook *book, int a, oggpack_buffer *b){ + if(a<0 || a>=book->c->entries)return(0); + oggpack_write(b,book->codelist[a],book->c->lengthlist[a]); + return(book->c->lengthlist[a]); +} + +/* the 'eliminate the decode tree' optimization actually requires the + codewords to be MSb first, not LSb. This is an annoying inelegancy + (and one of the first places where carefully thought out design + turned out to be wrong; Vorbis II and future Ogg codecs should go + to an MSb bitpacker), but not actually the huge hit it appears to + be. The first-stage decode table catches most words so that + bitreverse is not in the main execution path. */ + +static ogg_uint32_t bitreverse(ogg_uint32_t x){ + x= ((x>>16)&0x0000ffff) | ((x<<16)&0xffff0000); + x= ((x>> 8)&0x00ff00ff) | ((x<< 8)&0xff00ff00); + x= ((x>> 4)&0x0f0f0f0f) | ((x<< 4)&0xf0f0f0f0); + x= ((x>> 2)&0x33333333) | ((x<< 2)&0xcccccccc); + return((x>> 1)&0x55555555) | ((x<< 1)&0xaaaaaaaa); +} + +STIN long decode_packed_entry_number(codebook *book, oggpack_buffer *b){ + int read=book->dec_maxlength; + long lo,hi; + long lok = oggpack_look(b,book->dec_firsttablen); + + if (lok >= 0) { + long entry = book->dec_firsttable[lok]; + if(entry&0x80000000UL){ + lo=(entry>>15)&0x7fff; + hi=book->used_entries-(entry&0x7fff); + }else{ + oggpack_adv(b, book->dec_codelengths[entry-1]); + return(entry-1); + } + }else{ + lo=0; + hi=book->used_entries; + } + + lok = oggpack_look(b, read); + + while(lok<0 && read>1) + lok = oggpack_look(b, --read); + if(lok<0)return -1; + + /* bisect search for the codeword in the ordered list */ + { + ogg_uint32_t testword=bitreverse((ogg_uint32_t)lok); + + while(hi-lo>1){ + long p=(hi-lo)>>1; + long test=book->codelist[lo+p]>testword; + lo+=p&(test-1); + hi-=p&(-test); + } + + if(book->dec_codelengths[lo]<=read){ + oggpack_adv(b, book->dec_codelengths[lo]); + return(lo); + } + } + + oggpack_adv(b, read); + + return(-1); +} + +/* Decode side is specced and easier, because we don't need to find + matches using different criteria; we simply read and map. There are + two things we need to do 'depending': + + We may need to support interleave. We don't really, but it's + convenient to do it here rather than rebuild the vector later. + + Cascades may be additive or multiplicitive; this is not inherent in + the codebook, but set in the code using the codebook. Like + interleaving, it's easiest to do it here. + addmul==0 -> declarative (set the value) + addmul==1 -> additive + addmul==2 -> multiplicitive */ + +/* returns the [original, not compacted] entry number or -1 on eof *********/ +long vorbis_book_decode(codebook *book, oggpack_buffer *b){ + if(book->used_entries>0){ + long packed_entry=decode_packed_entry_number(book,b); + if(packed_entry>=0) + return(book->dec_index[packed_entry]); + } + + /* if there's no dec_index, the codebook unpacking isn't collapsed */ + return(-1); +} + +/* returns 0 on OK or -1 on eof *************************************/ +/* decode vector / dim granularity gaurding is done in the upper layer */ +long vorbis_book_decodevs_add(codebook *book,float *a,oggpack_buffer *b,int n){ + if(book->used_entries>0){ + int step=n/book->dim; + long *entry = alloca(sizeof(*entry)*step); + float **t = alloca(sizeof(*t)*step); + int i,j,o; + + for (i = 0; i < step; i++) { + entry[i]=decode_packed_entry_number(book,b); + if(entry[i]==-1)return(-1); + t[i] = book->valuelist+entry[i]*book->dim; + } + for(i=0,o=0;idim;i++,o+=step) + for (j=0;jused_entries>0){ + int i,j,entry; + float *t; + + if(book->dim>8){ + for(i=0;ivaluelist+entry*book->dim; + for (j=0;jdim;) + a[i++]+=t[j++]; + } + }else{ + for(i=0;ivaluelist+entry*book->dim; + j=0; + switch((int)book->dim){ + case 8: + a[i++]+=t[j++]; + case 7: + a[i++]+=t[j++]; + case 6: + a[i++]+=t[j++]; + case 5: + a[i++]+=t[j++]; + case 4: + a[i++]+=t[j++]; + case 3: + a[i++]+=t[j++]; + case 2: + a[i++]+=t[j++]; + case 1: + a[i++]+=t[j++]; + case 0: + break; + } + } + } + } + return(0); +} + +/* unlike the others, we guard against n not being an integer number + of internally rather than in the upper layer (called only by + floor0) */ +long vorbis_book_decodev_set(codebook *book,float *a,oggpack_buffer *b,int n){ + if(book->used_entries>0){ + int i,j,entry; + float *t; + + for(i=0;ivaluelist+entry*book->dim; + for (j=0;idim;){ + a[i++]=t[j++]; + } + } + }else{ + int i; + + for(i=0;iused_entries>0){ + for(i=offset/ch;i<(offset+n)/ch;){ + entry = decode_packed_entry_number(book,b); + if(entry==-1)return(-1); + { + const float *t = book->valuelist+entry*book->dim; + for (j=0;jdim;j++){ + a[chptr++][i]+=t[j]; + if(chptr==ch){ + chptr=0; + i++; + } + } + } + } + } + return(0); +} diff --git a/code/libvorbis-1.3.4/lib/codebook.h b/code/libvorbis-1.3.4/lib/codebook.h new file mode 100644 index 00000000..15ad90f8 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/codebook.h @@ -0,0 +1,119 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2014 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: basic shared codebook operations + last mod: $Id: codebook.h 19057 2014-01-22 12:32:31Z xiphmont $ + + ********************************************************************/ + +#ifndef _V_CODEBOOK_H_ +#define _V_CODEBOOK_H_ + +#include + +/* This structure encapsulates huffman and VQ style encoding books; it + doesn't do anything specific to either. + + valuelist/quantlist are nonNULL (and q_* significant) only if + there's entry->value mapping to be done. + + If encode-side mapping must be done (and thus the entry needs to be + hunted), the auxiliary encode pointer will point to a decision + tree. This is true of both VQ and huffman, but is mostly useful + with VQ. + +*/ + +typedef struct static_codebook{ + long dim; /* codebook dimensions (elements per vector) */ + long entries; /* codebook entries */ + char *lengthlist; /* codeword lengths in bits */ + + /* mapping ***************************************************************/ + int maptype; /* 0=none + 1=implicitly populated values from map column + 2=listed arbitrary values */ + + /* The below does a linear, single monotonic sequence mapping. */ + long q_min; /* packed 32 bit float; quant value 0 maps to minval */ + long q_delta; /* packed 32 bit float; val 1 - val 0 == delta */ + int q_quant; /* bits: 0 < quant <= 16 */ + int q_sequencep; /* bitflag */ + + long *quantlist; /* map == 1: (int)(entries^(1/dim)) element column map + map == 2: list of dim*entries quantized entry vals + */ + int allocedp; +} static_codebook; + +typedef struct codebook{ + long dim; /* codebook dimensions (elements per vector) */ + long entries; /* codebook entries */ + long used_entries; /* populated codebook entries */ + const static_codebook *c; + + /* for encode, the below are entry-ordered, fully populated */ + /* for decode, the below are ordered by bitreversed codeword and only + used entries are populated */ + float *valuelist; /* list of dim*entries actual entry values */ + ogg_uint32_t *codelist; /* list of bitstream codewords for each entry */ + + int *dec_index; /* only used if sparseness collapsed */ + char *dec_codelengths; + ogg_uint32_t *dec_firsttable; + int dec_firsttablen; + int dec_maxlength; + + /* The current encoder uses only centered, integer-only lattice books. */ + int quantvals; + int minval; + int delta; +} codebook; + +extern void vorbis_staticbook_destroy(static_codebook *b); +extern int vorbis_book_init_encode(codebook *dest,const static_codebook *source); +extern int vorbis_book_init_decode(codebook *dest,const static_codebook *source); +extern void vorbis_book_clear(codebook *b); + +extern float *_book_unquantize(const static_codebook *b,int n,int *map); +extern float *_book_logdist(const static_codebook *b,float *vals); +extern float _float32_unpack(long val); +extern long _float32_pack(float val); +extern int _best(codebook *book, float *a, int step); +extern int _ilog(unsigned int v); +extern long _book_maptype1_quantvals(const static_codebook *b); + +extern int vorbis_book_besterror(codebook *book,float *a,int step,int addmul); +extern long vorbis_book_codeword(codebook *book,int entry); +extern long vorbis_book_codelen(codebook *book,int entry); + + + +extern int vorbis_staticbook_pack(const static_codebook *c,oggpack_buffer *b); +extern static_codebook *vorbis_staticbook_unpack(oggpack_buffer *b); + +extern int vorbis_book_encode(codebook *book, int a, oggpack_buffer *b); + +extern long vorbis_book_decode(codebook *book, oggpack_buffer *b); +extern long vorbis_book_decodevs_add(codebook *book, float *a, + oggpack_buffer *b,int n); +extern long vorbis_book_decodev_set(codebook *book, float *a, + oggpack_buffer *b,int n); +extern long vorbis_book_decodev_add(codebook *book, float *a, + oggpack_buffer *b,int n); +extern long vorbis_book_decodevv_add(codebook *book, float **a, + long off,int ch, + oggpack_buffer *b,int n); + + + +#endif diff --git a/code/libvorbis-1.3.4/lib/codec_internal.h b/code/libvorbis-1.3.4/lib/codec_internal.h new file mode 100644 index 00000000..de1bccae --- /dev/null +++ b/code/libvorbis-1.3.4/lib/codec_internal.h @@ -0,0 +1,167 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: libvorbis codec headers + last mod: $Id: codec_internal.h 16227 2009-07-08 06:58:46Z xiphmont $ + + ********************************************************************/ + +#ifndef _V_CODECI_H_ +#define _V_CODECI_H_ + +#include "envelope.h" +#include "codebook.h" + +#define BLOCKTYPE_IMPULSE 0 +#define BLOCKTYPE_PADDING 1 +#define BLOCKTYPE_TRANSITION 0 +#define BLOCKTYPE_LONG 1 + +#define PACKETBLOBS 15 + +typedef struct vorbis_block_internal{ + float **pcmdelay; /* this is a pointer into local storage */ + float ampmax; + int blocktype; + + oggpack_buffer *packetblob[PACKETBLOBS]; /* initialized, must be freed; + blob [PACKETBLOBS/2] points to + the oggpack_buffer in the + main vorbis_block */ +} vorbis_block_internal; + +typedef void vorbis_look_floor; +typedef void vorbis_look_residue; +typedef void vorbis_look_transform; + +/* mode ************************************************************/ +typedef struct { + int blockflag; + int windowtype; + int transformtype; + int mapping; +} vorbis_info_mode; + +typedef void vorbis_info_floor; +typedef void vorbis_info_residue; +typedef void vorbis_info_mapping; + +#include "psy.h" +#include "bitrate.h" + +typedef struct private_state { + /* local lookup storage */ + envelope_lookup *ve; /* envelope lookup */ + int window[2]; + vorbis_look_transform **transform[2]; /* block, type */ + drft_lookup fft_look[2]; + + int modebits; + vorbis_look_floor **flr; + vorbis_look_residue **residue; + vorbis_look_psy *psy; + vorbis_look_psy_global *psy_g_look; + + /* local storage, only used on the encoding side. This way the + application does not need to worry about freeing some packets' + memory and not others'; packet storage is always tracked. + Cleared next call to a _dsp_ function */ + unsigned char *header; + unsigned char *header1; + unsigned char *header2; + + bitrate_manager_state bms; + + ogg_int64_t sample_count; +} private_state; + +/* codec_setup_info contains all the setup information specific to the + specific compression/decompression mode in progress (eg, + psychoacoustic settings, channel setup, options, codebook + etc). +*********************************************************************/ + +#include "highlevel.h" +typedef struct codec_setup_info { + + /* Vorbis supports only short and long blocks, but allows the + encoder to choose the sizes */ + + long blocksizes[2]; + + /* modes are the primary means of supporting on-the-fly different + blocksizes, different channel mappings (LR or M/A), + different residue backends, etc. Each mode consists of a + blocksize flag and a mapping (along with the mapping setup */ + + int modes; + int maps; + int floors; + int residues; + int books; + int psys; /* encode only */ + + vorbis_info_mode *mode_param[64]; + int map_type[64]; + vorbis_info_mapping *map_param[64]; + int floor_type[64]; + vorbis_info_floor *floor_param[64]; + int residue_type[64]; + vorbis_info_residue *residue_param[64]; + static_codebook *book_param[256]; + codebook *fullbooks; + + vorbis_info_psy *psy_param[4]; /* encode only */ + vorbis_info_psy_global psy_g_param; + + bitrate_manager_info bi; + highlevel_encode_setup hi; /* used only by vorbisenc.c. It's a + highly redundant structure, but + improves clarity of program flow. */ + int halfrate_flag; /* painless downsample for decode */ +} codec_setup_info; + +extern vorbis_look_psy_global *_vp_global_look(vorbis_info *vi); +extern void _vp_global_free(vorbis_look_psy_global *look); + + + +typedef struct { + int sorted_index[VIF_POSIT+2]; + int forward_index[VIF_POSIT+2]; + int reverse_index[VIF_POSIT+2]; + + int hineighbor[VIF_POSIT]; + int loneighbor[VIF_POSIT]; + int posts; + + int n; + int quant_q; + vorbis_info_floor1 *vi; + + long phrasebits; + long postbits; + long frames; +} vorbis_look_floor1; + + + +extern int *floor1_fit(vorbis_block *vb,vorbis_look_floor1 *look, + const float *logmdct, /* in */ + const float *logmask); +extern int *floor1_interpolate_fit(vorbis_block *vb,vorbis_look_floor1 *look, + int *A,int *B, + int del); +extern int floor1_encode(oggpack_buffer *opb,vorbis_block *vb, + vorbis_look_floor1 *look, + int *post,int *ilogmask); +#endif diff --git a/code/libvorbis-1.3.4/lib/envelope.c b/code/libvorbis-1.3.4/lib/envelope.c new file mode 100644 index 00000000..010c66e2 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/envelope.c @@ -0,0 +1,375 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: PCM data envelope analysis + last mod: $Id: envelope.c 16227 2009-07-08 06:58:46Z xiphmont $ + + ********************************************************************/ + +#include +#include +#include +#include +#include +#include "vorbis/codec.h" +#include "codec_internal.h" + +#include "os.h" +#include "scales.h" +#include "envelope.h" +#include "mdct.h" +#include "misc.h" + +void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi){ + codec_setup_info *ci=vi->codec_setup; + vorbis_info_psy_global *gi=&ci->psy_g_param; + int ch=vi->channels; + int i,j; + int n=e->winlength=128; + e->searchstep=64; /* not random */ + + e->minenergy=gi->preecho_minenergy; + e->ch=ch; + e->storage=128; + e->cursor=ci->blocksizes[1]/2; + e->mdct_win=_ogg_calloc(n,sizeof(*e->mdct_win)); + mdct_init(&e->mdct,n); + + for(i=0;imdct_win[i]=sin(i/(n-1.)*M_PI); + e->mdct_win[i]*=e->mdct_win[i]; + } + + /* magic follows */ + e->band[0].begin=2; e->band[0].end=4; + e->band[1].begin=4; e->band[1].end=5; + e->band[2].begin=6; e->band[2].end=6; + e->band[3].begin=9; e->band[3].end=8; + e->band[4].begin=13; e->band[4].end=8; + e->band[5].begin=17; e->band[5].end=8; + e->band[6].begin=22; e->band[6].end=8; + + for(j=0;jband[j].end; + e->band[j].window=_ogg_malloc(n*sizeof(*e->band[0].window)); + for(i=0;iband[j].window[i]=sin((i+.5)/n*M_PI); + e->band[j].total+=e->band[j].window[i]; + } + e->band[j].total=1./e->band[j].total; + } + + e->filter=_ogg_calloc(VE_BANDS*ch,sizeof(*e->filter)); + e->mark=_ogg_calloc(e->storage,sizeof(*e->mark)); + +} + +void _ve_envelope_clear(envelope_lookup *e){ + int i; + mdct_clear(&e->mdct); + for(i=0;iband[i].window); + _ogg_free(e->mdct_win); + _ogg_free(e->filter); + _ogg_free(e->mark); + memset(e,0,sizeof(*e)); +} + +/* fairly straight threshhold-by-band based until we find something + that works better and isn't patented. */ + +static int _ve_amp(envelope_lookup *ve, + vorbis_info_psy_global *gi, + float *data, + envelope_band *bands, + envelope_filter_state *filters){ + long n=ve->winlength; + int ret=0; + long i,j; + float decay; + + /* we want to have a 'minimum bar' for energy, else we're just + basing blocks on quantization noise that outweighs the signal + itself (for low power signals) */ + + float minV=ve->minenergy; + float *vec=alloca(n*sizeof(*vec)); + + /* stretch is used to gradually lengthen the number of windows + considered prevoius-to-potential-trigger */ + int stretch=max(VE_MINSTRETCH,ve->stretch/2); + float penalty=gi->stretch_penalty-(ve->stretch/2-VE_MINSTRETCH); + if(penalty<0.f)penalty=0.f; + if(penalty>gi->stretch_penalty)penalty=gi->stretch_penalty; + + /*_analysis_output_always("lpcm",seq2,data,n,0,0, + totalshift+pos*ve->searchstep);*/ + + /* window and transform */ + for(i=0;imdct_win[i]; + mdct_forward(&ve->mdct,vec,vec); + + /*_analysis_output_always("mdct",seq2,vec,n/2,0,1,0); */ + + /* near-DC spreading function; this has nothing to do with + psychoacoustics, just sidelobe leakage and window size */ + { + float temp=vec[0]*vec[0]+.7*vec[1]*vec[1]+.2*vec[2]*vec[2]; + int ptr=filters->nearptr; + + /* the accumulation is regularly refreshed from scratch to avoid + floating point creep */ + if(ptr==0){ + decay=filters->nearDC_acc=filters->nearDC_partialacc+temp; + filters->nearDC_partialacc=temp; + }else{ + decay=filters->nearDC_acc+=temp; + filters->nearDC_partialacc+=temp; + } + filters->nearDC_acc-=filters->nearDC[ptr]; + filters->nearDC[ptr]=temp; + + decay*=(1./(VE_NEARDC+1)); + filters->nearptr++; + if(filters->nearptr>=VE_NEARDC)filters->nearptr=0; + decay=todB(&decay)*.5-15.f; + } + + /* perform spreading and limiting, also smooth the spectrum. yes, + the MDCT results in all real coefficients, but it still *behaves* + like real/imaginary pairs */ + for(i=0;i>1]=val; + decay-=8.; + } + + /*_analysis_output_always("spread",seq2++,vec,n/4,0,0,0);*/ + + /* perform preecho/postecho triggering by band */ + for(j=0;j=VE_AMP)filters[j].ampptr=0; + } + + /* look at min/max, decide trigger */ + if(valmax>gi->preecho_thresh[j]+penalty){ + ret|=1; + ret|=4; + } + if(valminpostecho_thresh[j]-penalty)ret|=2; + } + + return(ret); +} + +#if 0 +static int seq=0; +static ogg_int64_t totalshift=-1024; +#endif + +long _ve_envelope_search(vorbis_dsp_state *v){ + vorbis_info *vi=v->vi; + codec_setup_info *ci=vi->codec_setup; + vorbis_info_psy_global *gi=&ci->psy_g_param; + envelope_lookup *ve=((private_state *)(v->backend_state))->ve; + long i,j; + + int first=ve->current/ve->searchstep; + int last=v->pcm_current/ve->searchstep-VE_WIN; + if(first<0)first=0; + + /* make sure we have enough storage to match the PCM */ + if(last+VE_WIN+VE_POST>ve->storage){ + ve->storage=last+VE_WIN+VE_POST; /* be sure */ + ve->mark=_ogg_realloc(ve->mark,ve->storage*sizeof(*ve->mark)); + } + + for(j=first;jstretch++; + if(ve->stretch>VE_MAXSTRETCH*2) + ve->stretch=VE_MAXSTRETCH*2; + + for(i=0;ich;i++){ + float *pcm=v->pcm[i]+ve->searchstep*(j); + ret|=_ve_amp(ve,gi,pcm,ve->band,ve->filter+i*VE_BANDS); + } + + ve->mark[j+VE_POST]=0; + if(ret&1){ + ve->mark[j]=1; + ve->mark[j+1]=1; + } + + if(ret&2){ + ve->mark[j]=1; + if(j>0)ve->mark[j-1]=1; + } + + if(ret&4)ve->stretch=-1; + } + + ve->current=last*ve->searchstep; + + { + long centerW=v->centerW; + long testW= + centerW+ + ci->blocksizes[v->W]/4+ + ci->blocksizes[1]/2+ + ci->blocksizes[0]/4; + + j=ve->cursor; + + while(jcurrent-(ve->searchstep)){/* account for postecho + working back one window */ + if(j>=testW)return(1); + + ve->cursor=j; + + if(ve->mark[j/ve->searchstep]){ + if(j>centerW){ + +#if 0 + if(j>ve->curmark){ + float *marker=alloca(v->pcm_current*sizeof(*marker)); + int l,m; + memset(marker,0,sizeof(*marker)*v->pcm_current); + fprintf(stderr,"mark! seq=%d, cursor:%fs time:%fs\n", + seq, + (totalshift+ve->cursor)/44100., + (totalshift+j)/44100.); + _analysis_output_always("pcmL",seq,v->pcm[0],v->pcm_current,0,0,totalshift); + _analysis_output_always("pcmR",seq,v->pcm[1],v->pcm_current,0,0,totalshift); + + _analysis_output_always("markL",seq,v->pcm[0],j,0,0,totalshift); + _analysis_output_always("markR",seq,v->pcm[1],j,0,0,totalshift); + + for(m=0;msearchstep]=ve->filter[m].markers[l]*.1; + _analysis_output_always(buf,seq,marker,v->pcm_current,0,0,totalshift); + } + + for(m=0;msearchstep]=ve->filter[m+VE_BANDS].markers[l]*.1; + _analysis_output_always(buf,seq,marker,v->pcm_current,0,0,totalshift); + } + + for(l=0;lsearchstep]=ve->mark[l]*.4; + _analysis_output_always("mark",seq,marker,v->pcm_current,0,0,totalshift); + + + seq++; + + } +#endif + + ve->curmark=j; + if(j>=testW)return(1); + return(0); + } + } + j+=ve->searchstep; + } + } + + return(-1); +} + +int _ve_envelope_mark(vorbis_dsp_state *v){ + envelope_lookup *ve=((private_state *)(v->backend_state))->ve; + vorbis_info *vi=v->vi; + codec_setup_info *ci=vi->codec_setup; + long centerW=v->centerW; + long beginW=centerW-ci->blocksizes[v->W]/4; + long endW=centerW+ci->blocksizes[v->W]/4; + if(v->W){ + beginW-=ci->blocksizes[v->lW]/4; + endW+=ci->blocksizes[v->nW]/4; + }else{ + beginW-=ci->blocksizes[0]/4; + endW+=ci->blocksizes[0]/4; + } + + if(ve->curmark>=beginW && ve->curmarksearchstep; + long last=endW/ve->searchstep; + long i; + for(i=first;imark[i])return(1); + } + return(0); +} + +void _ve_envelope_shift(envelope_lookup *e,long shift){ + int smallsize=e->current/e->searchstep+VE_POST; /* adjust for placing marks + ahead of ve->current */ + int smallshift=shift/e->searchstep; + + memmove(e->mark,e->mark+smallshift,(smallsize-smallshift)*sizeof(*e->mark)); + +#if 0 + for(i=0;ich;i++) + memmove(e->filter[i].markers, + e->filter[i].markers+smallshift, + (1024-smallshift)*sizeof(*(*e->filter).markers)); + totalshift+=shift; +#endif + + e->current-=shift; + if(e->curmark>=0) + e->curmark-=shift; + e->cursor-=shift; +} diff --git a/code/libvorbis-1.3.4/lib/envelope.h b/code/libvorbis-1.3.4/lib/envelope.h new file mode 100644 index 00000000..fd15fb32 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/envelope.h @@ -0,0 +1,80 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: PCM data envelope analysis and manipulation + last mod: $Id: envelope.h 16227 2009-07-08 06:58:46Z xiphmont $ + + ********************************************************************/ + +#ifndef _V_ENVELOPE_ +#define _V_ENVELOPE_ + +#include "mdct.h" + +#define VE_PRE 16 +#define VE_WIN 4 +#define VE_POST 2 +#define VE_AMP (VE_PRE+VE_POST-1) + +#define VE_BANDS 7 +#define VE_NEARDC 15 + +#define VE_MINSTRETCH 2 /* a bit less than short block */ +#define VE_MAXSTRETCH 12 /* one-third full block */ + +typedef struct { + float ampbuf[VE_AMP]; + int ampptr; + + float nearDC[VE_NEARDC]; + float nearDC_acc; + float nearDC_partialacc; + int nearptr; + +} envelope_filter_state; + +typedef struct { + int begin; + int end; + float *window; + float total; +} envelope_band; + +typedef struct { + int ch; + int winlength; + int searchstep; + float minenergy; + + mdct_lookup mdct; + float *mdct_win; + + envelope_band band[VE_BANDS]; + envelope_filter_state *filter; + int stretch; + + int *mark; + + long storage; + long current; + long curmark; + long cursor; +} envelope_lookup; + +extern void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi); +extern void _ve_envelope_clear(envelope_lookup *e); +extern long _ve_envelope_search(vorbis_dsp_state *v); +extern void _ve_envelope_shift(envelope_lookup *e,long shift); +extern int _ve_envelope_mark(vorbis_dsp_state *v); + + +#endif diff --git a/code/libvorbis-1.3.4/lib/floor0.c b/code/libvorbis-1.3.4/lib/floor0.c new file mode 100644 index 00000000..0b5652f4 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/floor0.c @@ -0,0 +1,224 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: floor backend 0 implementation + last mod: $Id: floor0.c 19031 2013-12-03 19:20:50Z tterribe $ + + ********************************************************************/ + +#include +#include +#include +#include +#include "vorbis/codec.h" +#include "codec_internal.h" +#include "registry.h" +#include "lpc.h" +#include "lsp.h" +#include "codebook.h" +#include "scales.h" +#include "misc.h" +#include "os.h" + +#include "misc.h" +#include + +typedef struct { + int ln; + int m; + int **linearmap; + int n[2]; + + vorbis_info_floor0 *vi; + + long bits; + long frames; +} vorbis_look_floor0; + + +/***********************************************/ + +static void floor0_free_info(vorbis_info_floor *i){ + vorbis_info_floor0 *info=(vorbis_info_floor0 *)i; + if(info){ + memset(info,0,sizeof(*info)); + _ogg_free(info); + } +} + +static void floor0_free_look(vorbis_look_floor *i){ + vorbis_look_floor0 *look=(vorbis_look_floor0 *)i; + if(look){ + + if(look->linearmap){ + + if(look->linearmap[0])_ogg_free(look->linearmap[0]); + if(look->linearmap[1])_ogg_free(look->linearmap[1]); + + _ogg_free(look->linearmap); + } + memset(look,0,sizeof(*look)); + _ogg_free(look); + } +} + +static vorbis_info_floor *floor0_unpack (vorbis_info *vi,oggpack_buffer *opb){ + codec_setup_info *ci=vi->codec_setup; + int j; + + vorbis_info_floor0 *info=_ogg_malloc(sizeof(*info)); + info->order=oggpack_read(opb,8); + info->rate=oggpack_read(opb,16); + info->barkmap=oggpack_read(opb,16); + info->ampbits=oggpack_read(opb,6); + info->ampdB=oggpack_read(opb,8); + info->numbooks=oggpack_read(opb,4)+1; + + if(info->order<1)goto err_out; + if(info->rate<1)goto err_out; + if(info->barkmap<1)goto err_out; + if(info->numbooks<1)goto err_out; + + for(j=0;jnumbooks;j++){ + info->books[j]=oggpack_read(opb,8); + if(info->books[j]<0 || info->books[j]>=ci->books)goto err_out; + if(ci->book_param[info->books[j]]->maptype==0)goto err_out; + if(ci->book_param[info->books[j]]->dim<1)goto err_out; + } + return(info); + + err_out: + floor0_free_info(info); + return(NULL); +} + +/* initialize Bark scale and normalization lookups. We could do this + with static tables, but Vorbis allows a number of possible + combinations, so it's best to do it computationally. + + The below is authoritative in terms of defining scale mapping. + Note that the scale depends on the sampling rate as well as the + linear block and mapping sizes */ + +static void floor0_map_lazy_init(vorbis_block *vb, + vorbis_info_floor *infoX, + vorbis_look_floor0 *look){ + if(!look->linearmap[vb->W]){ + vorbis_dsp_state *vd=vb->vd; + vorbis_info *vi=vd->vi; + codec_setup_info *ci=vi->codec_setup; + vorbis_info_floor0 *info=(vorbis_info_floor0 *)infoX; + int W=vb->W; + int n=ci->blocksizes[W]/2,j; + + /* we choose a scaling constant so that: + floor(bark(rate/2-1)*C)=mapped-1 + floor(bark(rate/2)*C)=mapped */ + float scale=look->ln/toBARK(info->rate/2.f); + + /* the mapping from a linear scale to a smaller bark scale is + straightforward. We do *not* make sure that the linear mapping + does not skip bark-scale bins; the decoder simply skips them and + the encoder may do what it wishes in filling them. They're + necessary in some mapping combinations to keep the scale spacing + accurate */ + look->linearmap[W]=_ogg_malloc((n+1)*sizeof(**look->linearmap)); + for(j=0;jrate/2.f)/n*j) + *scale); /* bark numbers represent band edges */ + if(val>=look->ln)val=look->ln-1; /* guard against the approximation */ + look->linearmap[W][j]=val; + } + look->linearmap[W][j]=-1; + look->n[W]=n; + } +} + +static vorbis_look_floor *floor0_look(vorbis_dsp_state *vd, + vorbis_info_floor *i){ + vorbis_info_floor0 *info=(vorbis_info_floor0 *)i; + vorbis_look_floor0 *look=_ogg_calloc(1,sizeof(*look)); + + (void)vd; + + look->m=info->order; + look->ln=info->barkmap; + look->vi=info; + + look->linearmap=_ogg_calloc(2,sizeof(*look->linearmap)); + + return look; +} + +static void *floor0_inverse1(vorbis_block *vb,vorbis_look_floor *i){ + vorbis_look_floor0 *look=(vorbis_look_floor0 *)i; + vorbis_info_floor0 *info=look->vi; + int j,k; + + int ampraw=oggpack_read(&vb->opb,info->ampbits); + if(ampraw>0){ /* also handles the -1 out of data case */ + long maxval=(1<ampbits)-1; + float amp=(float)ampraw/maxval*info->ampdB; + int booknum=oggpack_read(&vb->opb,_ilog(info->numbooks)); + + if(booknum!=-1 && booknumnumbooks){ /* be paranoid */ + codec_setup_info *ci=vb->vd->vi->codec_setup; + codebook *b=ci->fullbooks+info->books[booknum]; + float last=0.f; + + /* the additional b->dim is a guard against any possible stack + smash; b->dim is provably more than we can overflow the + vector */ + float *lsp=_vorbis_block_alloc(vb,sizeof(*lsp)*(look->m+b->dim+1)); + + if(vorbis_book_decodev_set(b,lsp,&vb->opb,look->m)==-1)goto eop; + for(j=0;jm;){ + for(k=0;jm && kdim;k++,j++)lsp[j]+=last; + last=lsp[j-1]; + } + + lsp[look->m]=amp; + return(lsp); + } + } + eop: + return(NULL); +} + +static int floor0_inverse2(vorbis_block *vb,vorbis_look_floor *i, + void *memo,float *out){ + vorbis_look_floor0 *look=(vorbis_look_floor0 *)i; + vorbis_info_floor0 *info=look->vi; + + floor0_map_lazy_init(vb,info,look); + + if(memo){ + float *lsp=(float *)memo; + float amp=lsp[look->m]; + + /* take the coefficients back to a spectral envelope curve */ + vorbis_lsp_to_curve(out, + look->linearmap[vb->W], + look->n[vb->W], + look->ln, + lsp,look->m,amp,(float)info->ampdB); + return(1); + } + memset(out,0,sizeof(*out)*look->n[vb->W]); + return(0); +} + +/* export hooks */ +const vorbis_func_floor floor0_exportbundle={ + NULL,&floor0_unpack,&floor0_look,&floor0_free_info, + &floor0_free_look,&floor0_inverse1,&floor0_inverse2 +}; diff --git a/code/libvorbis-1.3.4/lib/floor1.c b/code/libvorbis-1.3.4/lib/floor1.c new file mode 100644 index 00000000..097c583d --- /dev/null +++ b/code/libvorbis-1.3.4/lib/floor1.c @@ -0,0 +1,1102 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: floor backend 1 implementation + last mod: $Id: floor1.c 19031 2013-12-03 19:20:50Z tterribe $ + + ********************************************************************/ + +#include +#include +#include +#include +#include "vorbis/codec.h" +#include "codec_internal.h" +#include "registry.h" +#include "codebook.h" +#include "misc.h" +#include "scales.h" + +#include + +#define floor1_rangedB 140 /* floor 1 fixed at -140dB to 0dB range */ + +typedef struct lsfit_acc{ + int x0; + int x1; + + int xa; + int ya; + int x2a; + int y2a; + int xya; + int an; + + int xb; + int yb; + int x2b; + int y2b; + int xyb; + int bn; +} lsfit_acc; + +/***********************************************/ + +static void floor1_free_info(vorbis_info_floor *i){ + vorbis_info_floor1 *info=(vorbis_info_floor1 *)i; + if(info){ + memset(info,0,sizeof(*info)); + _ogg_free(info); + } +} + +static void floor1_free_look(vorbis_look_floor *i){ + vorbis_look_floor1 *look=(vorbis_look_floor1 *)i; + if(look){ + /*fprintf(stderr,"floor 1 bit usage %f:%f (%f total)\n", + (float)look->phrasebits/look->frames, + (float)look->postbits/look->frames, + (float)(look->postbits+look->phrasebits)/look->frames);*/ + + memset(look,0,sizeof(*look)); + _ogg_free(look); + } +} + +static int ilog(unsigned int v){ + int ret=0; + while(v){ + ret++; + v>>=1; + } + return(ret); +} + +static int ilog2(unsigned int v){ + int ret=0; + if(v)--v; + while(v){ + ret++; + v>>=1; + } + return(ret); +} + +static void floor1_pack (vorbis_info_floor *i,oggpack_buffer *opb){ + vorbis_info_floor1 *info=(vorbis_info_floor1 *)i; + int j,k; + int count=0; + int rangebits; + int maxposit=info->postlist[1]; + int maxclass=-1; + + /* save out partitions */ + oggpack_write(opb,info->partitions,5); /* only 0 to 31 legal */ + for(j=0;jpartitions;j++){ + oggpack_write(opb,info->partitionclass[j],4); /* only 0 to 15 legal */ + if(maxclasspartitionclass[j])maxclass=info->partitionclass[j]; + } + + /* save out partition classes */ + for(j=0;jclass_dim[j]-1,3); /* 1 to 8 */ + oggpack_write(opb,info->class_subs[j],2); /* 0 to 3 */ + if(info->class_subs[j])oggpack_write(opb,info->class_book[j],8); + for(k=0;k<(1<class_subs[j]);k++) + oggpack_write(opb,info->class_subbook[j][k]+1,8); + } + + /* save out the post list */ + oggpack_write(opb,info->mult-1,2); /* only 1,2,3,4 legal now */ + oggpack_write(opb,ilog2(maxposit),4); + rangebits=ilog2(maxposit); + + for(j=0,k=0;jpartitions;j++){ + count+=info->class_dim[info->partitionclass[j]]; + for(;kpostlist[k+2],rangebits); + } +} + +static int icomp(const void *a,const void *b){ + return(**(int **)a-**(int **)b); +} + +static vorbis_info_floor *floor1_unpack (vorbis_info *vi,oggpack_buffer *opb){ + codec_setup_info *ci=vi->codec_setup; + int j,k,count=0,maxclass=-1,rangebits; + + vorbis_info_floor1 *info=_ogg_calloc(1,sizeof(*info)); + /* read partitions */ + info->partitions=oggpack_read(opb,5); /* only 0 to 31 legal */ + for(j=0;jpartitions;j++){ + info->partitionclass[j]=oggpack_read(opb,4); /* only 0 to 15 legal */ + if(info->partitionclass[j]<0)goto err_out; + if(maxclasspartitionclass[j])maxclass=info->partitionclass[j]; + } + + /* read partition classes */ + for(j=0;jclass_dim[j]=oggpack_read(opb,3)+1; /* 1 to 8 */ + info->class_subs[j]=oggpack_read(opb,2); /* 0,1,2,3 bits */ + if(info->class_subs[j]<0) + goto err_out; + if(info->class_subs[j])info->class_book[j]=oggpack_read(opb,8); + if(info->class_book[j]<0 || info->class_book[j]>=ci->books) + goto err_out; + for(k=0;k<(1<class_subs[j]);k++){ + info->class_subbook[j][k]=oggpack_read(opb,8)-1; + if(info->class_subbook[j][k]<-1 || info->class_subbook[j][k]>=ci->books) + goto err_out; + } + } + + /* read the post list */ + info->mult=oggpack_read(opb,2)+1; /* only 1,2,3,4 legal now */ + rangebits=oggpack_read(opb,4); + if(rangebits<0)goto err_out; + + for(j=0,k=0;jpartitions;j++){ + count+=info->class_dim[info->partitionclass[j]]; + if(count>VIF_POSIT) goto err_out; + for(;kpostlist[k+2]=oggpack_read(opb,rangebits); + if(t<0 || t>=(1<postlist[0]=0; + info->postlist[1]=1<postlist+j; + qsort(sortpointer,count+2,sizeof(*sortpointer),icomp); + + for(j=1;jvi=info; + look->n=info->postlist[1]; + + /* we drop each position value in-between already decoded values, + and use linear interpolation to predict each new value past the + edges. The positions are read in the order of the position + list... we precompute the bounding positions in the lookup. Of + course, the neighbors can change (if a position is declined), but + this is an initial mapping */ + + for(i=0;ipartitions;i++)n+=info->class_dim[info->partitionclass[i]]; + n+=2; + look->posts=n; + + /* also store a sorted position index */ + for(i=0;ipostlist+i; + qsort(sortpointer,n,sizeof(*sortpointer),icomp); + + /* points from sort order back to range number */ + for(i=0;iforward_index[i]=sortpointer[i]-info->postlist; + /* points from range order to sorted position */ + for(i=0;ireverse_index[look->forward_index[i]]=i; + /* we actually need the post values too */ + for(i=0;isorted_index[i]=info->postlist[look->forward_index[i]]; + + /* quantize values to multiplier spec */ + switch(info->mult){ + case 1: /* 1024 -> 256 */ + look->quant_q=256; + break; + case 2: /* 1024 -> 128 */ + look->quant_q=128; + break; + case 3: /* 1024 -> 86 */ + look->quant_q=86; + break; + case 4: /* 1024 -> 64 */ + look->quant_q=64; + break; + } + + /* discover our neighbors for decode where we don't use fit flags + (that would push the neighbors outward) */ + for(i=0;in; + int currentx=info->postlist[i+2]; + for(j=0;jpostlist[j]; + if(x>lx && xcurrentx){ + hi=j; + hx=x; + } + } + look->loneighbor[i]=lo; + look->hineighbor[i]=hi; + } + + return(look); +} + +static int render_point(int x0,int x1,int y0,int y1,int x){ + y0&=0x7fff; /* mask off flag */ + y1&=0x7fff; + + { + int dy=y1-y0; + int adx=x1-x0; + int ady=abs(dy); + int err=ady*(x-x0); + + int off=err/adx; + if(dy<0)return(y0-off); + return(y0+off); + } +} + +static int vorbis_dBquant(const float *x){ + int i= *x*7.3142857f+1023.5f; + if(i>1023)return(1023); + if(i<0)return(0); + return i; +} + +static const float FLOOR1_fromdB_LOOKUP[256]={ + 1.0649863e-07F, 1.1341951e-07F, 1.2079015e-07F, 1.2863978e-07F, + 1.3699951e-07F, 1.4590251e-07F, 1.5538408e-07F, 1.6548181e-07F, + 1.7623575e-07F, 1.8768855e-07F, 1.9988561e-07F, 2.128753e-07F, + 2.2670913e-07F, 2.4144197e-07F, 2.5713223e-07F, 2.7384213e-07F, + 2.9163793e-07F, 3.1059021e-07F, 3.3077411e-07F, 3.5226968e-07F, + 3.7516214e-07F, 3.9954229e-07F, 4.2550680e-07F, 4.5315863e-07F, + 4.8260743e-07F, 5.1396998e-07F, 5.4737065e-07F, 5.8294187e-07F, + 6.2082472e-07F, 6.6116941e-07F, 7.0413592e-07F, 7.4989464e-07F, + 7.9862701e-07F, 8.5052630e-07F, 9.0579828e-07F, 9.6466216e-07F, + 1.0273513e-06F, 1.0941144e-06F, 1.1652161e-06F, 1.2409384e-06F, + 1.3215816e-06F, 1.4074654e-06F, 1.4989305e-06F, 1.5963394e-06F, + 1.7000785e-06F, 1.8105592e-06F, 1.9282195e-06F, 2.0535261e-06F, + 2.1869758e-06F, 2.3290978e-06F, 2.4804557e-06F, 2.6416497e-06F, + 2.8133190e-06F, 2.9961443e-06F, 3.1908506e-06F, 3.3982101e-06F, + 3.6190449e-06F, 3.8542308e-06F, 4.1047004e-06F, 4.3714470e-06F, + 4.6555282e-06F, 4.9580707e-06F, 5.2802740e-06F, 5.6234160e-06F, + 5.9888572e-06F, 6.3780469e-06F, 6.7925283e-06F, 7.2339451e-06F, + 7.7040476e-06F, 8.2047000e-06F, 8.7378876e-06F, 9.3057248e-06F, + 9.9104632e-06F, 1.0554501e-05F, 1.1240392e-05F, 1.1970856e-05F, + 1.2748789e-05F, 1.3577278e-05F, 1.4459606e-05F, 1.5399272e-05F, + 1.6400004e-05F, 1.7465768e-05F, 1.8600792e-05F, 1.9809576e-05F, + 2.1096914e-05F, 2.2467911e-05F, 2.3928002e-05F, 2.5482978e-05F, + 2.7139006e-05F, 2.8902651e-05F, 3.0780908e-05F, 3.2781225e-05F, + 3.4911534e-05F, 3.7180282e-05F, 3.9596466e-05F, 4.2169667e-05F, + 4.4910090e-05F, 4.7828601e-05F, 5.0936773e-05F, 5.4246931e-05F, + 5.7772202e-05F, 6.1526565e-05F, 6.5524908e-05F, 6.9783085e-05F, + 7.4317983e-05F, 7.9147585e-05F, 8.4291040e-05F, 8.9768747e-05F, + 9.5602426e-05F, 0.00010181521F, 0.00010843174F, 0.00011547824F, + 0.00012298267F, 0.00013097477F, 0.00013948625F, 0.00014855085F, + 0.00015820453F, 0.00016848555F, 0.00017943469F, 0.00019109536F, + 0.00020351382F, 0.00021673929F, 0.00023082423F, 0.00024582449F, + 0.00026179955F, 0.00027881276F, 0.00029693158F, 0.00031622787F, + 0.00033677814F, 0.00035866388F, 0.00038197188F, 0.00040679456F, + 0.00043323036F, 0.00046138411F, 0.00049136745F, 0.00052329927F, + 0.00055730621F, 0.00059352311F, 0.00063209358F, 0.00067317058F, + 0.00071691700F, 0.00076350630F, 0.00081312324F, 0.00086596457F, + 0.00092223983F, 0.00098217216F, 0.0010459992F, 0.0011139742F, + 0.0011863665F, 0.0012634633F, 0.0013455702F, 0.0014330129F, + 0.0015261382F, 0.0016253153F, 0.0017309374F, 0.0018434235F, + 0.0019632195F, 0.0020908006F, 0.0022266726F, 0.0023713743F, + 0.0025254795F, 0.0026895994F, 0.0028643847F, 0.0030505286F, + 0.0032487691F, 0.0034598925F, 0.0036847358F, 0.0039241906F, + 0.0041792066F, 0.0044507950F, 0.0047400328F, 0.0050480668F, + 0.0053761186F, 0.0057254891F, 0.0060975636F, 0.0064938176F, + 0.0069158225F, 0.0073652516F, 0.0078438871F, 0.0083536271F, + 0.0088964928F, 0.009474637F, 0.010090352F, 0.010746080F, + 0.011444421F, 0.012188144F, 0.012980198F, 0.013823725F, + 0.014722068F, 0.015678791F, 0.016697687F, 0.017782797F, + 0.018938423F, 0.020169149F, 0.021479854F, 0.022875735F, + 0.024362330F, 0.025945531F, 0.027631618F, 0.029427276F, + 0.031339626F, 0.033376252F, 0.035545228F, 0.037855157F, + 0.040315199F, 0.042935108F, 0.045725273F, 0.048696758F, + 0.051861348F, 0.055231591F, 0.058820850F, 0.062643361F, + 0.066714279F, 0.071049749F, 0.075666962F, 0.080584227F, + 0.085821044F, 0.091398179F, 0.097337747F, 0.10366330F, + 0.11039993F, 0.11757434F, 0.12521498F, 0.13335215F, + 0.14201813F, 0.15124727F, 0.16107617F, 0.17154380F, + 0.18269168F, 0.19456402F, 0.20720788F, 0.22067342F, + 0.23501402F, 0.25028656F, 0.26655159F, 0.28387361F, + 0.30232132F, 0.32196786F, 0.34289114F, 0.36517414F, + 0.38890521F, 0.41417847F, 0.44109412F, 0.46975890F, + 0.50028648F, 0.53279791F, 0.56742212F, 0.60429640F, + 0.64356699F, 0.68538959F, 0.72993007F, 0.77736504F, + 0.82788260F, 0.88168307F, 0.9389798F, 1.F, +}; + +static void render_line(int n, int x0,int x1,int y0,int y1,float *d){ + int dy=y1-y0; + int adx=x1-x0; + int ady=abs(dy); + int base=dy/adx; + int sy=(dy<0?base-1:base+1); + int x=x0; + int y=y0; + int err=0; + + ady-=abs(base*adx); + + if(n>x1)n=x1; + + if(x=adx){ + err-=adx; + y+=sy; + }else{ + y+=base; + } + d[x]*=FLOOR1_fromdB_LOOKUP[y]; + } +} + +static void render_line0(int n, int x0,int x1,int y0,int y1,int *d){ + int dy=y1-y0; + int adx=x1-x0; + int ady=abs(dy); + int base=dy/adx; + int sy=(dy<0?base-1:base+1); + int x=x0; + int y=y0; + int err=0; + + ady-=abs(base*adx); + + if(n>x1)n=x1; + + if(x=adx){ + err-=adx; + y+=sy; + }else{ + y+=base; + } + d[x]=y; + } +} + +/* the floor has already been filtered to only include relevant sections */ +static int accumulate_fit(const float *flr,const float *mdct, + int x0, int x1,lsfit_acc *a, + int n,vorbis_info_floor1 *info){ + long i; + + int xa=0,ya=0,x2a=0,y2a=0,xya=0,na=0, xb=0,yb=0,x2b=0,y2b=0,xyb=0,nb=0; + + memset(a,0,sizeof(*a)); + a->x0=x0; + a->x1=x1; + if(x1>=n)x1=n-1; + + for(i=x0;i<=x1;i++){ + int quantized=vorbis_dBquant(flr+i); + if(quantized){ + if(mdct[i]+info->twofitatten>=flr[i]){ + xa += i; + ya += quantized; + x2a += i*i; + y2a += quantized*quantized; + xya += i*quantized; + na++; + }else{ + xb += i; + yb += quantized; + x2b += i*i; + y2b += quantized*quantized; + xyb += i*quantized; + nb++; + } + } + } + + a->xa=xa; + a->ya=ya; + a->x2a=x2a; + a->y2a=y2a; + a->xya=xya; + a->an=na; + + a->xb=xb; + a->yb=yb; + a->x2b=x2b; + a->y2b=y2b; + a->xyb=xyb; + a->bn=nb; + + return(na); +} + +static int fit_line(lsfit_acc *a,int fits,int *y0,int *y1, + vorbis_info_floor1 *info){ + double xb=0,yb=0,x2b=0,y2b=0,xyb=0,bn=0; + int i; + int x0=a[0].x0; + int x1=a[fits-1].x1; + + for(i=0;itwofitweight/(a[i].an+1)+1.; + + xb+=a[i].xb + a[i].xa * weight; + yb+=a[i].yb + a[i].ya * weight; + x2b+=a[i].x2b + a[i].x2a * weight; + y2b+=a[i].y2b + a[i].y2a * weight; + xyb+=a[i].xyb + a[i].xya * weight; + bn+=a[i].bn + a[i].an * weight; + } + + if(*y0>=0){ + xb+= x0; + yb+= *y0; + x2b+= x0 * x0; + y2b+= *y0 * *y0; + xyb+= *y0 * x0; + bn++; + } + + if(*y1>=0){ + xb+= x1; + yb+= *y1; + x2b+= x1 * x1; + y2b+= *y1 * *y1; + xyb+= *y1 * x1; + bn++; + } + + { + double denom=(bn*x2b-xb*xb); + + if(denom>0.){ + double a=(yb*x2b-xyb*xb)/denom; + double b=(bn*xyb-xb*yb)/denom; + *y0=rint(a+b*x0); + *y1=rint(a+b*x1); + + /* limit to our range! */ + if(*y0>1023)*y0=1023; + if(*y1>1023)*y1=1023; + if(*y0<0)*y0=0; + if(*y1<0)*y1=0; + + return 0; + }else{ + *y0=0; + *y1=0; + return 1; + } + } +} + +static int inspect_error(int x0,int x1,int y0,int y1,const float *mask, + const float *mdct, + vorbis_info_floor1 *info){ + int dy=y1-y0; + int adx=x1-x0; + int ady=abs(dy); + int base=dy/adx; + int sy=(dy<0?base-1:base+1); + int x=x0; + int y=y0; + int err=0; + int val=vorbis_dBquant(mask+x); + int mse=0; + int n=0; + + ady-=abs(base*adx); + + mse=(y-val); + mse*=mse; + n++; + if(mdct[x]+info->twofitatten>=mask[x]){ + if(y+info->maxovermaxunder>val)return(1); + } + + while(++x=adx){ + err-=adx; + y+=sy; + }else{ + y+=base; + } + + val=vorbis_dBquant(mask+x); + mse+=((y-val)*(y-val)); + n++; + if(mdct[x]+info->twofitatten>=mask[x]){ + if(val){ + if(y+info->maxovermaxunder>val)return(1); + } + } + } + + if(info->maxover*info->maxover/n>info->maxerr)return(0); + if(info->maxunder*info->maxunder/n>info->maxerr)return(0); + if(mse/n>info->maxerr)return(1); + return(0); +} + +static int post_Y(int *A,int *B,int pos){ + if(A[pos]<0) + return B[pos]; + if(B[pos]<0) + return A[pos]; + + return (A[pos]+B[pos])>>1; +} + +int *floor1_fit(vorbis_block *vb,vorbis_look_floor1 *look, + const float *logmdct, /* in */ + const float *logmask){ + long i,j; + vorbis_info_floor1 *info=look->vi; + long n=look->n; + long posts=look->posts; + long nonzero=0; + lsfit_acc fits[VIF_POSIT+1]; + int fit_valueA[VIF_POSIT+2]; /* index by range list position */ + int fit_valueB[VIF_POSIT+2]; /* index by range list position */ + + int loneighbor[VIF_POSIT+2]; /* sorted index of range list position (+2) */ + int hineighbor[VIF_POSIT+2]; + int *output=NULL; + int memo[VIF_POSIT+2]; + + for(i=0;isorted_index[i], + look->sorted_index[i+1],fits+i, + n,info); + } + + if(nonzero){ + /* start by fitting the implicit base case.... */ + int y0=-200; + int y1=-200; + fit_line(fits,posts-1,&y0,&y1,info); + + fit_valueA[0]=y0; + fit_valueB[0]=y0; + fit_valueB[1]=y1; + fit_valueA[1]=y1; + + /* Non degenerate case */ + /* start progressive splitting. This is a greedy, non-optimal + algorithm, but simple and close enough to the best + answer. */ + for(i=2;ireverse_index[i]; + int ln=loneighbor[sortpos]; + int hn=hineighbor[sortpos]; + + /* eliminate repeat searches of a particular range with a memo */ + if(memo[ln]!=hn){ + /* haven't performed this error search yet */ + int lsortpos=look->reverse_index[ln]; + int hsortpos=look->reverse_index[hn]; + memo[ln]=hn; + + { + /* A note: we want to bound/minimize *local*, not global, error */ + int lx=info->postlist[ln]; + int hx=info->postlist[hn]; + int ly=post_Y(fit_valueA,fit_valueB,ln); + int hy=post_Y(fit_valueA,fit_valueB,hn); + + if(ly==-1 || hy==-1){ + exit(1); + } + + if(inspect_error(lx,hx,ly,hy,logmask,logmdct,info)){ + /* outside error bounds/begin search area. Split it. */ + int ly0=-200; + int ly1=-200; + int hy0=-200; + int hy1=-200; + int ret0=fit_line(fits+lsortpos,sortpos-lsortpos,&ly0,&ly1,info); + int ret1=fit_line(fits+sortpos,hsortpos-sortpos,&hy0,&hy1,info); + + if(ret0){ + ly0=ly; + ly1=hy0; + } + if(ret1){ + hy0=ly1; + hy1=hy; + } + + if(ret0 && ret1){ + fit_valueA[i]=-200; + fit_valueB[i]=-200; + }else{ + /* store new edge values */ + fit_valueB[ln]=ly0; + if(ln==0)fit_valueA[ln]=ly0; + fit_valueA[i]=ly1; + fit_valueB[i]=hy0; + fit_valueA[hn]=hy1; + if(hn==1)fit_valueB[hn]=hy1; + + if(ly1>=0 || hy0>=0){ + /* store new neighbor values */ + for(j=sortpos-1;j>=0;j--) + if(hineighbor[j]==hn) + hineighbor[j]=i; + else + break; + for(j=sortpos+1;jloneighbor[i-2]; + int hn=look->hineighbor[i-2]; + int x0=info->postlist[ln]; + int x1=info->postlist[hn]; + int y0=output[ln]; + int y1=output[hn]; + + int predicted=render_point(x0,x1,y0,y1,info->postlist[i]); + int vx=post_Y(fit_valueA,fit_valueB,i); + + if(vx>=0 && predicted!=vx){ + output[i]=vx; + }else{ + output[i]= predicted|0x8000; + } + } + } + + return(output); + +} + +int *floor1_interpolate_fit(vorbis_block *vb,vorbis_look_floor1 *look, + int *A,int *B, + int del){ + + long i; + long posts=look->posts; + int *output=NULL; + + if(A && B){ + output=_vorbis_block_alloc(vb,sizeof(*output)*posts); + + /* overly simpleminded--- look again post 1.2 */ + for(i=0;i>16; + if(A[i]&0x8000 && B[i]&0x8000)output[i]|=0x8000; + } + } + + return(output); +} + + +int floor1_encode(oggpack_buffer *opb,vorbis_block *vb, + vorbis_look_floor1 *look, + int *post,int *ilogmask){ + + long i,j; + vorbis_info_floor1 *info=look->vi; + long posts=look->posts; + codec_setup_info *ci=vb->vd->vi->codec_setup; + int out[VIF_POSIT+2]; + static_codebook **sbooks=ci->book_param; + codebook *books=ci->fullbooks; + + /* quantize values to multiplier spec */ + if(post){ + for(i=0;imult){ + case 1: /* 1024 -> 256 */ + val>>=2; + break; + case 2: /* 1024 -> 128 */ + val>>=3; + break; + case 3: /* 1024 -> 86 */ + val/=12; + break; + case 4: /* 1024 -> 64 */ + val>>=4; + break; + } + post[i]=val | (post[i]&0x8000); + } + + out[0]=post[0]; + out[1]=post[1]; + + /* find prediction values for each post and subtract them */ + for(i=2;iloneighbor[i-2]; + int hn=look->hineighbor[i-2]; + int x0=info->postlist[ln]; + int x1=info->postlist[hn]; + int y0=post[ln]; + int y1=post[hn]; + + int predicted=render_point(x0,x1,y0,y1,info->postlist[i]); + + if((post[i]&0x8000) || (predicted==post[i])){ + post[i]=predicted|0x8000; /* in case there was roundoff jitter + in interpolation */ + out[i]=0; + }else{ + int headroom=(look->quant_q-predictedquant_q-predicted:predicted); + + int val=post[i]-predicted; + + /* at this point the 'deviation' value is in the range +/- max + range, but the real, unique range can always be mapped to + only [0-maxrange). So we want to wrap the deviation into + this limited range, but do it in the way that least screws + an essentially gaussian probability distribution. */ + + if(val<0) + if(val<-headroom) + val=headroom-val-1; + else + val=-1-(val<<1); + else + if(val>=headroom) + val= val+headroom; + else + val<<=1; + + out[i]=val; + post[ln]&=0x7fff; + post[hn]&=0x7fff; + } + } + + /* we have everything we need. pack it out */ + /* mark nontrivial floor */ + oggpack_write(opb,1,1); + + /* beginning/end post */ + look->frames++; + look->postbits+=ilog(look->quant_q-1)*2; + oggpack_write(opb,out[0],ilog(look->quant_q-1)); + oggpack_write(opb,out[1],ilog(look->quant_q-1)); + + + /* partition by partition */ + for(i=0,j=2;ipartitions;i++){ + int class=info->partitionclass[i]; + int cdim=info->class_dim[class]; + int csubbits=info->class_subs[class]; + int csub=1<class_subbook[class][k]; + if(booknum<0){ + maxval[k]=1; + }else{ + maxval[k]=sbooks[info->class_subbook[class][k]]->entries; + } + } + for(k=0;kphrasebits+= + vorbis_book_encode(books+info->class_book[class],cval,opb); + +#ifdef TRAIN_FLOOR1 + { + FILE *of; + char buffer[80]; + sprintf(buffer,"line_%dx%ld_class%d.vqd", + vb->pcmend/2,posts-2,class); + of=fopen(buffer,"a"); + fprintf(of,"%d\n",cval); + fclose(of); + } +#endif + } + + /* write post values */ + for(k=0;kclass_subbook[class][bookas[k]]; + if(book>=0){ + /* hack to allow training with 'bad' books */ + if(out[j+k]<(books+book)->entries) + look->postbits+=vorbis_book_encode(books+book, + out[j+k],opb); + /*else + fprintf(stderr,"+!");*/ + +#ifdef TRAIN_FLOOR1 + { + FILE *of; + char buffer[80]; + sprintf(buffer,"line_%dx%ld_%dsub%d.vqd", + vb->pcmend/2,posts-2,class,bookas[k]); + of=fopen(buffer,"a"); + fprintf(of,"%d\n",out[j+k]); + fclose(of); + } +#endif + } + } + j+=cdim; + } + + { + /* generate quantized floor equivalent to what we'd unpack in decode */ + /* render the lines */ + int hx=0; + int lx=0; + int ly=post[0]*info->mult; + int n=ci->blocksizes[vb->W]/2; + + for(j=1;jposts;j++){ + int current=look->forward_index[j]; + int hy=post[current]&0x7fff; + if(hy==post[current]){ + + hy*=info->mult; + hx=info->postlist[current]; + + render_line0(n,lx,hx,ly,hy,ilogmask); + + lx=hx; + ly=hy; + } + } + for(j=hx;jpcmend/2;j++)ilogmask[j]=ly; /* be certain */ + return(1); + } + }else{ + oggpack_write(opb,0,1); + memset(ilogmask,0,vb->pcmend/2*sizeof(*ilogmask)); + return(0); + } +} + +static void *floor1_inverse1(vorbis_block *vb,vorbis_look_floor *in){ + vorbis_look_floor1 *look=(vorbis_look_floor1 *)in; + vorbis_info_floor1 *info=look->vi; + codec_setup_info *ci=vb->vd->vi->codec_setup; + + int i,j,k; + codebook *books=ci->fullbooks; + + /* unpack wrapped/predicted values from stream */ + if(oggpack_read(&vb->opb,1)==1){ + int *fit_value=_vorbis_block_alloc(vb,(look->posts)*sizeof(*fit_value)); + + fit_value[0]=oggpack_read(&vb->opb,ilog(look->quant_q-1)); + fit_value[1]=oggpack_read(&vb->opb,ilog(look->quant_q-1)); + + /* partition by partition */ + for(i=0,j=2;ipartitions;i++){ + int class=info->partitionclass[i]; + int cdim=info->class_dim[class]; + int csubbits=info->class_subs[class]; + int csub=1<class_book[class],&vb->opb); + + if(cval==-1)goto eop; + } + + for(k=0;kclass_subbook[class][cval&(csub-1)]; + cval>>=csubbits; + if(book>=0){ + if((fit_value[j+k]=vorbis_book_decode(books+book,&vb->opb))==-1) + goto eop; + }else{ + fit_value[j+k]=0; + } + } + j+=cdim; + } + + /* unwrap positive values and reconsitute via linear interpolation */ + for(i=2;iposts;i++){ + int predicted=render_point(info->postlist[look->loneighbor[i-2]], + info->postlist[look->hineighbor[i-2]], + fit_value[look->loneighbor[i-2]], + fit_value[look->hineighbor[i-2]], + info->postlist[i]); + int hiroom=look->quant_q-predicted; + int loroom=predicted; + int room=(hiroom=room){ + if(hiroom>loroom){ + val = val-loroom; + }else{ + val = -1-(val-hiroom); + } + }else{ + if(val&1){ + val= -((val+1)>>1); + }else{ + val>>=1; + } + } + + fit_value[i]=(val+predicted)&0x7fff; + fit_value[look->loneighbor[i-2]]&=0x7fff; + fit_value[look->hineighbor[i-2]]&=0x7fff; + + }else{ + fit_value[i]=predicted|0x8000; + } + + } + + return(fit_value); + } + eop: + return(NULL); +} + +static int floor1_inverse2(vorbis_block *vb,vorbis_look_floor *in,void *memo, + float *out){ + vorbis_look_floor1 *look=(vorbis_look_floor1 *)in; + vorbis_info_floor1 *info=look->vi; + + codec_setup_info *ci=vb->vd->vi->codec_setup; + int n=ci->blocksizes[vb->W]/2; + int j; + + if(memo){ + /* render the lines */ + int *fit_value=(int *)memo; + int hx=0; + int lx=0; + int ly=fit_value[0]*info->mult; + /* guard lookup against out-of-range values */ + ly=(ly<0?0:ly>255?255:ly); + + for(j=1;jposts;j++){ + int current=look->forward_index[j]; + int hy=fit_value[current]&0x7fff; + if(hy==fit_value[current]){ + + hx=info->postlist[current]; + hy*=info->mult; + /* guard lookup against out-of-range values */ + hy=(hy<0?0:hy>255?255:hy); + + render_line(n,lx,hx,ly,hy,out); + + lx=hx; + ly=hy; + } + } + for(j=hx;j header packets + last mod: $Id: info.c 19058 2014-01-22 18:03:15Z xiphmont $ + + ********************************************************************/ + +/* general handling of the header and the vorbis_info structure (and + substructures) */ + +#include +#include +#include +#include +#include "vorbis/codec.h" +#include "codec_internal.h" +#include "codebook.h" +#include "registry.h" +#include "window.h" +#include "psy.h" +#include "misc.h" +#include "os.h" + +#define GENERAL_VENDOR_STRING "Xiph.Org libVorbis 1.3.4" +#define ENCODE_VENDOR_STRING "Xiph.Org libVorbis I 20140122 (Turpakäräjiin)" + +/* helpers */ +static int ilog2(unsigned int v){ + int ret=0; + if(v)--v; + while(v){ + ret++; + v>>=1; + } + return(ret); +} + +static void _v_writestring(oggpack_buffer *o,const char *s, int bytes){ + + while(bytes--){ + oggpack_write(o,*s++,8); + } +} + +static void _v_readstring(oggpack_buffer *o,char *buf,int bytes){ + while(bytes--){ + *buf++=oggpack_read(o,8); + } +} + +void vorbis_comment_init(vorbis_comment *vc){ + memset(vc,0,sizeof(*vc)); +} + +void vorbis_comment_add(vorbis_comment *vc,const char *comment){ + vc->user_comments=_ogg_realloc(vc->user_comments, + (vc->comments+2)*sizeof(*vc->user_comments)); + vc->comment_lengths=_ogg_realloc(vc->comment_lengths, + (vc->comments+2)*sizeof(*vc->comment_lengths)); + vc->comment_lengths[vc->comments]=strlen(comment); + vc->user_comments[vc->comments]=_ogg_malloc(vc->comment_lengths[vc->comments]+1); + strcpy(vc->user_comments[vc->comments], comment); + vc->comments++; + vc->user_comments[vc->comments]=NULL; +} + +void vorbis_comment_add_tag(vorbis_comment *vc, const char *tag, const char *contents){ + char *comment=alloca(strlen(tag)+strlen(contents)+2); /* +2 for = and \0 */ + strcpy(comment, tag); + strcat(comment, "="); + strcat(comment, contents); + vorbis_comment_add(vc, comment); +} + +/* This is more or less the same as strncasecmp - but that doesn't exist + * everywhere, and this is a fairly trivial function, so we include it */ +static int tagcompare(const char *s1, const char *s2, int n){ + int c=0; + while(c < n){ + if(toupper(s1[c]) != toupper(s2[c])) + return !0; + c++; + } + return 0; +} + +char *vorbis_comment_query(vorbis_comment *vc, const char *tag, int count){ + long i; + int found = 0; + int taglen = strlen(tag)+1; /* +1 for the = we append */ + char *fulltag = alloca(taglen+ 1); + + strcpy(fulltag, tag); + strcat(fulltag, "="); + + for(i=0;icomments;i++){ + if(!tagcompare(vc->user_comments[i], fulltag, taglen)){ + if(count == found) + /* We return a pointer to the data, not a copy */ + return vc->user_comments[i] + taglen; + else + found++; + } + } + return NULL; /* didn't find anything */ +} + +int vorbis_comment_query_count(vorbis_comment *vc, const char *tag){ + int i,count=0; + int taglen = strlen(tag)+1; /* +1 for the = we append */ + char *fulltag = alloca(taglen+1); + strcpy(fulltag,tag); + strcat(fulltag, "="); + + for(i=0;icomments;i++){ + if(!tagcompare(vc->user_comments[i], fulltag, taglen)) + count++; + } + + return count; +} + +void vorbis_comment_clear(vorbis_comment *vc){ + if(vc){ + long i; + if(vc->user_comments){ + for(i=0;icomments;i++) + if(vc->user_comments[i])_ogg_free(vc->user_comments[i]); + _ogg_free(vc->user_comments); + } + if(vc->comment_lengths)_ogg_free(vc->comment_lengths); + if(vc->vendor)_ogg_free(vc->vendor); + memset(vc,0,sizeof(*vc)); + } +} + +/* blocksize 0 is guaranteed to be short, 1 is guaranteed to be long. + They may be equal, but short will never ge greater than long */ +int vorbis_info_blocksize(vorbis_info *vi,int zo){ + codec_setup_info *ci = vi->codec_setup; + return ci ? ci->blocksizes[zo] : -1; +} + +/* used by synthesis, which has a full, alloced vi */ +void vorbis_info_init(vorbis_info *vi){ + memset(vi,0,sizeof(*vi)); + vi->codec_setup=_ogg_calloc(1,sizeof(codec_setup_info)); +} + +void vorbis_info_clear(vorbis_info *vi){ + codec_setup_info *ci=vi->codec_setup; + int i; + + if(ci){ + + for(i=0;imodes;i++) + if(ci->mode_param[i])_ogg_free(ci->mode_param[i]); + + for(i=0;imaps;i++) /* unpack does the range checking */ + if(ci->map_param[i]) /* this may be cleaning up an aborted + unpack, in which case the below type + cannot be trusted */ + _mapping_P[ci->map_type[i]]->free_info(ci->map_param[i]); + + for(i=0;ifloors;i++) /* unpack does the range checking */ + if(ci->floor_param[i]) /* this may be cleaning up an aborted + unpack, in which case the below type + cannot be trusted */ + _floor_P[ci->floor_type[i]]->free_info(ci->floor_param[i]); + + for(i=0;iresidues;i++) /* unpack does the range checking */ + if(ci->residue_param[i]) /* this may be cleaning up an aborted + unpack, in which case the below type + cannot be trusted */ + _residue_P[ci->residue_type[i]]->free_info(ci->residue_param[i]); + + for(i=0;ibooks;i++){ + if(ci->book_param[i]){ + /* knows if the book was not alloced */ + vorbis_staticbook_destroy(ci->book_param[i]); + } + if(ci->fullbooks) + vorbis_book_clear(ci->fullbooks+i); + } + if(ci->fullbooks) + _ogg_free(ci->fullbooks); + + for(i=0;ipsys;i++) + _vi_psy_free(ci->psy_param[i]); + + _ogg_free(ci); + } + + memset(vi,0,sizeof(*vi)); +} + +/* Header packing/unpacking ********************************************/ + +static int _vorbis_unpack_info(vorbis_info *vi,oggpack_buffer *opb){ + codec_setup_info *ci=vi->codec_setup; + if(!ci)return(OV_EFAULT); + + vi->version=oggpack_read(opb,32); + if(vi->version!=0)return(OV_EVERSION); + + vi->channels=oggpack_read(opb,8); + vi->rate=oggpack_read(opb,32); + + vi->bitrate_upper=oggpack_read(opb,32); + vi->bitrate_nominal=oggpack_read(opb,32); + vi->bitrate_lower=oggpack_read(opb,32); + + ci->blocksizes[0]=1<blocksizes[1]=1<rate<1)goto err_out; + if(vi->channels<1)goto err_out; + if(ci->blocksizes[0]<64)goto err_out; + if(ci->blocksizes[1]blocksizes[0])goto err_out; + if(ci->blocksizes[1]>8192)goto err_out; + + if(oggpack_read(opb,1)!=1)goto err_out; /* EOP check */ + + return(0); + err_out: + vorbis_info_clear(vi); + return(OV_EBADHEADER); +} + +static int _vorbis_unpack_comment(vorbis_comment *vc,oggpack_buffer *opb){ + int i; + int vendorlen=oggpack_read(opb,32); + if(vendorlen<0)goto err_out; + if(vendorlen>opb->storage-8)goto err_out; + vc->vendor=_ogg_calloc(vendorlen+1,1); + _v_readstring(opb,vc->vendor,vendorlen); + i=oggpack_read(opb,32); + if(i<0)goto err_out; + if(i>((opb->storage-oggpack_bytes(opb))>>2))goto err_out; + vc->comments=i; + vc->user_comments=_ogg_calloc(vc->comments+1,sizeof(*vc->user_comments)); + vc->comment_lengths=_ogg_calloc(vc->comments+1, sizeof(*vc->comment_lengths)); + + for(i=0;icomments;i++){ + int len=oggpack_read(opb,32); + if(len<0)goto err_out; + if(len>opb->storage-oggpack_bytes(opb))goto err_out; + vc->comment_lengths[i]=len; + vc->user_comments[i]=_ogg_calloc(len+1,1); + _v_readstring(opb,vc->user_comments[i],len); + } + if(oggpack_read(opb,1)!=1)goto err_out; /* EOP check */ + + return(0); + err_out: + vorbis_comment_clear(vc); + return(OV_EBADHEADER); +} + +/* all of the real encoding details are here. The modes, books, + everything */ +static int _vorbis_unpack_books(vorbis_info *vi,oggpack_buffer *opb){ + codec_setup_info *ci=vi->codec_setup; + int i; + if(!ci)return(OV_EFAULT); + + /* codebooks */ + ci->books=oggpack_read(opb,8)+1; + if(ci->books<=0)goto err_out; + for(i=0;ibooks;i++){ + ci->book_param[i]=vorbis_staticbook_unpack(opb); + if(!ci->book_param[i])goto err_out; + } + + /* time backend settings; hooks are unused */ + { + int times=oggpack_read(opb,6)+1; + if(times<=0)goto err_out; + for(i=0;i=VI_TIMEB)goto err_out; + } + } + + /* floor backend settings */ + ci->floors=oggpack_read(opb,6)+1; + if(ci->floors<=0)goto err_out; + for(i=0;ifloors;i++){ + ci->floor_type[i]=oggpack_read(opb,16); + if(ci->floor_type[i]<0 || ci->floor_type[i]>=VI_FLOORB)goto err_out; + ci->floor_param[i]=_floor_P[ci->floor_type[i]]->unpack(vi,opb); + if(!ci->floor_param[i])goto err_out; + } + + /* residue backend settings */ + ci->residues=oggpack_read(opb,6)+1; + if(ci->residues<=0)goto err_out; + for(i=0;iresidues;i++){ + ci->residue_type[i]=oggpack_read(opb,16); + if(ci->residue_type[i]<0 || ci->residue_type[i]>=VI_RESB)goto err_out; + ci->residue_param[i]=_residue_P[ci->residue_type[i]]->unpack(vi,opb); + if(!ci->residue_param[i])goto err_out; + } + + /* map backend settings */ + ci->maps=oggpack_read(opb,6)+1; + if(ci->maps<=0)goto err_out; + for(i=0;imaps;i++){ + ci->map_type[i]=oggpack_read(opb,16); + if(ci->map_type[i]<0 || ci->map_type[i]>=VI_MAPB)goto err_out; + ci->map_param[i]=_mapping_P[ci->map_type[i]]->unpack(vi,opb); + if(!ci->map_param[i])goto err_out; + } + + /* mode settings */ + ci->modes=oggpack_read(opb,6)+1; + if(ci->modes<=0)goto err_out; + for(i=0;imodes;i++){ + ci->mode_param[i]=_ogg_calloc(1,sizeof(*ci->mode_param[i])); + ci->mode_param[i]->blockflag=oggpack_read(opb,1); + ci->mode_param[i]->windowtype=oggpack_read(opb,16); + ci->mode_param[i]->transformtype=oggpack_read(opb,16); + ci->mode_param[i]->mapping=oggpack_read(opb,8); + + if(ci->mode_param[i]->windowtype>=VI_WINDOWB)goto err_out; + if(ci->mode_param[i]->transformtype>=VI_WINDOWB)goto err_out; + if(ci->mode_param[i]->mapping>=ci->maps)goto err_out; + if(ci->mode_param[i]->mapping<0)goto err_out; + } + + if(oggpack_read(opb,1)!=1)goto err_out; /* top level EOP check */ + + return(0); + err_out: + vorbis_info_clear(vi); + return(OV_EBADHEADER); +} + +/* Is this packet a vorbis ID header? */ +int vorbis_synthesis_idheader(ogg_packet *op){ + oggpack_buffer opb; + char buffer[6]; + + if(op){ + oggpack_readinit(&opb,op->packet,op->bytes); + + if(!op->b_o_s) + return(0); /* Not the initial packet */ + + if(oggpack_read(&opb,8) != 1) + return 0; /* not an ID header */ + + memset(buffer,0,6); + _v_readstring(&opb,buffer,6); + if(memcmp(buffer,"vorbis",6)) + return 0; /* not vorbis */ + + return 1; + } + + return 0; +} + +/* The Vorbis header is in three packets; the initial small packet in + the first page that identifies basic parameters, a second packet + with bitstream comments and a third packet that holds the + codebook. */ + +int vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,ogg_packet *op){ + oggpack_buffer opb; + + if(op){ + oggpack_readinit(&opb,op->packet,op->bytes); + + /* Which of the three types of header is this? */ + /* Also verify header-ness, vorbis */ + { + char buffer[6]; + int packtype=oggpack_read(&opb,8); + memset(buffer,0,6); + _v_readstring(&opb,buffer,6); + if(memcmp(buffer,"vorbis",6)){ + /* not a vorbis header */ + return(OV_ENOTVORBIS); + } + switch(packtype){ + case 0x01: /* least significant *bit* is read first */ + if(!op->b_o_s){ + /* Not the initial packet */ + return(OV_EBADHEADER); + } + if(vi->rate!=0){ + /* previously initialized info header */ + return(OV_EBADHEADER); + } + + return(_vorbis_unpack_info(vi,&opb)); + + case 0x03: /* least significant *bit* is read first */ + if(vi->rate==0){ + /* um... we didn't get the initial header */ + return(OV_EBADHEADER); + } + + return(_vorbis_unpack_comment(vc,&opb)); + + case 0x05: /* least significant *bit* is read first */ + if(vi->rate==0 || vc->vendor==NULL){ + /* um... we didn;t get the initial header or comments yet */ + return(OV_EBADHEADER); + } + + return(_vorbis_unpack_books(vi,&opb)); + + default: + /* Not a valid vorbis header type */ + return(OV_EBADHEADER); + break; + } + } + } + return(OV_EBADHEADER); +} + +/* pack side **********************************************************/ + +static int _vorbis_pack_info(oggpack_buffer *opb,vorbis_info *vi){ + codec_setup_info *ci=vi->codec_setup; + if(!ci)return(OV_EFAULT); + + /* preamble */ + oggpack_write(opb,0x01,8); + _v_writestring(opb,"vorbis", 6); + + /* basic information about the stream */ + oggpack_write(opb,0x00,32); + oggpack_write(opb,vi->channels,8); + oggpack_write(opb,vi->rate,32); + + oggpack_write(opb,vi->bitrate_upper,32); + oggpack_write(opb,vi->bitrate_nominal,32); + oggpack_write(opb,vi->bitrate_lower,32); + + oggpack_write(opb,ilog2(ci->blocksizes[0]),4); + oggpack_write(opb,ilog2(ci->blocksizes[1]),4); + oggpack_write(opb,1,1); + + return(0); +} + +static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc){ + int bytes = strlen(ENCODE_VENDOR_STRING); + + /* preamble */ + oggpack_write(opb,0x03,8); + _v_writestring(opb,"vorbis", 6); + + /* vendor */ + oggpack_write(opb,bytes,32); + _v_writestring(opb,ENCODE_VENDOR_STRING, bytes); + + /* comments */ + + oggpack_write(opb,vc->comments,32); + if(vc->comments){ + int i; + for(i=0;icomments;i++){ + if(vc->user_comments[i]){ + oggpack_write(opb,vc->comment_lengths[i],32); + _v_writestring(opb,vc->user_comments[i], vc->comment_lengths[i]); + }else{ + oggpack_write(opb,0,32); + } + } + } + oggpack_write(opb,1,1); + + return(0); +} + +static int _vorbis_pack_books(oggpack_buffer *opb,vorbis_info *vi){ + codec_setup_info *ci=vi->codec_setup; + int i; + if(!ci)return(OV_EFAULT); + + oggpack_write(opb,0x05,8); + _v_writestring(opb,"vorbis", 6); + + /* books */ + oggpack_write(opb,ci->books-1,8); + for(i=0;ibooks;i++) + if(vorbis_staticbook_pack(ci->book_param[i],opb))goto err_out; + + /* times; hook placeholders */ + oggpack_write(opb,0,6); + oggpack_write(opb,0,16); + + /* floors */ + oggpack_write(opb,ci->floors-1,6); + for(i=0;ifloors;i++){ + oggpack_write(opb,ci->floor_type[i],16); + if(_floor_P[ci->floor_type[i]]->pack) + _floor_P[ci->floor_type[i]]->pack(ci->floor_param[i],opb); + else + goto err_out; + } + + /* residues */ + oggpack_write(opb,ci->residues-1,6); + for(i=0;iresidues;i++){ + oggpack_write(opb,ci->residue_type[i],16); + _residue_P[ci->residue_type[i]]->pack(ci->residue_param[i],opb); + } + + /* maps */ + oggpack_write(opb,ci->maps-1,6); + for(i=0;imaps;i++){ + oggpack_write(opb,ci->map_type[i],16); + _mapping_P[ci->map_type[i]]->pack(vi,ci->map_param[i],opb); + } + + /* modes */ + oggpack_write(opb,ci->modes-1,6); + for(i=0;imodes;i++){ + oggpack_write(opb,ci->mode_param[i]->blockflag,1); + oggpack_write(opb,ci->mode_param[i]->windowtype,16); + oggpack_write(opb,ci->mode_param[i]->transformtype,16); + oggpack_write(opb,ci->mode_param[i]->mapping,8); + } + oggpack_write(opb,1,1); + + return(0); +err_out: + return(-1); +} + +int vorbis_commentheader_out(vorbis_comment *vc, + ogg_packet *op){ + + oggpack_buffer opb; + + oggpack_writeinit(&opb); + if(_vorbis_pack_comment(&opb,vc)){ + oggpack_writeclear(&opb); + return OV_EIMPL; + } + + op->packet = _ogg_malloc(oggpack_bytes(&opb)); + memcpy(op->packet, opb.buffer, oggpack_bytes(&opb)); + + op->bytes=oggpack_bytes(&opb); + op->b_o_s=0; + op->e_o_s=0; + op->granulepos=0; + op->packetno=1; + + oggpack_writeclear(&opb); + return 0; +} + +int vorbis_analysis_headerout(vorbis_dsp_state *v, + vorbis_comment *vc, + ogg_packet *op, + ogg_packet *op_comm, + ogg_packet *op_code){ + int ret=OV_EIMPL; + vorbis_info *vi=v->vi; + oggpack_buffer opb; + private_state *b=v->backend_state; + + if(!b){ + ret=OV_EFAULT; + goto err_out; + } + + /* first header packet **********************************************/ + + oggpack_writeinit(&opb); + if(_vorbis_pack_info(&opb,vi))goto err_out; + + /* build the packet */ + if(b->header)_ogg_free(b->header); + b->header=_ogg_malloc(oggpack_bytes(&opb)); + memcpy(b->header,opb.buffer,oggpack_bytes(&opb)); + op->packet=b->header; + op->bytes=oggpack_bytes(&opb); + op->b_o_s=1; + op->e_o_s=0; + op->granulepos=0; + op->packetno=0; + + /* second header packet (comments) **********************************/ + + oggpack_reset(&opb); + if(_vorbis_pack_comment(&opb,vc))goto err_out; + + if(b->header1)_ogg_free(b->header1); + b->header1=_ogg_malloc(oggpack_bytes(&opb)); + memcpy(b->header1,opb.buffer,oggpack_bytes(&opb)); + op_comm->packet=b->header1; + op_comm->bytes=oggpack_bytes(&opb); + op_comm->b_o_s=0; + op_comm->e_o_s=0; + op_comm->granulepos=0; + op_comm->packetno=1; + + /* third header packet (modes/codebooks) ****************************/ + + oggpack_reset(&opb); + if(_vorbis_pack_books(&opb,vi))goto err_out; + + if(b->header2)_ogg_free(b->header2); + b->header2=_ogg_malloc(oggpack_bytes(&opb)); + memcpy(b->header2,opb.buffer,oggpack_bytes(&opb)); + op_code->packet=b->header2; + op_code->bytes=oggpack_bytes(&opb); + op_code->b_o_s=0; + op_code->e_o_s=0; + op_code->granulepos=0; + op_code->packetno=2; + + oggpack_writeclear(&opb); + return(0); + err_out: + memset(op,0,sizeof(*op)); + memset(op_comm,0,sizeof(*op_comm)); + memset(op_code,0,sizeof(*op_code)); + + if(b){ + oggpack_writeclear(&opb); + if(b->header)_ogg_free(b->header); + if(b->header1)_ogg_free(b->header1); + if(b->header2)_ogg_free(b->header2); + b->header=NULL; + b->header1=NULL; + b->header2=NULL; + } + return(ret); +} + +double vorbis_granule_time(vorbis_dsp_state *v,ogg_int64_t granulepos){ + if(granulepos == -1) return -1; + + /* We're not guaranteed a 64 bit unsigned type everywhere, so we + have to put the unsigned granpo in a signed type. */ + if(granulepos>=0){ + return((double)granulepos/v->vi->rate); + }else{ + ogg_int64_t granuleoff=0xffffffff; + granuleoff<<=31; + granuleoff|=0x7ffffffff; + return(((double)granulepos+2+granuleoff+granuleoff)/v->vi->rate); + } +} + +const char *vorbis_version_string(void){ + return GENERAL_VENDOR_STRING; +} diff --git a/code/libvorbis-1.3.4/lib/lookup.c b/code/libvorbis-1.3.4/lib/lookup.c new file mode 100644 index 00000000..3321ed3d --- /dev/null +++ b/code/libvorbis-1.3.4/lib/lookup.c @@ -0,0 +1,94 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: lookup based functions + last mod: $Id: lookup.c 16227 2009-07-08 06:58:46Z xiphmont $ + + ********************************************************************/ + +#include +#include "lookup.h" +#include "lookup_data.h" +#include "os.h" +#include "misc.h" + +#ifdef FLOAT_LOOKUP + +/* interpolated lookup based cos function, domain 0 to PI only */ +float vorbis_coslook(float a){ + double d=a*(.31830989*(float)COS_LOOKUP_SZ); + int i=vorbis_ftoi(d-.5); + + return COS_LOOKUP[i]+ (d-i)*(COS_LOOKUP[i+1]-COS_LOOKUP[i]); +} + +/* interpolated 1./sqrt(p) where .5 <= p < 1. */ +float vorbis_invsqlook(float a){ + double d=a*(2.f*(float)INVSQ_LOOKUP_SZ)-(float)INVSQ_LOOKUP_SZ; + int i=vorbis_ftoi(d-.5f); + return INVSQ_LOOKUP[i]+ (d-i)*(INVSQ_LOOKUP[i+1]-INVSQ_LOOKUP[i]); +} + +/* interpolated 1./sqrt(p) where .5 <= p < 1. */ +float vorbis_invsq2explook(int a){ + return INVSQ2EXP_LOOKUP[a-INVSQ2EXP_LOOKUP_MIN]; +} + +#include +/* interpolated lookup based fromdB function, domain -140dB to 0dB only */ +float vorbis_fromdBlook(float a){ + int i=vorbis_ftoi(a*((float)(-(1<=(FROMdB_LOOKUP_SZ<>FROMdB_SHIFT]*FROMdB2_LOOKUP[i&FROMdB2_MASK]); +} + +#endif + +#ifdef INT_LOOKUP +/* interpolated 1./sqrt(p) where .5 <= a < 1. (.100000... to .111111...) in + 16.16 format + + returns in m.8 format */ +long vorbis_invsqlook_i(long a,long e){ + long i=(a&0x7fff)>>(INVSQ_LOOKUP_I_SHIFT-1); + long d=(a&INVSQ_LOOKUP_I_MASK)<<(16-INVSQ_LOOKUP_I_SHIFT); /* 0.16 */ + long val=INVSQ_LOOKUP_I[i]- /* 1.16 */ + (((INVSQ_LOOKUP_I[i]-INVSQ_LOOKUP_I[i+1])* /* 0.16 */ + d)>>16); /* result 1.16 */ + + e+=32; + if(e&1)val=(val*5792)>>13; /* multiply val by 1/sqrt(2) */ + e=(e>>1)-8; + + return(val>>e); +} + +/* interpolated lookup based fromdB function, domain -140dB to 0dB only */ +/* a is in n.12 format */ +float vorbis_fromdBlook_i(long a){ + int i=(-a)>>(12-FROMdB2_SHIFT); + return (i<0)?1.f: + ((i>=(FROMdB_LOOKUP_SZ<>FROMdB_SHIFT]*FROMdB2_LOOKUP[i&FROMdB2_MASK]); +} + +/* interpolated lookup based cos function, domain 0 to PI only */ +/* a is in 0.16 format, where 0==0, 2^^16-1==PI, return 0.14 */ +long vorbis_coslook_i(long a){ + int i=a>>COS_LOOKUP_I_SHIFT; + int d=a&COS_LOOKUP_I_MASK; + return COS_LOOKUP_I[i]- ((d*(COS_LOOKUP_I[i]-COS_LOOKUP_I[i+1]))>> + COS_LOOKUP_I_SHIFT); +} + +#endif diff --git a/code/libvorbis-1.3.4/lib/lookup.h b/code/libvorbis-1.3.4/lib/lookup.h new file mode 100644 index 00000000..f8b5b827 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/lookup.h @@ -0,0 +1,32 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: lookup based functions + last mod: $Id: lookup.h 16227 2009-07-08 06:58:46Z xiphmont $ + + ********************************************************************/ + +#ifndef _V_LOOKUP_H_ + +#ifdef FLOAT_LOOKUP +extern float vorbis_coslook(float a); +extern float vorbis_invsqlook(float a); +extern float vorbis_invsq2explook(int a); +extern float vorbis_fromdBlook(float a); +#endif +#ifdef INT_LOOKUP +extern long vorbis_invsqlook_i(long a,long e); +extern long vorbis_coslook_i(long a); +extern float vorbis_fromdBlook_i(long a); +#endif + +#endif diff --git a/code/libvorbis-1.3.4/lib/lookup_data.h b/code/libvorbis-1.3.4/lib/lookup_data.h new file mode 100644 index 00000000..2424a1b3 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/lookup_data.h @@ -0,0 +1,192 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: lookup data; generated by lookups.pl; edit there + last mod: $Id: lookup_data.h 16037 2009-05-26 21:10:58Z xiphmont $ + + ********************************************************************/ + +#ifndef _V_LOOKUP_DATA_H_ + +#ifdef FLOAT_LOOKUP +#define COS_LOOKUP_SZ 128 +static const float COS_LOOKUP[COS_LOOKUP_SZ+1]={ + +1.0000000000000f,+0.9996988186962f,+0.9987954562052f,+0.9972904566787f, + +0.9951847266722f,+0.9924795345987f,+0.9891765099648f,+0.9852776423889f, + +0.9807852804032f,+0.9757021300385f,+0.9700312531945f,+0.9637760657954f, + +0.9569403357322f,+0.9495281805930f,+0.9415440651830f,+0.9329927988347f, + +0.9238795325113f,+0.9142097557035f,+0.9039892931234f,+0.8932243011955f, + +0.8819212643484f,+0.8700869911087f,+0.8577286100003f,+0.8448535652497f, + +0.8314696123025f,+0.8175848131516f,+0.8032075314806f,+0.7883464276266f, + +0.7730104533627f,+0.7572088465065f,+0.7409511253550f,+0.7242470829515f, + +0.7071067811865f,+0.6895405447371f,+0.6715589548470f,+0.6531728429538f, + +0.6343932841636f,+0.6152315905806f,+0.5956993044924f,+0.5758081914178f, + +0.5555702330196f,+0.5349976198871f,+0.5141027441932f,+0.4928981922298f, + +0.4713967368260f,+0.4496113296546f,+0.4275550934303f,+0.4052413140050f, + +0.3826834323651f,+0.3598950365350f,+0.3368898533922f,+0.3136817403989f, + +0.2902846772545f,+0.2667127574749f,+0.2429801799033f,+0.2191012401569f, + +0.1950903220161f,+0.1709618887603f,+0.1467304744554f,+0.1224106751992f, + +0.0980171403296f,+0.0735645635997f,+0.0490676743274f,+0.0245412285229f, + +0.0000000000000f,-0.0245412285229f,-0.0490676743274f,-0.0735645635997f, + -0.0980171403296f,-0.1224106751992f,-0.1467304744554f,-0.1709618887603f, + -0.1950903220161f,-0.2191012401569f,-0.2429801799033f,-0.2667127574749f, + -0.2902846772545f,-0.3136817403989f,-0.3368898533922f,-0.3598950365350f, + -0.3826834323651f,-0.4052413140050f,-0.4275550934303f,-0.4496113296546f, + -0.4713967368260f,-0.4928981922298f,-0.5141027441932f,-0.5349976198871f, + -0.5555702330196f,-0.5758081914178f,-0.5956993044924f,-0.6152315905806f, + -0.6343932841636f,-0.6531728429538f,-0.6715589548470f,-0.6895405447371f, + -0.7071067811865f,-0.7242470829515f,-0.7409511253550f,-0.7572088465065f, + -0.7730104533627f,-0.7883464276266f,-0.8032075314806f,-0.8175848131516f, + -0.8314696123025f,-0.8448535652497f,-0.8577286100003f,-0.8700869911087f, + -0.8819212643484f,-0.8932243011955f,-0.9039892931234f,-0.9142097557035f, + -0.9238795325113f,-0.9329927988347f,-0.9415440651830f,-0.9495281805930f, + -0.9569403357322f,-0.9637760657954f,-0.9700312531945f,-0.9757021300385f, + -0.9807852804032f,-0.9852776423889f,-0.9891765099648f,-0.9924795345987f, + -0.9951847266722f,-0.9972904566787f,-0.9987954562052f,-0.9996988186962f, + -1.0000000000000f, +}; + +#define INVSQ_LOOKUP_SZ 32 +static const float INVSQ_LOOKUP[INVSQ_LOOKUP_SZ+1]={ + 1.414213562373f,1.392621247646f,1.371988681140f,1.352246807566f, + 1.333333333333f,1.315191898443f,1.297771369046f,1.281025230441f, + 1.264911064067f,1.249390095109f,1.234426799697f,1.219988562661f, + 1.206045378311f,1.192569588000f,1.179535649239f,1.166919931983f, + 1.154700538379f,1.142857142857f,1.131370849898f,1.120224067222f, + 1.109400392450f,1.098884511590f,1.088662107904f,1.078719779941f, + 1.069044967650f,1.059625885652f,1.050451462878f,1.041511287847f, + 1.032795558989f,1.024295039463f,1.016001016002f,1.007905261358f, + 1.000000000000f, +}; + +#define INVSQ2EXP_LOOKUP_MIN (-32) +#define INVSQ2EXP_LOOKUP_MAX 32 +static const float INVSQ2EXP_LOOKUP[INVSQ2EXP_LOOKUP_MAX-\ + INVSQ2EXP_LOOKUP_MIN+1]={ + 65536.f, 46340.95001f, 32768.f, 23170.47501f, + 16384.f, 11585.2375f, 8192.f, 5792.618751f, + 4096.f, 2896.309376f, 2048.f, 1448.154688f, + 1024.f, 724.0773439f, 512.f, 362.038672f, + 256.f, 181.019336f, 128.f, 90.50966799f, + 64.f, 45.254834f, 32.f, 22.627417f, + 16.f, 11.3137085f, 8.f, 5.656854249f, + 4.f, 2.828427125f, 2.f, 1.414213562f, + 1.f, 0.7071067812f, 0.5f, 0.3535533906f, + 0.25f, 0.1767766953f, 0.125f, 0.08838834765f, + 0.0625f, 0.04419417382f, 0.03125f, 0.02209708691f, + 0.015625f, 0.01104854346f, 0.0078125f, 0.005524271728f, + 0.00390625f, 0.002762135864f, 0.001953125f, 0.001381067932f, + 0.0009765625f, 0.000690533966f, 0.00048828125f, 0.000345266983f, + 0.000244140625f,0.0001726334915f,0.0001220703125f,8.631674575e-05f, + 6.103515625e-05f,4.315837288e-05f,3.051757812e-05f,2.157918644e-05f, + 1.525878906e-05f, +}; + +#endif + +#define FROMdB_LOOKUP_SZ 35 +#define FROMdB2_LOOKUP_SZ 32 +#define FROMdB_SHIFT 5 +#define FROMdB2_SHIFT 3 +#define FROMdB2_MASK 31 + +#ifdef FLOAT_LOOKUP +static const float FROMdB_LOOKUP[FROMdB_LOOKUP_SZ]={ + 1.f, 0.6309573445f, 0.3981071706f, 0.2511886432f, + 0.1584893192f, 0.1f, 0.06309573445f, 0.03981071706f, + 0.02511886432f, 0.01584893192f, 0.01f, 0.006309573445f, + 0.003981071706f, 0.002511886432f, 0.001584893192f, 0.001f, + 0.0006309573445f,0.0003981071706f,0.0002511886432f,0.0001584893192f, + 0.0001f,6.309573445e-05f,3.981071706e-05f,2.511886432e-05f, + 1.584893192e-05f, 1e-05f,6.309573445e-06f,3.981071706e-06f, + 2.511886432e-06f,1.584893192e-06f, 1e-06f,6.309573445e-07f, + 3.981071706e-07f,2.511886432e-07f,1.584893192e-07f, +}; + +static const float FROMdB2_LOOKUP[FROMdB2_LOOKUP_SZ]={ + 0.9928302478f, 0.9786445908f, 0.9646616199f, 0.9508784391f, + 0.9372921937f, 0.92390007f, 0.9106992942f, 0.8976871324f, + 0.8848608897f, 0.8722179097f, 0.8597555737f, 0.8474713009f, + 0.835362547f, 0.8234268041f, 0.8116616003f, 0.8000644989f, + 0.7886330981f, 0.7773650302f, 0.7662579617f, 0.755309592f, + 0.7445176537f, 0.7338799116f, 0.7233941627f, 0.7130582353f, + 0.7028699885f, 0.6928273125f, 0.6829281272f, 0.6731703824f, + 0.6635520573f, 0.6540711597f, 0.6447257262f, 0.6355138211f, +}; +#endif + +#ifdef INT_LOOKUP + +#define INVSQ_LOOKUP_I_SHIFT 10 +#define INVSQ_LOOKUP_I_MASK 1023 +static const long INVSQ_LOOKUP_I[64+1]={ + 92682l, 91966l, 91267l, 90583l, + 89915l, 89261l, 88621l, 87995l, + 87381l, 86781l, 86192l, 85616l, + 85051l, 84497l, 83953l, 83420l, + 82897l, 82384l, 81880l, 81385l, + 80899l, 80422l, 79953l, 79492l, + 79039l, 78594l, 78156l, 77726l, + 77302l, 76885l, 76475l, 76072l, + 75674l, 75283l, 74898l, 74519l, + 74146l, 73778l, 73415l, 73058l, + 72706l, 72359l, 72016l, 71679l, + 71347l, 71019l, 70695l, 70376l, + 70061l, 69750l, 69444l, 69141l, + 68842l, 68548l, 68256l, 67969l, + 67685l, 67405l, 67128l, 66855l, + 66585l, 66318l, 66054l, 65794l, + 65536l, +}; + +#define COS_LOOKUP_I_SHIFT 9 +#define COS_LOOKUP_I_MASK 511 +#define COS_LOOKUP_I_SZ 128 +static const long COS_LOOKUP_I[COS_LOOKUP_I_SZ+1]={ + 16384l, 16379l, 16364l, 16340l, + 16305l, 16261l, 16207l, 16143l, + 16069l, 15986l, 15893l, 15791l, + 15679l, 15557l, 15426l, 15286l, + 15137l, 14978l, 14811l, 14635l, + 14449l, 14256l, 14053l, 13842l, + 13623l, 13395l, 13160l, 12916l, + 12665l, 12406l, 12140l, 11866l, + 11585l, 11297l, 11003l, 10702l, + 10394l, 10080l, 9760l, 9434l, + 9102l, 8765l, 8423l, 8076l, + 7723l, 7366l, 7005l, 6639l, + 6270l, 5897l, 5520l, 5139l, + 4756l, 4370l, 3981l, 3590l, + 3196l, 2801l, 2404l, 2006l, + 1606l, 1205l, 804l, 402l, + 0l, -401l, -803l, -1204l, + -1605l, -2005l, -2403l, -2800l, + -3195l, -3589l, -3980l, -4369l, + -4755l, -5138l, -5519l, -5896l, + -6269l, -6638l, -7004l, -7365l, + -7722l, -8075l, -8422l, -8764l, + -9101l, -9433l, -9759l, -10079l, + -10393l, -10701l, -11002l, -11296l, + -11584l, -11865l, -12139l, -12405l, + -12664l, -12915l, -13159l, -13394l, + -13622l, -13841l, -14052l, -14255l, + -14448l, -14634l, -14810l, -14977l, + -15136l, -15285l, -15425l, -15556l, + -15678l, -15790l, -15892l, -15985l, + -16068l, -16142l, -16206l, -16260l, + -16304l, -16339l, -16363l, -16378l, + -16383l, +}; + +#endif + +#endif diff --git a/code/libvorbis-1.3.4/lib/lpc.c b/code/libvorbis-1.3.4/lib/lpc.c new file mode 100644 index 00000000..f5199ec2 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/lpc.c @@ -0,0 +1,160 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: LPC low level routines + last mod: $Id: lpc.c 16227 2009-07-08 06:58:46Z xiphmont $ + + ********************************************************************/ + +/* Some of these routines (autocorrelator, LPC coefficient estimator) + are derived from code written by Jutta Degener and Carsten Bormann; + thus we include their copyright below. The entirety of this file + is freely redistributable on the condition that both of these + copyright notices are preserved without modification. */ + +/* Preserved Copyright: *********************************************/ + +/* Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann, +Technische Universita"t Berlin + +Any use of this software is permitted provided that this notice is not +removed and that neither the authors nor the Technische Universita"t +Berlin are deemed to have made any representations as to the +suitability of this software for any purpose nor are held responsible +for any defects of this software. THERE IS ABSOLUTELY NO WARRANTY FOR +THIS SOFTWARE. + +As a matter of courtesy, the authors request to be informed about uses +this software has found, about bugs in this software, and about any +improvements that may be of general interest. + +Berlin, 28.11.1994 +Jutta Degener +Carsten Bormann + +*********************************************************************/ + +#include +#include +#include +#include "os.h" +#include "smallft.h" +#include "lpc.h" +#include "scales.h" +#include "misc.h" + +/* Autocorrelation LPC coeff generation algorithm invented by + N. Levinson in 1947, modified by J. Durbin in 1959. */ + +/* Input : n elements of time doamin data + Output: m lpc coefficients, excitation energy */ + +float vorbis_lpc_from_data(float *data,float *lpci,int n,int m){ + double *aut=alloca(sizeof(*aut)*(m+1)); + double *lpc=alloca(sizeof(*lpc)*(m)); + double error; + double epsilon; + int i,j; + + /* autocorrelation, p+1 lag coefficients */ + j=m+1; + while(j--){ + double d=0; /* double needed for accumulator depth */ + for(i=j;i +#include +#include +#include "lsp.h" +#include "os.h" +#include "misc.h" +#include "lookup.h" +#include "scales.h" + +/* three possible LSP to f curve functions; the exact computation + (float), a lookup based float implementation, and an integer + implementation. The float lookup is likely the optimal choice on + any machine with an FPU. The integer implementation is *not* fixed + point (due to the need for a large dynamic range and thus a + separately tracked exponent) and thus much more complex than the + relatively simple float implementations. It's mostly for future + work on a fully fixed point implementation for processors like the + ARM family. */ + +/* define either of these (preferably FLOAT_LOOKUP) to have faster + but less precise implementation. */ +#undef FLOAT_LOOKUP +#undef INT_LOOKUP + +#ifdef FLOAT_LOOKUP +#include "lookup.c" /* catch this in the build system; we #include for + compilers (like gcc) that can't inline across + modules */ + +/* side effect: changes *lsp to cosines of lsp */ +void vorbis_lsp_to_curve(float *curve,int *map,int n,int ln,float *lsp,int m, + float amp,float ampoffset){ + int i; + float wdel=M_PI/ln; + vorbis_fpu_control fpu; + + vorbis_fpu_setround(&fpu); + for(i=0;i>1; + + while(c--){ + q*=ftmp[0]-w; + p*=ftmp[1]-w; + ftmp+=2; + } + + if(m&1){ + /* odd order filter; slightly assymetric */ + /* the last coefficient */ + q*=ftmp[0]-w; + q*=q; + p*=p*(1.f-w*w); + }else{ + /* even order filter; still symmetric */ + q*=q*(1.f+w); + p*=p*(1.f-w); + } + + q=frexp(p+q,&qexp); + q=vorbis_fromdBlook(amp* + vorbis_invsqlook(q)* + vorbis_invsq2explook(qexp+m)- + ampoffset); + + do{ + curve[i++]*=q; + }while(map[i]==k); + } + vorbis_fpu_restore(fpu); +} + +#else + +#ifdef INT_LOOKUP +#include "lookup.c" /* catch this in the build system; we #include for + compilers (like gcc) that can't inline across + modules */ + +static const int MLOOP_1[64]={ + 0,10,11,11, 12,12,12,12, 13,13,13,13, 13,13,13,13, + 14,14,14,14, 14,14,14,14, 14,14,14,14, 14,14,14,14, + 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, + 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, +}; + +static const int MLOOP_2[64]={ + 0,4,5,5, 6,6,6,6, 7,7,7,7, 7,7,7,7, + 8,8,8,8, 8,8,8,8, 8,8,8,8, 8,8,8,8, + 9,9,9,9, 9,9,9,9, 9,9,9,9, 9,9,9,9, + 9,9,9,9, 9,9,9,9, 9,9,9,9, 9,9,9,9, +}; + +static const int MLOOP_3[8]={0,1,2,2,3,3,3,3}; + + +/* side effect: changes *lsp to cosines of lsp */ +void vorbis_lsp_to_curve(float *curve,int *map,int n,int ln,float *lsp,int m, + float amp,float ampoffset){ + + /* 0 <= m < 256 */ + + /* set up for using all int later */ + int i; + int ampoffseti=rint(ampoffset*4096.f); + int ampi=rint(amp*16.f); + long *ilsp=alloca(m*sizeof(*ilsp)); + for(i=0;i>25])) + if(!(shift=MLOOP_2[(pi|qi)>>19])) + shift=MLOOP_3[(pi|qi)>>16]; + qi=(qi>>shift)*labs(ilsp[j-1]-wi); + pi=(pi>>shift)*labs(ilsp[j]-wi); + qexp+=shift; + } + if(!(shift=MLOOP_1[(pi|qi)>>25])) + if(!(shift=MLOOP_2[(pi|qi)>>19])) + shift=MLOOP_3[(pi|qi)>>16]; + + /* pi,qi normalized collectively, both tracked using qexp */ + + if(m&1){ + /* odd order filter; slightly assymetric */ + /* the last coefficient */ + qi=(qi>>shift)*labs(ilsp[j-1]-wi); + pi=(pi>>shift)<<14; + qexp+=shift; + + if(!(shift=MLOOP_1[(pi|qi)>>25])) + if(!(shift=MLOOP_2[(pi|qi)>>19])) + shift=MLOOP_3[(pi|qi)>>16]; + + pi>>=shift; + qi>>=shift; + qexp+=shift-14*((m+1)>>1); + + pi=((pi*pi)>>16); + qi=((qi*qi)>>16); + qexp=qexp*2+m; + + pi*=(1<<14)-((wi*wi)>>14); + qi+=pi>>14; + + }else{ + /* even order filter; still symmetric */ + + /* p*=p(1-w), q*=q(1+w), let normalization drift because it isn't + worth tracking step by step */ + + pi>>=shift; + qi>>=shift; + qexp+=shift-7*m; + + pi=((pi*pi)>>16); + qi=((qi*qi)>>16); + qexp=qexp*2+m; + + pi*=(1<<14)-wi; + qi*=(1<<14)+wi; + qi=(qi+pi)>>14; + + } + + + /* we've let the normalization drift because it wasn't important; + however, for the lookup, things must be normalized again. We + need at most one right shift or a number of left shifts */ + + if(qi&0xffff0000){ /* checks for 1.xxxxxxxxxxxxxxxx */ + qi>>=1; qexp++; + }else + while(qi && !(qi&0x8000)){ /* checks for 0.0xxxxxxxxxxxxxxx or less*/ + qi<<=1; qexp--; + } + + amp=vorbis_fromdBlook_i(ampi* /* n.4 */ + vorbis_invsqlook_i(qi,qexp)- + /* m.8, m+n<=8 */ + ampoffseti); /* 8.12[0] */ + + curve[i]*=amp; + while(map[++i]==k)curve[i]*=amp; + } +} + +#else + +/* old, nonoptimized but simple version for any poor sap who needs to + figure out what the hell this code does, or wants the other + fraction of a dB precision */ + +/* side effect: changes *lsp to cosines of lsp */ +void vorbis_lsp_to_curve(float *curve,int *map,int n,int ln,float *lsp,int m, + float amp,float ampoffset){ + int i; + float wdel=M_PI/ln; + for(i=0;i= i; j--) { + g[j-2] -= g[j]; + g[j] += g[j]; + } + } +} + +static int comp(const void *a,const void *b){ + return (*(float *)a<*(float *)b)-(*(float *)a>*(float *)b); +} + +/* Newton-Raphson-Maehly actually functioned as a decent root finder, + but there are root sets for which it gets into limit cycles + (exacerbated by zero suppression) and fails. We can't afford to + fail, even if the failure is 1 in 100,000,000, so we now use + Laguerre and later polish with Newton-Raphson (which can then + afford to fail) */ + +#define EPSILON 10e-7 +static int Laguerre_With_Deflation(float *a,int ord,float *r){ + int i,m; + double lastdelta=0.f; + double *defl=alloca(sizeof(*defl)*(ord+1)); + for(i=0;i<=ord;i++)defl[i]=a[i]; + + for(m=ord;m>0;m--){ + double new=0.f,delta; + + /* iterate a root */ + while(1){ + double p=defl[m],pp=0.f,ppp=0.f,denom; + + /* eval the polynomial and its first two derivatives */ + for(i=m;i>0;i--){ + ppp = new*ppp + pp; + pp = new*pp + p; + p = new*p + defl[i-1]; + } + + /* Laguerre's method */ + denom=(m-1) * ((m-1)*pp*pp - m*p*ppp); + if(denom<0) + return(-1); /* complex root! The LPC generator handed us a bad filter */ + + if(pp>0){ + denom = pp + sqrt(denom); + if(denom-(EPSILON))denom=-(EPSILON); + } + + delta = m*p/denom; + new -= delta; + + if(delta<0.f)delta*=-1; + + if(fabs(delta/new)<10e-12)break; + lastdelta=delta; + } + + r[m-1]=new; + + /* forward deflation */ + + for(i=m;i>0;i--) + defl[i-1]+=new*defl[i]; + defl++; + + } + return(0); +} + + +/* for spit-and-polish only */ +static int Newton_Raphson(float *a,int ord,float *r){ + int i, k, count=0; + double error=1.f; + double *root=alloca(ord*sizeof(*root)); + + for(i=0; i1e-20){ + error=0; + + for(i=0; i= 0; k--) { + + pp= pp* rooti + p; + p = p * rooti + a[k]; + } + + delta = p/pp; + root[i] -= delta; + error+= delta*delta; + } + + if(count>40)return(-1); + + count++; + } + + /* Replaced the original bubble sort with a real sort. With your + help, we can eliminate the bubble sort in our lifetime. --Monty */ + + for(i=0; i>1; + int g1_order,g2_order; + float *g1=alloca(sizeof(*g1)*(order2+1)); + float *g2=alloca(sizeof(*g2)*(order2+1)); + float *g1r=alloca(sizeof(*g1r)*(order2+1)); + float *g2r=alloca(sizeof(*g2r)*(order2+1)); + int i; + + /* even and odd are slightly different base cases */ + g1_order=(m+1)>>1; + g2_order=(m) >>1; + + /* Compute the lengths of the x polynomials. */ + /* Compute the first half of K & R F1 & F2 polynomials. */ + /* Compute half of the symmetric and antisymmetric polynomials. */ + /* Remove the roots at +1 and -1. */ + + g1[g1_order] = 1.f; + for(i=1;i<=g1_order;i++) g1[g1_order-i] = lpc[i-1]+lpc[m-i]; + g2[g2_order] = 1.f; + for(i=1;i<=g2_order;i++) g2[g2_order-i] = lpc[i-1]-lpc[m-i]; + + if(g1_order>g2_order){ + for(i=2; i<=g2_order;i++) g2[g2_order-i] += g2[g2_order-i+2]; + }else{ + for(i=1; i<=g1_order;i++) g1[g1_order-i] -= g1[g1_order-i+1]; + for(i=1; i<=g2_order;i++) g2[g2_order-i] += g2[g2_order-i+1]; + } + + /* Convert into polynomials in cos(alpha) */ + cheby(g1,g1_order); + cheby(g2,g2_order); + + /* Find the roots of the 2 even polynomials.*/ + if(Laguerre_With_Deflation(g1,g1_order,g1r) || + Laguerre_With_Deflation(g2,g2_order,g2r)) + return(-1); + + Newton_Raphson(g1,g1_order,g1r); /* if it fails, it leaves g1r alone */ + Newton_Raphson(g2,g2_order,g2r); /* if it fails, it leaves g2r alone */ + + qsort(g1r,g1_order,sizeof(*g1r),comp); + qsort(g2r,g2_order,sizeof(*g2r),comp); + + for(i=0;i +#include +#include +#include +#include +#include "vorbis/codec.h" +#include "codec_internal.h" +#include "codebook.h" +#include "window.h" +#include "registry.h" +#include "psy.h" +#include "misc.h" + +/* simplistic, wasteful way of doing this (unique lookup for each + mode/submapping); there should be a central repository for + identical lookups. That will require minor work, so I'm putting it + off as low priority. + + Why a lookup for each backend in a given mode? Because the + blocksize is set by the mode, and low backend lookups may require + parameters from other areas of the mode/mapping */ + +static void mapping0_free_info(vorbis_info_mapping *i){ + vorbis_info_mapping0 *info=(vorbis_info_mapping0 *)i; + if(info){ + memset(info,0,sizeof(*info)); + _ogg_free(info); + } +} + +static int ilog(unsigned int v){ + int ret=0; + if(v)--v; + while(v){ + ret++; + v>>=1; + } + return(ret); +} + +static void mapping0_pack(vorbis_info *vi,vorbis_info_mapping *vm, + oggpack_buffer *opb){ + int i; + vorbis_info_mapping0 *info=(vorbis_info_mapping0 *)vm; + + /* another 'we meant to do it this way' hack... up to beta 4, we + packed 4 binary zeros here to signify one submapping in use. We + now redefine that to mean four bitflags that indicate use of + deeper features; bit0:submappings, bit1:coupling, + bit2,3:reserved. This is backward compatable with all actual uses + of the beta code. */ + + if(info->submaps>1){ + oggpack_write(opb,1,1); + oggpack_write(opb,info->submaps-1,4); + }else + oggpack_write(opb,0,1); + + if(info->coupling_steps>0){ + oggpack_write(opb,1,1); + oggpack_write(opb,info->coupling_steps-1,8); + + for(i=0;icoupling_steps;i++){ + oggpack_write(opb,info->coupling_mag[i],ilog(vi->channels)); + oggpack_write(opb,info->coupling_ang[i],ilog(vi->channels)); + } + }else + oggpack_write(opb,0,1); + + oggpack_write(opb,0,2); /* 2,3:reserved */ + + /* we don't write the channel submappings if we only have one... */ + if(info->submaps>1){ + for(i=0;ichannels;i++) + oggpack_write(opb,info->chmuxlist[i],4); + } + for(i=0;isubmaps;i++){ + oggpack_write(opb,0,8); /* time submap unused */ + oggpack_write(opb,info->floorsubmap[i],8); + oggpack_write(opb,info->residuesubmap[i],8); + } +} + +/* also responsible for range checking */ +static vorbis_info_mapping *mapping0_unpack(vorbis_info *vi,oggpack_buffer *opb){ + int i,b; + vorbis_info_mapping0 *info=_ogg_calloc(1,sizeof(*info)); + codec_setup_info *ci=vi->codec_setup; + memset(info,0,sizeof(*info)); + + b=oggpack_read(opb,1); + if(b<0)goto err_out; + if(b){ + info->submaps=oggpack_read(opb,4)+1; + if(info->submaps<=0)goto err_out; + }else + info->submaps=1; + + b=oggpack_read(opb,1); + if(b<0)goto err_out; + if(b){ + info->coupling_steps=oggpack_read(opb,8)+1; + if(info->coupling_steps<=0)goto err_out; + for(i=0;icoupling_steps;i++){ + int testM=info->coupling_mag[i]=oggpack_read(opb,ilog(vi->channels)); + int testA=info->coupling_ang[i]=oggpack_read(opb,ilog(vi->channels)); + + if(testM<0 || + testA<0 || + testM==testA || + testM>=vi->channels || + testA>=vi->channels) goto err_out; + } + + } + + if(oggpack_read(opb,2)!=0)goto err_out; /* 2,3:reserved */ + + if(info->submaps>1){ + for(i=0;ichannels;i++){ + info->chmuxlist[i]=oggpack_read(opb,4); + if(info->chmuxlist[i]>=info->submaps || info->chmuxlist[i]<0)goto err_out; + } + } + for(i=0;isubmaps;i++){ + oggpack_read(opb,8); /* time submap unused */ + info->floorsubmap[i]=oggpack_read(opb,8); + if(info->floorsubmap[i]>=ci->floors || info->floorsubmap[i]<0)goto err_out; + info->residuesubmap[i]=oggpack_read(opb,8); + if(info->residuesubmap[i]>=ci->residues || info->residuesubmap[i]<0)goto err_out; + } + + return info; + + err_out: + mapping0_free_info(info); + return(NULL); +} + +#include "os.h" +#include "lpc.h" +#include "lsp.h" +#include "envelope.h" +#include "mdct.h" +#include "psy.h" +#include "scales.h" + +#if 0 +static long seq=0; +static ogg_int64_t total=0; +static float FLOOR1_fromdB_LOOKUP[256]={ + 1.0649863e-07F, 1.1341951e-07F, 1.2079015e-07F, 1.2863978e-07F, + 1.3699951e-07F, 1.4590251e-07F, 1.5538408e-07F, 1.6548181e-07F, + 1.7623575e-07F, 1.8768855e-07F, 1.9988561e-07F, 2.128753e-07F, + 2.2670913e-07F, 2.4144197e-07F, 2.5713223e-07F, 2.7384213e-07F, + 2.9163793e-07F, 3.1059021e-07F, 3.3077411e-07F, 3.5226968e-07F, + 3.7516214e-07F, 3.9954229e-07F, 4.2550680e-07F, 4.5315863e-07F, + 4.8260743e-07F, 5.1396998e-07F, 5.4737065e-07F, 5.8294187e-07F, + 6.2082472e-07F, 6.6116941e-07F, 7.0413592e-07F, 7.4989464e-07F, + 7.9862701e-07F, 8.5052630e-07F, 9.0579828e-07F, 9.6466216e-07F, + 1.0273513e-06F, 1.0941144e-06F, 1.1652161e-06F, 1.2409384e-06F, + 1.3215816e-06F, 1.4074654e-06F, 1.4989305e-06F, 1.5963394e-06F, + 1.7000785e-06F, 1.8105592e-06F, 1.9282195e-06F, 2.0535261e-06F, + 2.1869758e-06F, 2.3290978e-06F, 2.4804557e-06F, 2.6416497e-06F, + 2.8133190e-06F, 2.9961443e-06F, 3.1908506e-06F, 3.3982101e-06F, + 3.6190449e-06F, 3.8542308e-06F, 4.1047004e-06F, 4.3714470e-06F, + 4.6555282e-06F, 4.9580707e-06F, 5.2802740e-06F, 5.6234160e-06F, + 5.9888572e-06F, 6.3780469e-06F, 6.7925283e-06F, 7.2339451e-06F, + 7.7040476e-06F, 8.2047000e-06F, 8.7378876e-06F, 9.3057248e-06F, + 9.9104632e-06F, 1.0554501e-05F, 1.1240392e-05F, 1.1970856e-05F, + 1.2748789e-05F, 1.3577278e-05F, 1.4459606e-05F, 1.5399272e-05F, + 1.6400004e-05F, 1.7465768e-05F, 1.8600792e-05F, 1.9809576e-05F, + 2.1096914e-05F, 2.2467911e-05F, 2.3928002e-05F, 2.5482978e-05F, + 2.7139006e-05F, 2.8902651e-05F, 3.0780908e-05F, 3.2781225e-05F, + 3.4911534e-05F, 3.7180282e-05F, 3.9596466e-05F, 4.2169667e-05F, + 4.4910090e-05F, 4.7828601e-05F, 5.0936773e-05F, 5.4246931e-05F, + 5.7772202e-05F, 6.1526565e-05F, 6.5524908e-05F, 6.9783085e-05F, + 7.4317983e-05F, 7.9147585e-05F, 8.4291040e-05F, 8.9768747e-05F, + 9.5602426e-05F, 0.00010181521F, 0.00010843174F, 0.00011547824F, + 0.00012298267F, 0.00013097477F, 0.00013948625F, 0.00014855085F, + 0.00015820453F, 0.00016848555F, 0.00017943469F, 0.00019109536F, + 0.00020351382F, 0.00021673929F, 0.00023082423F, 0.00024582449F, + 0.00026179955F, 0.00027881276F, 0.00029693158F, 0.00031622787F, + 0.00033677814F, 0.00035866388F, 0.00038197188F, 0.00040679456F, + 0.00043323036F, 0.00046138411F, 0.00049136745F, 0.00052329927F, + 0.00055730621F, 0.00059352311F, 0.00063209358F, 0.00067317058F, + 0.00071691700F, 0.00076350630F, 0.00081312324F, 0.00086596457F, + 0.00092223983F, 0.00098217216F, 0.0010459992F, 0.0011139742F, + 0.0011863665F, 0.0012634633F, 0.0013455702F, 0.0014330129F, + 0.0015261382F, 0.0016253153F, 0.0017309374F, 0.0018434235F, + 0.0019632195F, 0.0020908006F, 0.0022266726F, 0.0023713743F, + 0.0025254795F, 0.0026895994F, 0.0028643847F, 0.0030505286F, + 0.0032487691F, 0.0034598925F, 0.0036847358F, 0.0039241906F, + 0.0041792066F, 0.0044507950F, 0.0047400328F, 0.0050480668F, + 0.0053761186F, 0.0057254891F, 0.0060975636F, 0.0064938176F, + 0.0069158225F, 0.0073652516F, 0.0078438871F, 0.0083536271F, + 0.0088964928F, 0.009474637F, 0.010090352F, 0.010746080F, + 0.011444421F, 0.012188144F, 0.012980198F, 0.013823725F, + 0.014722068F, 0.015678791F, 0.016697687F, 0.017782797F, + 0.018938423F, 0.020169149F, 0.021479854F, 0.022875735F, + 0.024362330F, 0.025945531F, 0.027631618F, 0.029427276F, + 0.031339626F, 0.033376252F, 0.035545228F, 0.037855157F, + 0.040315199F, 0.042935108F, 0.045725273F, 0.048696758F, + 0.051861348F, 0.055231591F, 0.058820850F, 0.062643361F, + 0.066714279F, 0.071049749F, 0.075666962F, 0.080584227F, + 0.085821044F, 0.091398179F, 0.097337747F, 0.10366330F, + 0.11039993F, 0.11757434F, 0.12521498F, 0.13335215F, + 0.14201813F, 0.15124727F, 0.16107617F, 0.17154380F, + 0.18269168F, 0.19456402F, 0.20720788F, 0.22067342F, + 0.23501402F, 0.25028656F, 0.26655159F, 0.28387361F, + 0.30232132F, 0.32196786F, 0.34289114F, 0.36517414F, + 0.38890521F, 0.41417847F, 0.44109412F, 0.46975890F, + 0.50028648F, 0.53279791F, 0.56742212F, 0.60429640F, + 0.64356699F, 0.68538959F, 0.72993007F, 0.77736504F, + 0.82788260F, 0.88168307F, 0.9389798F, 1.F, +}; + +#endif + + +static int mapping0_forward(vorbis_block *vb){ + vorbis_dsp_state *vd=vb->vd; + vorbis_info *vi=vd->vi; + codec_setup_info *ci=vi->codec_setup; + private_state *b=vb->vd->backend_state; + vorbis_block_internal *vbi=(vorbis_block_internal *)vb->internal; + int n=vb->pcmend; + int i,j,k; + + int *nonzero = alloca(sizeof(*nonzero)*vi->channels); + float **gmdct = _vorbis_block_alloc(vb,vi->channels*sizeof(*gmdct)); + int **iwork = _vorbis_block_alloc(vb,vi->channels*sizeof(*iwork)); + int ***floor_posts = _vorbis_block_alloc(vb,vi->channels*sizeof(*floor_posts)); + + float global_ampmax=vbi->ampmax; + float *local_ampmax=alloca(sizeof(*local_ampmax)*vi->channels); + int blocktype=vbi->blocktype; + + int modenumber=vb->W; + vorbis_info_mapping0 *info=ci->map_param[modenumber]; + vorbis_look_psy *psy_look=b->psy+blocktype+(vb->W?2:0); + + vb->mode=modenumber; + + for(i=0;ichannels;i++){ + float scale=4.f/n; + float scale_dB; + + float *pcm =vb->pcm[i]; + float *logfft =pcm; + + iwork[i]=_vorbis_block_alloc(vb,n/2*sizeof(**iwork)); + gmdct[i]=_vorbis_block_alloc(vb,n/2*sizeof(**gmdct)); + + scale_dB=todB(&scale) + .345; /* + .345 is a hack; the original + todB estimation used on IEEE 754 + compliant machines had a bug that + returned dB values about a third + of a decibel too high. The bug + was harmless because tunings + implicitly took that into + account. However, fixing the bug + in the estimator requires + changing all the tunings as well. + For now, it's easier to sync + things back up here, and + recalibrate the tunings in the + next major model upgrade. */ + +#if 0 + if(vi->channels==2){ + if(i==0) + _analysis_output("pcmL",seq,pcm,n,0,0,total-n/2); + else + _analysis_output("pcmR",seq,pcm,n,0,0,total-n/2); + }else{ + _analysis_output("pcm",seq,pcm,n,0,0,total-n/2); + } +#endif + + /* window the PCM data */ + _vorbis_apply_window(pcm,b->window,ci->blocksizes,vb->lW,vb->W,vb->nW); + +#if 0 + if(vi->channels==2){ + if(i==0) + _analysis_output("windowedL",seq,pcm,n,0,0,total-n/2); + else + _analysis_output("windowedR",seq,pcm,n,0,0,total-n/2); + }else{ + _analysis_output("windowed",seq,pcm,n,0,0,total-n/2); + } +#endif + + /* transform the PCM data */ + /* only MDCT right now.... */ + mdct_forward(b->transform[vb->W][0],pcm,gmdct[i]); + + /* FFT yields more accurate tonal estimation (not phase sensitive) */ + drft_forward(&b->fft_look[vb->W],pcm); + logfft[0]=scale_dB+todB(pcm) + .345; /* + .345 is a hack; the + original todB estimation used on + IEEE 754 compliant machines had a + bug that returned dB values about + a third of a decibel too high. + The bug was harmless because + tunings implicitly took that into + account. However, fixing the bug + in the estimator requires + changing all the tunings as well. + For now, it's easier to sync + things back up here, and + recalibrate the tunings in the + next major model upgrade. */ + local_ampmax[i]=logfft[0]; + for(j=1;j>1]=scale_dB+.5f*todB(&temp) + .345; /* + + .345 is a hack; the original todB + estimation used on IEEE 754 + compliant machines had a bug that + returned dB values about a third + of a decibel too high. The bug + was harmless because tunings + implicitly took that into + account. However, fixing the bug + in the estimator requires + changing all the tunings as well. + For now, it's easier to sync + things back up here, and + recalibrate the tunings in the + next major model upgrade. */ + if(temp>local_ampmax[i])local_ampmax[i]=temp; + } + + if(local_ampmax[i]>0.f)local_ampmax[i]=0.f; + if(local_ampmax[i]>global_ampmax)global_ampmax=local_ampmax[i]; + +#if 0 + if(vi->channels==2){ + if(i==0){ + _analysis_output("fftL",seq,logfft,n/2,1,0,0); + }else{ + _analysis_output("fftR",seq,logfft,n/2,1,0,0); + } + }else{ + _analysis_output("fft",seq,logfft,n/2,1,0,0); + } +#endif + + } + + { + float *noise = _vorbis_block_alloc(vb,n/2*sizeof(*noise)); + float *tone = _vorbis_block_alloc(vb,n/2*sizeof(*tone)); + + for(i=0;ichannels;i++){ + /* the encoder setup assumes that all the modes used by any + specific bitrate tweaking use the same floor */ + + int submap=info->chmuxlist[i]; + + /* the following makes things clearer to *me* anyway */ + float *mdct =gmdct[i]; + float *logfft =vb->pcm[i]; + + float *logmdct =logfft+n/2; + float *logmask =logfft; + + vb->mode=modenumber; + + floor_posts[i]=_vorbis_block_alloc(vb,PACKETBLOBS*sizeof(**floor_posts)); + memset(floor_posts[i],0,sizeof(**floor_posts)*PACKETBLOBS); + + for(j=0;jchannels==2){ + if(i==0) + _analysis_output("mdctL",seq,logmdct,n/2,1,0,0); + else + _analysis_output("mdctR",seq,logmdct,n/2,1,0,0); + }else{ + _analysis_output("mdct",seq,logmdct,n/2,1,0,0); + } +#endif + + /* first step; noise masking. Not only does 'noise masking' + give us curves from which we can decide how much resolution + to give noise parts of the spectrum, it also implicitly hands + us a tonality estimate (the larger the value in the + 'noise_depth' vector, the more tonal that area is) */ + + _vp_noisemask(psy_look, + logmdct, + noise); /* noise does not have by-frequency offset + bias applied yet */ +#if 0 + if(vi->channels==2){ + if(i==0) + _analysis_output("noiseL",seq,noise,n/2,1,0,0); + else + _analysis_output("noiseR",seq,noise,n/2,1,0,0); + }else{ + _analysis_output("noise",seq,noise,n/2,1,0,0); + } +#endif + + /* second step: 'all the other crap'; all the stuff that isn't + computed/fit for bitrate management goes in the second psy + vector. This includes tone masking, peak limiting and ATH */ + + _vp_tonemask(psy_look, + logfft, + tone, + global_ampmax, + local_ampmax[i]); + +#if 0 + if(vi->channels==2){ + if(i==0) + _analysis_output("toneL",seq,tone,n/2,1,0,0); + else + _analysis_output("toneR",seq,tone,n/2,1,0,0); + }else{ + _analysis_output("tone",seq,tone,n/2,1,0,0); + } +#endif + + /* third step; we offset the noise vectors, overlay tone + masking. We then do a floor1-specific line fit. If we're + performing bitrate management, the line fit is performed + multiple times for up/down tweakage on demand. */ + +#if 0 + { + float aotuv[psy_look->n]; +#endif + + _vp_offset_and_mix(psy_look, + noise, + tone, + 1, + logmask, + mdct, + logmdct); + +#if 0 + if(vi->channels==2){ + if(i==0) + _analysis_output("aotuvM1_L",seq,aotuv,psy_look->n,1,1,0); + else + _analysis_output("aotuvM1_R",seq,aotuv,psy_look->n,1,1,0); + }else{ + _analysis_output("aotuvM1",seq,aotuv,psy_look->n,1,1,0); + } + } +#endif + + +#if 0 + if(vi->channels==2){ + if(i==0) + _analysis_output("mask1L",seq,logmask,n/2,1,0,0); + else + _analysis_output("mask1R",seq,logmask,n/2,1,0,0); + }else{ + _analysis_output("mask1",seq,logmask,n/2,1,0,0); + } +#endif + + /* this algorithm is hardwired to floor 1 for now; abort out if + we're *not* floor1. This won't happen unless someone has + broken the encode setup lib. Guard it anyway. */ + if(ci->floor_type[info->floorsubmap[submap]]!=1)return(-1); + + floor_posts[i][PACKETBLOBS/2]= + floor1_fit(vb,b->flr[info->floorsubmap[submap]], + logmdct, + logmask); + + /* are we managing bitrate? If so, perform two more fits for + later rate tweaking (fits represent hi/lo) */ + if(vorbis_bitrate_managed(vb) && floor_posts[i][PACKETBLOBS/2]){ + /* higher rate by way of lower noise curve */ + + _vp_offset_and_mix(psy_look, + noise, + tone, + 2, + logmask, + mdct, + logmdct); + +#if 0 + if(vi->channels==2){ + if(i==0) + _analysis_output("mask2L",seq,logmask,n/2,1,0,0); + else + _analysis_output("mask2R",seq,logmask,n/2,1,0,0); + }else{ + _analysis_output("mask2",seq,logmask,n/2,1,0,0); + } +#endif + + floor_posts[i][PACKETBLOBS-1]= + floor1_fit(vb,b->flr[info->floorsubmap[submap]], + logmdct, + logmask); + + /* lower rate by way of higher noise curve */ + _vp_offset_and_mix(psy_look, + noise, + tone, + 0, + logmask, + mdct, + logmdct); + +#if 0 + if(vi->channels==2){ + if(i==0) + _analysis_output("mask0L",seq,logmask,n/2,1,0,0); + else + _analysis_output("mask0R",seq,logmask,n/2,1,0,0); + }else{ + _analysis_output("mask0",seq,logmask,n/2,1,0,0); + } +#endif + + floor_posts[i][0]= + floor1_fit(vb,b->flr[info->floorsubmap[submap]], + logmdct, + logmask); + + /* we also interpolate a range of intermediate curves for + intermediate rates */ + for(k=1;kflr[info->floorsubmap[submap]], + floor_posts[i][0], + floor_posts[i][PACKETBLOBS/2], + k*65536/(PACKETBLOBS/2)); + for(k=PACKETBLOBS/2+1;kflr[info->floorsubmap[submap]], + floor_posts[i][PACKETBLOBS/2], + floor_posts[i][PACKETBLOBS-1], + (k-PACKETBLOBS/2)*65536/(PACKETBLOBS/2)); + } + } + } + vbi->ampmax=global_ampmax; + + /* + the next phases are performed once for vbr-only and PACKETBLOB + times for bitrate managed modes. + + 1) encode actual mode being used + 2) encode the floor for each channel, compute coded mask curve/res + 3) normalize and couple. + 4) encode residue + 5) save packet bytes to the packetblob vector + + */ + + /* iterate over the many masking curve fits we've created */ + + { + int **couple_bundle=alloca(sizeof(*couple_bundle)*vi->channels); + int *zerobundle=alloca(sizeof(*zerobundle)*vi->channels); + + for(k=(vorbis_bitrate_managed(vb)?0:PACKETBLOBS/2); + k<=(vorbis_bitrate_managed(vb)?PACKETBLOBS-1:PACKETBLOBS/2); + k++){ + oggpack_buffer *opb=vbi->packetblob[k]; + + /* start out our new packet blob with packet type and mode */ + /* Encode the packet type */ + oggpack_write(opb,0,1); + /* Encode the modenumber */ + /* Encode frame mode, pre,post windowsize, then dispatch */ + oggpack_write(opb,modenumber,b->modebits); + if(vb->W){ + oggpack_write(opb,vb->lW,1); + oggpack_write(opb,vb->nW,1); + } + + /* encode floor, compute masking curve, sep out residue */ + for(i=0;ichannels;i++){ + int submap=info->chmuxlist[i]; + int *ilogmask=iwork[i]; + + nonzero[i]=floor1_encode(opb,vb,b->flr[info->floorsubmap[submap]], + floor_posts[i][k], + ilogmask); +#if 0 + { + char buf[80]; + sprintf(buf,"maskI%c%d",i?'R':'L',k); + float work[n/2]; + for(j=0;jpsy_g_param, + psy_look, + info, + gmdct, + iwork, + nonzero, + ci->psy_g_param.sliding_lowpass[vb->W][k], + vi->channels); + +#if 0 + for(i=0;ichannels;i++){ + char buf[80]; + sprintf(buf,"res%c%d",i?'R':'L',k); + float work[n/2]; + for(j=0;jsubmaps;i++){ + int ch_in_bundle=0; + long **classifications; + int resnum=info->residuesubmap[i]; + + for(j=0;jchannels;j++){ + if(info->chmuxlist[j]==i){ + zerobundle[ch_in_bundle]=0; + if(nonzero[j])zerobundle[ch_in_bundle]=1; + couple_bundle[ch_in_bundle++]=iwork[j]; + } + } + + classifications=_residue_P[ci->residue_type[resnum]]-> + class(vb,b->residue[resnum],couple_bundle,zerobundle,ch_in_bundle); + + ch_in_bundle=0; + for(j=0;jchannels;j++) + if(info->chmuxlist[j]==i) + couple_bundle[ch_in_bundle++]=iwork[j]; + + _residue_P[ci->residue_type[resnum]]-> + forward(opb,vb,b->residue[resnum], + couple_bundle,zerobundle,ch_in_bundle,classifications,i); + } + + /* ok, done encoding. Next protopacket. */ + } + + } + +#if 0 + seq++; + total+=ci->blocksizes[vb->W]/4+ci->blocksizes[vb->nW]/4; +#endif + return(0); +} + +static int mapping0_inverse(vorbis_block *vb,vorbis_info_mapping *l){ + vorbis_dsp_state *vd=vb->vd; + vorbis_info *vi=vd->vi; + codec_setup_info *ci=vi->codec_setup; + private_state *b=vd->backend_state; + vorbis_info_mapping0 *info=(vorbis_info_mapping0 *)l; + + int i,j; + long n=vb->pcmend=ci->blocksizes[vb->W]; + + float **pcmbundle=alloca(sizeof(*pcmbundle)*vi->channels); + int *zerobundle=alloca(sizeof(*zerobundle)*vi->channels); + + int *nonzero =alloca(sizeof(*nonzero)*vi->channels); + void **floormemo=alloca(sizeof(*floormemo)*vi->channels); + + /* recover the spectral envelope; store it in the PCM vector for now */ + for(i=0;ichannels;i++){ + int submap=info->chmuxlist[i]; + floormemo[i]=_floor_P[ci->floor_type[info->floorsubmap[submap]]]-> + inverse1(vb,b->flr[info->floorsubmap[submap]]); + if(floormemo[i]) + nonzero[i]=1; + else + nonzero[i]=0; + memset(vb->pcm[i],0,sizeof(*vb->pcm[i])*n/2); + } + + /* channel coupling can 'dirty' the nonzero listing */ + for(i=0;icoupling_steps;i++){ + if(nonzero[info->coupling_mag[i]] || + nonzero[info->coupling_ang[i]]){ + nonzero[info->coupling_mag[i]]=1; + nonzero[info->coupling_ang[i]]=1; + } + } + + /* recover the residue into our working vectors */ + for(i=0;isubmaps;i++){ + int ch_in_bundle=0; + for(j=0;jchannels;j++){ + if(info->chmuxlist[j]==i){ + if(nonzero[j]) + zerobundle[ch_in_bundle]=1; + else + zerobundle[ch_in_bundle]=0; + pcmbundle[ch_in_bundle++]=vb->pcm[j]; + } + } + + _residue_P[ci->residue_type[info->residuesubmap[i]]]-> + inverse(vb,b->residue[info->residuesubmap[i]], + pcmbundle,zerobundle,ch_in_bundle); + } + + /* channel coupling */ + for(i=info->coupling_steps-1;i>=0;i--){ + float *pcmM=vb->pcm[info->coupling_mag[i]]; + float *pcmA=vb->pcm[info->coupling_ang[i]]; + + for(j=0;j0) + if(ang>0){ + pcmM[j]=mag; + pcmA[j]=mag-ang; + }else{ + pcmA[j]=mag; + pcmM[j]=mag+ang; + } + else + if(ang>0){ + pcmM[j]=mag; + pcmA[j]=mag+ang; + }else{ + pcmA[j]=mag; + pcmM[j]=mag-ang; + } + } + } + + /* compute and apply spectral envelope */ + for(i=0;ichannels;i++){ + float *pcm=vb->pcm[i]; + int submap=info->chmuxlist[i]; + _floor_P[ci->floor_type[info->floorsubmap[submap]]]-> + inverse2(vb,b->flr[info->floorsubmap[submap]], + floormemo[i],pcm); + } + + /* transform the PCM data; takes PCM vector, vb; modifies PCM vector */ + /* only MDCT right now.... */ + for(i=0;ichannels;i++){ + float *pcm=vb->pcm[i]; + mdct_backward(b->transform[vb->W][0],pcm,pcm); + } + + /* all done! */ + return(0); +} + +/* export hooks */ +const vorbis_func_mapping mapping0_exportbundle={ + &mapping0_pack, + &mapping0_unpack, + &mapping0_free_info, + &mapping0_forward, + &mapping0_inverse +}; diff --git a/code/libvorbis-1.3.4/lib/masking.h b/code/libvorbis-1.3.4/lib/masking.h new file mode 100644 index 00000000..3576ab78 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/masking.h @@ -0,0 +1,785 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: masking curve data for psychoacoustics + last mod: $Id: masking.h 16227 2009-07-08 06:58:46Z xiphmont $ + + ********************************************************************/ + +#ifndef _V_MASKING_H_ +#define _V_MASKING_H_ + +/* more detailed ATH; the bass if flat to save stressing the floor + overly for only a bin or two of savings. */ + +#define MAX_ATH 88 +static const float ATH[]={ + /*15*/ -51, -52, -53, -54, -55, -56, -57, -58, + /*31*/ -59, -60, -61, -62, -63, -64, -65, -66, + /*63*/ -67, -68, -69, -70, -71, -72, -73, -74, + /*125*/ -75, -76, -77, -78, -80, -81, -82, -83, + /*250*/ -84, -85, -86, -87, -88, -88, -89, -89, + /*500*/ -90, -91, -91, -92, -93, -94, -95, -96, + /*1k*/ -96, -97, -98, -98, -99, -99,-100,-100, + /*2k*/ -101,-102,-103,-104,-106,-107,-107,-107, + /*4k*/ -107,-105,-103,-102,-101, -99, -98, -96, + /*8k*/ -95, -95, -96, -97, -96, -95, -93, -90, + /*16k*/ -80, -70, -50, -40, -30, -30, -30, -30 +}; + +/* The tone masking curves from Ehmer's and Fielder's papers have been + replaced by an empirically collected data set. The previously + published values were, far too often, simply on crack. */ + +#define EHMER_OFFSET 16 +#define EHMER_MAX 56 + +/* masking tones from -50 to 0dB, 62.5 through 16kHz at half octaves + test tones from -2 octaves to +5 octaves sampled at eighth octaves */ +/* (Vorbis 0dB, the loudest possible tone, is assumed to be ~100dB SPL + for collection of these curves) */ + +static const float tonemasks[P_BANDS][6][EHMER_MAX]={ + /* 62.5 Hz */ + {{ -60, -60, -60, -60, -60, -60, -60, -60, + -60, -60, -60, -60, -62, -62, -65, -73, + -69, -68, -68, -67, -70, -70, -72, -74, + -75, -79, -79, -80, -83, -88, -93, -100, + -110, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + { -48, -48, -48, -48, -48, -48, -48, -48, + -48, -48, -48, -48, -48, -53, -61, -66, + -66, -68, -67, -70, -76, -76, -72, -73, + -75, -76, -78, -79, -83, -88, -93, -100, + -110, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + { -37, -37, -37, -37, -37, -37, -37, -37, + -38, -40, -42, -46, -48, -53, -55, -62, + -65, -58, -56, -56, -61, -60, -65, -67, + -69, -71, -77, -77, -78, -80, -82, -84, + -88, -93, -98, -106, -112, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + { -25, -25, -25, -25, -25, -25, -25, -25, + -25, -26, -27, -29, -32, -38, -48, -52, + -52, -50, -48, -48, -51, -52, -54, -60, + -67, -67, -66, -68, -69, -73, -73, -76, + -80, -81, -81, -85, -85, -86, -88, -93, + -100, -110, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + { -16, -16, -16, -16, -16, -16, -16, -16, + -17, -19, -20, -22, -26, -28, -31, -40, + -47, -39, -39, -40, -42, -43, -47, -51, + -57, -52, -55, -55, -60, -58, -62, -63, + -70, -67, -69, -72, -73, -77, -80, -82, + -83, -87, -90, -94, -98, -104, -115, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + { -8, -8, -8, -8, -8, -8, -8, -8, + -8, -8, -10, -11, -15, -19, -25, -30, + -34, -31, -30, -31, -29, -32, -35, -42, + -48, -42, -44, -46, -50, -50, -51, -52, + -59, -54, -55, -55, -58, -62, -63, -66, + -72, -73, -76, -75, -78, -80, -80, -81, + -84, -88, -90, -94, -98, -101, -106, -110}}, + /* 88Hz */ + {{ -66, -66, -66, -66, -66, -66, -66, -66, + -66, -66, -66, -66, -66, -67, -67, -67, + -76, -72, -71, -74, -76, -76, -75, -78, + -79, -79, -81, -83, -86, -89, -93, -97, + -100, -105, -110, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + { -47, -47, -47, -47, -47, -47, -47, -47, + -47, -47, -47, -48, -51, -55, -59, -66, + -66, -66, -67, -66, -68, -69, -70, -74, + -79, -77, -77, -78, -80, -81, -82, -84, + -86, -88, -91, -95, -100, -108, -116, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + { -36, -36, -36, -36, -36, -36, -36, -36, + -36, -37, -37, -41, -44, -48, -51, -58, + -62, -60, -57, -59, -59, -60, -63, -65, + -72, -71, -70, -72, -74, -77, -76, -78, + -81, -81, -80, -83, -86, -91, -96, -100, + -105, -110, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + { -28, -28, -28, -28, -28, -28, -28, -28, + -28, -30, -32, -32, -33, -35, -41, -49, + -50, -49, -47, -48, -48, -52, -51, -57, + -65, -61, -59, -61, -64, -69, -70, -74, + -77, -77, -78, -81, -84, -85, -87, -90, + -92, -96, -100, -107, -112, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + { -19, -19, -19, -19, -19, -19, -19, -19, + -20, -21, -23, -27, -30, -35, -36, -41, + -46, -44, -42, -40, -41, -41, -43, -48, + -55, -53, -52, -53, -56, -59, -58, -60, + -67, -66, -69, -71, -72, -75, -79, -81, + -84, -87, -90, -93, -97, -101, -107, -114, + -999, -999, -999, -999, -999, -999, -999, -999}, + { -9, -9, -9, -9, -9, -9, -9, -9, + -11, -12, -12, -15, -16, -20, -23, -30, + -37, -34, -33, -34, -31, -32, -32, -38, + -47, -44, -41, -40, -47, -49, -46, -46, + -58, -50, -50, -54, -58, -62, -64, -67, + -67, -70, -72, -76, -79, -83, -87, -91, + -96, -100, -104, -110, -999, -999, -999, -999}}, + /* 125 Hz */ + {{ -62, -62, -62, -62, -62, -62, -62, -62, + -62, -62, -63, -64, -66, -67, -66, -68, + -75, -72, -76, -75, -76, -78, -79, -82, + -84, -85, -90, -94, -101, -110, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + { -59, -59, -59, -59, -59, -59, -59, -59, + -59, -59, -59, -60, -60, -61, -63, -66, + -71, -68, -70, -70, -71, -72, -72, -75, + -81, -78, -79, -82, -83, -86, -90, -97, + -103, -113, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + { -53, -53, -53, -53, -53, -53, -53, -53, + -53, -54, -55, -57, -56, -57, -55, -61, + -65, -60, -60, -62, -63, -63, -66, -68, + -74, -73, -75, -75, -78, -80, -80, -82, + -85, -90, -96, -101, -108, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + { -46, -46, -46, -46, -46, -46, -46, -46, + -46, -46, -47, -47, -47, -47, -48, -51, + -57, -51, -49, -50, -51, -53, -54, -59, + -66, -60, -62, -67, -67, -70, -72, -75, + -76, -78, -81, -85, -88, -94, -97, -104, + -112, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + { -36, -36, -36, -36, -36, -36, -36, -36, + -39, -41, -42, -42, -39, -38, -41, -43, + -52, -44, -40, -39, -37, -37, -40, -47, + -54, -50, -48, -50, -55, -61, -59, -62, + -66, -66, -66, -69, -69, -73, -74, -74, + -75, -77, -79, -82, -87, -91, -95, -100, + -108, -115, -999, -999, -999, -999, -999, -999}, + { -28, -26, -24, -22, -20, -20, -23, -29, + -30, -31, -28, -27, -28, -28, -28, -35, + -40, -33, -32, -29, -30, -30, -30, -37, + -45, -41, -37, -38, -45, -47, -47, -48, + -53, -49, -48, -50, -49, -49, -51, -52, + -58, -56, -57, -56, -60, -61, -62, -70, + -72, -74, -78, -83, -88, -93, -100, -106}}, + /* 177 Hz */ + {{-999, -999, -999, -999, -999, -999, -999, -999, + -999, -110, -105, -100, -95, -91, -87, -83, + -80, -78, -76, -78, -78, -81, -83, -85, + -86, -85, -86, -87, -90, -97, -107, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -110, -105, -100, -95, -90, + -85, -81, -77, -73, -70, -67, -67, -68, + -75, -73, -70, -69, -70, -72, -75, -79, + -84, -83, -84, -86, -88, -89, -89, -93, + -98, -105, -112, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-105, -100, -95, -90, -85, -80, -76, -71, + -68, -68, -65, -63, -63, -62, -62, -64, + -65, -64, -61, -62, -63, -64, -66, -68, + -73, -73, -74, -75, -76, -81, -83, -85, + -88, -89, -92, -95, -100, -108, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + { -80, -75, -71, -68, -65, -63, -62, -61, + -61, -61, -61, -59, -56, -57, -53, -50, + -58, -52, -50, -50, -52, -53, -54, -58, + -67, -63, -67, -68, -72, -75, -78, -80, + -81, -81, -82, -85, -89, -90, -93, -97, + -101, -107, -114, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + { -65, -61, -59, -57, -56, -55, -55, -56, + -56, -57, -55, -53, -52, -47, -44, -44, + -50, -44, -41, -39, -39, -42, -40, -46, + -51, -49, -50, -53, -54, -63, -60, -61, + -62, -66, -66, -66, -70, -73, -74, -75, + -76, -75, -79, -85, -89, -91, -96, -102, + -110, -999, -999, -999, -999, -999, -999, -999}, + { -52, -50, -49, -49, -48, -48, -48, -49, + -50, -50, -49, -46, -43, -39, -35, -33, + -38, -36, -32, -29, -32, -32, -32, -35, + -44, -39, -38, -38, -46, -50, -45, -46, + -53, -50, -50, -50, -54, -54, -53, -53, + -56, -57, -59, -66, -70, -72, -74, -79, + -83, -85, -90, -97, -114, -999, -999, -999}}, + /* 250 Hz */ + {{-999, -999, -999, -999, -999, -999, -110, -105, + -100, -95, -90, -86, -80, -75, -75, -79, + -80, -79, -80, -81, -82, -88, -95, -103, + -110, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -108, -103, -98, -93, + -88, -83, -79, -78, -75, -71, -67, -68, + -73, -73, -72, -73, -75, -77, -80, -82, + -88, -93, -100, -107, -114, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -110, -105, -101, -96, -90, + -86, -81, -77, -73, -69, -66, -61, -62, + -66, -64, -62, -65, -66, -70, -72, -76, + -81, -80, -84, -90, -95, -102, -110, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -107, -103, -97, -92, -88, + -83, -79, -74, -70, -66, -59, -53, -58, + -62, -55, -54, -54, -54, -58, -61, -62, + -72, -70, -72, -75, -78, -80, -81, -80, + -83, -83, -88, -93, -100, -107, -115, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -105, -100, -95, -90, -85, + -80, -75, -70, -66, -62, -56, -48, -44, + -48, -46, -46, -43, -46, -48, -48, -51, + -58, -58, -59, -60, -62, -62, -61, -61, + -65, -64, -65, -68, -70, -74, -75, -78, + -81, -86, -95, -110, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -105, -100, -95, -90, -85, -80, + -75, -70, -65, -61, -55, -49, -39, -33, + -40, -35, -32, -38, -40, -33, -35, -37, + -46, -41, -45, -44, -46, -42, -45, -46, + -52, -50, -50, -50, -54, -54, -55, -57, + -62, -64, -66, -68, -70, -76, -81, -90, + -100, -110, -999, -999, -999, -999, -999, -999}}, + /* 354 hz */ + {{-999, -999, -999, -999, -999, -999, -999, -999, + -105, -98, -90, -85, -82, -83, -80, -78, + -84, -79, -80, -83, -87, -89, -91, -93, + -99, -106, -117, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -105, -98, -90, -85, -80, -75, -70, -68, + -74, -72, -74, -77, -80, -82, -85, -87, + -92, -89, -91, -95, -100, -106, -112, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -105, -98, -90, -83, -75, -71, -63, -64, + -67, -62, -64, -67, -70, -73, -77, -81, + -84, -83, -85, -89, -90, -93, -98, -104, + -109, -114, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -103, -96, -88, -81, -75, -68, -58, -54, + -56, -54, -56, -56, -58, -60, -63, -66, + -74, -69, -72, -72, -75, -74, -77, -81, + -81, -82, -84, -87, -93, -96, -99, -104, + -110, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -108, -102, -96, + -91, -85, -80, -74, -68, -60, -51, -46, + -48, -46, -43, -45, -47, -47, -49, -48, + -56, -53, -55, -58, -57, -63, -58, -60, + -66, -64, -67, -70, -70, -74, -77, -84, + -86, -89, -91, -93, -94, -101, -109, -118, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -108, -103, -98, -93, -88, + -83, -78, -73, -68, -60, -53, -44, -35, + -38, -38, -34, -34, -36, -40, -41, -44, + -51, -45, -46, -47, -46, -54, -50, -49, + -50, -50, -50, -51, -54, -57, -58, -60, + -66, -66, -66, -64, -65, -68, -77, -82, + -87, -95, -110, -999, -999, -999, -999, -999}}, + /* 500 Hz */ + {{-999, -999, -999, -999, -999, -999, -999, -999, + -107, -102, -97, -92, -87, -83, -78, -75, + -82, -79, -83, -85, -89, -92, -95, -98, + -101, -105, -109, -113, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -106, + -100, -95, -90, -86, -81, -78, -74, -69, + -74, -74, -76, -79, -83, -84, -86, -89, + -92, -97, -93, -100, -103, -107, -110, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -106, -100, + -95, -90, -87, -83, -80, -75, -69, -60, + -66, -66, -68, -70, -74, -78, -79, -81, + -81, -83, -84, -87, -93, -96, -99, -103, + -107, -110, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -108, -103, -98, + -93, -89, -85, -82, -78, -71, -62, -55, + -58, -58, -54, -54, -55, -59, -61, -62, + -70, -66, -66, -67, -70, -72, -75, -78, + -84, -84, -84, -88, -91, -90, -95, -98, + -102, -103, -106, -110, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -108, -103, -98, -94, + -90, -87, -82, -79, -73, -67, -58, -47, + -50, -45, -41, -45, -48, -44, -44, -49, + -54, -51, -48, -47, -49, -50, -51, -57, + -58, -60, -63, -69, -70, -69, -71, -74, + -78, -82, -90, -95, -101, -105, -110, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -105, -101, -97, -93, -90, + -85, -80, -77, -72, -65, -56, -48, -37, + -40, -36, -34, -40, -50, -47, -38, -41, + -47, -38, -35, -39, -38, -43, -40, -45, + -50, -45, -44, -47, -50, -55, -48, -48, + -52, -66, -70, -76, -82, -90, -97, -105, + -110, -999, -999, -999, -999, -999, -999, -999}}, + /* 707 Hz */ + {{-999, -999, -999, -999, -999, -999, -999, -999, + -999, -108, -103, -98, -93, -86, -79, -76, + -83, -81, -85, -87, -89, -93, -98, -102, + -107, -112, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -108, -103, -98, -93, -86, -79, -71, + -77, -74, -77, -79, -81, -84, -85, -90, + -92, -93, -92, -98, -101, -108, -112, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -108, -103, -98, -93, -87, -78, -68, -65, + -66, -62, -65, -67, -70, -73, -75, -78, + -82, -82, -83, -84, -91, -93, -98, -102, + -106, -110, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -105, -100, -95, -90, -82, -74, -62, -57, + -58, -56, -51, -52, -52, -54, -54, -58, + -66, -59, -60, -63, -66, -69, -73, -79, + -83, -84, -80, -81, -81, -82, -88, -92, + -98, -105, -113, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -107, + -102, -97, -92, -84, -79, -69, -57, -47, + -52, -47, -44, -45, -50, -52, -42, -42, + -53, -43, -43, -48, -51, -56, -55, -52, + -57, -59, -61, -62, -67, -71, -78, -83, + -86, -94, -98, -103, -110, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -105, -100, + -95, -90, -84, -78, -70, -61, -51, -41, + -40, -38, -40, -46, -52, -51, -41, -40, + -46, -40, -38, -38, -41, -46, -41, -46, + -47, -43, -43, -45, -41, -45, -56, -67, + -68, -83, -87, -90, -95, -102, -107, -113, + -999, -999, -999, -999, -999, -999, -999, -999}}, + /* 1000 Hz */ + {{-999, -999, -999, -999, -999, -999, -999, -999, + -999, -109, -105, -101, -96, -91, -84, -77, + -82, -82, -85, -89, -94, -100, -106, -110, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -106, -103, -98, -92, -85, -80, -71, + -75, -72, -76, -80, -84, -86, -89, -93, + -100, -107, -113, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -107, + -104, -101, -97, -92, -88, -84, -80, -64, + -66, -63, -64, -66, -69, -73, -77, -83, + -83, -86, -91, -98, -104, -111, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -107, + -104, -101, -97, -92, -90, -84, -74, -57, + -58, -52, -55, -54, -50, -52, -50, -52, + -63, -62, -69, -76, -77, -78, -78, -79, + -82, -88, -94, -100, -106, -111, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -106, -102, + -98, -95, -90, -85, -83, -78, -70, -50, + -50, -41, -44, -49, -47, -50, -50, -44, + -55, -46, -47, -48, -48, -54, -49, -49, + -58, -62, -71, -81, -87, -92, -97, -102, + -108, -114, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -106, -102, + -98, -95, -90, -85, -83, -78, -70, -45, + -43, -41, -47, -50, -51, -50, -49, -45, + -47, -41, -44, -41, -39, -43, -38, -37, + -40, -41, -44, -50, -58, -65, -73, -79, + -85, -92, -97, -101, -105, -109, -113, -999, + -999, -999, -999, -999, -999, -999, -999, -999}}, + /* 1414 Hz */ + {{-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -107, -100, -95, -87, -81, + -85, -83, -88, -93, -100, -107, -114, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -107, -101, -95, -88, -83, -76, + -73, -72, -79, -84, -90, -95, -100, -105, + -110, -115, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -104, -98, -92, -87, -81, -70, + -65, -62, -67, -71, -74, -80, -85, -91, + -95, -99, -103, -108, -111, -114, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -103, -97, -90, -85, -76, -60, + -56, -54, -60, -62, -61, -56, -63, -65, + -73, -74, -77, -75, -78, -81, -86, -87, + -88, -91, -94, -98, -103, -110, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -105, + -100, -97, -92, -86, -81, -79, -70, -57, + -51, -47, -51, -58, -60, -56, -53, -50, + -58, -52, -50, -50, -53, -55, -64, -69, + -71, -85, -82, -78, -81, -85, -95, -102, + -112, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -105, + -100, -97, -92, -85, -83, -79, -72, -49, + -40, -43, -43, -54, -56, -51, -50, -40, + -43, -38, -36, -35, -37, -38, -37, -44, + -54, -60, -57, -60, -70, -75, -84, -92, + -103, -112, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}}, + /* 2000 Hz */ + {{-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -110, -102, -95, -89, -82, + -83, -84, -90, -92, -99, -107, -113, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -107, -101, -95, -89, -83, -72, + -74, -78, -85, -88, -88, -90, -92, -98, + -105, -111, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -109, -103, -97, -93, -87, -81, -70, + -70, -67, -75, -73, -76, -79, -81, -83, + -88, -89, -97, -103, -110, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -107, -100, -94, -88, -83, -75, -63, + -59, -59, -63, -66, -60, -62, -67, -67, + -77, -76, -81, -88, -86, -92, -96, -102, + -109, -116, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -105, -98, -92, -86, -81, -73, -56, + -52, -47, -55, -60, -58, -52, -51, -45, + -49, -50, -53, -54, -61, -71, -70, -69, + -78, -79, -87, -90, -96, -104, -112, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -103, -96, -90, -86, -78, -70, -51, + -42, -47, -48, -55, -54, -54, -53, -42, + -35, -28, -33, -38, -37, -44, -47, -49, + -54, -63, -68, -78, -82, -89, -94, -99, + -104, -109, -114, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}}, + /* 2828 Hz */ + {{-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -110, -100, -90, -79, + -85, -81, -82, -82, -89, -94, -99, -103, + -109, -115, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -105, -97, -85, -72, + -74, -70, -70, -70, -76, -85, -91, -93, + -97, -103, -109, -115, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -112, -93, -81, -68, + -62, -60, -60, -57, -63, -70, -77, -82, + -90, -93, -98, -104, -109, -113, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -113, -100, -93, -84, -63, + -58, -48, -53, -54, -52, -52, -57, -64, + -66, -76, -83, -81, -85, -85, -90, -95, + -98, -101, -103, -106, -108, -111, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -105, -95, -86, -74, -53, + -50, -38, -43, -49, -43, -42, -39, -39, + -46, -52, -57, -56, -72, -69, -74, -81, + -87, -92, -94, -97, -99, -102, -105, -108, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -108, -99, -90, -76, -66, -45, + -43, -41, -44, -47, -43, -47, -40, -30, + -31, -31, -39, -33, -40, -41, -43, -53, + -59, -70, -73, -77, -79, -82, -84, -87, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}}, + /* 4000 Hz */ + {{-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -110, -91, -76, + -75, -85, -93, -98, -104, -110, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -110, -91, -70, + -70, -75, -86, -89, -94, -98, -101, -106, + -110, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -110, -95, -80, -60, + -65, -64, -74, -83, -88, -91, -95, -99, + -103, -107, -110, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -110, -95, -80, -58, + -55, -49, -66, -68, -71, -78, -78, -80, + -88, -85, -89, -97, -100, -105, -110, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -110, -95, -80, -53, + -52, -41, -59, -59, -49, -58, -56, -63, + -86, -79, -90, -93, -98, -103, -107, -112, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -110, -97, -91, -73, -45, + -40, -33, -53, -61, -49, -54, -50, -50, + -60, -52, -67, -74, -81, -92, -96, -100, + -105, -110, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}}, + /* 5657 Hz */ + {{-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -113, -106, -99, -92, -77, + -80, -88, -97, -106, -115, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -116, -109, -102, -95, -89, -74, + -72, -88, -87, -95, -102, -109, -116, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -116, -109, -102, -95, -89, -75, + -66, -74, -77, -78, -86, -87, -90, -96, + -105, -115, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -115, -108, -101, -94, -88, -66, + -56, -61, -70, -65, -78, -72, -83, -84, + -93, -98, -105, -110, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -110, -105, -95, -89, -82, -57, + -52, -52, -59, -56, -59, -58, -69, -67, + -88, -82, -82, -89, -94, -100, -108, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -110, -101, -96, -90, -83, -77, -54, + -43, -38, -50, -48, -52, -48, -42, -42, + -51, -52, -53, -59, -65, -71, -78, -85, + -95, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}}, + /* 8000 Hz */ + {{-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -120, -105, -86, -68, + -78, -79, -90, -100, -110, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -120, -105, -86, -66, + -73, -77, -88, -96, -105, -115, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -120, -105, -92, -80, -61, + -64, -68, -80, -87, -92, -100, -110, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -120, -104, -91, -79, -52, + -60, -54, -64, -69, -77, -80, -82, -84, + -85, -87, -88, -90, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -118, -100, -87, -77, -49, + -50, -44, -58, -61, -61, -67, -65, -62, + -62, -62, -65, -68, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -115, -98, -84, -62, -49, + -44, -38, -46, -49, -49, -46, -39, -37, + -39, -40, -42, -43, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}}, + /* 11314 Hz */ + {{-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -110, -88, -74, + -77, -82, -82, -85, -90, -94, -99, -104, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -110, -88, -66, + -70, -81, -80, -81, -84, -88, -91, -93, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -110, -88, -61, + -63, -70, -71, -74, -77, -80, -83, -85, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -110, -86, -62, + -63, -62, -62, -58, -52, -50, -50, -52, + -54, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -118, -108, -84, -53, + -50, -50, -50, -55, -47, -45, -40, -40, + -40, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -118, -100, -73, -43, + -37, -42, -43, -53, -38, -37, -35, -35, + -38, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}}, + /* 16000 Hz */ + {{-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -110, -100, -91, -84, -74, + -80, -80, -80, -80, -80, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -110, -100, -91, -84, -74, + -68, -68, -68, -68, -68, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -110, -100, -86, -78, -70, + -60, -45, -30, -21, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -110, -100, -87, -78, -67, + -48, -38, -29, -21, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -110, -100, -86, -69, -56, + -45, -35, -33, -29, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}, + {-999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -110, -100, -83, -71, -48, + -27, -38, -37, -34, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999, + -999, -999, -999, -999, -999, -999, -999, -999}} +}; + +#endif diff --git a/code/libvorbis-1.3.4/lib/mdct.c b/code/libvorbis-1.3.4/lib/mdct.c new file mode 100644 index 00000000..08163318 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/mdct.c @@ -0,0 +1,563 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: normalized modified discrete cosine transform + power of two length transform only [64 <= n ] + last mod: $Id: mdct.c 16227 2009-07-08 06:58:46Z xiphmont $ + + Original algorithm adapted long ago from _The use of multirate filter + banks for coding of high quality digital audio_, by T. Sporer, + K. Brandenburg and B. Edler, collection of the European Signal + Processing Conference (EUSIPCO), Amsterdam, June 1992, Vol.1, pp + 211-214 + + The below code implements an algorithm that no longer looks much like + that presented in the paper, but the basic structure remains if you + dig deep enough to see it. + + This module DOES NOT INCLUDE code to generate/apply the window + function. Everybody has their own weird favorite including me... I + happen to like the properties of y=sin(.5PI*sin^2(x)), but others may + vehemently disagree. + + ********************************************************************/ + +/* this can also be run as an integer transform by uncommenting a + define in mdct.h; the integerization is a first pass and although + it's likely stable for Vorbis, the dynamic range is constrained and + roundoff isn't done (so it's noisy). Consider it functional, but + only a starting point. There's no point on a machine with an FPU */ + +#include +#include +#include +#include +#include "vorbis/codec.h" +#include "mdct.h" +#include "os.h" +#include "misc.h" + +/* build lookups for trig functions; also pre-figure scaling and + some window function algebra. */ + +void mdct_init(mdct_lookup *lookup,int n){ + int *bitrev=_ogg_malloc(sizeof(*bitrev)*(n/4)); + DATA_TYPE *T=_ogg_malloc(sizeof(*T)*(n+n/4)); + + int i; + int n2=n>>1; + int log2n=lookup->log2n=rint(log((float)n)/log(2.f)); + lookup->n=n; + lookup->trig=T; + lookup->bitrev=bitrev; + +/* trig lookups... */ + + for(i=0;i>j;j++) + if((msb>>j)&i)acc|=1<scale=FLOAT_CONV(4.f/n); +} + +/* 8 point butterfly (in place, 4 register) */ +STIN void mdct_butterfly_8(DATA_TYPE *x){ + REG_TYPE r0 = x[6] + x[2]; + REG_TYPE r1 = x[6] - x[2]; + REG_TYPE r2 = x[4] + x[0]; + REG_TYPE r3 = x[4] - x[0]; + + x[6] = r0 + r2; + x[4] = r0 - r2; + + r0 = x[5] - x[1]; + r2 = x[7] - x[3]; + x[0] = r1 + r0; + x[2] = r1 - r0; + + r0 = x[5] + x[1]; + r1 = x[7] + x[3]; + x[3] = r2 + r3; + x[1] = r2 - r3; + x[7] = r1 + r0; + x[5] = r1 - r0; + +} + +/* 16 point butterfly (in place, 4 register) */ +STIN void mdct_butterfly_16(DATA_TYPE *x){ + REG_TYPE r0 = x[1] - x[9]; + REG_TYPE r1 = x[0] - x[8]; + + x[8] += x[0]; + x[9] += x[1]; + x[0] = MULT_NORM((r0 + r1) * cPI2_8); + x[1] = MULT_NORM((r0 - r1) * cPI2_8); + + r0 = x[3] - x[11]; + r1 = x[10] - x[2]; + x[10] += x[2]; + x[11] += x[3]; + x[2] = r0; + x[3] = r1; + + r0 = x[12] - x[4]; + r1 = x[13] - x[5]; + x[12] += x[4]; + x[13] += x[5]; + x[4] = MULT_NORM((r0 - r1) * cPI2_8); + x[5] = MULT_NORM((r0 + r1) * cPI2_8); + + r0 = x[14] - x[6]; + r1 = x[15] - x[7]; + x[14] += x[6]; + x[15] += x[7]; + x[6] = r0; + x[7] = r1; + + mdct_butterfly_8(x); + mdct_butterfly_8(x+8); +} + +/* 32 point butterfly (in place, 4 register) */ +STIN void mdct_butterfly_32(DATA_TYPE *x){ + REG_TYPE r0 = x[30] - x[14]; + REG_TYPE r1 = x[31] - x[15]; + + x[30] += x[14]; + x[31] += x[15]; + x[14] = r0; + x[15] = r1; + + r0 = x[28] - x[12]; + r1 = x[29] - x[13]; + x[28] += x[12]; + x[29] += x[13]; + x[12] = MULT_NORM( r0 * cPI1_8 - r1 * cPI3_8 ); + x[13] = MULT_NORM( r0 * cPI3_8 + r1 * cPI1_8 ); + + r0 = x[26] - x[10]; + r1 = x[27] - x[11]; + x[26] += x[10]; + x[27] += x[11]; + x[10] = MULT_NORM(( r0 - r1 ) * cPI2_8); + x[11] = MULT_NORM(( r0 + r1 ) * cPI2_8); + + r0 = x[24] - x[8]; + r1 = x[25] - x[9]; + x[24] += x[8]; + x[25] += x[9]; + x[8] = MULT_NORM( r0 * cPI3_8 - r1 * cPI1_8 ); + x[9] = MULT_NORM( r1 * cPI3_8 + r0 * cPI1_8 ); + + r0 = x[22] - x[6]; + r1 = x[7] - x[23]; + x[22] += x[6]; + x[23] += x[7]; + x[6] = r1; + x[7] = r0; + + r0 = x[4] - x[20]; + r1 = x[5] - x[21]; + x[20] += x[4]; + x[21] += x[5]; + x[4] = MULT_NORM( r1 * cPI1_8 + r0 * cPI3_8 ); + x[5] = MULT_NORM( r1 * cPI3_8 - r0 * cPI1_8 ); + + r0 = x[2] - x[18]; + r1 = x[3] - x[19]; + x[18] += x[2]; + x[19] += x[3]; + x[2] = MULT_NORM(( r1 + r0 ) * cPI2_8); + x[3] = MULT_NORM(( r1 - r0 ) * cPI2_8); + + r0 = x[0] - x[16]; + r1 = x[1] - x[17]; + x[16] += x[0]; + x[17] += x[1]; + x[0] = MULT_NORM( r1 * cPI3_8 + r0 * cPI1_8 ); + x[1] = MULT_NORM( r1 * cPI1_8 - r0 * cPI3_8 ); + + mdct_butterfly_16(x); + mdct_butterfly_16(x+16); + +} + +/* N point first stage butterfly (in place, 2 register) */ +STIN void mdct_butterfly_first(DATA_TYPE *T, + DATA_TYPE *x, + int points){ + + DATA_TYPE *x1 = x + points - 8; + DATA_TYPE *x2 = x + (points>>1) - 8; + REG_TYPE r0; + REG_TYPE r1; + + do{ + + r0 = x1[6] - x2[6]; + r1 = x1[7] - x2[7]; + x1[6] += x2[6]; + x1[7] += x2[7]; + x2[6] = MULT_NORM(r1 * T[1] + r0 * T[0]); + x2[7] = MULT_NORM(r1 * T[0] - r0 * T[1]); + + r0 = x1[4] - x2[4]; + r1 = x1[5] - x2[5]; + x1[4] += x2[4]; + x1[5] += x2[5]; + x2[4] = MULT_NORM(r1 * T[5] + r0 * T[4]); + x2[5] = MULT_NORM(r1 * T[4] - r0 * T[5]); + + r0 = x1[2] - x2[2]; + r1 = x1[3] - x2[3]; + x1[2] += x2[2]; + x1[3] += x2[3]; + x2[2] = MULT_NORM(r1 * T[9] + r0 * T[8]); + x2[3] = MULT_NORM(r1 * T[8] - r0 * T[9]); + + r0 = x1[0] - x2[0]; + r1 = x1[1] - x2[1]; + x1[0] += x2[0]; + x1[1] += x2[1]; + x2[0] = MULT_NORM(r1 * T[13] + r0 * T[12]); + x2[1] = MULT_NORM(r1 * T[12] - r0 * T[13]); + + x1-=8; + x2-=8; + T+=16; + + }while(x2>=x); +} + +/* N/stage point generic N stage butterfly (in place, 2 register) */ +STIN void mdct_butterfly_generic(DATA_TYPE *T, + DATA_TYPE *x, + int points, + int trigint){ + + DATA_TYPE *x1 = x + points - 8; + DATA_TYPE *x2 = x + (points>>1) - 8; + REG_TYPE r0; + REG_TYPE r1; + + do{ + + r0 = x1[6] - x2[6]; + r1 = x1[7] - x2[7]; + x1[6] += x2[6]; + x1[7] += x2[7]; + x2[6] = MULT_NORM(r1 * T[1] + r0 * T[0]); + x2[7] = MULT_NORM(r1 * T[0] - r0 * T[1]); + + T+=trigint; + + r0 = x1[4] - x2[4]; + r1 = x1[5] - x2[5]; + x1[4] += x2[4]; + x1[5] += x2[5]; + x2[4] = MULT_NORM(r1 * T[1] + r0 * T[0]); + x2[5] = MULT_NORM(r1 * T[0] - r0 * T[1]); + + T+=trigint; + + r0 = x1[2] - x2[2]; + r1 = x1[3] - x2[3]; + x1[2] += x2[2]; + x1[3] += x2[3]; + x2[2] = MULT_NORM(r1 * T[1] + r0 * T[0]); + x2[3] = MULT_NORM(r1 * T[0] - r0 * T[1]); + + T+=trigint; + + r0 = x1[0] - x2[0]; + r1 = x1[1] - x2[1]; + x1[0] += x2[0]; + x1[1] += x2[1]; + x2[0] = MULT_NORM(r1 * T[1] + r0 * T[0]); + x2[1] = MULT_NORM(r1 * T[0] - r0 * T[1]); + + T+=trigint; + x1-=8; + x2-=8; + + }while(x2>=x); +} + +STIN void mdct_butterflies(mdct_lookup *init, + DATA_TYPE *x, + int points){ + + DATA_TYPE *T=init->trig; + int stages=init->log2n-5; + int i,j; + + if(--stages>0){ + mdct_butterfly_first(T,x,points); + } + + for(i=1;--stages>0;i++){ + for(j=0;j<(1<>i)*j,points>>i,4<trig)_ogg_free(l->trig); + if(l->bitrev)_ogg_free(l->bitrev); + memset(l,0,sizeof(*l)); + } +} + +STIN void mdct_bitreverse(mdct_lookup *init, + DATA_TYPE *x){ + int n = init->n; + int *bit = init->bitrev; + DATA_TYPE *w0 = x; + DATA_TYPE *w1 = x = w0+(n>>1); + DATA_TYPE *T = init->trig+n; + + do{ + DATA_TYPE *x0 = x+bit[0]; + DATA_TYPE *x1 = x+bit[1]; + + REG_TYPE r0 = x0[1] - x1[1]; + REG_TYPE r1 = x0[0] + x1[0]; + REG_TYPE r2 = MULT_NORM(r1 * T[0] + r0 * T[1]); + REG_TYPE r3 = MULT_NORM(r1 * T[1] - r0 * T[0]); + + w1 -= 4; + + r0 = HALVE(x0[1] + x1[1]); + r1 = HALVE(x0[0] - x1[0]); + + w0[0] = r0 + r2; + w1[2] = r0 - r2; + w0[1] = r1 + r3; + w1[3] = r3 - r1; + + x0 = x+bit[2]; + x1 = x+bit[3]; + + r0 = x0[1] - x1[1]; + r1 = x0[0] + x1[0]; + r2 = MULT_NORM(r1 * T[2] + r0 * T[3]); + r3 = MULT_NORM(r1 * T[3] - r0 * T[2]); + + r0 = HALVE(x0[1] + x1[1]); + r1 = HALVE(x0[0] - x1[0]); + + w0[2] = r0 + r2; + w1[0] = r0 - r2; + w0[3] = r1 + r3; + w1[1] = r3 - r1; + + T += 4; + bit += 4; + w0 += 4; + + }while(w0n; + int n2=n>>1; + int n4=n>>2; + + /* rotate */ + + DATA_TYPE *iX = in+n2-7; + DATA_TYPE *oX = out+n2+n4; + DATA_TYPE *T = init->trig+n4; + + do{ + oX -= 4; + oX[0] = MULT_NORM(-iX[2] * T[3] - iX[0] * T[2]); + oX[1] = MULT_NORM (iX[0] * T[3] - iX[2] * T[2]); + oX[2] = MULT_NORM(-iX[6] * T[1] - iX[4] * T[0]); + oX[3] = MULT_NORM (iX[4] * T[1] - iX[6] * T[0]); + iX -= 8; + T += 4; + }while(iX>=in); + + iX = in+n2-8; + oX = out+n2+n4; + T = init->trig+n4; + + do{ + T -= 4; + oX[0] = MULT_NORM (iX[4] * T[3] + iX[6] * T[2]); + oX[1] = MULT_NORM (iX[4] * T[2] - iX[6] * T[3]); + oX[2] = MULT_NORM (iX[0] * T[1] + iX[2] * T[0]); + oX[3] = MULT_NORM (iX[0] * T[0] - iX[2] * T[1]); + iX -= 8; + oX += 4; + }while(iX>=in); + + mdct_butterflies(init,out+n2,n2); + mdct_bitreverse(init,out); + + /* roatate + window */ + + { + DATA_TYPE *oX1=out+n2+n4; + DATA_TYPE *oX2=out+n2+n4; + DATA_TYPE *iX =out; + T =init->trig+n2; + + do{ + oX1-=4; + + oX1[3] = MULT_NORM (iX[0] * T[1] - iX[1] * T[0]); + oX2[0] = -MULT_NORM (iX[0] * T[0] + iX[1] * T[1]); + + oX1[2] = MULT_NORM (iX[2] * T[3] - iX[3] * T[2]); + oX2[1] = -MULT_NORM (iX[2] * T[2] + iX[3] * T[3]); + + oX1[1] = MULT_NORM (iX[4] * T[5] - iX[5] * T[4]); + oX2[2] = -MULT_NORM (iX[4] * T[4] + iX[5] * T[5]); + + oX1[0] = MULT_NORM (iX[6] * T[7] - iX[7] * T[6]); + oX2[3] = -MULT_NORM (iX[6] * T[6] + iX[7] * T[7]); + + oX2+=4; + iX += 8; + T += 8; + }while(iXoX2); + } +} + +void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out){ + int n=init->n; + int n2=n>>1; + int n4=n>>2; + int n8=n>>3; + DATA_TYPE *w=alloca(n*sizeof(*w)); /* forward needs working space */ + DATA_TYPE *w2=w+n2; + + /* rotate */ + + /* window + rotate + step 1 */ + + REG_TYPE r0; + REG_TYPE r1; + DATA_TYPE *x0=in+n2+n4; + DATA_TYPE *x1=x0+1; + DATA_TYPE *T=init->trig+n2; + + int i=0; + + for(i=0;itrig+n2; + x0=out+n2; + + for(i=0;iscale); + x0[0] =MULT_NORM((w[0]*T[1]-w[1]*T[0])*init->scale); + w+=2; + T+=2; + } +} diff --git a/code/libvorbis-1.3.4/lib/mdct.h b/code/libvorbis-1.3.4/lib/mdct.h new file mode 100644 index 00000000..3ed94333 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/mdct.h @@ -0,0 +1,71 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: modified discrete cosine transform prototypes + last mod: $Id: mdct.h 16227 2009-07-08 06:58:46Z xiphmont $ + + ********************************************************************/ + +#ifndef _OGG_mdct_H_ +#define _OGG_mdct_H_ + +#include "vorbis/codec.h" + + + + + +/*#define MDCT_INTEGERIZED <- be warned there could be some hurt left here*/ +#ifdef MDCT_INTEGERIZED + +#define DATA_TYPE int +#define REG_TYPE register int +#define TRIGBITS 14 +#define cPI3_8 6270 +#define cPI2_8 11585 +#define cPI1_8 15137 + +#define FLOAT_CONV(x) ((int)((x)*(1<>TRIGBITS) +#define HALVE(x) ((x)>>1) + +#else + +#define DATA_TYPE float +#define REG_TYPE float +#define cPI3_8 .38268343236508977175F +#define cPI2_8 .70710678118654752441F +#define cPI1_8 .92387953251128675613F + +#define FLOAT_CONV(x) (x) +#define MULT_NORM(x) (x) +#define HALVE(x) ((x)*.5f) + +#endif + + +typedef struct { + int n; + int log2n; + + DATA_TYPE *trig; + int *bitrev; + + DATA_TYPE scale; +} mdct_lookup; + +extern void mdct_init(mdct_lookup *lookup,int n); +extern void mdct_clear(mdct_lookup *l); +extern void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out); +extern void mdct_backward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out); + +#endif diff --git a/code/libvorbis-1.3.4/lib/misc.h b/code/libvorbis-1.3.4/lib/misc.h new file mode 100644 index 00000000..85fe3074 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/misc.h @@ -0,0 +1,57 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: miscellaneous prototypes + last mod: $Id: misc.h 16227 2009-07-08 06:58:46Z xiphmont $ + + ********************************************************************/ + +#ifndef _V_RANDOM_H_ +#define _V_RANDOM_H_ +#include "vorbis/codec.h" + +extern void *_vorbis_block_alloc(vorbis_block *vb,long bytes); +extern void _vorbis_block_ripcord(vorbis_block *vb); + +#ifdef ANALYSIS +extern int analysis_noisy; +extern void _analysis_output(char *base,int i,float *v,int n,int bark,int dB, + ogg_int64_t off); +extern void _analysis_output_always(char *base,int i,float *v,int n,int bark,int dB, + ogg_int64_t off); +#endif + +#ifdef DEBUG_MALLOC + +#define _VDBG_GRAPHFILE "malloc.m" +#undef _VDBG_GRAPHFILE +extern void *_VDBG_malloc(void *ptr,long bytes,char *file,long line); +extern void _VDBG_free(void *ptr,char *file,long line); + +#ifndef MISC_C +#undef _ogg_malloc +#undef _ogg_calloc +#undef _ogg_realloc +#undef _ogg_free + +#define _ogg_malloc(x) _VDBG_malloc(NULL,(x),__FILE__,__LINE__) +#define _ogg_calloc(x,y) _VDBG_malloc(NULL,(x)*(y),__FILE__,__LINE__) +#define _ogg_realloc(x,y) _VDBG_malloc((x),(y),__FILE__,__LINE__) +#define _ogg_free(x) _VDBG_free((x),__FILE__,__LINE__) +#endif +#endif + +#endif + + + + diff --git a/code/libvorbis-1.3.4/lib/modes/floor_all.h b/code/libvorbis-1.3.4/lib/modes/floor_all.h new file mode 100644 index 00000000..4292be32 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/floor_all.h @@ -0,0 +1,260 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: key floor settings + last mod: $Id: floor_all.h 17050 2010-03-26 01:34:42Z xiphmont $ + + ********************************************************************/ + +#include "vorbis/codec.h" +#include "backends.h" +#include "books/floor/floor_books.h" + +static const static_codebook*const _floor_128x4_books[]={ + &_huff_book_line_128x4_class0, + &_huff_book_line_128x4_0sub0, + &_huff_book_line_128x4_0sub1, + &_huff_book_line_128x4_0sub2, + &_huff_book_line_128x4_0sub3, +}; +static const static_codebook*const _floor_256x4_books[]={ + &_huff_book_line_256x4_class0, + &_huff_book_line_256x4_0sub0, + &_huff_book_line_256x4_0sub1, + &_huff_book_line_256x4_0sub2, + &_huff_book_line_256x4_0sub3, +}; +static const static_codebook*const _floor_128x7_books[]={ + &_huff_book_line_128x7_class0, + &_huff_book_line_128x7_class1, + + &_huff_book_line_128x7_0sub1, + &_huff_book_line_128x7_0sub2, + &_huff_book_line_128x7_0sub3, + &_huff_book_line_128x7_1sub1, + &_huff_book_line_128x7_1sub2, + &_huff_book_line_128x7_1sub3, +}; +static const static_codebook*const _floor_256x7_books[]={ + &_huff_book_line_256x7_class0, + &_huff_book_line_256x7_class1, + + &_huff_book_line_256x7_0sub1, + &_huff_book_line_256x7_0sub2, + &_huff_book_line_256x7_0sub3, + &_huff_book_line_256x7_1sub1, + &_huff_book_line_256x7_1sub2, + &_huff_book_line_256x7_1sub3, +}; +static const static_codebook*const _floor_128x11_books[]={ + &_huff_book_line_128x11_class1, + &_huff_book_line_128x11_class2, + &_huff_book_line_128x11_class3, + + &_huff_book_line_128x11_0sub0, + &_huff_book_line_128x11_1sub0, + &_huff_book_line_128x11_1sub1, + &_huff_book_line_128x11_2sub1, + &_huff_book_line_128x11_2sub2, + &_huff_book_line_128x11_2sub3, + &_huff_book_line_128x11_3sub1, + &_huff_book_line_128x11_3sub2, + &_huff_book_line_128x11_3sub3, +}; +static const static_codebook*const _floor_128x17_books[]={ + &_huff_book_line_128x17_class1, + &_huff_book_line_128x17_class2, + &_huff_book_line_128x17_class3, + + &_huff_book_line_128x17_0sub0, + &_huff_book_line_128x17_1sub0, + &_huff_book_line_128x17_1sub1, + &_huff_book_line_128x17_2sub1, + &_huff_book_line_128x17_2sub2, + &_huff_book_line_128x17_2sub3, + &_huff_book_line_128x17_3sub1, + &_huff_book_line_128x17_3sub2, + &_huff_book_line_128x17_3sub3, +}; +static const static_codebook*const _floor_256x4low_books[]={ + &_huff_book_line_256x4low_class0, + &_huff_book_line_256x4low_0sub0, + &_huff_book_line_256x4low_0sub1, + &_huff_book_line_256x4low_0sub2, + &_huff_book_line_256x4low_0sub3, +}; +static const static_codebook*const _floor_1024x27_books[]={ + &_huff_book_line_1024x27_class1, + &_huff_book_line_1024x27_class2, + &_huff_book_line_1024x27_class3, + &_huff_book_line_1024x27_class4, + + &_huff_book_line_1024x27_0sub0, + &_huff_book_line_1024x27_1sub0, + &_huff_book_line_1024x27_1sub1, + &_huff_book_line_1024x27_2sub0, + &_huff_book_line_1024x27_2sub1, + &_huff_book_line_1024x27_3sub1, + &_huff_book_line_1024x27_3sub2, + &_huff_book_line_1024x27_3sub3, + &_huff_book_line_1024x27_4sub1, + &_huff_book_line_1024x27_4sub2, + &_huff_book_line_1024x27_4sub3, +}; +static const static_codebook*const _floor_2048x27_books[]={ + &_huff_book_line_2048x27_class1, + &_huff_book_line_2048x27_class2, + &_huff_book_line_2048x27_class3, + &_huff_book_line_2048x27_class4, + + &_huff_book_line_2048x27_0sub0, + &_huff_book_line_2048x27_1sub0, + &_huff_book_line_2048x27_1sub1, + &_huff_book_line_2048x27_2sub0, + &_huff_book_line_2048x27_2sub1, + &_huff_book_line_2048x27_3sub1, + &_huff_book_line_2048x27_3sub2, + &_huff_book_line_2048x27_3sub3, + &_huff_book_line_2048x27_4sub1, + &_huff_book_line_2048x27_4sub2, + &_huff_book_line_2048x27_4sub3, +}; + +static const static_codebook*const _floor_512x17_books[]={ + &_huff_book_line_512x17_class1, + &_huff_book_line_512x17_class2, + &_huff_book_line_512x17_class3, + + &_huff_book_line_512x17_0sub0, + &_huff_book_line_512x17_1sub0, + &_huff_book_line_512x17_1sub1, + &_huff_book_line_512x17_2sub1, + &_huff_book_line_512x17_2sub2, + &_huff_book_line_512x17_2sub3, + &_huff_book_line_512x17_3sub1, + &_huff_book_line_512x17_3sub2, + &_huff_book_line_512x17_3sub3, +}; + +static const static_codebook*const _floor_Xx0_books[]={ + 0 +}; + +static const static_codebook*const *const _floor_books[11]={ + _floor_128x4_books, + _floor_256x4_books, + _floor_128x7_books, + _floor_256x7_books, + _floor_128x11_books, + _floor_128x17_books, + _floor_256x4low_books, + _floor_1024x27_books, + _floor_2048x27_books, + _floor_512x17_books, + _floor_Xx0_books, +}; + +static const vorbis_info_floor1 _floor[11]={ + /* 0: 128 x 4 */ + { + 1,{0},{4},{2},{0}, + {{1,2,3,4}}, + 4,{0,128, 33,8,16,70}, + + 60,30,500, 1.,18., 128 + }, + /* 1: 256 x 4 */ + { + 1,{0},{4},{2},{0}, + {{1,2,3,4}}, + 4,{0,256, 66,16,32,140}, + + 60,30,500, 1.,18., 256 + }, + /* 2: 128 x 7 */ + { + 2,{0,1},{3,4},{2,2},{0,1}, + {{-1,2,3,4},{-1,5,6,7}}, + 4,{0,128, 14,4,58, 2,8,28,90}, + + 60,30,500, 1.,18., 128 + }, + /* 3: 256 x 7 */ + { + 2,{0,1},{3,4},{2,2},{0,1}, + {{-1,2,3,4},{-1,5,6,7}}, + 4,{0,256, 28,8,116, 4,16,56,180}, + + 60,30,500, 1.,18., 256 + }, + /* 4: 128 x 11 */ + { + 4,{0,1,2,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2}, + {{3},{4,5},{-1,6,7,8},{-1,9,10,11}}, + + 2,{0,128, 8,33, 4,16,70, 2,6,12, 23,46,90}, + + 60,30,500, 1,18., 128 + }, + /* 5: 128 x 17 */ + { + 6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2}, + {{3},{4,5},{-1,6,7,8},{-1,9,10,11}}, + 2,{0,128, 12,46, 4,8,16, 23,33,70, 2,6,10, 14,19,28, 39,58,90}, + + 60,30,500, 1,18., 128 + }, + /* 6: 256 x 4 (low bitrate version) */ + { + 1,{0},{4},{2},{0}, + {{1,2,3,4}}, + 4,{0,256, 66,16,32,140}, + + 60,30,500, 1.,18., 256 + }, + /* 7: 1024 x 27 */ + { + 8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3}, + {{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}}, + 2,{0,1024, 93,23,372, 6,46,186,750, 14,33,65, 130,260,556, + 3,10,18,28, 39,55,79,111, 158,220,312, 464,650,850}, + + 60,30,500, 3,18., 1024 + }, + /* 8: 2048 x 27 */ + { + 8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3}, + {{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}}, + 2,{0,2048, 186,46,744, 12,92,372,1500, 28,66,130, 260,520,1112, + 6,20,36,56, 78,110,158,222, 316,440,624, 928,1300,1700}, + + 60,30,500, 3,18., 2048 + }, + /* 9: 512 x 17 */ + { + 6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2}, + {{3},{4,5},{-1,6,7,8},{-1,9,10,11}}, + 2,{0,512, 46,186, 16,33,65, 93,130,278, + 7,23,39, 55,79,110, 156,232,360}, + + 60,30,500, 1,18., 512 + }, + + /* 10: X x 0 (LFE floor; edge posts only) */ + { + 0,{0}, {0},{0},{-1}, + {{-1}}, + 2,{0,12}, + 60,30,500, 1.,18., 10 + }, + +}; diff --git a/code/libvorbis-1.3.4/lib/modes/psych_11.h b/code/libvorbis-1.3.4/lib/modes/psych_11.h new file mode 100644 index 00000000..844a8ed3 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/psych_11.h @@ -0,0 +1,51 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: 11kHz settings + last mod: $Id: psych_11.h 16227 2009-07-08 06:58:46Z xiphmont $ + + ********************************************************************/ + +static const double _psy_lowpass_11[3]={4.5,5.5,30.,}; + +static const att3 _psy_tone_masteratt_11[3]={ + {{ 30, 25, 12}, 0, 0}, /* 0 */ + {{ 30, 25, 12}, 0, 0}, /* 0 */ + {{ 20, 0, -14}, 0, 0}, /* 0 */ +}; + +static const vp_adjblock _vp_tonemask_adj_11[3]={ + /* adjust for mode zero */ + /* 63 125 250 500 1 2 4 8 16 */ + {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 2, 0,99,99,99}}, /* 0 */ + {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 5, 0, 0,99,99,99}}, /* 1 */ + {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 2 */ +}; + + +static const noise3 _psy_noisebias_11[3]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ + {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 10, 10, 12, 12, 12, 99, 99, 99}, + {-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 4, 5, 5, 10, 99, 99, 99}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, + + {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 10, 10, 12, 12, 12, 99, 99, 99}, + {-15,-15,-15,-15,-10,-10, -5, -5, -5, 0, 0, 0, 0, 0, 99, 99, 99}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, + + {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 99, 99, 99}, + {-30,-30,-30,-30,-26,-22,-20,-14,-12,-12,-10,-10,-10,-10, 99, 99, 99}, + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24, 99, 99, 99}}}, +}; + +static const double _noise_thresh_11[3]={ .3,.5,.5 }; + diff --git a/code/libvorbis-1.3.4/lib/modes/psych_16.h b/code/libvorbis-1.3.4/lib/modes/psych_16.h new file mode 100644 index 00000000..1c10b395 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/psych_16.h @@ -0,0 +1,133 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: 16kHz settings + last mod: $Id: psych_16.h 16227 2009-07-08 06:58:46Z xiphmont $ + + ********************************************************************/ + +/* stereo mode by base quality level */ +static const adj_stereo _psy_stereo_modes_16[4]={ + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */ + {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, + { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, + { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + { 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + {{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, + { 5, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +}; + +static const double _psy_lowpass_16[4]={6.5,8,30.,99.}; + +static const att3 _psy_tone_masteratt_16[4]={ + {{ 30, 25, 12}, 0, 0}, /* 0 */ + {{ 25, 22, 12}, 0, 0}, /* 0 */ + {{ 20, 12, 0}, 0, 0}, /* 0 */ + {{ 15, 0, -14}, 0, 0}, /* 0 */ +}; + +static const vp_adjblock _vp_tonemask_adj_16[4]={ + /* adjust for mode zero */ + /* 63 125 250 500 1 2 4 8 16 */ + {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0}}, /* 0 */ + {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0}}, /* 1 */ + {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 2 */ + {{-30,-30,-30,-30,-30,-26,-20,-10, -5, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 2 */ +}; + + +static const noise3 _psy_noisebias_16_short[4]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ + {{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, + {-15,-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 5, 5, 6, 8, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, + + {{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 6, 6, 6, 6, 8, 10, 12, 20}, + {-15,-15,-15,-15,-15,-15,-15,-10, -5, -5, -5, 4, 5, 6, 8, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10,-10,-10,-10,-10,-10,-10,-10,-10}}}, + + {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 12}, + {-20,-20,-20,-20,-16,-12,-20,-14,-10,-10, -8, 0, 0, 0, 0, 2, 5}, + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}}, + + {{{-15,-15,-15,-15,-15,-12,-10, -8, -5, -5, -5, -5, -5, 0, 0, 0, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-12,-12,-10,-10,-10,-10,-10,-10, -6}, + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}}, +}; + +static const noise3 _psy_noisebias_16_impulse[4]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ + {{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, + {-15,-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 5, 5, 6, 8, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, + + {{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 4, 4, 4, 5, 5, 6, 8, 15}, + {-15,-15,-15,-15,-15,-15,-15,-10, -5, -5, -5, 0, 0, 0, 0, 4, 10}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10,-10,-10,-10,-10,-10,-10,-10,-10}}}, + + {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 4, 10}, + {-20,-20,-20,-20,-16,-12,-20,-14,-10,-10,-10,-10,-10,-10,-10, -7, -5}, + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}}, + + {{{-15,-15,-15,-15,-15,-12,-10, -8, -5, -5, -5, -5, -5, 0, 0, 0, 6}, + {-30,-30,-30,-30,-26,-22,-20,-18,-18,-18,-20,-20,-20,-20,-20,-20,-16}, + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}}, +}; + +static const noise3 _psy_noisebias_16[4]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ + {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 6, 8, 8, 10, 10, 10, 14, 20}, + {-10,-10,-10,-10,-10, -5, -2, -2, 0, 0, 0, 4, 5, 6, 8, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, + + {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 6, 6, 6, 6, 8, 10, 12, 20}, + {-15,-15,-15,-15,-15,-10, -5, -5, 0, 0, 0, 4, 5, 6, 8, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, + + {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 12}, + {-20,-20,-20,-20,-16,-12,-20,-10, -5, -5, 0, 0, 0, 0, 0, 2, 5}, + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}}, + + {{{-15,-15,-15,-15,-15,-12,-10, -8, -5, -5, -5, -5, -5, 0, 0, 0, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-12,-12,-10,-10,-10,-10,-10,-10, -6}, + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}}, +}; + +static const noiseguard _psy_noiseguards_16[4]={ + {10,10,-1}, + {10,10,-1}, + {20,20,-1}, + {20,20,-1}, +}; + +static const double _noise_thresh_16[4]={ .3,.5,.5,.5 }; + +static const int _noise_start_16[3]={ 256,256,9999 }; +static const int _noise_part_16[4]={ 8,8,8,8 }; + +static const int _psy_ath_floater_16[4]={ + -100,-100,-100,-105, +}; + +static const int _psy_ath_abs_16[4]={ + -130,-130,-130,-140, +}; diff --git a/code/libvorbis-1.3.4/lib/modes/psych_44.h b/code/libvorbis-1.3.4/lib/modes/psych_44.h new file mode 100644 index 00000000..f05c0326 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/psych_44.h @@ -0,0 +1,642 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: key psychoacoustic settings for 44.1/48kHz + last mod: $Id: psych_44.h 16962 2010-03-11 07:30:34Z xiphmont $ + + ********************************************************************/ + + +/* preecho trigger settings *****************************************/ + +static const vorbis_info_psy_global _psy_global_44[5]={ + + {8, /* lines per eighth octave */ + {20.f,14.f,12.f,12.f,12.f,12.f,12.f}, + {-60.f,-30.f,-40.f,-40.f,-40.f,-40.f,-40.f}, 2,-75.f, + -6.f, + {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} + }, + {8, /* lines per eighth octave */ + {14.f,10.f,10.f,10.f,10.f,10.f,10.f}, + {-40.f,-30.f,-25.f,-25.f,-25.f,-25.f,-25.f}, 2,-80.f, + -6.f, + {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} + }, + {8, /* lines per eighth octave */ + {12.f,10.f,10.f,10.f,10.f,10.f,10.f}, + {-20.f,-20.f,-15.f,-15.f,-15.f,-15.f,-15.f}, 0,-80.f, + -6.f, + {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} + }, + {8, /* lines per eighth octave */ + {10.f,8.f,8.f,8.f,8.f,8.f,8.f}, + {-20.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-80.f, + -6.f, + {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} + }, + {8, /* lines per eighth octave */ + {10.f,6.f,6.f,6.f,6.f,6.f,6.f}, + {-15.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-85.f, + -6.f, + {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} + }, +}; + +/* noise compander lookups * low, mid, high quality ****************/ +static const compandblock _psy_compand_44[6]={ + /* sub-mode Z short */ + {{ + 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ + 8, 9,10,11,12,13,14, 15, /* 15dB */ + 16,17,18,19,20,21,22, 23, /* 23dB */ + 24,25,26,27,28,29,30, 31, /* 31dB */ + 32,33,34,35,36,37,38, 39, /* 39dB */ + }}, + /* mode_Z nominal short */ + {{ + 0, 1, 2, 3, 4, 5, 6, 6, /* 7dB */ + 7, 7, 7, 7, 6, 6, 6, 7, /* 15dB */ + 7, 8, 9,10,11,12,13, 14, /* 23dB */ + 15,16,17,17,17,18,18, 19, /* 31dB */ + 19,19,20,21,22,23,24, 25, /* 39dB */ + }}, + /* mode A short */ + {{ + 0, 1, 2, 3, 4, 5, 5, 5, /* 7dB */ + 6, 6, 6, 5, 4, 4, 4, 4, /* 15dB */ + 4, 4, 5, 5, 5, 6, 6, 6, /* 23dB */ + 7, 7, 7, 8, 8, 8, 9, 10, /* 31dB */ + 11,12,13,14,15,16,17, 18, /* 39dB */ + }}, + /* sub-mode Z long */ + {{ + 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ + 8, 9,10,11,12,13,14, 15, /* 15dB */ + 16,17,18,19,20,21,22, 23, /* 23dB */ + 24,25,26,27,28,29,30, 31, /* 31dB */ + 32,33,34,35,36,37,38, 39, /* 39dB */ + }}, + /* mode_Z nominal long */ + {{ + 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ + 8, 9,10,11,12,12,13, 13, /* 15dB */ + 13,14,14,14,15,15,15, 15, /* 23dB */ + 16,16,17,17,17,18,18, 19, /* 31dB */ + 19,19,20,21,22,23,24, 25, /* 39dB */ + }}, + /* mode A long */ + {{ + 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ + 8, 8, 7, 6, 5, 4, 4, 4, /* 15dB */ + 4, 4, 5, 5, 5, 6, 6, 6, /* 23dB */ + 7, 7, 7, 8, 8, 8, 9, 10, /* 31dB */ + 11,12,13,14,15,16,17, 18, /* 39dB */ + }} +}; + +/* tonal masking curve level adjustments *************************/ + +static const vp_adjblock _vp_tonemask_adj_longblock[12]={ + + /* 63 125 250 500 1 2 4 8 16 */ + + {{ -3, -8,-13,-15,-10,-10,-10,-10,-10,-10,-10, 0, 0, 0, 0, 0, 0}}, /* -1 */ + +/* {{-15,-15,-15,-15,-10, -8, -4, -2, 0, 0, 0, 10, 0, 0, 0, 0, 0}}, 0 */ + {{ -4,-10,-14,-16,-15,-14,-13,-12,-12,-12,-11, -1, -1, -1, -1, -1, 0}}, /* 0 */ + +/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 5, 0, 0, 0, 0, 0}}, 1 */ + {{ -6,-12,-14,-16,-15,-15,-14,-13,-13,-12,-12, -2, -2, -1, -1, -1, 0}}, /* 1 */ + +/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 2 */ + {{-12,-13,-14,-16,-16,-16,-15,-14,-13,-12,-12, -6, -3, -1, -1, -1, 0}}, /* 2 */ + +/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 3 */ + {{-15,-15,-15,-16,-16,-16,-16,-14,-13,-13,-13,-10, -4, -2, -1, -1, 0}}, /* 3 */ + +/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, *//* 4 */ + {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 4 */ + +/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 5 */ + {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 5 */ + +/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 6 */ + {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -8, -4, -2, -2, 0}}, /* 6 */ + +/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 7 */ + {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 7 */ + +/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 8 */ + {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 8 */ + +/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 9 */ + {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 9 */ + +/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 10 */ + {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 10 */ +}; + +static const vp_adjblock _vp_tonemask_adj_otherblock[12]={ + /* 63 125 250 500 1 2 4 8 16 */ + + {{ -3, -8,-13,-15,-10,-10, -9, -9, -9, -9, -9, 1, 1, 1, 1, 1, 1}}, /* -1 */ + +/* {{-20,-20,-20,-20,-14,-12,-10, -8, -4, 0, 0, 10, 0, 0, 0, 0, 0}}, 0 */ + {{ -4,-10,-14,-16,-14,-13,-12,-12,-11,-11,-10, 0, 0, 0, 0, 0, 0}}, /* 0 */ + +/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 5, 0, 0, 0, 0, 0}}, 1 */ + {{ -6,-12,-14,-16,-15,-15,-14,-13,-13,-12,-12, -2, -2, -1, 0, 0, 0}}, /* 1 */ + +/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 2 */ + {{-12,-13,-14,-16,-16,-16,-15,-14,-13,-12,-12, -5, -2, -1, 0, 0, 0}}, /* 2 */ + +/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 3 */ + {{-15,-15,-15,-16,-16,-16,-16,-14,-13,-13,-13,-10, -4, -2, 0, 0, 0}}, /* 3 */ + +/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 4 */ + {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 4 */ + +/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 5 */ + {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 5 */ + +/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 6 */ + {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -8, -4, -2, -2, 0}}, /* 6 */ + +/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 7 */ + {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 7 */ + +/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 8 */ + {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 8 */ + +/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 9 */ + {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 9 */ + +/* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 10 */ + {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 10 */ +}; + +/* noise bias (transition block) */ +static const noise3 _psy_noisebias_trans[12]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ + /* -1 */ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, + /* 0 + {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14, -8, -4, 0, 0, 0, 0, 2, 4, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4, -2}}},*/ + {{{-15,-15,-15,-15,-15,-12, -6, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14, -8, -4, 0, 0, 0, 0, 2, 3, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4, -2}}}, + /* 1 + {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},*/ + {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 1, 4}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}}, + /* 2 + {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, */ + {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -2, -1, 0, 3}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -7, -4}}}, + /* 3 + {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ + {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 2}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, + /* 4 + {{{-20,-20,-20,-20,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 5}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ + {{{-20,-20,-20,-20,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, -1, 1}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, + /* 5 + {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-22,-16,-12, -6, -4, -4, -4, -4, -2, -1, 2}, + {-34,-34,-34,-34,-30,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}}, */ + {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-22,-16,-12, -6, -4, -4, -4, -4, -3, -1, 0}, + {-34,-34,-34,-34,-30,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}}, + /* 6 + {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2, 1}, + {-34,-34,-34,-34,-30,-26,-24,-18,-17,-15,-15,-15,-15,-13,-13,-12, -8}}},*/ + {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-24,-18,-14, -8, -6, -6, -6, -6, -5, -2, 0}, + {-34,-34,-34,-34,-30,-26,-26,-24,-22,-19,-19,-19,-19,-18,-17,-16,-12}}}, + /* 7 + {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-24,-18,-14,-12,-10, -8, -8, -8, -6, -4, 0}, + {-34,-34,-34,-34,-30,-26,-26,-24,-22,-19,-19,-19,-19,-18,-17,-16,-12}}},*/ + {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-24,-24,-18,-14,-12,-10,-10,-10, -8, -6, -2}, + {-34,-34,-34,-34,-30,-26,-26,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}}, + /* 8 + {{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7}, + {-36,-36,-36,-36,-30,-30,-30,-24,-18,-14,-12,-10,-10,-10, -8, -6, -2}, + {-36,-36,-36,-36,-34,-30,-28,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},*/ + {{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7}, + {-36,-36,-36,-36,-30,-30,-30,-24,-20,-16,-16,-16,-16,-14,-12,-10, -7}, + {-36,-36,-36,-36,-34,-30,-28,-26,-24,-30,-30,-30,-30,-30,-30,-24,-20}}}, + /* 9 + {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, + {-36,-36,-36,-36,-34,-32,-32,-28,-20,-16,-16,-16,-16,-14,-12,-10, -7}, + {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},*/ + {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, + {-38,-38,-38,-38,-36,-34,-34,-30,-24,-20,-20,-20,-20,-18,-16,-12,-10}, + {-40,-40,-40,-40,-40,-40,-40,-38,-35,-35,-35,-35,-35,-35,-35,-35,-30}}}, + /* 10 */ + {{{-30,-30,-30,-30,-30,-30,-30,-28,-20,-14,-14,-14,-14,-14,-14,-12,-10}, + {-40,-40,-40,-40,-40,-40,-40,-40,-35,-30,-30,-30,-30,-30,-30,-30,-20}, + {-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}}, +}; + +/* noise bias (long block) */ +static const noise3 _psy_noisebias_long[12]={ + /*63 125 250 500 1k 2k 4k 8k 16k*/ + /* -1 */ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 0, 6, 6, 6, 6, 10, 10, 12, 20}, + {-20,-20,-20,-20,-20,-20,-10, -2, 0, 0, 0, 0, 0, 2, 4, 6, 15}, + {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}}, + + /* 0 */ + /* {{{-10,-10,-10,-10,-10,-10, -8, 2, 2, 2, 4, 4, 5, 5, 5, 8, 10}, + {-20,-20,-20,-20,-20,-20,-20,-14, -6, 0, 0, 0, 0, 0, 2, 4, 10}, + {-20,-20,-20,-20,-20,-20,-20,-14, -8, -6, -6, -6, -6, -4, -4, -4, -2}}},*/ + {{{-10,-10,-10,-10,-10,-10, -8, 2, 2, 2, 4, 4, 5, 5, 5, 8, 10}, + {-20,-20,-20,-20,-20,-20,-20,-14, -6, 0, 0, 0, 0, 0, 2, 3, 6}, + {-20,-20,-20,-20,-20,-20,-20,-14, -8, -6, -6, -6, -6, -4, -4, -4, -2}}}, + /* 1 */ + /* {{{-10,-10,-10,-10,-10,-10, -8, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 8}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},*/ + {{{-10,-10,-10,-10,-10,-10, -8, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 1, 4}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}}, + /* 2 */ + /* {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 6}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ + {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -2, -1, 0, 3}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, + /* 3 */ + /* {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 6}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ + {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 2}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -5}}}, + /* 4 */ + /* {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 5}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, -1, 1}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -7}}}, + /* 5 */ + /* {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, + {-22,-22,-22,-22,-22,-22,-22,-16,-12, -6, -4, -4, -4, -4, -2, -1, 2}, + {-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}},*/ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, + {-22,-22,-22,-22,-22,-22,-22,-16,-12, -6, -4, -4, -4, -4, -3, -1, 0}, + {-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -8}}}, + /* 6 */ + /* {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, + {-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2, 1}, + {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12, -8}}},*/ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, + {-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -5, -2, 0}, + {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12,-10}}}, + /* 7 */ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, + {-24,-24,-24,-24,-24,-24,-24,-18,-14,-10, -8, -8, -8, -8, -6, -4, 0}, + {-26,-26,-26,-26,-26,-26,-26,-22,-20,-19,-19,-19,-19,-18,-17,-16,-12}}}, + /* 8 */ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 0, 0, 0, 0, 1, 2, 3, 7}, + {-26,-26,-26,-26,-26,-26,-26,-20,-16,-12,-10,-10,-10,-10, -8, -6, -2}, + {-28,-28,-28,-28,-28,-28,-28,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}}, + /* 9 */ + {{{-22,-22,-22,-22,-22,-22,-22,-18,-14, -8, -4, -4, -4, -4, -4, -2, 2}, + {-26,-26,-26,-26,-26,-26,-26,-22,-18,-16,-16,-16,-16,-14,-12,-10, -7}, + {-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-24,-20}}}, + /* 10 */ + {{{-24,-24,-24,-24,-24,-24,-24,-24,-24,-18,-14,-14,-14,-14,-14,-12,-10}, + {-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-20}, + {-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}}, +}; + +/* noise bias (impulse block) */ +static const noise3 _psy_noisebias_impulse[12]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ + /* -1 */ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, + + /* 0 */ + /* {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 4, 8, 8, 8, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-22,-20,-14, -6, -2, 0, 0, 0, 0, 2, 4, 10}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 4, 8, 8, 8, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-22,-20,-14, -6, -2, 0, 0, 0, 0, 2, 3, 6}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, + /* 1 */ + {{{-12,-12,-12,-12,-12, -8, -6, -4, 0, 4, 4, 4, 4, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -4, -4, -2, -2, -2, -2, 2}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8,-10,-10, -8, -8, -8, -6, -4}}}, + /* 2 */ + {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + /* 3 */ + {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 6, 8, 8, 14}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + /* 4 */ + {{{-16,-16,-16,-16,-16,-12,-10, -6, -2, 0, 0, 0, 0, 4, 6, 6, 12}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + /* 5 */ + {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, + {-32,-32,-32,-32,-28,-24,-22,-16,-10, -6, -8, -8, -6, -6, -6, -4, -2}, + {-34,-34,-34,-34,-30,-26,-24,-18,-14,-12,-12,-12,-12,-12,-10, -9, -5}}}, + /* 6 + {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, + {-34,-34,-34,-34,-30,-30,-24,-20,-12,-12,-14,-14,-10, -9, -8, -6, -4}, + {-34,-34,-34,-34,-34,-30,-26,-20,-16,-15,-15,-15,-15,-15,-13,-12, -8}}},*/ + {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, + {-34,-34,-34,-34,-30,-30,-30,-24,-16,-16,-16,-16,-16,-16,-14,-14,-12}, + {-36,-36,-36,-36,-36,-34,-28,-24,-20,-20,-20,-20,-20,-20,-20,-18,-16}}}, + /* 7 */ + /* {{{-22,-22,-22,-22,-22,-20,-14,-10, -6, 0, 0, 0, 0, 4, 4, 6, 11}, + {-34,-34,-34,-34,-30,-30,-24,-20,-14,-14,-16,-16,-14,-12,-10,-10,-10}, + {-34,-34,-34,-34,-32,-32,-30,-24,-20,-19,-19,-19,-19,-19,-17,-16,-12}}},*/ + {{{-22,-22,-22,-22,-22,-20,-14,-10, -6, 0, 0, 0, 0, 4, 4, 6, 11}, + {-34,-34,-34,-34,-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-24,-22}, + {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-30,-24}}}, + /* 8 */ + /* {{{-24,-24,-24,-24,-24,-22,-14,-10, -6, -1, -1, -1, -1, 3, 3, 5, 10}, + {-34,-34,-34,-34,-30,-30,-30,-24,-20,-20,-20,-20,-20,-18,-16,-16,-14}, + {-36,-36,-36,-36,-36,-34,-28,-24,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},*/ + {{{-24,-24,-24,-24,-24,-22,-14,-10, -6, -1, -1, -1, -1, 3, 3, 5, 10}, + {-34,-34,-34,-34,-34,-32,-32,-30,-26,-26,-26,-26,-26,-26,-26,-26,-24}, + {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-30,-24}}}, + /* 9 */ + /* {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, + {-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-22,-20,-20,-18}, + {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},*/ + {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, + {-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26}, + {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}}, + /* 10 */ + {{{-30,-30,-30,-30,-30,-26,-24,-24,-24,-20,-16,-16,-16,-16,-16,-14,-12}, + {-40,-40,-40,-40,-40,-40,-40,-40,-35,-30,-30,-30,-30,-30,-30,-30,-26}, + {-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}}, +}; + +/* noise bias (padding block) */ +static const noise3 _psy_noisebias_padding[12]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ + + /* -1 */ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, + + /* 0 */ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, 2, 3, 6, 6, 8, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -4, -4, -4, -4, -2, 0, 2}}}, + /* 1 */ + {{{-12,-12,-12,-12,-12, -8, -6, -4, 0, 4, 4, 4, 4, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 2, 2, 4, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -6, -4, -2, 0}}}, + /* 2 */ + /* {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 2, 2, 4, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}},*/ + {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1, 0, 0, 2, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}}, + /* 3 */ + {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 6, 8, 8, 14}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1, 0, 0, 2, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}}, + /* 4 */ + {{{-16,-16,-16,-16,-16,-12,-10, -6, -2, 0, 0, 0, 0, 4, 6, 6, 12}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1, -1, 0, 2, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}}, + /* 5 */ + {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 6, 6, 12}, + {-32,-32,-32,-32,-28,-24,-22,-16,-12, -6, -3, -3, -3, -3, -2, 0, 4}, + {-34,-34,-34,-34,-30,-26,-24,-18,-14,-10,-10,-10,-10,-10, -8, -5, -3}}}, + /* 6 */ + {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 6, 6, 12}, + {-34,-34,-34,-34,-30,-30,-24,-20,-14, -8, -4, -4, -4, -4, -3, -1, 4}, + {-34,-34,-34,-34,-34,-30,-26,-20,-16,-13,-13,-13,-13,-13,-11, -8, -6}}}, + /* 7 */ + {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 6, 6, 12}, + {-34,-34,-34,-34,-30,-30,-30,-24,-16,-10, -8, -6, -6, -6, -5, -3, 1}, + {-34,-34,-34,-34,-32,-32,-28,-22,-18,-16,-16,-16,-16,-16,-14,-12,-10}}}, + /* 8 */ + {{{-22,-22,-22,-22,-22,-20,-14,-10, -4, 0, 0, 0, 0, 3, 5, 5, 11}, + {-34,-34,-34,-34,-30,-30,-30,-24,-16,-12,-10, -8, -8, -8, -7, -5, -2}, + {-36,-36,-36,-36,-36,-34,-28,-22,-20,-20,-20,-20,-20,-20,-20,-16,-14}}}, + /* 9 */ + {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -2, -2, -2, -2, 0, 2, 6}, + {-36,-36,-36,-36,-34,-32,-32,-24,-16,-12,-12,-12,-12,-12,-10, -8, -5}, + {-40,-40,-40,-40,-40,-40,-40,-32,-26,-24,-24,-24,-24,-24,-24,-20,-18}}}, + /* 10 */ + {{{-30,-30,-30,-30,-30,-26,-24,-24,-24,-20,-12,-12,-12,-12,-12,-10, -8}, + {-40,-40,-40,-40,-40,-40,-40,-40,-35,-30,-25,-25,-25,-25,-25,-25,-15}, + {-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}}, +}; + + +static const noiseguard _psy_noiseguards_44[4]={ + {3,3,15}, + {3,3,15}, + {10,10,100}, + {10,10,100}, +}; + +static const int _psy_tone_suppress[12]={ + -20,-20,-20,-20,-20,-24,-30,-40,-40,-45,-45,-45, +}; +static const int _psy_tone_0dB[12]={ + 90,90,95,95,95,95,105,105,105,105,105,105, +}; +static const int _psy_noise_suppress[12]={ + -20,-20,-24,-24,-24,-24,-30,-40,-40,-45,-45,-45, +}; + +static const vorbis_info_psy _psy_info_template={ + /* blockflag */ + -1, + /* ath_adjatt, ath_maxatt */ + -140.,-140., + /* tonemask att boost/decay,suppr,curves */ + {0.f,0.f,0.f}, 0.,0., -40.f, {0.}, + + /*noisemaskp,supp, low/high window, low/hi guard, minimum */ + 1, -0.f, .5f, .5f, 0,0,0, + /* noiseoffset*3, noisecompand, max_curve_dB */ + {{-1},{-1},{-1}},{-1},105.f, + /* noise normalization - noise_p, start, partition, thresh. */ + 0,-1,-1,0., +}; + +/* ath ****************/ + +static const int _psy_ath_floater[12]={ + -100,-100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120, +}; +static const int _psy_ath_abs[12]={ + -130,-130,-130,-130,-140,-140,-140,-140,-140,-140,-140,-150, +}; + +/* stereo setup. These don't map directly to quality level, there's + an additional indirection as several of the below may be used in a + single bitmanaged stream + +****************/ + +/* various stereo possibilities */ + +/* stereo mode by base quality level */ +static const adj_stereo _psy_stereo_modes_44[12]={ + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -1 */ + {{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0}, + { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 4, 3}, + { 1, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 8, 8}, + { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}}, + +/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 */ + {{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0, 0, 0, 0, 0}, + { 8, 8, 8, 8, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3}, + { 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8}, + { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}}, + + + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 */ + {{ 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, 0, 0, 0, 0}, + { 8, 8, 8, 8, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3}, + { 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + + + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 */ + {{ 3, 3, 3, 3, 3, 3, 3, 2, 1, 1, 0, 0, 0, 0, 0}, + { 8, 8, 6, 6, 5, 5, 4, 4, 4, 4, 4, 4, 3, 2, 1}, + { 3, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 */ + {{ 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1}, + { 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 10, 10, 10, 10, 10}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 */ + {{ 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 2, 1, 0}, + { 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 */ + {{ 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0}, + { 6, 7, 8, 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 */ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 3, 3, 3, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 8, 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 */ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 3, 3, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 */ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 9 */ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 */ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +}; + +/* tone master attenuation by base quality mode and bitrate tweak */ +static const att3 _psy_tone_masteratt_44[12]={ + {{ 35, 21, 9}, 0, 0}, /* -1 */ + {{ 30, 20, 8}, -2, 1.25}, /* 0 */ + /* {{ 25, 14, 4}, 0, 0}, *//* 1 */ + {{ 25, 12, 2}, 0, 0}, /* 1 */ + /* {{ 20, 10, -2}, 0, 0}, *//* 2 */ + {{ 20, 9, -3}, 0, 0}, /* 2 */ + {{ 20, 9, -4}, 0, 0}, /* 3 */ + {{ 20, 9, -4}, 0, 0}, /* 4 */ + {{ 20, 6, -6}, 0, 0}, /* 5 */ + {{ 20, 3, -10}, 0, 0}, /* 6 */ + {{ 18, 1, -14}, 0, 0}, /* 7 */ + {{ 18, 0, -16}, 0, 0}, /* 8 */ + {{ 18, -2, -16}, 0, 0}, /* 9 */ + {{ 12, -2, -20}, 0, 0}, /* 10 */ +}; + +/* lowpass by mode **************/ +static const double _psy_lowpass_44[12]={ + /* 15.1,15.8,16.5,17.9,20.5,48.,999.,999.,999.,999.,999. */ + 13.9,15.1,15.8,16.5,17.2,18.9,20.1,48.,999.,999.,999.,999. +}; + +/* noise normalization **********/ + +static const int _noise_start_short_44[11]={ + /* 16,16,16,16,32,32,9999,9999,9999,9999 */ + 32,16,16,16,32,9999,9999,9999,9999,9999,9999 +}; +static const int _noise_start_long_44[11]={ + /* 128,128,128,256,512,512,9999,9999,9999,9999 */ + 256,128,128,256,512,9999,9999,9999,9999,9999,9999 +}; + +static const int _noise_part_short_44[11]={ + 8,8,8,8,8,8,8,8,8,8,8 +}; +static const int _noise_part_long_44[11]={ + 32,32,32,32,32,32,32,32,32,32,32 +}; + +static const double _noise_thresh_44[11]={ + /* .2,.2,.3,.4,.5,.5,9999.,9999.,9999.,9999., */ + .2,.2,.2,.4,.6,9999.,9999.,9999.,9999.,9999.,9999., +}; + +static const double _noise_thresh_5only[2]={ + .5,.5, +}; diff --git a/code/libvorbis-1.3.4/lib/modes/psych_8.h b/code/libvorbis-1.3.4/lib/modes/psych_8.h new file mode 100644 index 00000000..0e2dd573 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/psych_8.h @@ -0,0 +1,101 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: 8kHz psychoacoustic settings + last mod: $Id: psych_8.h 16227 2009-07-08 06:58:46Z xiphmont $ + + ********************************************************************/ + +static const att3 _psy_tone_masteratt_8[3]={ + {{ 32, 25, 12}, 0, 0}, /* 0 */ + {{ 30, 25, 12}, 0, 0}, /* 0 */ + {{ 20, 0, -14}, 0, 0}, /* 0 */ +}; + +static const vp_adjblock _vp_tonemask_adj_8[3]={ + /* adjust for mode zero */ + /* 63 125 250 500 1 2 4 8 16 */ + {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */ + {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */ + {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 1 */ +}; + + +static const noise3 _psy_noisebias_8[3]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ + {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 8, 8, 8, 10, 10, 99, 99, 99}, + {-10,-10,-10,-10, -5, -5, -5, 0, 0, 4, 4, 4, 4, 4, 99, 99, 99}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, + + {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 8, 8, 8, 10, 10, 99, 99, 99}, + {-10,-10,-10,-10,-10,-10, -5, -5, -5, 0, 0, 0, 0, 0, 99, 99, 99}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, + + {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 99, 99, 99}, + {-30,-30,-30,-30,-26,-22,-20,-14,-12,-12,-10,-10,-10,-10, 99, 99, 99}, + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24, 99, 99, 99}}}, +}; + +/* stereo mode by base quality level */ +static const adj_stereo _psy_stereo_modes_8[3]={ + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */ + {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, + { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, + { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + {{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +}; + +static const noiseguard _psy_noiseguards_8[2]={ + {10,10,-1}, + {10,10,-1}, +}; + +static const compandblock _psy_compand_8[2]={ + {{ + 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ + 8, 8, 9, 9,10,10,11, 11, /* 15dB */ + 12,12,13,13,14,14,15, 15, /* 23dB */ + 16,16,17,17,17,18,18, 19, /* 31dB */ + 19,19,20,21,22,23,24, 25, /* 39dB */ + }}, + {{ + 0, 1, 2, 3, 4, 5, 6, 6, /* 7dB */ + 7, 7, 6, 6, 5, 5, 4, 4, /* 15dB */ + 3, 3, 3, 4, 5, 6, 7, 8, /* 23dB */ + 9,10,11,12,13,14,15, 16, /* 31dB */ + 17,18,19,20,21,22,23, 24, /* 39dB */ + }}, +}; + +static const double _psy_lowpass_8[3]={3.,4.,4.}; +static const int _noise_start_8[2]={ + 64,64, +}; +static const int _noise_part_8[2]={ + 8,8, +}; + +static const int _psy_ath_floater_8[3]={ + -100,-100,-105, +}; + +static const int _psy_ath_abs_8[3]={ + -130,-130,-140, +}; diff --git a/code/libvorbis-1.3.4/lib/modes/residue_16.h b/code/libvorbis-1.3.4/lib/modes/residue_16.h new file mode 100644 index 00000000..dcaca545 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/residue_16.h @@ -0,0 +1,163 @@ +/******************************************************************** + * * + * This FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: toplevel residue templates 16/22kHz + last mod: $Id: residue_16.h 16962 2010-03-11 07:30:34Z xiphmont $ + + ********************************************************************/ + +/***** residue backends *********************************************/ + +static const static_bookblock _resbook_16s_0={ + { + {0}, + {0,0,&_16c0_s_p1_0}, + {0}, + {0,0,&_16c0_s_p3_0}, + {0,0,&_16c0_s_p4_0}, + {0,0,&_16c0_s_p5_0}, + {0,0,&_16c0_s_p6_0}, + {&_16c0_s_p7_0,&_16c0_s_p7_1}, + {&_16c0_s_p8_0,&_16c0_s_p8_1}, + {&_16c0_s_p9_0,&_16c0_s_p9_1,&_16c0_s_p9_2} + } +}; +static const static_bookblock _resbook_16s_1={ + { + {0}, + {0,0,&_16c1_s_p1_0}, + {0}, + {0,0,&_16c1_s_p3_0}, + {0,0,&_16c1_s_p4_0}, + {0,0,&_16c1_s_p5_0}, + {0,0,&_16c1_s_p6_0}, + {&_16c1_s_p7_0,&_16c1_s_p7_1}, + {&_16c1_s_p8_0,&_16c1_s_p8_1}, + {&_16c1_s_p9_0,&_16c1_s_p9_1,&_16c1_s_p9_2} + } +}; +static const static_bookblock _resbook_16s_2={ + { + {0}, + {0,0,&_16c2_s_p1_0}, + {0,0,&_16c2_s_p2_0}, + {0,0,&_16c2_s_p3_0}, + {0,0,&_16c2_s_p4_0}, + {&_16c2_s_p5_0,&_16c2_s_p5_1}, + {&_16c2_s_p6_0,&_16c2_s_p6_1}, + {&_16c2_s_p7_0,&_16c2_s_p7_1}, + {&_16c2_s_p8_0,&_16c2_s_p8_1}, + {&_16c2_s_p9_0,&_16c2_s_p9_1,&_16c2_s_p9_2} + } +}; + +static const vorbis_residue_template _res_16s_0[]={ + {2,0,32, &_residue_44_mid, + &_huff_book__16c0_s_single,&_huff_book__16c0_s_single, + &_resbook_16s_0,&_resbook_16s_0}, +}; +static const vorbis_residue_template _res_16s_1[]={ + {2,0,32, &_residue_44_mid, + &_huff_book__16c1_s_short,&_huff_book__16c1_s_short, + &_resbook_16s_1,&_resbook_16s_1}, + + {2,0,32, &_residue_44_mid, + &_huff_book__16c1_s_long,&_huff_book__16c1_s_long, + &_resbook_16s_1,&_resbook_16s_1} +}; +static const vorbis_residue_template _res_16s_2[]={ + {2,0,32, &_residue_44_high, + &_huff_book__16c2_s_short,&_huff_book__16c2_s_short, + &_resbook_16s_2,&_resbook_16s_2}, + + {2,0,32, &_residue_44_high, + &_huff_book__16c2_s_long,&_huff_book__16c2_s_long, + &_resbook_16s_2,&_resbook_16s_2} +}; + +static const vorbis_mapping_template _mapres_template_16_stereo[3]={ + { _map_nominal, _res_16s_0 }, /* 0 */ + { _map_nominal, _res_16s_1 }, /* 1 */ + { _map_nominal, _res_16s_2 }, /* 2 */ +}; + +static const static_bookblock _resbook_16u_0={ + { + {0}, + {0,0,&_16u0__p1_0}, + {0,0,&_16u0__p2_0}, + {0,0,&_16u0__p3_0}, + {0,0,&_16u0__p4_0}, + {0,0,&_16u0__p5_0}, + {&_16u0__p6_0,&_16u0__p6_1}, + {&_16u0__p7_0,&_16u0__p7_1,&_16u0__p7_2} + } +}; +static const static_bookblock _resbook_16u_1={ + { + {0}, + {0,0,&_16u1__p1_0}, + {0,0,&_16u1__p2_0}, + {0,0,&_16u1__p3_0}, + {0,0,&_16u1__p4_0}, + {0,0,&_16u1__p5_0}, + {0,0,&_16u1__p6_0}, + {&_16u1__p7_0,&_16u1__p7_1}, + {&_16u1__p8_0,&_16u1__p8_1}, + {&_16u1__p9_0,&_16u1__p9_1,&_16u1__p9_2} + } +}; +static const static_bookblock _resbook_16u_2={ + { + {0}, + {0,0,&_16u2_p1_0}, + {0,0,&_16u2_p2_0}, + {0,0,&_16u2_p3_0}, + {0,0,&_16u2_p4_0}, + {&_16u2_p5_0,&_16u2_p5_1}, + {&_16u2_p6_0,&_16u2_p6_1}, + {&_16u2_p7_0,&_16u2_p7_1}, + {&_16u2_p8_0,&_16u2_p8_1}, + {&_16u2_p9_0,&_16u2_p9_1,&_16u2_p9_2} + } +}; + +static const vorbis_residue_template _res_16u_0[]={ + {1,0,32, &_residue_44_low_un, + &_huff_book__16u0__single,&_huff_book__16u0__single, + &_resbook_16u_0,&_resbook_16u_0}, +}; +static const vorbis_residue_template _res_16u_1[]={ + {1,0,32, &_residue_44_mid_un, + &_huff_book__16u1__short,&_huff_book__16u1__short, + &_resbook_16u_1,&_resbook_16u_1}, + + {1,0,32, &_residue_44_mid_un, + &_huff_book__16u1__long,&_huff_book__16u1__long, + &_resbook_16u_1,&_resbook_16u_1} +}; +static const vorbis_residue_template _res_16u_2[]={ + {1,0,32, &_residue_44_hi_un, + &_huff_book__16u2__short,&_huff_book__16u2__short, + &_resbook_16u_2,&_resbook_16u_2}, + + {1,0,32, &_residue_44_hi_un, + &_huff_book__16u2__long,&_huff_book__16u2__long, + &_resbook_16u_2,&_resbook_16u_2} +}; + + +static const vorbis_mapping_template _mapres_template_16_uncoupled[3]={ + { _map_nominal_u, _res_16u_0 }, /* 0 */ + { _map_nominal_u, _res_16u_1 }, /* 1 */ + { _map_nominal_u, _res_16u_2 }, /* 2 */ +}; diff --git a/code/libvorbis-1.3.4/lib/modes/residue_44.h b/code/libvorbis-1.3.4/lib/modes/residue_44.h new file mode 100644 index 00000000..236c1834 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/residue_44.h @@ -0,0 +1,292 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: toplevel residue templates for 32/44.1/48kHz + last mod: $Id: residue_44.h 16962 2010-03-11 07:30:34Z xiphmont $ + + ********************************************************************/ + +#include "vorbis/codec.h" +#include "backends.h" +#include "books/coupled/res_books_stereo.h" + +/***** residue backends *********************************************/ + +static const vorbis_info_residue0 _residue_44_low={ + 0,-1, -1, 9,-1,-1, + /* 0 1 2 3 4 5 6 7 */ + {0}, + {-1}, + { 0, 1, 2, 2, 4, 8, 16, 32}, + { 0, 0, 0,999, 4, 8, 16, 32}, +}; + +static const vorbis_info_residue0 _residue_44_mid={ + 0,-1, -1, 10,-1,-1, + /* 0 1 2 3 4 5 6 7 8 */ + {0}, + {-1}, + { 0, 1, 1, 2, 2, 4, 8, 16, 32}, + { 0, 0,999, 0,999, 4, 8, 16, 32}, +}; + +static const vorbis_info_residue0 _residue_44_high={ + 0,-1, -1, 10,-1,-1, + /* 0 1 2 3 4 5 6 7 8 */ + {0}, + {-1}, + { 0, 1, 2, 4, 8, 16, 32, 71,157}, + { 0, 1, 2, 3, 4, 8, 16, 71,157}, +}; + +static const static_bookblock _resbook_44s_n1={ + { + {0},{0,0,&_44cn1_s_p1_0},{0,0,&_44cn1_s_p2_0}, + {0,0,&_44cn1_s_p3_0},{0,0,&_44cn1_s_p4_0},{0,0,&_44cn1_s_p5_0}, + {&_44cn1_s_p6_0,&_44cn1_s_p6_1},{&_44cn1_s_p7_0,&_44cn1_s_p7_1}, + {&_44cn1_s_p8_0,&_44cn1_s_p8_1,&_44cn1_s_p8_2} + } +}; +static const static_bookblock _resbook_44sm_n1={ + { + {0},{0,0,&_44cn1_sm_p1_0},{0,0,&_44cn1_sm_p2_0}, + {0,0,&_44cn1_sm_p3_0},{0,0,&_44cn1_sm_p4_0},{0,0,&_44cn1_sm_p5_0}, + {&_44cn1_sm_p6_0,&_44cn1_sm_p6_1},{&_44cn1_sm_p7_0,&_44cn1_sm_p7_1}, + {&_44cn1_sm_p8_0,&_44cn1_sm_p8_1,&_44cn1_sm_p8_2} + } +}; + +static const static_bookblock _resbook_44s_0={ + { + {0},{0,0,&_44c0_s_p1_0},{0,0,&_44c0_s_p2_0}, + {0,0,&_44c0_s_p3_0},{0,0,&_44c0_s_p4_0},{0,0,&_44c0_s_p5_0}, + {&_44c0_s_p6_0,&_44c0_s_p6_1},{&_44c0_s_p7_0,&_44c0_s_p7_1}, + {&_44c0_s_p8_0,&_44c0_s_p8_1,&_44c0_s_p8_2} + } +}; +static const static_bookblock _resbook_44sm_0={ + { + {0},{0,0,&_44c0_sm_p1_0},{0,0,&_44c0_sm_p2_0}, + {0,0,&_44c0_sm_p3_0},{0,0,&_44c0_sm_p4_0},{0,0,&_44c0_sm_p5_0}, + {&_44c0_sm_p6_0,&_44c0_sm_p6_1},{&_44c0_sm_p7_0,&_44c0_sm_p7_1}, + {&_44c0_sm_p8_0,&_44c0_sm_p8_1,&_44c0_sm_p8_2} + } +}; + +static const static_bookblock _resbook_44s_1={ + { + {0},{0,0,&_44c1_s_p1_0},{0,0,&_44c1_s_p2_0}, + {0,0,&_44c1_s_p3_0},{0,0,&_44c1_s_p4_0},{0,0,&_44c1_s_p5_0}, + {&_44c1_s_p6_0,&_44c1_s_p6_1},{&_44c1_s_p7_0,&_44c1_s_p7_1}, + {&_44c1_s_p8_0,&_44c1_s_p8_1,&_44c1_s_p8_2} + } +}; +static const static_bookblock _resbook_44sm_1={ + { + {0},{0,0,&_44c1_sm_p1_0},{0,0,&_44c1_sm_p2_0}, + {0,0,&_44c1_sm_p3_0},{0,0,&_44c1_sm_p4_0},{0,0,&_44c1_sm_p5_0}, + {&_44c1_sm_p6_0,&_44c1_sm_p6_1},{&_44c1_sm_p7_0,&_44c1_sm_p7_1}, + {&_44c1_sm_p8_0,&_44c1_sm_p8_1,&_44c1_sm_p8_2} + } +}; + +static const static_bookblock _resbook_44s_2={ + { + {0},{0,0,&_44c2_s_p1_0},{0,0,&_44c2_s_p2_0},{0,0,&_44c2_s_p3_0}, + {0,0,&_44c2_s_p4_0},{0,0,&_44c2_s_p5_0},{0,0,&_44c2_s_p6_0}, + {&_44c2_s_p7_0,&_44c2_s_p7_1},{&_44c2_s_p8_0,&_44c2_s_p8_1}, + {&_44c2_s_p9_0,&_44c2_s_p9_1,&_44c2_s_p9_2} + } +}; +static const static_bookblock _resbook_44s_3={ + { + {0},{0,0,&_44c3_s_p1_0},{0,0,&_44c3_s_p2_0},{0,0,&_44c3_s_p3_0}, + {0,0,&_44c3_s_p4_0},{0,0,&_44c3_s_p5_0},{0,0,&_44c3_s_p6_0}, + {&_44c3_s_p7_0,&_44c3_s_p7_1},{&_44c3_s_p8_0,&_44c3_s_p8_1}, + {&_44c3_s_p9_0,&_44c3_s_p9_1,&_44c3_s_p9_2} + } +}; +static const static_bookblock _resbook_44s_4={ + { + {0},{0,0,&_44c4_s_p1_0},{0,0,&_44c4_s_p2_0},{0,0,&_44c4_s_p3_0}, + {0,0,&_44c4_s_p4_0},{0,0,&_44c4_s_p5_0},{0,0,&_44c4_s_p6_0}, + {&_44c4_s_p7_0,&_44c4_s_p7_1},{&_44c4_s_p8_0,&_44c4_s_p8_1}, + {&_44c4_s_p9_0,&_44c4_s_p9_1,&_44c4_s_p9_2} + } +}; +static const static_bookblock _resbook_44s_5={ + { + {0},{0,0,&_44c5_s_p1_0},{0,0,&_44c5_s_p2_0},{0,0,&_44c5_s_p3_0}, + {0,0,&_44c5_s_p4_0},{0,0,&_44c5_s_p5_0},{0,0,&_44c5_s_p6_0}, + {&_44c5_s_p7_0,&_44c5_s_p7_1},{&_44c5_s_p8_0,&_44c5_s_p8_1}, + {&_44c5_s_p9_0,&_44c5_s_p9_1,&_44c5_s_p9_2} + } +}; +static const static_bookblock _resbook_44s_6={ + { + {0},{0,0,&_44c6_s_p1_0},{0,0,&_44c6_s_p2_0},{0,0,&_44c6_s_p3_0}, + {0,0,&_44c6_s_p4_0}, + {&_44c6_s_p5_0,&_44c6_s_p5_1}, + {&_44c6_s_p6_0,&_44c6_s_p6_1}, + {&_44c6_s_p7_0,&_44c6_s_p7_1}, + {&_44c6_s_p8_0,&_44c6_s_p8_1}, + {&_44c6_s_p9_0,&_44c6_s_p9_1,&_44c6_s_p9_2} + } +}; +static const static_bookblock _resbook_44s_7={ + { + {0},{0,0,&_44c7_s_p1_0},{0,0,&_44c7_s_p2_0},{0,0,&_44c7_s_p3_0}, + {0,0,&_44c7_s_p4_0}, + {&_44c7_s_p5_0,&_44c7_s_p5_1}, + {&_44c7_s_p6_0,&_44c7_s_p6_1}, + {&_44c7_s_p7_0,&_44c7_s_p7_1}, + {&_44c7_s_p8_0,&_44c7_s_p8_1}, + {&_44c7_s_p9_0,&_44c7_s_p9_1,&_44c7_s_p9_2} + } +}; +static const static_bookblock _resbook_44s_8={ + { + {0},{0,0,&_44c8_s_p1_0},{0,0,&_44c8_s_p2_0},{0,0,&_44c8_s_p3_0}, + {0,0,&_44c8_s_p4_0}, + {&_44c8_s_p5_0,&_44c8_s_p5_1}, + {&_44c8_s_p6_0,&_44c8_s_p6_1}, + {&_44c8_s_p7_0,&_44c8_s_p7_1}, + {&_44c8_s_p8_0,&_44c8_s_p8_1}, + {&_44c8_s_p9_0,&_44c8_s_p9_1,&_44c8_s_p9_2} + } +}; +static const static_bookblock _resbook_44s_9={ + { + {0},{0,0,&_44c9_s_p1_0},{0,0,&_44c9_s_p2_0},{0,0,&_44c9_s_p3_0}, + {0,0,&_44c9_s_p4_0}, + {&_44c9_s_p5_0,&_44c9_s_p5_1}, + {&_44c9_s_p6_0,&_44c9_s_p6_1}, + {&_44c9_s_p7_0,&_44c9_s_p7_1}, + {&_44c9_s_p8_0,&_44c9_s_p8_1}, + {&_44c9_s_p9_0,&_44c9_s_p9_1,&_44c9_s_p9_2} + } +}; + +static const vorbis_residue_template _res_44s_n1[]={ + {2,0,32, &_residue_44_low, + &_huff_book__44cn1_s_short,&_huff_book__44cn1_sm_short, + &_resbook_44s_n1,&_resbook_44sm_n1}, + + {2,0,32, &_residue_44_low, + &_huff_book__44cn1_s_long,&_huff_book__44cn1_sm_long, + &_resbook_44s_n1,&_resbook_44sm_n1} +}; +static const vorbis_residue_template _res_44s_0[]={ + {2,0,16, &_residue_44_low, + &_huff_book__44c0_s_short,&_huff_book__44c0_sm_short, + &_resbook_44s_0,&_resbook_44sm_0}, + + {2,0,32, &_residue_44_low, + &_huff_book__44c0_s_long,&_huff_book__44c0_sm_long, + &_resbook_44s_0,&_resbook_44sm_0} +}; +static const vorbis_residue_template _res_44s_1[]={ + {2,0,16, &_residue_44_low, + &_huff_book__44c1_s_short,&_huff_book__44c1_sm_short, + &_resbook_44s_1,&_resbook_44sm_1}, + + {2,0,32, &_residue_44_low, + &_huff_book__44c1_s_long,&_huff_book__44c1_sm_long, + &_resbook_44s_1,&_resbook_44sm_1} +}; + +static const vorbis_residue_template _res_44s_2[]={ + {2,0,16, &_residue_44_mid, + &_huff_book__44c2_s_short,&_huff_book__44c2_s_short, + &_resbook_44s_2,&_resbook_44s_2}, + + {2,0,32, &_residue_44_mid, + &_huff_book__44c2_s_long,&_huff_book__44c2_s_long, + &_resbook_44s_2,&_resbook_44s_2} +}; +static const vorbis_residue_template _res_44s_3[]={ + {2,0,16, &_residue_44_mid, + &_huff_book__44c3_s_short,&_huff_book__44c3_s_short, + &_resbook_44s_3,&_resbook_44s_3}, + + {2,0,32, &_residue_44_mid, + &_huff_book__44c3_s_long,&_huff_book__44c3_s_long, + &_resbook_44s_3,&_resbook_44s_3} +}; +static const vorbis_residue_template _res_44s_4[]={ + {2,0,16, &_residue_44_mid, + &_huff_book__44c4_s_short,&_huff_book__44c4_s_short, + &_resbook_44s_4,&_resbook_44s_4}, + + {2,0,32, &_residue_44_mid, + &_huff_book__44c4_s_long,&_huff_book__44c4_s_long, + &_resbook_44s_4,&_resbook_44s_4} +}; +static const vorbis_residue_template _res_44s_5[]={ + {2,0,16, &_residue_44_mid, + &_huff_book__44c5_s_short,&_huff_book__44c5_s_short, + &_resbook_44s_5,&_resbook_44s_5}, + + {2,0,32, &_residue_44_mid, + &_huff_book__44c5_s_long,&_huff_book__44c5_s_long, + &_resbook_44s_5,&_resbook_44s_5} +}; +static const vorbis_residue_template _res_44s_6[]={ + {2,0,16, &_residue_44_high, + &_huff_book__44c6_s_short,&_huff_book__44c6_s_short, + &_resbook_44s_6,&_resbook_44s_6}, + + {2,0,32, &_residue_44_high, + &_huff_book__44c6_s_long,&_huff_book__44c6_s_long, + &_resbook_44s_6,&_resbook_44s_6} +}; +static const vorbis_residue_template _res_44s_7[]={ + {2,0,16, &_residue_44_high, + &_huff_book__44c7_s_short,&_huff_book__44c7_s_short, + &_resbook_44s_7,&_resbook_44s_7}, + + {2,0,32, &_residue_44_high, + &_huff_book__44c7_s_long,&_huff_book__44c7_s_long, + &_resbook_44s_7,&_resbook_44s_7} +}; +static const vorbis_residue_template _res_44s_8[]={ + {2,0,16, &_residue_44_high, + &_huff_book__44c8_s_short,&_huff_book__44c8_s_short, + &_resbook_44s_8,&_resbook_44s_8}, + + {2,0,32, &_residue_44_high, + &_huff_book__44c8_s_long,&_huff_book__44c8_s_long, + &_resbook_44s_8,&_resbook_44s_8} +}; +static const vorbis_residue_template _res_44s_9[]={ + {2,0,16, &_residue_44_high, + &_huff_book__44c9_s_short,&_huff_book__44c9_s_short, + &_resbook_44s_9,&_resbook_44s_9}, + + {2,0,32, &_residue_44_high, + &_huff_book__44c9_s_long,&_huff_book__44c9_s_long, + &_resbook_44s_9,&_resbook_44s_9} +}; + +static const vorbis_mapping_template _mapres_template_44_stereo[]={ + { _map_nominal, _res_44s_n1 }, /* -1 */ + { _map_nominal, _res_44s_0 }, /* 0 */ + { _map_nominal, _res_44s_1 }, /* 1 */ + { _map_nominal, _res_44s_2 }, /* 2 */ + { _map_nominal, _res_44s_3 }, /* 3 */ + { _map_nominal, _res_44s_4 }, /* 4 */ + { _map_nominal, _res_44s_5 }, /* 5 */ + { _map_nominal, _res_44s_6 }, /* 6 */ + { _map_nominal, _res_44s_7 }, /* 7 */ + { _map_nominal, _res_44s_8 }, /* 8 */ + { _map_nominal, _res_44s_9 }, /* 9 */ +}; diff --git a/code/libvorbis-1.3.4/lib/modes/residue_44p51.h b/code/libvorbis-1.3.4/lib/modes/residue_44p51.h new file mode 100644 index 00000000..a52cc524 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/residue_44p51.h @@ -0,0 +1,451 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: toplevel residue templates for 32/44.1/48kHz uncoupled + last mod: $Id: residue_44p51.h 19013 2013-11-12 04:04:50Z giles $ + + ********************************************************************/ + +#include "vorbis/codec.h" +#include "backends.h" + +#include "books/coupled/res_books_51.h" + +/***** residue backends *********************************************/ + +static const vorbis_info_residue0 _residue_44p_lo={ + 0,-1, -1, 7,-1,-1, + /* 0 1 2 3 4 5 6 7 8 */ + {0}, + {-1}, + { 0, 1, 2, 7, 17, 31}, + { 0, 0, 99, 7, 17, 31}, +}; + +static const vorbis_info_residue0 _residue_44p={ + 0,-1, -1, 8,-1,-1, + /* 0 1 2 3 4 5 6 7 8 */ + {0}, + {-1}, + { 0, 1, 1, 2, 7, 17, 31}, + { 0, 0, 99, 99, 7, 17, 31}, +}; + +static const vorbis_info_residue0 _residue_44p_hi={ + 0,-1, -1, 8,-1,-1, + /* 0 1 2 3 4 5 6 7 8 */ + {0}, + {-1}, + { 0, 1, 2, 4, 7, 17, 31}, + { 0, 1, 2, 4, 7, 17, 31}, +}; + +static const vorbis_info_residue0 _residue_44p_lfe={ + 0,-1, -1, 2,-1,-1, + /* 0 1 2 3 4 5 6 7 8 */ + {0}, + {-1}, + { 32}, + { -1} +}; + +static const static_bookblock _resbook_44p_n1={ + { + {0}, + {0,&_44pn1_p1_0}, + + {&_44pn1_p2_0,&_44pn1_p2_1,0}, + {&_44pn1_p3_0,&_44pn1_p3_1,0}, + {&_44pn1_p4_0,&_44pn1_p4_1,0}, + + {&_44pn1_p5_0,&_44pn1_p5_1,&_44pn1_p4_1}, + {&_44pn1_p6_0,&_44pn1_p6_1,&_44pn1_p6_2}, + } +}; + +static const static_bookblock _resbook_44p_0={ + { + {0}, + {0,&_44p0_p1_0}, + + {&_44p0_p2_0,&_44p0_p2_1,0}, + {&_44p0_p3_0,&_44p0_p3_1,0}, + {&_44p0_p4_0,&_44p0_p4_1,0}, + + {&_44p0_p5_0,&_44p0_p5_1,&_44p0_p4_1}, + {&_44p0_p6_0,&_44p0_p6_1,&_44p0_p6_2}, + } +}; + +static const static_bookblock _resbook_44p_1={ + { + {0}, + {0,&_44p1_p1_0}, + + {&_44p1_p2_0,&_44p1_p2_1,0}, + {&_44p1_p3_0,&_44p1_p3_1,0}, + {&_44p1_p4_0,&_44p1_p4_1,0}, + + {&_44p1_p5_0,&_44p1_p5_1,&_44p1_p4_1}, + {&_44p1_p6_0,&_44p1_p6_1,&_44p1_p6_2}, + } +}; + +static const static_bookblock _resbook_44p_2={ + { + {0}, + {0,0,&_44p2_p1_0}, + {0,&_44p2_p2_0,0}, + + {&_44p2_p3_0,&_44p2_p3_1,0}, + {&_44p2_p4_0,&_44p2_p4_1,0}, + {&_44p2_p5_0,&_44p2_p5_1,0}, + + {&_44p2_p6_0,&_44p2_p6_1,&_44p2_p5_1}, + {&_44p2_p7_0,&_44p2_p7_1,&_44p2_p7_2,&_44p2_p7_3} + } +}; +static const static_bookblock _resbook_44p_3={ + { + {0}, + {0,0,&_44p3_p1_0}, + {0,&_44p3_p2_0,0}, + + {&_44p3_p3_0,&_44p3_p3_1,0}, + {&_44p3_p4_0,&_44p3_p4_1,0}, + {&_44p3_p5_0,&_44p3_p5_1,0}, + + {&_44p3_p6_0,&_44p3_p6_1,&_44p3_p5_1}, + {&_44p3_p7_0,&_44p3_p7_1,&_44p3_p7_2,&_44p3_p7_3} + } +}; +static const static_bookblock _resbook_44p_4={ + { + {0}, + {0,0,&_44p4_p1_0}, + {0,&_44p4_p2_0,0}, + + {&_44p4_p3_0,&_44p4_p3_1,0}, + {&_44p4_p4_0,&_44p4_p4_1,0}, + {&_44p4_p5_0,&_44p4_p5_1,0}, + + {&_44p4_p6_0,&_44p4_p6_1,&_44p4_p5_1}, + {&_44p4_p7_0,&_44p4_p7_1,&_44p4_p7_2,&_44p4_p7_3} + } +}; +static const static_bookblock _resbook_44p_5={ + { + {0}, + {0,0,&_44p5_p1_0}, + {0,&_44p5_p2_0,0}, + + {&_44p5_p3_0,&_44p5_p3_1,0}, + {&_44p5_p4_0,&_44p5_p4_1,0}, + {&_44p5_p5_0,&_44p5_p5_1,0}, + + {&_44p5_p6_0,&_44p5_p6_1,&_44p5_p5_1}, + {&_44p5_p7_0,&_44p5_p7_1,&_44p5_p7_2,&_44p5_p7_3} + } +}; +static const static_bookblock _resbook_44p_6={ + { + {0}, + {0,0,&_44p6_p1_0}, + {0,&_44p6_p2_0,0}, + + {&_44p6_p3_0,&_44p6_p3_1,0}, + {&_44p6_p4_0,&_44p6_p4_1,0}, + {&_44p6_p5_0,&_44p6_p5_1,0}, + + {&_44p6_p6_0,&_44p6_p6_1,&_44p6_p5_1}, + {&_44p6_p7_0,&_44p6_p7_1,&_44p6_p7_2,&_44p6_p7_3} + } +}; +static const static_bookblock _resbook_44p_7={ + { + {0}, + {0,0,&_44p7_p1_0}, + {0,&_44p7_p2_0,0}, + + {&_44p7_p3_0,&_44p7_p3_1,0}, + {&_44p7_p4_0,&_44p7_p4_1,0}, + {&_44p7_p5_0,&_44p7_p5_1,0}, + + {&_44p7_p6_0,&_44p7_p6_1,&_44p7_p5_1}, + {&_44p7_p7_0,&_44p7_p7_1,&_44p7_p7_2,&_44p7_p7_3} + } +}; +static const static_bookblock _resbook_44p_8={ + { + {0}, + {0,0,&_44p8_p1_0}, + {0,&_44p8_p2_0,0}, + + {&_44p8_p3_0,&_44p8_p3_1,0}, + {&_44p8_p4_0,&_44p8_p4_1,0}, + {&_44p8_p5_0,&_44p8_p5_1,0}, + + {&_44p8_p6_0,&_44p8_p6_1,&_44p8_p5_1}, + {&_44p8_p7_0,&_44p8_p7_1,&_44p8_p7_2,&_44p8_p7_3} + } +}; +static const static_bookblock _resbook_44p_9={ + { + {0}, + {0,0,&_44p9_p1_0}, + {0,&_44p9_p2_0,0}, + + {&_44p9_p3_0,&_44p9_p3_1,0}, + {&_44p9_p4_0,&_44p9_p4_1,0}, + {&_44p9_p5_0,&_44p9_p5_1,0}, + + {&_44p9_p6_0,&_44p9_p6_1,&_44p9_p5_1}, + {&_44p9_p7_0,&_44p9_p7_1,&_44p9_p7_2,&_44p9_p7_3} + } +}; + +static const static_bookblock _resbook_44p_ln1={ + { + {&_44pn1_l0_0,&_44pn1_l0_1,0}, + {&_44pn1_l1_0,&_44pn1_p6_1,&_44pn1_p6_2}, + } +}; +static const static_bookblock _resbook_44p_l0={ + { + {&_44p0_l0_0,&_44p0_l0_1,0}, + {&_44p0_l1_0,&_44p0_p6_1,&_44p0_p6_2}, + } +}; +static const static_bookblock _resbook_44p_l1={ + { + {&_44p1_l0_0,&_44p1_l0_1,0}, + {&_44p1_l1_0,&_44p1_p6_1,&_44p1_p6_2}, + } +}; +static const static_bookblock _resbook_44p_l2={ + { + {&_44p2_l0_0,&_44p2_l0_1,0}, + {&_44p2_l1_0,&_44p2_p7_2,&_44p2_p7_3}, + } +}; +static const static_bookblock _resbook_44p_l3={ + { + {&_44p3_l0_0,&_44p3_l0_1,0}, + {&_44p3_l1_0,&_44p3_p7_2,&_44p3_p7_3}, + } +}; +static const static_bookblock _resbook_44p_l4={ + { + {&_44p4_l0_0,&_44p4_l0_1,0}, + {&_44p4_l1_0,&_44p4_p7_2,&_44p4_p7_3}, + } +}; +static const static_bookblock _resbook_44p_l5={ + { + {&_44p5_l0_0,&_44p5_l0_1,0}, + {&_44p5_l1_0,&_44p5_p7_2,&_44p5_p7_3}, + } +}; +static const static_bookblock _resbook_44p_l6={ + { + {&_44p6_l0_0,&_44p6_l0_1,0}, + {&_44p6_l1_0,&_44p6_p7_2,&_44p6_p7_3}, + } +}; +static const static_bookblock _resbook_44p_l7={ + { + {&_44p7_l0_0,&_44p7_l0_1,0}, + {&_44p7_l1_0,&_44p7_p7_2,&_44p7_p7_3}, + } +}; +static const static_bookblock _resbook_44p_l8={ + { + {&_44p8_l0_0,&_44p8_l0_1,0}, + {&_44p8_l1_0,&_44p8_p7_2,&_44p8_p7_3}, + } +}; +static const static_bookblock _resbook_44p_l9={ + { + {&_44p9_l0_0,&_44p9_l0_1,0}, + {&_44p9_l1_0,&_44p9_p7_2,&_44p9_p7_3}, + } +}; + + +static const vorbis_info_mapping0 _map_nominal_51[2]={ + {2, {0,0,0,0,0,1}, {0,2}, {0,2}, 4,{0,3,0,0},{2,4,1,3}}, + {2, {0,0,0,0,0,1}, {1,2}, {1,2}, 4,{0,3,0,0},{2,4,1,3}} +}; +static const vorbis_info_mapping0 _map_nominal_51u[2]={ + {2, {0,0,0,0,0,1}, {0,2}, {0,2}, 0,{0},{0}}, + {2, {0,0,0,0,0,1}, {1,2}, {1,2}, 0,{0},{0}} +}; + +static const vorbis_residue_template _res_44p51_n1[]={ + {2,0,30, &_residue_44p_lo, + &_huff_book__44pn1_short,&_huff_book__44pn1_short, + &_resbook_44p_n1,&_resbook_44p_n1}, + + {2,0,30, &_residue_44p_lo, + &_huff_book__44pn1_long,&_huff_book__44pn1_long, + &_resbook_44p_n1,&_resbook_44p_n1}, + + {1,2,6, &_residue_44p_lfe, + &_huff_book__44pn1_lfe,&_huff_book__44pn1_lfe, + &_resbook_44p_ln1,&_resbook_44p_ln1} +}; +static const vorbis_residue_template _res_44p51_0[]={ + {2,0,15, &_residue_44p_lo, + &_huff_book__44p0_short,&_huff_book__44p0_short, + &_resbook_44p_0,&_resbook_44p_0}, + + {2,0,30, &_residue_44p_lo, + &_huff_book__44p0_long,&_huff_book__44p0_long, + &_resbook_44p_0,&_resbook_44p_0}, + + {1,2,6, &_residue_44p_lfe, + &_huff_book__44p0_lfe,&_huff_book__44p0_lfe, + &_resbook_44p_l0,&_resbook_44p_l0} +}; +static const vorbis_residue_template _res_44p51_1[]={ + {2,0,15, &_residue_44p_lo, + &_huff_book__44p1_short,&_huff_book__44p1_short, + &_resbook_44p_1,&_resbook_44p_1}, + + {2,0,30, &_residue_44p_lo, + &_huff_book__44p1_long,&_huff_book__44p1_long, + &_resbook_44p_1,&_resbook_44p_1}, + + {1,2,6, &_residue_44p_lfe, + &_huff_book__44p1_lfe,&_huff_book__44p1_lfe, + &_resbook_44p_l1,&_resbook_44p_l1} +}; +static const vorbis_residue_template _res_44p51_2[]={ + {2,0,15, &_residue_44p, + &_huff_book__44p2_short,&_huff_book__44p2_short, + &_resbook_44p_2,&_resbook_44p_2}, + + {2,0,30, &_residue_44p, + &_huff_book__44p2_long,&_huff_book__44p2_long, + &_resbook_44p_2,&_resbook_44p_2}, + + {1,2,6, &_residue_44p_lfe, + &_huff_book__44p2_lfe,&_huff_book__44p2_lfe, + &_resbook_44p_l2,&_resbook_44p_l2} +}; +static const vorbis_residue_template _res_44p51_3[]={ + {2,0,15, &_residue_44p, + &_huff_book__44p3_short,&_huff_book__44p3_short, + &_resbook_44p_3,&_resbook_44p_3}, + + {2,0,30, &_residue_44p, + &_huff_book__44p3_long,&_huff_book__44p3_long, + &_resbook_44p_3,&_resbook_44p_3}, + + {1,2,6, &_residue_44p_lfe, + &_huff_book__44p3_lfe,&_huff_book__44p3_lfe, + &_resbook_44p_l3,&_resbook_44p_l3} +}; +static const vorbis_residue_template _res_44p51_4[]={ + {2,0,15, &_residue_44p, + &_huff_book__44p4_short,&_huff_book__44p4_short, + &_resbook_44p_4,&_resbook_44p_4}, + + {2,0,30, &_residue_44p, + &_huff_book__44p4_long,&_huff_book__44p4_long, + &_resbook_44p_4,&_resbook_44p_4}, + + {1,2,6, &_residue_44p_lfe, + &_huff_book__44p4_lfe,&_huff_book__44p4_lfe, + &_resbook_44p_l4,&_resbook_44p_l4} +}; +static const vorbis_residue_template _res_44p51_5[]={ + {2,0,15, &_residue_44p_hi, + &_huff_book__44p5_short,&_huff_book__44p5_short, + &_resbook_44p_5,&_resbook_44p_5}, + + {2,0,30, &_residue_44p_hi, + &_huff_book__44p5_long,&_huff_book__44p5_long, + &_resbook_44p_5,&_resbook_44p_5}, + + {1,2,6, &_residue_44p_lfe, + &_huff_book__44p5_lfe,&_huff_book__44p5_lfe, + &_resbook_44p_l5,&_resbook_44p_l5} +}; +static const vorbis_residue_template _res_44p51_6[]={ + {2,0,15, &_residue_44p_hi, + &_huff_book__44p6_short,&_huff_book__44p6_short, + &_resbook_44p_6,&_resbook_44p_6}, + + {2,0,30, &_residue_44p_hi, + &_huff_book__44p6_long,&_huff_book__44p6_long, + &_resbook_44p_6,&_resbook_44p_6}, + + {1,2,6, &_residue_44p_lfe, + &_huff_book__44p6_lfe,&_huff_book__44p6_lfe, + &_resbook_44p_l6,&_resbook_44p_l6} +}; + + +static const vorbis_residue_template _res_44p51_7[]={ + {2,0,15, &_residue_44p_hi, + &_huff_book__44p7_short,&_huff_book__44p7_short, + &_resbook_44p_7,&_resbook_44p_7}, + + {2,0,30, &_residue_44p_hi, + &_huff_book__44p7_long,&_huff_book__44p7_long, + &_resbook_44p_7,&_resbook_44p_7}, + + {1,2,6, &_residue_44p_lfe, + &_huff_book__44p6_lfe,&_huff_book__44p6_lfe, + &_resbook_44p_l6,&_resbook_44p_l6} +}; +static const vorbis_residue_template _res_44p51_8[]={ + {2,0,15, &_residue_44p_hi, + &_huff_book__44p8_short,&_huff_book__44p8_short, + &_resbook_44p_8,&_resbook_44p_8}, + + {2,0,30, &_residue_44p_hi, + &_huff_book__44p8_long,&_huff_book__44p8_long, + &_resbook_44p_8,&_resbook_44p_8}, + + {1,2,6, &_residue_44p_lfe, + &_huff_book__44p6_lfe,&_huff_book__44p6_lfe, + &_resbook_44p_l6,&_resbook_44p_l6} +}; +static const vorbis_residue_template _res_44p51_9[]={ + {2,0,15, &_residue_44p_hi, + &_huff_book__44p9_short,&_huff_book__44p9_short, + &_resbook_44p_9,&_resbook_44p_9}, + + {2,0,30, &_residue_44p_hi, + &_huff_book__44p9_long,&_huff_book__44p9_long, + &_resbook_44p_9,&_resbook_44p_9}, + + {1,2,6, &_residue_44p_lfe, + &_huff_book__44p6_lfe,&_huff_book__44p6_lfe, + &_resbook_44p_l6,&_resbook_44p_l6} +}; + +static const vorbis_mapping_template _mapres_template_44_51[]={ + { _map_nominal_51, _res_44p51_n1 }, /* -1 */ + { _map_nominal_51, _res_44p51_0 }, /* 0 */ + { _map_nominal_51, _res_44p51_1 }, /* 1 */ + { _map_nominal_51, _res_44p51_2 }, /* 2 */ + { _map_nominal_51, _res_44p51_3 }, /* 3 */ + { _map_nominal_51, _res_44p51_4 }, /* 4 */ + { _map_nominal_51u, _res_44p51_5 }, /* 5 */ + { _map_nominal_51u, _res_44p51_6 }, /* 6 */ + { _map_nominal_51u, _res_44p51_7 }, /* 7 */ + { _map_nominal_51u, _res_44p51_8 }, /* 8 */ + { _map_nominal_51u, _res_44p51_9 }, /* 9 */ +}; diff --git a/code/libvorbis-1.3.4/lib/modes/residue_44u.h b/code/libvorbis-1.3.4/lib/modes/residue_44u.h new file mode 100644 index 00000000..92c4a09c --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/residue_44u.h @@ -0,0 +1,318 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: toplevel residue templates for 32/44.1/48kHz uncoupled + last mod: $Id: residue_44u.h 16962 2010-03-11 07:30:34Z xiphmont $ + + ********************************************************************/ + +#include "vorbis/codec.h" +#include "backends.h" +#include "books/uncoupled/res_books_uncoupled.h" + +/***** residue backends *********************************************/ + + +static const vorbis_info_residue0 _residue_44_low_un={ + 0,-1, -1, 8,-1,-1, + {0}, + {-1}, + { 0, 1, 1, 2, 2, 4, 28}, + { -1, 25, -1, 45, -1, -1, -1} +}; + +static const vorbis_info_residue0 _residue_44_mid_un={ + 0,-1, -1, 10,-1,-1, + /* 0 1 2 3 4 5 6 7 8 9 */ + {0}, + {-1}, + { 0, 1, 1, 2, 2, 4, 4, 16, 60}, + { -1, 30, -1, 50, -1, 80, -1, -1, -1} +}; + +static const vorbis_info_residue0 _residue_44_hi_un={ + 0,-1, -1, 10,-1,-1, + /* 0 1 2 3 4 5 6 7 8 9 */ + {0}, + {-1}, + { 0, 1, 2, 4, 8, 16, 32, 71,157}, + { -1, -1, -1, -1, -1, -1, -1, -1, -1} +}; + +/* mapping conventions: + only one submap (this would change for efficient 5.1 support for example)*/ +/* Four psychoacoustic profiles are used, one for each blocktype */ +static const vorbis_info_mapping0 _map_nominal_u[2]={ + {1, {0,0,0,0,0,0}, {0}, {0}, 0,{0},{0}}, + {1, {0,0,0,0,0,0}, {1}, {1}, 0,{0},{0}} +}; + +static const static_bookblock _resbook_44u_n1={ + { + {0}, + {0,0,&_44un1__p1_0}, + {0,0,&_44un1__p2_0}, + {0,0,&_44un1__p3_0}, + {0,0,&_44un1__p4_0}, + {0,0,&_44un1__p5_0}, + {&_44un1__p6_0,&_44un1__p6_1}, + {&_44un1__p7_0,&_44un1__p7_1,&_44un1__p7_2} + } +}; +static const static_bookblock _resbook_44u_0={ + { + {0}, + {0,0,&_44u0__p1_0}, + {0,0,&_44u0__p2_0}, + {0,0,&_44u0__p3_0}, + {0,0,&_44u0__p4_0}, + {0,0,&_44u0__p5_0}, + {&_44u0__p6_0,&_44u0__p6_1}, + {&_44u0__p7_0,&_44u0__p7_1,&_44u0__p7_2} + } +}; +static const static_bookblock _resbook_44u_1={ + { + {0}, + {0,0,&_44u1__p1_0}, + {0,0,&_44u1__p2_0}, + {0,0,&_44u1__p3_0}, + {0,0,&_44u1__p4_0}, + {0,0,&_44u1__p5_0}, + {&_44u1__p6_0,&_44u1__p6_1}, + {&_44u1__p7_0,&_44u1__p7_1,&_44u1__p7_2} + } +}; +static const static_bookblock _resbook_44u_2={ + { + {0}, + {0,0,&_44u2__p1_0}, + {0,0,&_44u2__p2_0}, + {0,0,&_44u2__p3_0}, + {0,0,&_44u2__p4_0}, + {0,0,&_44u2__p5_0}, + {&_44u2__p6_0,&_44u2__p6_1}, + {&_44u2__p7_0,&_44u2__p7_1,&_44u2__p7_2} + } +}; +static const static_bookblock _resbook_44u_3={ + { + {0}, + {0,0,&_44u3__p1_0}, + {0,0,&_44u3__p2_0}, + {0,0,&_44u3__p3_0}, + {0,0,&_44u3__p4_0}, + {0,0,&_44u3__p5_0}, + {&_44u3__p6_0,&_44u3__p6_1}, + {&_44u3__p7_0,&_44u3__p7_1,&_44u3__p7_2} + } +}; +static const static_bookblock _resbook_44u_4={ + { + {0}, + {0,0,&_44u4__p1_0}, + {0,0,&_44u4__p2_0}, + {0,0,&_44u4__p3_0}, + {0,0,&_44u4__p4_0}, + {0,0,&_44u4__p5_0}, + {&_44u4__p6_0,&_44u4__p6_1}, + {&_44u4__p7_0,&_44u4__p7_1,&_44u4__p7_2} + } +}; +static const static_bookblock _resbook_44u_5={ + { + {0}, + {0,0,&_44u5__p1_0}, + {0,0,&_44u5__p2_0}, + {0,0,&_44u5__p3_0}, + {0,0,&_44u5__p4_0}, + {0,0,&_44u5__p5_0}, + {0,0,&_44u5__p6_0}, + {&_44u5__p7_0,&_44u5__p7_1}, + {&_44u5__p8_0,&_44u5__p8_1}, + {&_44u5__p9_0,&_44u5__p9_1,&_44u5__p9_2} + } +}; +static const static_bookblock _resbook_44u_6={ + { + {0}, + {0,0,&_44u6__p1_0}, + {0,0,&_44u6__p2_0}, + {0,0,&_44u6__p3_0}, + {0,0,&_44u6__p4_0}, + {0,0,&_44u6__p5_0}, + {0,0,&_44u6__p6_0}, + {&_44u6__p7_0,&_44u6__p7_1}, + {&_44u6__p8_0,&_44u6__p8_1}, + {&_44u6__p9_0,&_44u6__p9_1,&_44u6__p9_2} + } +}; +static const static_bookblock _resbook_44u_7={ + { + {0}, + {0,0,&_44u7__p1_0}, + {0,0,&_44u7__p2_0}, + {0,0,&_44u7__p3_0}, + {0,0,&_44u7__p4_0}, + {0,0,&_44u7__p5_0}, + {0,0,&_44u7__p6_0}, + {&_44u7__p7_0,&_44u7__p7_1}, + {&_44u7__p8_0,&_44u7__p8_1}, + {&_44u7__p9_0,&_44u7__p9_1,&_44u7__p9_2} + } +}; +static const static_bookblock _resbook_44u_8={ + { + {0}, + {0,0,&_44u8_p1_0}, + {0,0,&_44u8_p2_0}, + {0,0,&_44u8_p3_0}, + {0,0,&_44u8_p4_0}, + {&_44u8_p5_0,&_44u8_p5_1}, + {&_44u8_p6_0,&_44u8_p6_1}, + {&_44u8_p7_0,&_44u8_p7_1}, + {&_44u8_p8_0,&_44u8_p8_1}, + {&_44u8_p9_0,&_44u8_p9_1,&_44u8_p9_2} + } +}; +static const static_bookblock _resbook_44u_9={ + { + {0}, + {0,0,&_44u9_p1_0}, + {0,0,&_44u9_p2_0}, + {0,0,&_44u9_p3_0}, + {0,0,&_44u9_p4_0}, + {&_44u9_p5_0,&_44u9_p5_1}, + {&_44u9_p6_0,&_44u9_p6_1}, + {&_44u9_p7_0,&_44u9_p7_1}, + {&_44u9_p8_0,&_44u9_p8_1}, + {&_44u9_p9_0,&_44u9_p9_1,&_44u9_p9_2} + } +}; + +static const vorbis_residue_template _res_44u_n1[]={ + {1,0,32, &_residue_44_low_un, + &_huff_book__44un1__short,&_huff_book__44un1__short, + &_resbook_44u_n1,&_resbook_44u_n1}, + + {1,0,32, &_residue_44_low_un, + &_huff_book__44un1__long,&_huff_book__44un1__long, + &_resbook_44u_n1,&_resbook_44u_n1} +}; +static const vorbis_residue_template _res_44u_0[]={ + {1,0,16, &_residue_44_low_un, + &_huff_book__44u0__short,&_huff_book__44u0__short, + &_resbook_44u_0,&_resbook_44u_0}, + + {1,0,32, &_residue_44_low_un, + &_huff_book__44u0__long,&_huff_book__44u0__long, + &_resbook_44u_0,&_resbook_44u_0} +}; +static const vorbis_residue_template _res_44u_1[]={ + {1,0,16, &_residue_44_low_un, + &_huff_book__44u1__short,&_huff_book__44u1__short, + &_resbook_44u_1,&_resbook_44u_1}, + + {1,0,32, &_residue_44_low_un, + &_huff_book__44u1__long,&_huff_book__44u1__long, + &_resbook_44u_1,&_resbook_44u_1} +}; +static const vorbis_residue_template _res_44u_2[]={ + {1,0,16, &_residue_44_low_un, + &_huff_book__44u2__short,&_huff_book__44u2__short, + &_resbook_44u_2,&_resbook_44u_2}, + + {1,0,32, &_residue_44_low_un, + &_huff_book__44u2__long,&_huff_book__44u2__long, + &_resbook_44u_2,&_resbook_44u_2} +}; +static const vorbis_residue_template _res_44u_3[]={ + {1,0,16, &_residue_44_low_un, + &_huff_book__44u3__short,&_huff_book__44u3__short, + &_resbook_44u_3,&_resbook_44u_3}, + + {1,0,32, &_residue_44_low_un, + &_huff_book__44u3__long,&_huff_book__44u3__long, + &_resbook_44u_3,&_resbook_44u_3} +}; +static const vorbis_residue_template _res_44u_4[]={ + {1,0,16, &_residue_44_low_un, + &_huff_book__44u4__short,&_huff_book__44u4__short, + &_resbook_44u_4,&_resbook_44u_4}, + + {1,0,32, &_residue_44_low_un, + &_huff_book__44u4__long,&_huff_book__44u4__long, + &_resbook_44u_4,&_resbook_44u_4} +}; + +static const vorbis_residue_template _res_44u_5[]={ + {1,0,16, &_residue_44_mid_un, + &_huff_book__44u5__short,&_huff_book__44u5__short, + &_resbook_44u_5,&_resbook_44u_5}, + + {1,0,32, &_residue_44_mid_un, + &_huff_book__44u5__long,&_huff_book__44u5__long, + &_resbook_44u_5,&_resbook_44u_5} +}; + +static const vorbis_residue_template _res_44u_6[]={ + {1,0,16, &_residue_44_mid_un, + &_huff_book__44u6__short,&_huff_book__44u6__short, + &_resbook_44u_6,&_resbook_44u_6}, + + {1,0,32, &_residue_44_mid_un, + &_huff_book__44u6__long,&_huff_book__44u6__long, + &_resbook_44u_6,&_resbook_44u_6} +}; + +static const vorbis_residue_template _res_44u_7[]={ + {1,0,16, &_residue_44_mid_un, + &_huff_book__44u7__short,&_huff_book__44u7__short, + &_resbook_44u_7,&_resbook_44u_7}, + + {1,0,32, &_residue_44_mid_un, + &_huff_book__44u7__long,&_huff_book__44u7__long, + &_resbook_44u_7,&_resbook_44u_7} +}; + +static const vorbis_residue_template _res_44u_8[]={ + {1,0,16, &_residue_44_hi_un, + &_huff_book__44u8__short,&_huff_book__44u8__short, + &_resbook_44u_8,&_resbook_44u_8}, + + {1,0,32, &_residue_44_hi_un, + &_huff_book__44u8__long,&_huff_book__44u8__long, + &_resbook_44u_8,&_resbook_44u_8} +}; +static const vorbis_residue_template _res_44u_9[]={ + {1,0,16, &_residue_44_hi_un, + &_huff_book__44u9__short,&_huff_book__44u9__short, + &_resbook_44u_9,&_resbook_44u_9}, + + {1,0,32, &_residue_44_hi_un, + &_huff_book__44u9__long,&_huff_book__44u9__long, + &_resbook_44u_9,&_resbook_44u_9} +}; + +static const vorbis_mapping_template _mapres_template_44_uncoupled[]={ + { _map_nominal_u, _res_44u_n1 }, /* -1 */ + { _map_nominal_u, _res_44u_0 }, /* 0 */ + { _map_nominal_u, _res_44u_1 }, /* 1 */ + { _map_nominal_u, _res_44u_2 }, /* 2 */ + { _map_nominal_u, _res_44u_3 }, /* 3 */ + { _map_nominal_u, _res_44u_4 }, /* 4 */ + { _map_nominal_u, _res_44u_5 }, /* 5 */ + { _map_nominal_u, _res_44u_6 }, /* 6 */ + { _map_nominal_u, _res_44u_7 }, /* 7 */ + { _map_nominal_u, _res_44u_8 }, /* 8 */ + { _map_nominal_u, _res_44u_9 }, /* 9 */ +}; diff --git a/code/libvorbis-1.3.4/lib/modes/residue_8.h b/code/libvorbis-1.3.4/lib/modes/residue_8.h new file mode 100644 index 00000000..94c6d84c --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/residue_8.h @@ -0,0 +1,109 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: toplevel residue templates 8/11kHz + last mod: $Id: residue_8.h 16962 2010-03-11 07:30:34Z xiphmont $ + + ********************************************************************/ + +#include "vorbis/codec.h" +#include "backends.h" + +/***** residue backends *********************************************/ + +static const static_bookblock _resbook_8s_0={ + { + {0}, + {0,0,&_8c0_s_p1_0}, + {0}, + {0,0,&_8c0_s_p3_0}, + {0,0,&_8c0_s_p4_0}, + {0,0,&_8c0_s_p5_0}, + {0,0,&_8c0_s_p6_0}, + {&_8c0_s_p7_0,&_8c0_s_p7_1}, + {&_8c0_s_p8_0,&_8c0_s_p8_1}, + {&_8c0_s_p9_0,&_8c0_s_p9_1,&_8c0_s_p9_2} + } +}; +static const static_bookblock _resbook_8s_1={ + { + {0}, + {0,0,&_8c1_s_p1_0}, + {0}, + {0,0,&_8c1_s_p3_0}, + {0,0,&_8c1_s_p4_0}, + {0,0,&_8c1_s_p5_0}, + {0,0,&_8c1_s_p6_0}, + {&_8c1_s_p7_0,&_8c1_s_p7_1}, + {&_8c1_s_p8_0,&_8c1_s_p8_1}, + {&_8c1_s_p9_0,&_8c1_s_p9_1,&_8c1_s_p9_2} + } +}; + +static const vorbis_residue_template _res_8s_0[]={ + {2,0,32, &_residue_44_mid, + &_huff_book__8c0_s_single,&_huff_book__8c0_s_single, + &_resbook_8s_0,&_resbook_8s_0}, +}; +static const vorbis_residue_template _res_8s_1[]={ + {2,0,32, &_residue_44_mid, + &_huff_book__8c1_s_single,&_huff_book__8c1_s_single, + &_resbook_8s_1,&_resbook_8s_1}, +}; + +static const vorbis_mapping_template _mapres_template_8_stereo[2]={ + { _map_nominal, _res_8s_0 }, /* 0 */ + { _map_nominal, _res_8s_1 }, /* 1 */ +}; + +static const static_bookblock _resbook_8u_0={ + { + {0}, + {0,0,&_8u0__p1_0}, + {0,0,&_8u0__p2_0}, + {0,0,&_8u0__p3_0}, + {0,0,&_8u0__p4_0}, + {0,0,&_8u0__p5_0}, + {&_8u0__p6_0,&_8u0__p6_1}, + {&_8u0__p7_0,&_8u0__p7_1,&_8u0__p7_2} + } +}; +static const static_bookblock _resbook_8u_1={ + { + {0}, + {0,0,&_8u1__p1_0}, + {0,0,&_8u1__p2_0}, + {0,0,&_8u1__p3_0}, + {0,0,&_8u1__p4_0}, + {0,0,&_8u1__p5_0}, + {0,0,&_8u1__p6_0}, + {&_8u1__p7_0,&_8u1__p7_1}, + {&_8u1__p8_0,&_8u1__p8_1}, + {&_8u1__p9_0,&_8u1__p9_1,&_8u1__p9_2} + } +}; + +static const vorbis_residue_template _res_8u_0[]={ + {1,0,32, &_residue_44_low_un, + &_huff_book__8u0__single,&_huff_book__8u0__single, + &_resbook_8u_0,&_resbook_8u_0}, +}; +static const vorbis_residue_template _res_8u_1[]={ + {1,0,32, &_residue_44_mid_un, + &_huff_book__8u1__single,&_huff_book__8u1__single, + &_resbook_8u_1,&_resbook_8u_1}, +}; + +static const vorbis_mapping_template _mapres_template_8_uncoupled[2]={ + { _map_nominal_u, _res_8u_0 }, /* 0 */ + { _map_nominal_u, _res_8u_1 }, /* 1 */ +}; diff --git a/code/libvorbis-1.3.4/lib/modes/setup_11.h b/code/libvorbis-1.3.4/lib/modes/setup_11.h new file mode 100644 index 00000000..4c2d619c --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/setup_11.h @@ -0,0 +1,143 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: 11kHz settings + last mod: $Id: setup_11.h 16894 2010-02-12 20:32:12Z xiphmont $ + + ********************************************************************/ + +#include "psych_11.h" + +static const int blocksize_11[2]={ + 512,512 +}; + +static const int _floor_mapping_11a[]={ + 6,6 +}; +static const int *_floor_mapping_11[]={ + _floor_mapping_11a +}; + +static const double rate_mapping_11[3]={ + 8000.,13000.,44000., +}; + +static const double rate_mapping_11_uncoupled[3]={ + 12000.,20000.,50000., +}; + +static const double quality_mapping_11[3]={ + -.1,.0,1. +}; + +static const ve_setup_data_template ve_setup_11_stereo={ + 2, + rate_mapping_11, + quality_mapping_11, + 2, + 9000, + 15000, + + blocksize_11, + blocksize_11, + + _psy_tone_masteratt_11, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_11, + NULL, + _vp_tonemask_adj_11, + + _psy_noiseguards_8, + _psy_noisebias_11, + _psy_noisebias_11, + NULL, + NULL, + _psy_noise_suppress, + + _psy_compand_8, + _psy_compand_8_mapping, + NULL, + + {_noise_start_8,_noise_start_8}, + {_noise_part_8,_noise_part_8}, + _noise_thresh_11, + + _psy_ath_floater_8, + _psy_ath_abs_8, + + _psy_lowpass_11, + + _psy_global_44, + _global_mapping_8, + _psy_stereo_modes_8, + + _floor_books, + _floor, + 1, + _floor_mapping_11, + + _mapres_template_8_stereo +}; + +static const ve_setup_data_template ve_setup_11_uncoupled={ + 2, + rate_mapping_11_uncoupled, + quality_mapping_11, + -1, + 9000, + 15000, + + blocksize_11, + blocksize_11, + + _psy_tone_masteratt_11, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_11, + NULL, + _vp_tonemask_adj_11, + + _psy_noiseguards_8, + _psy_noisebias_11, + _psy_noisebias_11, + NULL, + NULL, + _psy_noise_suppress, + + _psy_compand_8, + _psy_compand_8_mapping, + NULL, + + {_noise_start_8,_noise_start_8}, + {_noise_part_8,_noise_part_8}, + _noise_thresh_11, + + _psy_ath_floater_8, + _psy_ath_abs_8, + + _psy_lowpass_11, + + _psy_global_44, + _global_mapping_8, + _psy_stereo_modes_8, + + _floor_books, + _floor, + 1, + _floor_mapping_11, + + _mapres_template_8_uncoupled +}; diff --git a/code/libvorbis-1.3.4/lib/modes/setup_16.h b/code/libvorbis-1.3.4/lib/modes/setup_16.h new file mode 100644 index 00000000..336007f9 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/setup_16.h @@ -0,0 +1,153 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: 16kHz settings + last mod: $Id: setup_16.h 16894 2010-02-12 20:32:12Z xiphmont $ + + ********************************************************************/ + +#include "psych_16.h" +#include "residue_16.h" + +static const int blocksize_16_short[3]={ + 1024,512,512 +}; +static const int blocksize_16_long[3]={ + 1024,1024,1024 +}; + +static const int _floor_mapping_16a[]={ + 9,3,3 +}; +static const int _floor_mapping_16b[]={ + 9,9,9 +}; +static const int *_floor_mapping_16[]={ + _floor_mapping_16a, + _floor_mapping_16b +}; + +static const double rate_mapping_16[4]={ + 12000.,20000.,44000.,86000. +}; + +static const double rate_mapping_16_uncoupled[4]={ + 16000.,28000.,64000.,100000. +}; + +static const double _global_mapping_16[4]={ 1., 2., 3., 4. }; + +static const double quality_mapping_16[4]={ -.1,.05,.5,1. }; + +static const double _psy_compand_16_mapping[4]={ 0., .8, 1., 1.}; + +static const ve_setup_data_template ve_setup_16_stereo={ + 3, + rate_mapping_16, + quality_mapping_16, + 2, + 15000, + 19000, + + blocksize_16_short, + blocksize_16_long, + + _psy_tone_masteratt_16, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_16, + _vp_tonemask_adj_16, + _vp_tonemask_adj_16, + + _psy_noiseguards_16, + _psy_noisebias_16_impulse, + _psy_noisebias_16_short, + _psy_noisebias_16_short, + _psy_noisebias_16, + _psy_noise_suppress, + + _psy_compand_8, + _psy_compand_16_mapping, + _psy_compand_16_mapping, + + {_noise_start_16,_noise_start_16}, + { _noise_part_16, _noise_part_16}, + _noise_thresh_16, + + _psy_ath_floater_16, + _psy_ath_abs_16, + + _psy_lowpass_16, + + _psy_global_44, + _global_mapping_16, + _psy_stereo_modes_16, + + _floor_books, + _floor, + 2, + _floor_mapping_16, + + _mapres_template_16_stereo +}; + +static const ve_setup_data_template ve_setup_16_uncoupled={ + 3, + rate_mapping_16_uncoupled, + quality_mapping_16, + -1, + 15000, + 19000, + + blocksize_16_short, + blocksize_16_long, + + _psy_tone_masteratt_16, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_16, + _vp_tonemask_adj_16, + _vp_tonemask_adj_16, + + _psy_noiseguards_16, + _psy_noisebias_16_impulse, + _psy_noisebias_16_short, + _psy_noisebias_16_short, + _psy_noisebias_16, + _psy_noise_suppress, + + _psy_compand_8, + _psy_compand_16_mapping, + _psy_compand_16_mapping, + + {_noise_start_16,_noise_start_16}, + { _noise_part_16, _noise_part_16}, + _noise_thresh_16, + + _psy_ath_floater_16, + _psy_ath_abs_16, + + _psy_lowpass_16, + + _psy_global_44, + _global_mapping_16, + _psy_stereo_modes_16, + + _floor_books, + _floor, + 2, + _floor_mapping_16, + + _mapres_template_16_uncoupled +}; diff --git a/code/libvorbis-1.3.4/lib/modes/setup_22.h b/code/libvorbis-1.3.4/lib/modes/setup_22.h new file mode 100644 index 00000000..4fd5e571 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/setup_22.h @@ -0,0 +1,128 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: 22kHz settings + last mod: $Id: setup_22.h 17026 2010-03-25 05:00:27Z xiphmont $ + + ********************************************************************/ + +static const double rate_mapping_22[4]={ + 15000.,20000.,44000.,86000. +}; + +static const double rate_mapping_22_uncoupled[4]={ + 16000.,28000.,50000.,90000. +}; + +static const double _psy_lowpass_22[4]={9.5,11.,30.,99.}; + +static const ve_setup_data_template ve_setup_22_stereo={ + 3, + rate_mapping_22, + quality_mapping_16, + 2, + 19000, + 26000, + + blocksize_16_short, + blocksize_16_long, + + _psy_tone_masteratt_16, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_16, + _vp_tonemask_adj_16, + _vp_tonemask_adj_16, + + _psy_noiseguards_16, + _psy_noisebias_16_impulse, + _psy_noisebias_16_short, + _psy_noisebias_16_short, + _psy_noisebias_16, + _psy_noise_suppress, + + _psy_compand_8, + _psy_compand_16_mapping, + _psy_compand_16_mapping, + + {_noise_start_16,_noise_start_16}, + { _noise_part_16, _noise_part_16}, + _noise_thresh_16, + + _psy_ath_floater_16, + _psy_ath_abs_16, + + _psy_lowpass_22, + + _psy_global_44, + _global_mapping_16, + _psy_stereo_modes_16, + + _floor_books, + _floor, + 2, + _floor_mapping_16, + + _mapres_template_16_stereo +}; + +static const ve_setup_data_template ve_setup_22_uncoupled={ + 3, + rate_mapping_22_uncoupled, + quality_mapping_16, + -1, + 19000, + 26000, + + blocksize_16_short, + blocksize_16_long, + + _psy_tone_masteratt_16, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_16, + _vp_tonemask_adj_16, + _vp_tonemask_adj_16, + + _psy_noiseguards_16, + _psy_noisebias_16_impulse, + _psy_noisebias_16_short, + _psy_noisebias_16_short, + _psy_noisebias_16, + _psy_noise_suppress, + + _psy_compand_8, + _psy_compand_16_mapping, + _psy_compand_16_mapping, + + {_noise_start_16,_noise_start_16}, + { _noise_part_16, _noise_part_16}, + _noise_thresh_16, + + _psy_ath_floater_16, + _psy_ath_abs_16, + + _psy_lowpass_22, + + _psy_global_44, + _global_mapping_16, + _psy_stereo_modes_16, + + _floor_books, + _floor, + 2, + _floor_mapping_16, + + _mapres_template_16_uncoupled +}; diff --git a/code/libvorbis-1.3.4/lib/modes/setup_32.h b/code/libvorbis-1.3.4/lib/modes/setup_32.h new file mode 100644 index 00000000..2275ac96 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/setup_32.h @@ -0,0 +1,132 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: toplevel settings for 32kHz + last mod: $Id: setup_32.h 16894 2010-02-12 20:32:12Z xiphmont $ + + ********************************************************************/ + +static const double rate_mapping_32[12]={ + 18000.,28000.,35000.,45000.,56000.,60000., + 75000.,90000.,100000.,115000.,150000.,190000., +}; + +static const double rate_mapping_32_un[12]={ + 30000.,42000.,52000.,64000.,72000.,78000., + 86000.,92000.,110000.,120000.,140000.,190000., +}; + +static const double _psy_lowpass_32[12]={ + 12.3,13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99. +}; + +static const ve_setup_data_template ve_setup_32_stereo={ + 11, + rate_mapping_32, + quality_mapping_44, + 2, + 26000, + 40000, + + blocksize_short_44, + blocksize_long_44, + + _psy_tone_masteratt_44, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_otherblock, + _vp_tonemask_adj_longblock, + _vp_tonemask_adj_otherblock, + + _psy_noiseguards_44, + _psy_noisebias_impulse, + _psy_noisebias_padding, + _psy_noisebias_trans, + _psy_noisebias_long, + _psy_noise_suppress, + + _psy_compand_44, + _psy_compand_short_mapping, + _psy_compand_long_mapping, + + {_noise_start_short_44,_noise_start_long_44}, + {_noise_part_short_44,_noise_part_long_44}, + _noise_thresh_44, + + _psy_ath_floater, + _psy_ath_abs, + + _psy_lowpass_32, + + _psy_global_44, + _global_mapping_44, + _psy_stereo_modes_44, + + _floor_books, + _floor, + 2, + _floor_mapping_44, + + _mapres_template_44_stereo +}; + +static const ve_setup_data_template ve_setup_32_uncoupled={ + 11, + rate_mapping_32_un, + quality_mapping_44, + -1, + 26000, + 40000, + + blocksize_short_44, + blocksize_long_44, + + _psy_tone_masteratt_44, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_otherblock, + _vp_tonemask_adj_longblock, + _vp_tonemask_adj_otherblock, + + _psy_noiseguards_44, + _psy_noisebias_impulse, + _psy_noisebias_padding, + _psy_noisebias_trans, + _psy_noisebias_long, + _psy_noise_suppress, + + _psy_compand_44, + _psy_compand_short_mapping, + _psy_compand_long_mapping, + + {_noise_start_short_44,_noise_start_long_44}, + {_noise_part_short_44,_noise_part_long_44}, + _noise_thresh_44, + + _psy_ath_floater, + _psy_ath_abs, + + _psy_lowpass_32, + + _psy_global_44, + _global_mapping_44, + NULL, + + _floor_books, + _floor, + 2, + _floor_mapping_44, + + _mapres_template_44_uncoupled +}; diff --git a/code/libvorbis-1.3.4/lib/modes/setup_44.h b/code/libvorbis-1.3.4/lib/modes/setup_44.h new file mode 100644 index 00000000..3b88a89a --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/setup_44.h @@ -0,0 +1,117 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: toplevel settings for 44.1/48kHz + last mod: $Id: setup_44.h 16962 2010-03-11 07:30:34Z xiphmont $ + + ********************************************************************/ + +#include "modes/floor_all.h" +#include "modes/residue_44.h" +#include "modes/psych_44.h" + +static const double rate_mapping_44_stereo[12]={ + 22500.,32000.,40000.,48000.,56000.,64000., + 80000.,96000.,112000.,128000.,160000.,250001. +}; + +static const double quality_mapping_44[12]={ + -.1,.0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1.0 +}; + +static const int blocksize_short_44[11]={ + 512,256,256,256,256,256,256,256,256,256,256 +}; +static const int blocksize_long_44[11]={ + 4096,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048 +}; + +static const double _psy_compand_short_mapping[12]={ + 0.5, 1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2. +}; +static const double _psy_compand_long_mapping[12]={ + 3.5, 4., 4., 4.3, 4.6, 5., 5., 5., 5., 5., 5., 5. +}; + +static const double _global_mapping_44[12]={ + /* 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.5, 4., 4. */ + 0., 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.7, 4., 4. +}; + +static const int _floor_mapping_44a[11]={ + 1,0,0,2,2,4,5,5,5,5,5 +}; + +static const int _floor_mapping_44b[11]={ + 8,7,7,7,7,7,7,7,7,7,7 +}; + +static const int _floor_mapping_44c[11]={ + 10,10,10,10,10,10,10,10,10,10,10 +}; + +static const int *_floor_mapping_44[]={ + _floor_mapping_44a, + _floor_mapping_44b, + _floor_mapping_44c, +}; + +static const ve_setup_data_template ve_setup_44_stereo={ + 11, + rate_mapping_44_stereo, + quality_mapping_44, + 2, + 40000, + 50000, + + blocksize_short_44, + blocksize_long_44, + + _psy_tone_masteratt_44, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_otherblock, + _vp_tonemask_adj_longblock, + _vp_tonemask_adj_otherblock, + + _psy_noiseguards_44, + _psy_noisebias_impulse, + _psy_noisebias_padding, + _psy_noisebias_trans, + _psy_noisebias_long, + _psy_noise_suppress, + + _psy_compand_44, + _psy_compand_short_mapping, + _psy_compand_long_mapping, + + {_noise_start_short_44,_noise_start_long_44}, + {_noise_part_short_44,_noise_part_long_44}, + _noise_thresh_44, + + _psy_ath_floater, + _psy_ath_abs, + + _psy_lowpass_44, + + _psy_global_44, + _global_mapping_44, + _psy_stereo_modes_44, + + _floor_books, + _floor, + 2, + _floor_mapping_44, + + _mapres_template_44_stereo +}; diff --git a/code/libvorbis-1.3.4/lib/modes/setup_44p51.h b/code/libvorbis-1.3.4/lib/modes/setup_44p51.h new file mode 100644 index 00000000..67d99796 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/setup_44p51.h @@ -0,0 +1,74 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: toplevel settings for 44.1/48kHz 5.1 surround modes + last mod: $Id: setup_44p51.h 19013 2013-11-12 04:04:50Z giles $ + + ********************************************************************/ + +#include "modes/residue_44p51.h" + +static const double rate_mapping_44p51[12]={ + 14000.,20000.,28000.,38000.,46000.,54000., + 75000.,96000.,120000.,140000.,180000.,240001. +}; + +static const ve_setup_data_template ve_setup_44_51={ + 11, + rate_mapping_44p51, + quality_mapping_44, + 6, + 40000, + 70000, + + blocksize_short_44, + blocksize_long_44, + + _psy_tone_masteratt_44, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_otherblock, + _vp_tonemask_adj_longblock, + _vp_tonemask_adj_otherblock, + + _psy_noiseguards_44, + _psy_noisebias_impulse, + _psy_noisebias_padding, + _psy_noisebias_trans, + _psy_noisebias_long, + _psy_noise_suppress, + + _psy_compand_44, + _psy_compand_short_mapping, + _psy_compand_long_mapping, + + {_noise_start_short_44,_noise_start_long_44}, + {_noise_part_short_44,_noise_part_long_44}, + _noise_thresh_44, + + _psy_ath_floater, + _psy_ath_abs, + + _psy_lowpass_44, + + _psy_global_44, + _global_mapping_44, + _psy_stereo_modes_44, + + _floor_books, + _floor, + 3, + _floor_mapping_44, + + _mapres_template_44_51 +}; diff --git a/code/libvorbis-1.3.4/lib/modes/setup_44u.h b/code/libvorbis-1.3.4/lib/modes/setup_44u.h new file mode 100644 index 00000000..568b5f89 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/setup_44u.h @@ -0,0 +1,74 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: toplevel settings for 44.1/48kHz uncoupled modes + last mod: $Id: setup_44u.h 16962 2010-03-11 07:30:34Z xiphmont $ + + ********************************************************************/ + +#include "modes/residue_44u.h" + +static const double rate_mapping_44_un[12]={ + 32000.,48000.,60000.,70000.,80000.,86000., + 96000.,110000.,120000.,140000.,160000.,240001. +}; + +static const ve_setup_data_template ve_setup_44_uncoupled={ + 11, + rate_mapping_44_un, + quality_mapping_44, + -1, + 40000, + 50000, + + blocksize_short_44, + blocksize_long_44, + + _psy_tone_masteratt_44, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_otherblock, + _vp_tonemask_adj_longblock, + _vp_tonemask_adj_otherblock, + + _psy_noiseguards_44, + _psy_noisebias_impulse, + _psy_noisebias_padding, + _psy_noisebias_trans, + _psy_noisebias_long, + _psy_noise_suppress, + + _psy_compand_44, + _psy_compand_short_mapping, + _psy_compand_long_mapping, + + {_noise_start_short_44,_noise_start_long_44}, + {_noise_part_short_44,_noise_part_long_44}, + _noise_thresh_44, + + _psy_ath_floater, + _psy_ath_abs, + + _psy_lowpass_44, + + _psy_global_44, + _global_mapping_44, + _psy_stereo_modes_44, + + _floor_books, + _floor, + 2, + _floor_mapping_44, + + _mapres_template_44_uncoupled +}; diff --git a/code/libvorbis-1.3.4/lib/modes/setup_8.h b/code/libvorbis-1.3.4/lib/modes/setup_8.h new file mode 100644 index 00000000..14c48374 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/setup_8.h @@ -0,0 +1,149 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: 8kHz settings + last mod: $Id: setup_8.h 16894 2010-02-12 20:32:12Z xiphmont $ + + ********************************************************************/ + +#include "psych_8.h" +#include "residue_8.h" + +static const int blocksize_8[2]={ + 512,512 +}; + +static const int _floor_mapping_8a[]={ + 6,6 +}; + +static const int *_floor_mapping_8[]={ + _floor_mapping_8a +}; + +static const double rate_mapping_8[3]={ + 6000.,9000.,32000., +}; + +static const double rate_mapping_8_uncoupled[3]={ + 8000.,14000.,42000., +}; + +static const double quality_mapping_8[3]={ + -.1,.0,1. +}; + +static const double _psy_compand_8_mapping[3]={ 0., 1., 1.}; + +static const double _global_mapping_8[3]={ 1., 2., 3. }; + +static const ve_setup_data_template ve_setup_8_stereo={ + 2, + rate_mapping_8, + quality_mapping_8, + 2, + 8000, + 9000, + + blocksize_8, + blocksize_8, + + _psy_tone_masteratt_8, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_8, + NULL, + _vp_tonemask_adj_8, + + _psy_noiseguards_8, + _psy_noisebias_8, + _psy_noisebias_8, + NULL, + NULL, + _psy_noise_suppress, + + _psy_compand_8, + _psy_compand_8_mapping, + NULL, + + {_noise_start_8,_noise_start_8}, + {_noise_part_8,_noise_part_8}, + _noise_thresh_5only, + + _psy_ath_floater_8, + _psy_ath_abs_8, + + _psy_lowpass_8, + + _psy_global_44, + _global_mapping_8, + _psy_stereo_modes_8, + + _floor_books, + _floor, + 1, + _floor_mapping_8, + + _mapres_template_8_stereo +}; + +static const ve_setup_data_template ve_setup_8_uncoupled={ + 2, + rate_mapping_8_uncoupled, + quality_mapping_8, + -1, + 8000, + 9000, + + blocksize_8, + blocksize_8, + + _psy_tone_masteratt_8, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_8, + NULL, + _vp_tonemask_adj_8, + + _psy_noiseguards_8, + _psy_noisebias_8, + _psy_noisebias_8, + NULL, + NULL, + _psy_noise_suppress, + + _psy_compand_8, + _psy_compand_8_mapping, + NULL, + + {_noise_start_8,_noise_start_8}, + {_noise_part_8,_noise_part_8}, + _noise_thresh_5only, + + _psy_ath_floater_8, + _psy_ath_abs_8, + + _psy_lowpass_8, + + _psy_global_44, + _global_mapping_8, + _psy_stereo_modes_8, + + _floor_books, + _floor, + 1, + _floor_mapping_8, + + _mapres_template_8_uncoupled +}; diff --git a/code/libvorbis-1.3.4/lib/modes/setup_X.h b/code/libvorbis-1.3.4/lib/modes/setup_X.h new file mode 100644 index 00000000..a69f5d40 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/modes/setup_X.h @@ -0,0 +1,225 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: catch-all toplevel settings for q modes only + last mod: $Id: setup_X.h 16894 2010-02-12 20:32:12Z xiphmont $ + + ********************************************************************/ + +static const double rate_mapping_X[12]={ + -1.,-1.,-1.,-1.,-1.,-1., + -1.,-1.,-1.,-1.,-1.,-1. +}; + +static const ve_setup_data_template ve_setup_X_stereo={ + 11, + rate_mapping_X, + quality_mapping_44, + 2, + 50000, + 200000, + + blocksize_short_44, + blocksize_long_44, + + _psy_tone_masteratt_44, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_otherblock, + _vp_tonemask_adj_longblock, + _vp_tonemask_adj_otherblock, + + _psy_noiseguards_44, + _psy_noisebias_impulse, + _psy_noisebias_padding, + _psy_noisebias_trans, + _psy_noisebias_long, + _psy_noise_suppress, + + _psy_compand_44, + _psy_compand_short_mapping, + _psy_compand_long_mapping, + + {_noise_start_short_44,_noise_start_long_44}, + {_noise_part_short_44,_noise_part_long_44}, + _noise_thresh_44, + + _psy_ath_floater, + _psy_ath_abs, + + _psy_lowpass_44, + + _psy_global_44, + _global_mapping_44, + _psy_stereo_modes_44, + + _floor_books, + _floor, + 2, + _floor_mapping_44, + + _mapres_template_44_stereo +}; + +static const ve_setup_data_template ve_setup_X_uncoupled={ + 11, + rate_mapping_X, + quality_mapping_44, + -1, + 50000, + 200000, + + blocksize_short_44, + blocksize_long_44, + + _psy_tone_masteratt_44, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_otherblock, + _vp_tonemask_adj_longblock, + _vp_tonemask_adj_otherblock, + + _psy_noiseguards_44, + _psy_noisebias_impulse, + _psy_noisebias_padding, + _psy_noisebias_trans, + _psy_noisebias_long, + _psy_noise_suppress, + + _psy_compand_44, + _psy_compand_short_mapping, + _psy_compand_long_mapping, + + {_noise_start_short_44,_noise_start_long_44}, + {_noise_part_short_44,_noise_part_long_44}, + _noise_thresh_44, + + _psy_ath_floater, + _psy_ath_abs, + + _psy_lowpass_44, + + _psy_global_44, + _global_mapping_44, + NULL, + + _floor_books, + _floor, + 2, + _floor_mapping_44, + + _mapres_template_44_uncoupled +}; + +static const ve_setup_data_template ve_setup_XX_stereo={ + 2, + rate_mapping_X, + quality_mapping_8, + 2, + 0, + 8000, + + blocksize_8, + blocksize_8, + + _psy_tone_masteratt_8, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_8, + NULL, + _vp_tonemask_adj_8, + + _psy_noiseguards_8, + _psy_noisebias_8, + _psy_noisebias_8, + NULL, + NULL, + _psy_noise_suppress, + + _psy_compand_8, + _psy_compand_8_mapping, + NULL, + + {_noise_start_8,_noise_start_8}, + {_noise_part_8,_noise_part_8}, + _noise_thresh_5only, + + _psy_ath_floater_8, + _psy_ath_abs_8, + + _psy_lowpass_8, + + _psy_global_44, + _global_mapping_8, + _psy_stereo_modes_8, + + _floor_books, + _floor, + 1, + _floor_mapping_8, + + _mapres_template_8_stereo +}; + +static const ve_setup_data_template ve_setup_XX_uncoupled={ + 2, + rate_mapping_X, + quality_mapping_8, + -1, + 0, + 8000, + + blocksize_8, + blocksize_8, + + _psy_tone_masteratt_8, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_8, + NULL, + _vp_tonemask_adj_8, + + _psy_noiseguards_8, + _psy_noisebias_8, + _psy_noisebias_8, + NULL, + NULL, + _psy_noise_suppress, + + _psy_compand_8, + _psy_compand_8_mapping, + NULL, + + {_noise_start_8,_noise_start_8}, + {_noise_part_8,_noise_part_8}, + _noise_thresh_5only, + + _psy_ath_floater_8, + _psy_ath_abs_8, + + _psy_lowpass_8, + + _psy_global_44, + _global_mapping_8, + _psy_stereo_modes_8, + + _floor_books, + _floor, + 1, + _floor_mapping_8, + + _mapres_template_8_uncoupled +}; diff --git a/code/libvorbis-1.3.4/lib/os.h b/code/libvorbis-1.3.4/lib/os.h new file mode 100644 index 00000000..79dea351 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/os.h @@ -0,0 +1,190 @@ +#ifndef _OS_H +#define _OS_H +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: #ifdef jail to whip a few platforms into the UNIX ideal. + last mod: $Id: os.h 19031 2013-12-03 19:20:50Z tterribe $ + + ********************************************************************/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +#include "misc.h" + +#ifndef _V_IFDEFJAIL_H_ +# define _V_IFDEFJAIL_H_ + +# ifdef __GNUC__ +# define STIN static __inline__ +# elif _WIN32 +# define STIN static __inline +# else +# define STIN static +# endif + +#ifdef DJGPP +# define rint(x) (floor((x)+0.5f)) +#endif + +#ifndef M_PI +# define M_PI (3.1415926536f) +#endif + +#if defined(_WIN32) && !defined(__SYMBIAN32__) +# include +# define rint(x) (floor((x)+0.5f)) +# define NO_FLOAT_MATH_LIB +# define FAST_HYPOT(a, b) sqrt((a)*(a) + (b)*(b)) +#endif + +#if defined(__SYMBIAN32__) && defined(__WINS__) +void *_alloca(size_t size); +# define alloca _alloca +#endif + +#ifndef FAST_HYPOT +# define FAST_HYPOT hypot +#endif + +#endif + +#ifdef HAVE_ALLOCA_H +# include +#endif + +#ifdef USE_MEMORY_H +# include +#endif + +#ifndef min +# define min(x,y) ((x)>(y)?(y):(x)) +#endif + +#ifndef max +# define max(x,y) ((x)<(y)?(y):(x)) +#endif + + +/* Special i386 GCC implementation */ +#if defined(__i386__) && defined(__GNUC__) && !defined(__BEOS__) +# define VORBIS_FPU_CONTROL +/* both GCC and MSVC are kinda stupid about rounding/casting to int. + Because of encapsulation constraints (GCC can't see inside the asm + block and so we end up doing stupid things like a store/load that + is collectively a noop), we do it this way */ + +/* we must set up the fpu before this works!! */ + +typedef ogg_int16_t vorbis_fpu_control; + +static inline void vorbis_fpu_setround(vorbis_fpu_control *fpu){ + ogg_int16_t ret; + ogg_int16_t temp; + __asm__ __volatile__("fnstcw %0\n\t" + "movw %0,%%dx\n\t" + "andw $62463,%%dx\n\t" + "movw %%dx,%1\n\t" + "fldcw %1\n\t":"=m"(ret):"m"(temp): "dx"); + *fpu=ret; +} + +static inline void vorbis_fpu_restore(vorbis_fpu_control fpu){ + __asm__ __volatile__("fldcw %0":: "m"(fpu)); +} + +/* assumes the FPU is in round mode! */ +static inline int vorbis_ftoi(double f){ /* yes, double! Otherwise, + we get extra fst/fld to + truncate precision */ + int i; + __asm__("fistl %0": "=m"(i) : "t"(f)); + return(i); +} +#endif /* Special i386 GCC implementation */ + + +/* MSVC inline assembly. 32 bit only; inline ASM isn't implemented in the + * 64 bit compiler */ +#if defined(_MSC_VER) && !defined(_WIN64) && !defined(_WIN32_WCE) +# define VORBIS_FPU_CONTROL + +typedef ogg_int16_t vorbis_fpu_control; + +static __inline int vorbis_ftoi(double f){ + int i; + __asm{ + fld f + fistp i + } + return i; +} + +static __inline void vorbis_fpu_setround(vorbis_fpu_control *fpu){ + (void)fpu; +} + +static __inline void vorbis_fpu_restore(vorbis_fpu_control fpu){ + (void)fpu; +} + +#endif /* Special MSVC 32 bit implementation */ + + +/* Optimized code path for x86_64 builds. Uses SSE2 intrinsics. This can be + done safely because all x86_64 CPUs supports SSE2. */ +#if (defined(_MSC_VER) && defined(_WIN64)) || (defined(__GNUC__) && defined (__x86_64__)) +# define VORBIS_FPU_CONTROL + +typedef ogg_int16_t vorbis_fpu_control; + +#include +static __inline int vorbis_ftoi(double f){ + return _mm_cvtsd_si32(_mm_load_sd(&f)); +} + +static __inline void vorbis_fpu_setround(vorbis_fpu_control *fpu){ + (void)fpu; +} + +static __inline void vorbis_fpu_restore(vorbis_fpu_control fpu){ + (void)fpu; +} + +#endif /* Special MSVC x64 implementation */ + + +/* If no special implementation was found for the current compiler / platform, + use the default implementation here: */ +#ifndef VORBIS_FPU_CONTROL + +typedef int vorbis_fpu_control; + +static int vorbis_ftoi(double f){ + /* Note: MSVC and GCC (at least on some systems) round towards zero, thus, + the floor() call is required to ensure correct roudning of + negative numbers */ + return (int)floor(f+.5); +} + +/* We don't have special code for this compiler/arch, so do it the slow way */ +# define vorbis_fpu_setround(vorbis_fpu_control) {} +# define vorbis_fpu_restore(vorbis_fpu_control) {} + +#endif /* default implementation */ + +#endif /* _OS_H */ diff --git a/code/libvorbis-1.3.4/lib/psy.c b/code/libvorbis-1.3.4/lib/psy.c new file mode 100644 index 00000000..f7a44c6d --- /dev/null +++ b/code/libvorbis-1.3.4/lib/psy.c @@ -0,0 +1,1206 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: psychoacoustics not including preecho + last mod: $Id: psy.c 18077 2011-09-02 02:49:00Z giles $ + + ********************************************************************/ + +#include +#include +#include +#include "vorbis/codec.h" +#include "codec_internal.h" + +#include "masking.h" +#include "psy.h" +#include "os.h" +#include "lpc.h" +#include "smallft.h" +#include "scales.h" +#include "misc.h" + +#define NEGINF -9999.f +static const double stereo_threshholds[]={0.0, .5, 1.0, 1.5, 2.5, 4.5, 8.5, 16.5, 9e10}; +static const double stereo_threshholds_limited[]={0.0, .5, 1.0, 1.5, 2.0, 2.5, 4.5, 8.5, 9e10}; + +vorbis_look_psy_global *_vp_global_look(vorbis_info *vi){ + codec_setup_info *ci=vi->codec_setup; + vorbis_info_psy_global *gi=&ci->psy_g_param; + vorbis_look_psy_global *look=_ogg_calloc(1,sizeof(*look)); + + look->channels=vi->channels; + + look->ampmax=-9999.; + look->gi=gi; + return(look); +} + +void _vp_global_free(vorbis_look_psy_global *look){ + if(look){ + memset(look,0,sizeof(*look)); + _ogg_free(look); + } +} + +void _vi_gpsy_free(vorbis_info_psy_global *i){ + if(i){ + memset(i,0,sizeof(*i)); + _ogg_free(i); + } +} + +void _vi_psy_free(vorbis_info_psy *i){ + if(i){ + memset(i,0,sizeof(*i)); + _ogg_free(i); + } +} + +static void min_curve(float *c, + float *c2){ + int i; + for(i=0;ic[i])c[i]=c2[i]; +} + +static void attenuate_curve(float *c,float att){ + int i; + for(i=0;iATH[j+k+ath_offset])min=ATH[j+k+ath_offset]; + }else{ + if(min>ATH[MAX_ATH-1])min=ATH[MAX_ATH-1]; + } + ath[j]=min; + } + + /* copy curves into working space, replicate the 50dB curve to 30 + and 40, replicate the 100dB curve to 110 */ + for(j=0;j<6;j++) + memcpy(workc[i][j+2],tonemasks[i][j],EHMER_MAX*sizeof(*tonemasks[i][j])); + memcpy(workc[i][0],tonemasks[i][0],EHMER_MAX*sizeof(*tonemasks[i][0])); + memcpy(workc[i][1],tonemasks[i][0],EHMER_MAX*sizeof(*tonemasks[i][0])); + + /* apply centered curve boost/decay */ + for(j=0;j0)adj=0.; + if(adj>0. && center_boost<0)adj=0.; + workc[i][j][k]+=adj; + } + } + + /* normalize curves so the driving amplitude is 0dB */ + /* make temp curves with the ATH overlayed */ + for(j=0;j an eighth of an octave and that the eighth + octave values may also be composited. */ + + /* which octave curves will we be compositing? */ + bin=floor(fromOC(i*.5)/binHz); + lo_curve= ceil(toOC(bin*binHz+1)*2); + hi_curve= floor(toOC((bin+1)*binHz)*2); + if(lo_curve>i)lo_curve=i; + if(lo_curve<0)lo_curve=0; + if(hi_curve>=P_BANDS)hi_curve=P_BANDS-1; + + for(m=0;mn)lo_bin=n; + if(lo_binn)hi_bin=n; + + for(;lworkc[k][m][j]) + brute_buffer[l]=workc[k][m][j]; + } + + for(;lworkc[k][m][EHMER_MAX-1]) + brute_buffer[l]=workc[k][m][EHMER_MAX-1]; + + } + + /* be equally paranoid about being valid up to next half ocatve */ + if(i+1n)lo_bin=n; + if(lo_binn)hi_bin=n; + + for(;lworkc[k][m][j]) + brute_buffer[l]=workc[k][m][j]; + } + + for(;lworkc[k][m][EHMER_MAX-1]) + brute_buffer[l]=workc[k][m][EHMER_MAX-1]; + + } + + + for(j=0;j=n){ + ret[i][m][j+2]=-999.; + }else{ + ret[i][m][j+2]=brute_buffer[bin]; + } + } + } + + /* add fenceposts */ + for(j=0;j-200.f)break; + ret[i][m][0]=j; + + for(j=EHMER_MAX-1;j>EHMER_OFFSET+1;j--) + if(ret[i][m][j+2]>-200.f) + break; + ret[i][m][1]=j; + + } + } + + return(ret); +} + +void _vp_psy_init(vorbis_look_psy *p,vorbis_info_psy *vi, + vorbis_info_psy_global *gi,int n,long rate){ + long i,j,lo=-99,hi=1; + long maxoc; + memset(p,0,sizeof(*p)); + + p->eighth_octave_lines=gi->eighth_octave_lines; + p->shiftoc=rint(log(gi->eighth_octave_lines*8.f)/log(2.f))-1; + + p->firstoc=toOC(.25f*rate*.5/n)*(1<<(p->shiftoc+1))-gi->eighth_octave_lines; + maxoc=toOC((n+.25f)*rate*.5/n)*(1<<(p->shiftoc+1))+.5f; + p->total_octave_lines=maxoc-p->firstoc+1; + p->ath=_ogg_malloc(n*sizeof(*p->ath)); + + p->octave=_ogg_malloc(n*sizeof(*p->octave)); + p->bark=_ogg_malloc(n*sizeof(*p->bark)); + p->vi=vi; + p->n=n; + p->rate=rate; + + /* AoTuV HF weighting */ + p->m_val = 1.; + if(rate < 26000) p->m_val = 0; + else if(rate < 38000) p->m_val = .94; /* 32kHz */ + else if(rate > 46000) p->m_val = 1.275; /* 48kHz */ + + /* set up the lookups for a given blocksize and sample rate */ + + for(i=0,j=0;iath[j]=base+100.; + base+=delta; + } + } + } + + for(;jath[j]=p->ath[j-1]; + } + + for(i=0;inoisewindowlominnoisewindowlo);lo++); + + for(;hi<=n && (hinoisewindowhimin || + toBARK(rate/(2*n)*hi)<(bark+vi->noisewindowhi));hi++); + + p->bark[i]=((lo-1)<<16)+(hi-1); + + } + + for(i=0;ioctave[i]=toOC((i+.25f)*.5*rate/n)*(1<<(p->shiftoc+1))+.5f; + + p->tonecurves=setup_tone_curves(vi->toneatt,rate*.5/n,n, + vi->tone_centerboost,vi->tone_decay); + + /* set up rolling noise median */ + p->noiseoffset=_ogg_malloc(P_NOISECURVES*sizeof(*p->noiseoffset)); + for(i=0;inoiseoffset[i]=_ogg_malloc(n*sizeof(**p->noiseoffset)); + + for(i=0;i=P_BANDS-1)halfoc=P_BANDS-1; + inthalfoc=(int)halfoc; + del=halfoc-inthalfoc; + + for(j=0;jnoiseoffset[j][i]= + p->vi->noiseoff[j][inthalfoc]*(1.-del) + + p->vi->noiseoff[j][inthalfoc+1]*del; + + } +#if 0 + { + static int ls=0; + _analysis_output_always("noiseoff0",ls,p->noiseoffset[0],n,1,0,0); + _analysis_output_always("noiseoff1",ls,p->noiseoffset[1],n,1,0,0); + _analysis_output_always("noiseoff2",ls++,p->noiseoffset[2],n,1,0,0); + } +#endif +} + +void _vp_psy_clear(vorbis_look_psy *p){ + int i,j; + if(p){ + if(p->ath)_ogg_free(p->ath); + if(p->octave)_ogg_free(p->octave); + if(p->bark)_ogg_free(p->bark); + if(p->tonecurves){ + for(i=0;itonecurves[i][j]); + } + _ogg_free(p->tonecurves[i]); + } + _ogg_free(p->tonecurves); + } + if(p->noiseoffset){ + for(i=0;inoiseoffset[i]); + } + _ogg_free(p->noiseoffset); + } + memset(p,0,sizeof(*p)); + } +} + +/* octave/(8*eighth_octave_lines) x scale and dB y scale */ +static void seed_curve(float *seed, + const float **curves, + float amp, + int oc, int n, + int linesper,float dBoffset){ + int i,post1; + int seedptr; + const float *posts,*curve; + + int choice=(int)((amp+dBoffset-P_LEVEL_0)*.1f); + choice=max(choice,0); + choice=min(choice,P_LEVELS-1); + posts=curves[choice]; + curve=posts+2; + post1=(int)posts[1]; + seedptr=oc+(posts[0]-EHMER_OFFSET)*linesper-(linesper>>1); + + for(i=posts[0];i0){ + float lin=amp+curve[i]; + if(seed[seedptr]=n)break; + } +} + +static void seed_loop(vorbis_look_psy *p, + const float ***curves, + const float *f, + const float *flr, + float *seed, + float specmax){ + vorbis_info_psy *vi=p->vi; + long n=p->n,i; + float dBoffset=vi->max_curve_dB-specmax; + + /* prime the working vector with peak values */ + + for(i=0;ioctave[i]; + while(i+1octave[i+1]==oc){ + i++; + if(f[i]>max)max=f[i]; + } + + if(max+6.f>flr[i]){ + oc=oc>>p->shiftoc; + + if(oc>=P_BANDS)oc=P_BANDS-1; + if(oc<0)oc=0; + + seed_curve(seed, + curves[oc], + max, + p->octave[i]-p->firstoc, + p->total_octave_lines, + p->eighth_octave_lines, + dBoffset); + } + } +} + +static void seed_chase(float *seeds, int linesper, long n){ + long *posstack=alloca(n*sizeof(*posstack)); + float *ampstack=alloca(n*sizeof(*ampstack)); + long stack=0; + long pos=0; + long i; + + for(i=0;i1 && ampstack[stack-1]<=ampstack[stack-2] && + iampstack[i]){ + endpos=posstack[i+1]; + }else{ + endpos=posstack[i]+linesper+1; /* +1 is important, else bin 0 is + discarded in short frames */ + } + if(endpos>n)endpos=n; + for(;pos +static void max_seeds(vorbis_look_psy *p, + float *seed, + float *flr){ + long n=p->total_octave_lines; + int linesper=p->eighth_octave_lines; + long linpos=0; + long pos; + + seed_chase(seed,linesper,n); /* for masking */ + + pos=p->octave[0]-p->firstoc-(linesper>>1); + + while(linpos+1n){ + float minV=seed[pos]; + long end=((p->octave[linpos]+p->octave[linpos+1])>>1)-p->firstoc; + if(minV>p->vi->tone_abs_limit)minV=p->vi->tone_abs_limit; + while(pos+1<=end){ + pos++; + if((seed[pos]>NEGINF && seed[pos]firstoc; + for(;linposn && p->octave[linpos]<=end;linpos++) + if(flr[linpos]total_octave_lines-1]; + for(;linposn;linpos++) + if(flr[linpos]> 16; + if( lo>=0 ) break; + hi = b[i] & 0xffff; + + tN = N[hi] + N[-lo]; + tX = X[hi] - X[-lo]; + tXX = XX[hi] + XX[-lo]; + tY = Y[hi] + Y[-lo]; + tXY = XY[hi] - XY[-lo]; + + A = tY * tXX - tX * tXY; + B = tN * tXY - tX * tY; + D = tN * tXX - tX * tX; + R = (A + x * B) / D; + if (R < 0.f) + R = 0.f; + + noise[i] = R - offset; + } + + for ( ;; i++, x += 1.f) { + + lo = b[i] >> 16; + hi = b[i] & 0xffff; + if(hi>=n)break; + + tN = N[hi] - N[lo]; + tX = X[hi] - X[lo]; + tXX = XX[hi] - XX[lo]; + tY = Y[hi] - Y[lo]; + tXY = XY[hi] - XY[lo]; + + A = tY * tXX - tX * tXY; + B = tN * tXY - tX * tY; + D = tN * tXX - tX * tX; + R = (A + x * B) / D; + if (R < 0.f) R = 0.f; + + noise[i] = R - offset; + } + for ( ; i < n; i++, x += 1.f) { + + R = (A + x * B) / D; + if (R < 0.f) R = 0.f; + + noise[i] = R - offset; + } + + if (fixed <= 0) return; + + for (i = 0, x = 0.f;; i++, x += 1.f) { + hi = i + fixed / 2; + lo = hi - fixed; + if(lo>=0)break; + + tN = N[hi] + N[-lo]; + tX = X[hi] - X[-lo]; + tXX = XX[hi] + XX[-lo]; + tY = Y[hi] + Y[-lo]; + tXY = XY[hi] - XY[-lo]; + + + A = tY * tXX - tX * tXY; + B = tN * tXY - tX * tY; + D = tN * tXX - tX * tX; + R = (A + x * B) / D; + + if (R - offset < noise[i]) noise[i] = R - offset; + } + for ( ;; i++, x += 1.f) { + + hi = i + fixed / 2; + lo = hi - fixed; + if(hi>=n)break; + + tN = N[hi] - N[lo]; + tX = X[hi] - X[lo]; + tXX = XX[hi] - XX[lo]; + tY = Y[hi] - Y[lo]; + tXY = XY[hi] - XY[lo]; + + A = tY * tXX - tX * tXY; + B = tN * tXY - tX * tY; + D = tN * tXX - tX * tX; + R = (A + x * B) / D; + + if (R - offset < noise[i]) noise[i] = R - offset; + } + for ( ; i < n; i++, x += 1.f) { + R = (A + x * B) / D; + if (R - offset < noise[i]) noise[i] = R - offset; + } +} + +void _vp_noisemask(vorbis_look_psy *p, + float *logmdct, + float *logmask){ + + int i,n=p->n; + float *work=alloca(n*sizeof(*work)); + + bark_noise_hybridmp(n,p->bark,logmdct,logmask, + 140.,-1); + + for(i=0;ibark,work,logmask,0., + p->vi->noisewindowfixed); + + for(i=0;i=NOISE_COMPAND_LEVELS)dB=NOISE_COMPAND_LEVELS-1; + if(dB<0)dB=0; + logmask[i]= work[i]+p->vi->noisecompand[dB]; + } + +} + +void _vp_tonemask(vorbis_look_psy *p, + float *logfft, + float *logmask, + float global_specmax, + float local_specmax){ + + int i,n=p->n; + + float *seed=alloca(sizeof(*seed)*p->total_octave_lines); + float att=local_specmax+p->vi->ath_adjatt; + for(i=0;itotal_octave_lines;i++)seed[i]=NEGINF; + + /* set the ATH (floating below localmax, not global max by a + specified att) */ + if(attvi->ath_maxatt)att=p->vi->ath_maxatt; + + for(i=0;iath[i]+att; + + /* tone masking */ + seed_loop(p,(const float ***)p->tonecurves,logfft,logmask,seed,global_specmax); + max_seeds(p,seed,logmask); + +} + +void _vp_offset_and_mix(vorbis_look_psy *p, + float *noise, + float *tone, + int offset_select, + float *logmask, + float *mdct, + float *logmdct){ + int i,n=p->n; + float de, coeffi, cx;/* AoTuV */ + float toneatt=p->vi->tone_masteratt[offset_select]; + + cx = p->m_val; + + for(i=0;inoiseoffset[offset_select][i]; + if(val>p->vi->noisemaxsupp)val=p->vi->noisemaxsupp; + logmask[i]=max(val,tone[i]+toneatt); + + + /* AoTuV */ + /** @ M1 ** + The following codes improve a noise problem. + A fundamental idea uses the value of masking and carries out + the relative compensation of the MDCT. + However, this code is not perfect and all noise problems cannot be solved. + by Aoyumi @ 2004/04/18 + */ + + if(offset_select == 1) { + coeffi = -17.2; /* coeffi is a -17.2dB threshold */ + val = val - logmdct[i]; /* val == mdct line value relative to floor in dB */ + + if(val > coeffi){ + /* mdct value is > -17.2 dB below floor */ + + de = 1.0-((val-coeffi)*0.005*cx); + /* pro-rated attenuation: + -0.00 dB boost if mdct value is -17.2dB (relative to floor) + -0.77 dB boost if mdct value is 0dB (relative to floor) + -1.64 dB boost if mdct value is +17.2dB (relative to floor) + etc... */ + + if(de < 0) de = 0.0001; + }else + /* mdct value is <= -17.2 dB below floor */ + + de = 1.0-((val-coeffi)*0.0003*cx); + /* pro-rated attenuation: + +0.00 dB atten if mdct value is -17.2dB (relative to floor) + +0.45 dB atten if mdct value is -34.4dB (relative to floor) + etc... */ + + mdct[i] *= de; + + } + } +} + +float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd){ + vorbis_info *vi=vd->vi; + codec_setup_info *ci=vi->codec_setup; + vorbis_info_psy_global *gi=&ci->psy_g_param; + + int n=ci->blocksizes[vd->W]/2; + float secs=(float)n/vi->rate; + + amp+=secs*gi->ampmax_att_per_sec; + if(amp<-9999)amp=-9999; + return(amp); +} + +static float FLOOR1_fromdB_LOOKUP[256]={ + 1.0649863e-07F, 1.1341951e-07F, 1.2079015e-07F, 1.2863978e-07F, + 1.3699951e-07F, 1.4590251e-07F, 1.5538408e-07F, 1.6548181e-07F, + 1.7623575e-07F, 1.8768855e-07F, 1.9988561e-07F, 2.128753e-07F, + 2.2670913e-07F, 2.4144197e-07F, 2.5713223e-07F, 2.7384213e-07F, + 2.9163793e-07F, 3.1059021e-07F, 3.3077411e-07F, 3.5226968e-07F, + 3.7516214e-07F, 3.9954229e-07F, 4.2550680e-07F, 4.5315863e-07F, + 4.8260743e-07F, 5.1396998e-07F, 5.4737065e-07F, 5.8294187e-07F, + 6.2082472e-07F, 6.6116941e-07F, 7.0413592e-07F, 7.4989464e-07F, + 7.9862701e-07F, 8.5052630e-07F, 9.0579828e-07F, 9.6466216e-07F, + 1.0273513e-06F, 1.0941144e-06F, 1.1652161e-06F, 1.2409384e-06F, + 1.3215816e-06F, 1.4074654e-06F, 1.4989305e-06F, 1.5963394e-06F, + 1.7000785e-06F, 1.8105592e-06F, 1.9282195e-06F, 2.0535261e-06F, + 2.1869758e-06F, 2.3290978e-06F, 2.4804557e-06F, 2.6416497e-06F, + 2.8133190e-06F, 2.9961443e-06F, 3.1908506e-06F, 3.3982101e-06F, + 3.6190449e-06F, 3.8542308e-06F, 4.1047004e-06F, 4.3714470e-06F, + 4.6555282e-06F, 4.9580707e-06F, 5.2802740e-06F, 5.6234160e-06F, + 5.9888572e-06F, 6.3780469e-06F, 6.7925283e-06F, 7.2339451e-06F, + 7.7040476e-06F, 8.2047000e-06F, 8.7378876e-06F, 9.3057248e-06F, + 9.9104632e-06F, 1.0554501e-05F, 1.1240392e-05F, 1.1970856e-05F, + 1.2748789e-05F, 1.3577278e-05F, 1.4459606e-05F, 1.5399272e-05F, + 1.6400004e-05F, 1.7465768e-05F, 1.8600792e-05F, 1.9809576e-05F, + 2.1096914e-05F, 2.2467911e-05F, 2.3928002e-05F, 2.5482978e-05F, + 2.7139006e-05F, 2.8902651e-05F, 3.0780908e-05F, 3.2781225e-05F, + 3.4911534e-05F, 3.7180282e-05F, 3.9596466e-05F, 4.2169667e-05F, + 4.4910090e-05F, 4.7828601e-05F, 5.0936773e-05F, 5.4246931e-05F, + 5.7772202e-05F, 6.1526565e-05F, 6.5524908e-05F, 6.9783085e-05F, + 7.4317983e-05F, 7.9147585e-05F, 8.4291040e-05F, 8.9768747e-05F, + 9.5602426e-05F, 0.00010181521F, 0.00010843174F, 0.00011547824F, + 0.00012298267F, 0.00013097477F, 0.00013948625F, 0.00014855085F, + 0.00015820453F, 0.00016848555F, 0.00017943469F, 0.00019109536F, + 0.00020351382F, 0.00021673929F, 0.00023082423F, 0.00024582449F, + 0.00026179955F, 0.00027881276F, 0.00029693158F, 0.00031622787F, + 0.00033677814F, 0.00035866388F, 0.00038197188F, 0.00040679456F, + 0.00043323036F, 0.00046138411F, 0.00049136745F, 0.00052329927F, + 0.00055730621F, 0.00059352311F, 0.00063209358F, 0.00067317058F, + 0.00071691700F, 0.00076350630F, 0.00081312324F, 0.00086596457F, + 0.00092223983F, 0.00098217216F, 0.0010459992F, 0.0011139742F, + 0.0011863665F, 0.0012634633F, 0.0013455702F, 0.0014330129F, + 0.0015261382F, 0.0016253153F, 0.0017309374F, 0.0018434235F, + 0.0019632195F, 0.0020908006F, 0.0022266726F, 0.0023713743F, + 0.0025254795F, 0.0026895994F, 0.0028643847F, 0.0030505286F, + 0.0032487691F, 0.0034598925F, 0.0036847358F, 0.0039241906F, + 0.0041792066F, 0.0044507950F, 0.0047400328F, 0.0050480668F, + 0.0053761186F, 0.0057254891F, 0.0060975636F, 0.0064938176F, + 0.0069158225F, 0.0073652516F, 0.0078438871F, 0.0083536271F, + 0.0088964928F, 0.009474637F, 0.010090352F, 0.010746080F, + 0.011444421F, 0.012188144F, 0.012980198F, 0.013823725F, + 0.014722068F, 0.015678791F, 0.016697687F, 0.017782797F, + 0.018938423F, 0.020169149F, 0.021479854F, 0.022875735F, + 0.024362330F, 0.025945531F, 0.027631618F, 0.029427276F, + 0.031339626F, 0.033376252F, 0.035545228F, 0.037855157F, + 0.040315199F, 0.042935108F, 0.045725273F, 0.048696758F, + 0.051861348F, 0.055231591F, 0.058820850F, 0.062643361F, + 0.066714279F, 0.071049749F, 0.075666962F, 0.080584227F, + 0.085821044F, 0.091398179F, 0.097337747F, 0.10366330F, + 0.11039993F, 0.11757434F, 0.12521498F, 0.13335215F, + 0.14201813F, 0.15124727F, 0.16107617F, 0.17154380F, + 0.18269168F, 0.19456402F, 0.20720788F, 0.22067342F, + 0.23501402F, 0.25028656F, 0.26655159F, 0.28387361F, + 0.30232132F, 0.32196786F, 0.34289114F, 0.36517414F, + 0.38890521F, 0.41417847F, 0.44109412F, 0.46975890F, + 0.50028648F, 0.53279791F, 0.56742212F, 0.60429640F, + 0.64356699F, 0.68538959F, 0.72993007F, 0.77736504F, + 0.82788260F, 0.88168307F, 0.9389798F, 1.F, +}; + +/* this is for per-channel noise normalization */ +static int apsort(const void *a, const void *b){ + float f1=**(float**)a; + float f2=**(float**)b; + return (f1f2); +} + +static void flag_lossless(int limit, float prepoint, float postpoint, float *mdct, + float *floor, int *flag, int i, int jn){ + int j; + for(j=0;j=limit-i ? postpoint : prepoint; + float r = fabs(mdct[j])/floor[j]; + if(rvi; + float **sort = alloca(n*sizeof(*sort)); + int j,count=0; + int start = (vi->normal_p ? vi->normal_start-i : n); + if(start>n)start=n; + + /* force classic behavior where only energy in the current band is considered */ + acc=0.f; + + /* still responsible for populating *out where noise norm not in + effect. There's no need to [re]populate *q in these areas */ + for(j=0;j pointlimit */ + if(ve<.25f && (!flags || j>=limit-i)){ + acc += ve; + sort[count++]=q+j; /* q is fabs(r) for unflagged element */ + }else{ + /* For now: no acc adjustment for nonzero quantization. populate *out and q as this value is final. */ + if(r[j]<0) + out[j] = -rint(sqrt(ve)); + else + out[j] = rint(sqrt(ve)); + q[j] = out[j]*out[j]*f[j]; + } + }/* else{ + again, no energy adjustment for error in nonzero quant-- for now + }*/ + } + + if(count){ + /* noise norm to do */ + qsort(sort,count,sizeof(*sort),apsort); + for(j=0;j=vi->normal_thresh){ + out[k]=unitnorm(r[k]); + acc-=1.f; + q[k]=f[k]; + }else{ + out[k]=0; + q[k]=0.f; + } + } + } + + return acc; +} + +/* Noise normalization, quantization and coupling are not wholly + seperable processes in depth>1 coupling. */ +void _vp_couple_quantize_normalize(int blobno, + vorbis_info_psy_global *g, + vorbis_look_psy *p, + vorbis_info_mapping0 *vi, + float **mdct, + int **iwork, + int *nonzero, + int sliding_lowpass, + int ch){ + + int i; + int n = p->n; + int partition=(p->vi->normal_p ? p->vi->normal_partition : 16); + int limit = g->coupling_pointlimit[p->vi->blockflag][blobno]; + float prepoint=stereo_threshholds[g->coupling_prepointamp[blobno]]; + float postpoint=stereo_threshholds[g->coupling_postpointamp[blobno]]; +#if 0 + float de=0.1*p->m_val; /* a blend of the AoTuV M2 and M3 code here and below */ +#endif + + /* mdct is our raw mdct output, floor not removed. */ + /* inout passes in the ifloor, passes back quantized result */ + + /* unquantized energy (negative indicates amplitude has negative sign) */ + float **raw = alloca(ch*sizeof(*raw)); + + /* dual pupose; quantized energy (if flag set), othersize fabs(raw) */ + float **quant = alloca(ch*sizeof(*quant)); + + /* floor energy */ + float **floor = alloca(ch*sizeof(*floor)); + + /* flags indicating raw/quantized status of elements in raw vector */ + int **flag = alloca(ch*sizeof(*flag)); + + /* non-zero flag working vector */ + int *nz = alloca(ch*sizeof(*nz)); + + /* energy surplus/defecit tracking */ + float *acc = alloca((ch+vi->coupling_steps)*sizeof(*acc)); + + /* The threshold of a stereo is changed with the size of n */ + if(n > 1000) + postpoint=stereo_threshholds_limited[g->coupling_postpointamp[blobno]]; + + raw[0] = alloca(ch*partition*sizeof(**raw)); + quant[0] = alloca(ch*partition*sizeof(**quant)); + floor[0] = alloca(ch*partition*sizeof(**floor)); + flag[0] = alloca(ch*partition*sizeof(**flag)); + + for(i=1;icoupling_steps;i++) + acc[i]=0.f; + + for(i=0;i n-i ? n-i : partition; + int step,track = 0; + + memcpy(nz,nonzero,sizeof(*nz)*ch); + + /* prefill */ + memset(flag[0],0,ch*partition*sizeof(**flag)); + for(k=0;kcoupling_steps;step++){ + int Mi = vi->coupling_mag[step]; + int Ai = vi->coupling_ang[step]; + int *iM = &iwork[Mi][i]; + int *iA = &iwork[Ai][i]; + float *reM = raw[Mi]; + float *reA = raw[Ai]; + float *qeM = quant[Mi]; + float *qeA = quant[Ai]; + float *floorM = floor[Mi]; + float *floorA = floor[Ai]; + int *fM = flag[Mi]; + int *fA = flag[Ai]; + + if(nz[Mi] || nz[Ai]){ + nz[Mi] = nz[Ai] = 1; + + for(j=0;jabs(B)){ + iA[j]=(A>0?A-B:B-A); + }else{ + iA[j]=(B>0?A-B:B-A); + iM[j]=B; + } + + /* collapse two equivalent tuples to one */ + if(iA[j]>=abs(iM[j])*2){ + iA[j]= -iA[j]; + iM[j]= -iM[j]; + } + + } + + }else{ + /* lossy (point) coupling */ + if(jcoupling_steps;i++){ + /* make sure coupling a zero and a nonzero channel results in two + nonzero channels. */ + if(nonzero[vi->coupling_mag[i]] || + nonzero[vi->coupling_ang[i]]){ + nonzero[vi->coupling_mag[i]]=1; + nonzero[vi->coupling_ang[i]]=1; + } + } +} diff --git a/code/libvorbis-1.3.4/lib/psy.h b/code/libvorbis-1.3.4/lib/psy.h new file mode 100644 index 00000000..c1ea8244 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/psy.h @@ -0,0 +1,154 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: random psychoacoustics (not including preecho) + last mod: $Id: psy.h 16946 2010-03-03 16:12:40Z xiphmont $ + + ********************************************************************/ + +#ifndef _V_PSY_H_ +#define _V_PSY_H_ +#include "smallft.h" + +#include "backends.h" +#include "envelope.h" + +#ifndef EHMER_MAX +#define EHMER_MAX 56 +#endif + +/* psychoacoustic setup ********************************************/ +#define P_BANDS 17 /* 62Hz to 16kHz */ +#define P_LEVELS 8 /* 30dB to 100dB */ +#define P_LEVEL_0 30. /* 30 dB */ +#define P_NOISECURVES 3 + +#define NOISE_COMPAND_LEVELS 40 +typedef struct vorbis_info_psy{ + int blockflag; + + float ath_adjatt; + float ath_maxatt; + + float tone_masteratt[P_NOISECURVES]; + float tone_centerboost; + float tone_decay; + float tone_abs_limit; + float toneatt[P_BANDS]; + + int noisemaskp; + float noisemaxsupp; + float noisewindowlo; + float noisewindowhi; + int noisewindowlomin; + int noisewindowhimin; + int noisewindowfixed; + float noiseoff[P_NOISECURVES][P_BANDS]; + float noisecompand[NOISE_COMPAND_LEVELS]; + + float max_curve_dB; + + int normal_p; + int normal_start; + int normal_partition; + double normal_thresh; +} vorbis_info_psy; + +typedef struct{ + int eighth_octave_lines; + + /* for block long/short tuning; encode only */ + float preecho_thresh[VE_BANDS]; + float postecho_thresh[VE_BANDS]; + float stretch_penalty; + float preecho_minenergy; + + float ampmax_att_per_sec; + + /* channel coupling config */ + int coupling_pkHz[PACKETBLOBS]; + int coupling_pointlimit[2][PACKETBLOBS]; + int coupling_prepointamp[PACKETBLOBS]; + int coupling_postpointamp[PACKETBLOBS]; + int sliding_lowpass[2][PACKETBLOBS]; + +} vorbis_info_psy_global; + +typedef struct { + float ampmax; + int channels; + + vorbis_info_psy_global *gi; + int coupling_pointlimit[2][P_NOISECURVES]; +} vorbis_look_psy_global; + + +typedef struct { + int n; + struct vorbis_info_psy *vi; + + float ***tonecurves; + float **noiseoffset; + + float *ath; + long *octave; /* in n.ocshift format */ + long *bark; + + long firstoc; + long shiftoc; + int eighth_octave_lines; /* power of two, please */ + int total_octave_lines; + long rate; /* cache it */ + + float m_val; /* Masking compensation value */ + +} vorbis_look_psy; + +extern void _vp_psy_init(vorbis_look_psy *p,vorbis_info_psy *vi, + vorbis_info_psy_global *gi,int n,long rate); +extern void _vp_psy_clear(vorbis_look_psy *p); +extern void *_vi_psy_dup(void *source); + +extern void _vi_psy_free(vorbis_info_psy *i); +extern vorbis_info_psy *_vi_psy_copy(vorbis_info_psy *i); + +extern void _vp_noisemask(vorbis_look_psy *p, + float *logmdct, + float *logmask); + +extern void _vp_tonemask(vorbis_look_psy *p, + float *logfft, + float *logmask, + float global_specmax, + float local_specmax); + +extern void _vp_offset_and_mix(vorbis_look_psy *p, + float *noise, + float *tone, + int offset_select, + float *logmask, + float *mdct, + float *logmdct); + +extern float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd); + +extern void _vp_couple_quantize_normalize(int blobno, + vorbis_info_psy_global *g, + vorbis_look_psy *p, + vorbis_info_mapping0 *vi, + float **mdct, + int **iwork, + int *nonzero, + int sliding_lowpass, + int ch); + +#endif diff --git a/code/libvorbis-1.3.4/lib/registry.c b/code/libvorbis-1.3.4/lib/registry.c new file mode 100644 index 00000000..3961ed14 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/registry.c @@ -0,0 +1,45 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: registry for time, floor, res backends and channel mappings + last mod: $Id: registry.c 16227 2009-07-08 06:58:46Z xiphmont $ + + ********************************************************************/ + +#include "vorbis/codec.h" +#include "codec_internal.h" +#include "registry.h" +#include "misc.h" +/* seems like major overkill now; the backend numbers will grow into + the infrastructure soon enough */ + +extern const vorbis_func_floor floor0_exportbundle; +extern const vorbis_func_floor floor1_exportbundle; +extern const vorbis_func_residue residue0_exportbundle; +extern const vorbis_func_residue residue1_exportbundle; +extern const vorbis_func_residue residue2_exportbundle; +extern const vorbis_func_mapping mapping0_exportbundle; + +const vorbis_func_floor *const _floor_P[]={ + &floor0_exportbundle, + &floor1_exportbundle, +}; + +const vorbis_func_residue *const _residue_P[]={ + &residue0_exportbundle, + &residue1_exportbundle, + &residue2_exportbundle, +}; + +const vorbis_func_mapping *const _mapping_P[]={ + &mapping0_exportbundle, +}; diff --git a/code/libvorbis-1.3.4/lib/registry.h b/code/libvorbis-1.3.4/lib/registry.h new file mode 100644 index 00000000..3ae04776 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/registry.h @@ -0,0 +1,32 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: registry for time, floor, res backends and channel mappings + last mod: $Id: registry.h 15531 2008-11-24 23:50:06Z xiphmont $ + + ********************************************************************/ + +#ifndef _V_REG_H_ +#define _V_REG_H_ + +#define VI_TRANSFORMB 1 +#define VI_WINDOWB 1 +#define VI_TIMEB 1 +#define VI_FLOORB 2 +#define VI_RESB 3 +#define VI_MAPB 1 + +extern const vorbis_func_floor *const _floor_P[]; +extern const vorbis_func_residue *const _residue_P[]; +extern const vorbis_func_mapping *const _mapping_P[]; + +#endif diff --git a/code/libvorbis-1.3.4/lib/res0.c b/code/libvorbis-1.3.4/lib/res0.c new file mode 100644 index 00000000..97cdbba9 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/res0.c @@ -0,0 +1,899 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: residue backend 0, 1 and 2 implementation + last mod: $Id: res0.c 19031 2013-12-03 19:20:50Z tterribe $ + + ********************************************************************/ + +/* Slow, slow, slow, simpleminded and did I mention it was slow? The + encode/decode loops are coded for clarity and performance is not + yet even a nagging little idea lurking in the shadows. Oh and BTW, + it's slow. */ + +#include +#include +#include +#include +#include "vorbis/codec.h" +#include "codec_internal.h" +#include "registry.h" +#include "codebook.h" +#include "misc.h" +#include "os.h" + +//#define TRAIN_RES 1 +//#define TRAIN_RESAUX 1 + +#if defined(TRAIN_RES) || defined (TRAIN_RESAUX) +#include +#endif + +typedef struct { + vorbis_info_residue0 *info; + + int parts; + int stages; + codebook *fullbooks; + codebook *phrasebook; + codebook ***partbooks; + + int partvals; + int **decodemap; + + long postbits; + long phrasebits; + long frames; + +#if defined(TRAIN_RES) || defined(TRAIN_RESAUX) + int train_seq; + long *training_data[8][64]; + float training_max[8][64]; + float training_min[8][64]; + float tmin; + float tmax; + int submap; +#endif + +} vorbis_look_residue0; + +void res0_free_info(vorbis_info_residue *i){ + vorbis_info_residue0 *info=(vorbis_info_residue0 *)i; + if(info){ + memset(info,0,sizeof(*info)); + _ogg_free(info); + } +} + +void res0_free_look(vorbis_look_residue *i){ + int j; + if(i){ + + vorbis_look_residue0 *look=(vorbis_look_residue0 *)i; + +#ifdef TRAIN_RES + { + int j,k,l; + for(j=0;jparts;j++){ + /*fprintf(stderr,"partition %d: ",j);*/ + for(k=0;k<8;k++) + if(look->training_data[k][j]){ + char buffer[80]; + FILE *of; + codebook *statebook=look->partbooks[j][k]; + + /* long and short into the same bucket by current convention */ + sprintf(buffer,"res_sub%d_part%d_pass%d.vqd",look->submap,j,k); + of=fopen(buffer,"a"); + + for(l=0;lentries;l++) + fprintf(of,"%d:%ld\n",l,look->training_data[k][j][l]); + + fclose(of); + + /*fprintf(stderr,"%d(%.2f|%.2f) ",k, + look->training_min[k][j],look->training_max[k][j]);*/ + + _ogg_free(look->training_data[k][j]); + look->training_data[k][j]=NULL; + } + /*fprintf(stderr,"\n");*/ + } + } + fprintf(stderr,"min/max residue: %g::%g\n",look->tmin,look->tmax); + + /*fprintf(stderr,"residue bit usage %f:%f (%f total)\n", + (float)look->phrasebits/look->frames, + (float)look->postbits/look->frames, + (float)(look->postbits+look->phrasebits)/look->frames);*/ +#endif + + + /*vorbis_info_residue0 *info=look->info; + + fprintf(stderr, + "%ld frames encoded in %ld phrasebits and %ld residue bits " + "(%g/frame) \n",look->frames,look->phrasebits, + look->resbitsflat, + (look->phrasebits+look->resbitsflat)/(float)look->frames); + + for(j=0;jparts;j++){ + long acc=0; + fprintf(stderr,"\t[%d] == ",j); + for(k=0;kstages;k++) + if((info->secondstages[j]>>k)&1){ + fprintf(stderr,"%ld,",look->resbits[j][k]); + acc+=look->resbits[j][k]; + } + + fprintf(stderr,":: (%ld vals) %1.2fbits/sample\n",look->resvals[j], + acc?(float)acc/(look->resvals[j]*info->grouping):0); + } + fprintf(stderr,"\n");*/ + + for(j=0;jparts;j++) + if(look->partbooks[j])_ogg_free(look->partbooks[j]); + _ogg_free(look->partbooks); + for(j=0;jpartvals;j++) + _ogg_free(look->decodemap[j]); + _ogg_free(look->decodemap); + + memset(look,0,sizeof(*look)); + _ogg_free(look); + } +} + +static int ilog(unsigned int v){ + int ret=0; + while(v){ + ret++; + v>>=1; + } + return(ret); +} + +static int icount(unsigned int v){ + int ret=0; + while(v){ + ret+=v&1; + v>>=1; + } + return(ret); +} + + +void res0_pack(vorbis_info_residue *vr,oggpack_buffer *opb){ + vorbis_info_residue0 *info=(vorbis_info_residue0 *)vr; + int j,acc=0; + oggpack_write(opb,info->begin,24); + oggpack_write(opb,info->end,24); + + oggpack_write(opb,info->grouping-1,24); /* residue vectors to group and + code with a partitioned book */ + oggpack_write(opb,info->partitions-1,6); /* possible partition choices */ + oggpack_write(opb,info->groupbook,8); /* group huffman book */ + + /* secondstages is a bitmask; as encoding progresses pass by pass, a + bitmask of one indicates this partition class has bits to write + this pass */ + for(j=0;jpartitions;j++){ + if(ilog(info->secondstages[j])>3){ + /* yes, this is a minor hack due to not thinking ahead */ + oggpack_write(opb,info->secondstages[j],3); + oggpack_write(opb,1,1); + oggpack_write(opb,info->secondstages[j]>>3,5); + }else + oggpack_write(opb,info->secondstages[j],4); /* trailing zero */ + acc+=icount(info->secondstages[j]); + } + for(j=0;jbooklist[j],8); + +} + +/* vorbis_info is for range checking */ +vorbis_info_residue *res0_unpack(vorbis_info *vi,oggpack_buffer *opb){ + int j,acc=0; + vorbis_info_residue0 *info=_ogg_calloc(1,sizeof(*info)); + codec_setup_info *ci=vi->codec_setup; + + info->begin=oggpack_read(opb,24); + info->end=oggpack_read(opb,24); + info->grouping=oggpack_read(opb,24)+1; + info->partitions=oggpack_read(opb,6)+1; + info->groupbook=oggpack_read(opb,8); + + /* check for premature EOP */ + if(info->groupbook<0)goto errout; + + for(j=0;jpartitions;j++){ + int cascade=oggpack_read(opb,3); + int cflag=oggpack_read(opb,1); + if(cflag<0) goto errout; + if(cflag){ + int c=oggpack_read(opb,5); + if(c<0) goto errout; + cascade|=(c<<3); + } + info->secondstages[j]=cascade; + + acc+=icount(cascade); + } + for(j=0;jbooklist[j]=book; + } + + if(info->groupbook>=ci->books)goto errout; + for(j=0;jbooklist[j]>=ci->books)goto errout; + if(ci->book_param[info->booklist[j]]->maptype==0)goto errout; + } + + /* verify the phrasebook is not specifying an impossible or + inconsistent partitioning scheme. */ + /* modify the phrasebook ranging check from r16327; an early beta + encoder had a bug where it used an oversized phrasebook by + accident. These files should continue to be playable, but don't + allow an exploit */ + { + int entries = ci->book_param[info->groupbook]->entries; + int dim = ci->book_param[info->groupbook]->dim; + int partvals = 1; + if (dim<1) goto errout; + while(dim>0){ + partvals *= info->partitions; + if(partvals > entries) goto errout; + dim--; + } + info->partvals = partvals; + } + + return(info); + errout: + res0_free_info(info); + return(NULL); +} + +vorbis_look_residue *res0_look(vorbis_dsp_state *vd, + vorbis_info_residue *vr){ + vorbis_info_residue0 *info=(vorbis_info_residue0 *)vr; + vorbis_look_residue0 *look=_ogg_calloc(1,sizeof(*look)); + codec_setup_info *ci=vd->vi->codec_setup; + + int j,k,acc=0; + int dim; + int maxstage=0; + look->info=info; + + look->parts=info->partitions; + look->fullbooks=ci->fullbooks; + look->phrasebook=ci->fullbooks+info->groupbook; + dim=look->phrasebook->dim; + + look->partbooks=_ogg_calloc(look->parts,sizeof(*look->partbooks)); + + for(j=0;jparts;j++){ + int stages=ilog(info->secondstages[j]); + if(stages){ + if(stages>maxstage)maxstage=stages; + look->partbooks[j]=_ogg_calloc(stages,sizeof(*look->partbooks[j])); + for(k=0;ksecondstages[j]&(1<partbooks[j][k]=ci->fullbooks+info->booklist[acc++]; +#ifdef TRAIN_RES + look->training_data[k][j]=_ogg_calloc(look->partbooks[j][k]->entries, + sizeof(***look->training_data)); +#endif + } + } + } + + look->partvals=1; + for(j=0;jpartvals*=look->parts; + + look->stages=maxstage; + look->decodemap=_ogg_malloc(look->partvals*sizeof(*look->decodemap)); + for(j=0;jpartvals;j++){ + long val=j; + long mult=look->partvals/look->parts; + look->decodemap[j]=_ogg_malloc(dim*sizeof(*look->decodemap[j])); + for(k=0;kparts; + look->decodemap[j][k]=deco; + } + } +#if defined(TRAIN_RES) || defined (TRAIN_RESAUX) + { + static int train_seq=0; + look->train_seq=train_seq++; + } +#endif + return(look); +} + +/* break an abstraction and copy some code for performance purposes */ +static int local_book_besterror(codebook *book,int *a){ + int dim=book->dim; + int i,j,o; + int minval=book->minval; + int del=book->delta; + int qv=book->quantvals; + int ze=(qv>>1); + int index=0; + /* assumes integer/centered encoder codebook maptype 1 no more than dim 8 */ + int p[8]={0,0,0,0,0,0,0,0}; + + if(del!=1){ + for(i=0,o=dim;i>1))/del; + int m = (v=qv?qv-1:m)); + p[o]=v*del+minval; + } + }else{ + for(i=0,o=dim;i=qv?qv-1:m)); + p[o]=v*del+minval; + } + } + + if(book->c->lengthlist[index]<=0){ + const static_codebook *c=book->c; + int best=-1; + /* assumes integer/centered encoder codebook maptype 1 no more than dim 8 */ + int e[8]={0,0,0,0,0,0,0,0}; + int maxval = book->minval + book->delta*(book->quantvals-1); + for(i=0;ientries;i++){ + if(c->lengthlist[i]>0){ + int this=0; + for(j=0;j=maxval) + e[j++]=0; + if(e[j]>=0) + e[j]+=book->delta; + e[j]= -e[j]; + } + } + + if(index>-1){ + for(i=0;idim; + int step=n/dim; + + for(i=0;i=0) + acc[entry]++; +#endif + + bits+=vorbis_book_encode(book,entry,opb); + + } + + return(bits); +} + +static long **_01class(vorbis_block *vb,vorbis_look_residue *vl, + int **in,int ch){ + long i,j,k; + vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl; + vorbis_info_residue0 *info=look->info; + + /* move all this setup out later */ + int samples_per_partition=info->grouping; + int possible_partitions=info->partitions; + int n=info->end-info->begin; + + int partvals=n/samples_per_partition; + long **partword=_vorbis_block_alloc(vb,ch*sizeof(*partword)); + float scale=100./samples_per_partition; + + /* we find the partition type for each partition of each + channel. We'll go back and do the interleaved encoding in a + bit. For now, clarity */ + + for(i=0;ibegin; + for(j=0;jmax)max=abs(in[j][offset+k]); + ent+=abs(in[j][offset+k]); + } + ent*=scale; + + for(k=0;kclassmetric1[k] && + (info->classmetric2[k]<0 || entclassmetric2[k])) + break; + + partword[j][i]=k; + } + } + +#ifdef TRAIN_RESAUX + { + FILE *of; + char buffer[80]; + + for(i=0;itrain_seq); + of=fopen(buffer,"a"); + for(j=0;jframes++; + + return(partword); +} + +/* designed for stereo or other modes where the partition size is an + integer multiple of the number of channels encoded in the current + submap */ +static long **_2class(vorbis_block *vb,vorbis_look_residue *vl,int **in, + int ch){ + long i,j,k,l; + vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl; + vorbis_info_residue0 *info=look->info; + + /* move all this setup out later */ + int samples_per_partition=info->grouping; + int possible_partitions=info->partitions; + int n=info->end-info->begin; + + int partvals=n/samples_per_partition; + long **partword=_vorbis_block_alloc(vb,sizeof(*partword)); + +#if defined(TRAIN_RES) || defined (TRAIN_RESAUX) + FILE *of; + char buffer[80]; +#endif + + partword[0]=_vorbis_block_alloc(vb,partvals*sizeof(*partword[0])); + memset(partword[0],0,partvals*sizeof(*partword[0])); + + for(i=0,l=info->begin/ch;imagmax)magmax=abs(in[0][l]); + for(k=1;kangmax)angmax=abs(in[k][l]); + l++; + } + + for(j=0;jclassmetric1[j] && + angmax<=info->classmetric2[j]) + break; + + partword[0][i]=j; + + } + +#ifdef TRAIN_RESAUX + sprintf(buffer,"resaux_%d.vqd",look->train_seq); + of=fopen(buffer,"a"); + for(i=0;iframes++; + + return(partword); +} + +static int _01forward(oggpack_buffer *opb, + vorbis_look_residue *vl, + int **in,int ch, + long **partword, +#ifdef TRAIN_RES + int (*encode)(oggpack_buffer *,int *,int, + codebook *,long *), + int submap +#else + int (*encode)(oggpack_buffer *,int *,int, + codebook *) +#endif +){ + long i,j,k,s; + vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl; + vorbis_info_residue0 *info=look->info; + +#ifdef TRAIN_RES + look->submap=submap; +#endif + + /* move all this setup out later */ + int samples_per_partition=info->grouping; + int possible_partitions=info->partitions; + int partitions_per_word=look->phrasebook->dim; + int n=info->end-info->begin; + + int partvals=n/samples_per_partition; + long resbits[128]; + long resvals[128]; + +#ifdef TRAIN_RES + for(i=0;ibegin;jend;j++){ + if(in[i][j]>look->tmax)look->tmax=in[i][j]; + if(in[i][j]tmin)look->tmin=in[i][j]; + } +#endif + + memset(resbits,0,sizeof(resbits)); + memset(resvals,0,sizeof(resvals)); + + /* we code the partition words for each channel, then the residual + words for a partition per channel until we've written all the + residual words for that partition word. Then write the next + partition channel words... */ + + for(s=0;sstages;s++){ + + for(i=0;iphrasebook->entries) + look->phrasebits+=vorbis_book_encode(look->phrasebook,val,opb); +#if 0 /*def TRAIN_RES*/ + else + fprintf(stderr,"!"); +#endif + + } + } + + /* now we encode interleaved residual values for the partitions */ + for(k=0;kbegin; + + for(j=0;jsecondstages[partword[j][i]]&(1<partbooks[partword[j][i]][s]; + if(statebook){ + int ret; +#ifdef TRAIN_RES + long *accumulator=NULL; + accumulator=look->training_data[s][partword[j][i]]; + { + int l; + int *samples=in[j]+offset; + for(l=0;ltraining_min[s][partword[j][i]]) + look->training_min[s][partword[j][i]]=samples[l]; + if(samples[l]>look->training_max[s][partword[j][i]]) + look->training_max[s][partword[j][i]]=samples[l]; + } + } + ret=encode(opb,in[j]+offset,samples_per_partition, + statebook,accumulator); +#else + ret=encode(opb,in[j]+offset,samples_per_partition, + statebook); +#endif + + look->postbits+=ret; + resbits[partword[j][i]]+=ret; + } + } + } + } + } + } + + return(0); +} + +/* a truncated packet here just means 'stop working'; it's not an error */ +static int _01inverse(vorbis_block *vb,vorbis_look_residue *vl, + float **in,int ch, + long (*decodepart)(codebook *, float *, + oggpack_buffer *,int)){ + + long i,j,k,l,s; + vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl; + vorbis_info_residue0 *info=look->info; + + /* move all this setup out later */ + int samples_per_partition=info->grouping; + int partitions_per_word=look->phrasebook->dim; + int max=vb->pcmend>>1; + int end=(info->endend:max); + int n=end-info->begin; + + if(n>0){ + int partvals=n/samples_per_partition; + int partwords=(partvals+partitions_per_word-1)/partitions_per_word; + int ***partword=alloca(ch*sizeof(*partword)); + + for(j=0;jstages;s++){ + + /* each loop decodes on partition codeword containing + partitions_per_word partitions */ + for(i=0,l=0;iphrasebook,&vb->opb); + + if(temp==-1 || temp>=info->partvals)goto eopbreak; + partword[j][l]=look->decodemap[temp]; + if(partword[j][l]==NULL)goto errout; + } + } + + /* now we decode residual values for the partitions */ + for(k=0;kbegin+i*samples_per_partition; + if(info->secondstages[partword[j][l][k]]&(1<partbooks[partword[j][l][k]][s]; + if(stagebook){ + if(decodepart(stagebook,in[j]+offset,&vb->opb, + samples_per_partition)==-1)goto eopbreak; + } + } + } + } + } + } + errout: + eopbreak: + return(0); +} + +int res0_inverse(vorbis_block *vb,vorbis_look_residue *vl, + float **in,int *nonzero,int ch){ + int i,used=0; + for(i=0;ipcmend/2,used=0; + + /* don't duplicate the code; use a working vector hack for now and + reshape ourselves into a single channel res1 */ + /* ugly; reallocs for each coupling pass :-( */ + int *work=_vorbis_block_alloc(vb,ch*n*sizeof(*work)); + for(i=0;iinfo; + + /* move all this setup out later */ + int samples_per_partition=info->grouping; + int partitions_per_word=look->phrasebook->dim; + int max=(vb->pcmend*ch)>>1; + int end=(info->endend:max); + int n=end-info->begin; + + if(n>0){ + int partvals=n/samples_per_partition; + int partwords=(partvals+partitions_per_word-1)/partitions_per_word; + int **partword=_vorbis_block_alloc(vb,partwords*sizeof(*partword)); + + for(i=0;istages;s++){ + for(i=0,l=0;iphrasebook,&vb->opb); + if(temp==-1 || temp>=info->partvals)goto eopbreak; + partword[l]=look->decodemap[temp]; + if(partword[l]==NULL)goto errout; + } + + /* now we decode residual values for the partitions */ + for(k=0;ksecondstages[partword[l][k]]&(1<partbooks[partword[l][k]][s]; + + if(stagebook){ + if(vorbis_book_decodevv_add(stagebook,in, + i*samples_per_partition+info->begin,ch, + &vb->opb,samples_per_partition)==-1) + goto eopbreak; + } + } + } + } + } + errout: + eopbreak: + return(0); +} + + +const vorbis_func_residue residue0_exportbundle={ + NULL, + &res0_unpack, + &res0_look, + &res0_free_info, + &res0_free_look, + NULL, + NULL, + &res0_inverse +}; + +const vorbis_func_residue residue1_exportbundle={ + &res0_pack, + &res0_unpack, + &res0_look, + &res0_free_info, + &res0_free_look, + &res1_class, + &res1_forward, + &res1_inverse +}; + +const vorbis_func_residue residue2_exportbundle={ + &res0_pack, + &res0_unpack, + &res0_look, + &res0_free_info, + &res0_free_look, + &res2_class, + &res2_forward, + &res2_inverse +}; diff --git a/code/libvorbis-1.3.4/lib/scales.h b/code/libvorbis-1.3.4/lib/scales.h new file mode 100644 index 00000000..613f796e --- /dev/null +++ b/code/libvorbis-1.3.4/lib/scales.h @@ -0,0 +1,90 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: linear scale -> dB, Bark and Mel scales + last mod: $Id: scales.h 16227 2009-07-08 06:58:46Z xiphmont $ + + ********************************************************************/ + +#ifndef _V_SCALES_H_ +#define _V_SCALES_H_ + +#include +#include "os.h" + +#ifdef _MSC_VER +/* MS Visual Studio doesn't have C99 inline keyword. */ +#define inline __inline +#endif + +/* 20log10(x) */ +#define VORBIS_IEEE_FLOAT32 1 +#ifdef VORBIS_IEEE_FLOAT32 + +static inline float unitnorm(float x){ + union { + ogg_uint32_t i; + float f; + } ix; + ix.f = x; + ix.i = (ix.i & 0x80000000U) | (0x3f800000U); + return ix.f; +} + +/* Segher was off (too high) by ~ .3 decibel. Center the conversion correctly. */ +static inline float todB(const float *x){ + union { + ogg_uint32_t i; + float f; + } ix; + ix.f = *x; + ix.i = ix.i&0x7fffffff; + return (float)(ix.i * 7.17711438e-7f -764.6161886f); +} + +#define todB_nn(x) todB(x) + +#else + +static float unitnorm(float x){ + if(x<0)return(-1.f); + return(1.f); +} + +#define todB(x) (*(x)==0?-400.f:log(*(x)**(x))*4.34294480f) +#define todB_nn(x) (*(x)==0.f?-400.f:log(*(x))*8.6858896f) + +#endif + +#define fromdB(x) (exp((x)*.11512925f)) + +/* The bark scale equations are approximations, since the original + table was somewhat hand rolled. The below are chosen to have the + best possible fit to the rolled tables, thus their somewhat odd + appearance (these are more accurate and over a longer range than + the oft-quoted bark equations found in the texts I have). The + approximations are valid from 0 - 30kHz (nyquist) or so. + + all f in Hz, z in Bark */ + +#define toBARK(n) (13.1f*atan(.00074f*(n))+2.24f*atan((n)*(n)*1.85e-8f)+1e-4f*(n)) +#define fromBARK(z) (102.f*(z)-2.f*pow(z,2.f)+.4f*pow(z,3.f)+pow(1.46f,z)-1.f) +#define toMEL(n) (log(1.f+(n)*.001f)*1442.695f) +#define fromMEL(m) (1000.f*exp((m)/1442.695f)-1000.f) + +/* Frequency to octave. We arbitrarily declare 63.5 Hz to be octave + 0.0 */ + +#define toOC(n) (log(n)*1.442695f-5.965784f) +#define fromOC(o) (exp(((o)+5.965784f)*.693147f)) + +#endif diff --git a/code/libvorbis-1.3.4/lib/sharedbook.c b/code/libvorbis-1.3.4/lib/sharedbook.c new file mode 100644 index 00000000..250717da --- /dev/null +++ b/code/libvorbis-1.3.4/lib/sharedbook.c @@ -0,0 +1,579 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: basic shared codebook operations + last mod: $Id: sharedbook.c 19057 2014-01-22 12:32:31Z xiphmont $ + + ********************************************************************/ + +#include +#include +#include +#include +#include "os.h" +#include "misc.h" +#include "vorbis/codec.h" +#include "codebook.h" +#include "scales.h" + +/**** pack/unpack helpers ******************************************/ +int _ilog(unsigned int v){ + int ret=0; + while(v){ + ret++; + v>>=1; + } + return(ret); +} + +/* 32 bit float (not IEEE; nonnormalized mantissa + + biased exponent) : neeeeeee eeemmmmm mmmmmmmm mmmmmmmm + Why not IEEE? It's just not that important here. */ + +#define VQ_FEXP 10 +#define VQ_FMAN 21 +#define VQ_FEXP_BIAS 768 /* bias toward values smaller than 1. */ + +/* doesn't currently guard under/overflow */ +long _float32_pack(float val){ + int sign=0; + long exp; + long mant; + if(val<0){ + sign=0x80000000; + val= -val; + } + exp= floor(log(val)/log(2.f)+.001); //+epsilon + mant=rint(ldexp(val,(VQ_FMAN-1)-exp)); + exp=(exp+VQ_FEXP_BIAS)<>VQ_FMAN; + if(sign)mant= -mant; + return(ldexp(mant,exp-(VQ_FMAN-1)-VQ_FEXP_BIAS)); +} + +/* given a list of word lengths, generate a list of codewords. Works + for length ordered or unordered, always assigns the lowest valued + codewords first. Extended to handle unused entries (length 0) */ +ogg_uint32_t *_make_words(char *l,long n,long sparsecount){ + long i,j,count=0; + ogg_uint32_t marker[33]; + ogg_uint32_t *r=_ogg_malloc((sparsecount?sparsecount:n)*sizeof(*r)); + memset(marker,0,sizeof(marker)); + + for(i=0;i0){ + ogg_uint32_t entry=marker[length]; + + /* when we claim a node for an entry, we also claim the nodes + below it (pruning off the imagined tree that may have dangled + from it) as well as blocking the use of any nodes directly + above for leaves */ + + /* update ourself */ + if(length<32 && (entry>>length)){ + /* error condition; the lengths must specify an overpopulated tree */ + _ogg_free(r); + return(NULL); + } + r[count++]=entry; + + /* Look to see if the next shorter marker points to the node + above. if so, update it and repeat. */ + { + for(j=length;j>0;j--){ + + if(marker[j]&1){ + /* have to jump branches */ + if(j==1) + marker[1]++; + else + marker[j]=marker[j-1]<<1; + break; /* invariant says next upper marker would already + have been moved if it was on the same path */ + } + marker[j]++; + } + } + + /* prune the tree; the implicit invariant says all the longer + markers were dangling from our just-taken node. Dangle them + from our *new* node. */ + for(j=length+1;j<33;j++) + if((marker[j]>>1) == entry){ + entry=marker[j]; + marker[j]=marker[j-1]<<1; + }else + break; + }else + if(sparsecount==0)count++; + } + + /* sanity check the huffman tree; an underpopulated tree must be + rejected. The only exception is the one-node pseudo-nil tree, + which appears to be underpopulated because the tree doesn't + really exist; there's only one possible 'codeword' or zero bits, + but the above tree-gen code doesn't mark that. */ + if(sparsecount != 1){ + for(i=1;i<33;i++) + if(marker[i] & (0xffffffffUL>>(32-i))){ + _ogg_free(r); + return(NULL); + } + } + + /* bitreverse the words because our bitwise packer/unpacker is LSb + endian */ + for(i=0,count=0;i>j)&1; + } + + if(sparsecount){ + if(l[i]) + r[count++]=temp; + }else + r[count++]=temp; + } + + return(r); +} + +/* there might be a straightforward one-line way to do the below + that's portable and totally safe against roundoff, but I haven't + thought of it. Therefore, we opt on the side of caution */ +long _book_maptype1_quantvals(const static_codebook *b){ + long vals=floor(pow((float)b->entries,1.f/b->dim)); + + /* the above *should* be reliable, but we'll not assume that FP is + ever reliable when bitstream sync is at stake; verify via integer + means that vals really is the greatest value of dim for which + vals^b->bim <= b->entries */ + /* treat the above as an initial guess */ + while(1){ + long acc=1; + long acc1=1; + int i; + for(i=0;idim;i++){ + acc*=vals; + acc1*=vals+1; + } + if(acc<=b->entries && acc1>b->entries){ + return(vals); + }else{ + if(acc>b->entries){ + vals--; + }else{ + vals++; + } + } + } +} + +/* unpack the quantized list of values for encode/decode ***********/ +/* we need to deal with two map types: in map type 1, the values are + generated algorithmically (each column of the vector counts through + the values in the quant vector). in map type 2, all the values came + in in an explicit list. Both value lists must be unpacked */ +float *_book_unquantize(const static_codebook *b,int n,int *sparsemap){ + long j,k,count=0; + if(b->maptype==1 || b->maptype==2){ + int quantvals; + float mindel=_float32_unpack(b->q_min); + float delta=_float32_unpack(b->q_delta); + float *r=_ogg_calloc(n*b->dim,sizeof(*r)); + + /* maptype 1 and 2 both use a quantized value vector, but + different sizes */ + switch(b->maptype){ + case 1: + /* most of the time, entries%dimensions == 0, but we need to be + well defined. We define that the possible vales at each + scalar is values == entries/dim. If entries%dim != 0, we'll + have 'too few' values (values*dimentries;j++){ + if((sparsemap && b->lengthlist[j]) || !sparsemap){ + float last=0.f; + int indexdiv=1; + for(k=0;kdim;k++){ + int index= (j/indexdiv)%quantvals; + float val=b->quantlist[index]; + val=fabs(val)*delta+mindel+last; + if(b->q_sequencep)last=val; + if(sparsemap) + r[sparsemap[count]*b->dim+k]=val; + else + r[count*b->dim+k]=val; + indexdiv*=quantvals; + } + count++; + } + + } + break; + case 2: + for(j=0;jentries;j++){ + if((sparsemap && b->lengthlist[j]) || !sparsemap){ + float last=0.f; + + for(k=0;kdim;k++){ + float val=b->quantlist[j*b->dim+k]; + val=fabs(val)*delta+mindel+last; + if(b->q_sequencep)last=val; + if(sparsemap) + r[sparsemap[count]*b->dim+k]=val; + else + r[count*b->dim+k]=val; + } + count++; + } + } + break; + } + + return(r); + } + return(NULL); +} + +void vorbis_staticbook_destroy(static_codebook *b){ + if(b->allocedp){ + if(b->quantlist)_ogg_free(b->quantlist); + if(b->lengthlist)_ogg_free(b->lengthlist); + memset(b,0,sizeof(*b)); + _ogg_free(b); + } /* otherwise, it is in static memory */ +} + +void vorbis_book_clear(codebook *b){ + /* static book is not cleared; we're likely called on the lookup and + the static codebook belongs to the info struct */ + if(b->valuelist)_ogg_free(b->valuelist); + if(b->codelist)_ogg_free(b->codelist); + + if(b->dec_index)_ogg_free(b->dec_index); + if(b->dec_codelengths)_ogg_free(b->dec_codelengths); + if(b->dec_firsttable)_ogg_free(b->dec_firsttable); + + memset(b,0,sizeof(*b)); +} + +int vorbis_book_init_encode(codebook *c,const static_codebook *s){ + + memset(c,0,sizeof(*c)); + c->c=s; + c->entries=s->entries; + c->used_entries=s->entries; + c->dim=s->dim; + c->codelist=_make_words(s->lengthlist,s->entries,0); + //c->valuelist=_book_unquantize(s,s->entries,NULL); + c->quantvals=_book_maptype1_quantvals(s); + c->minval=(int)rint(_float32_unpack(s->q_min)); + c->delta=(int)rint(_float32_unpack(s->q_delta)); + + return(0); +} + +static ogg_uint32_t bitreverse(ogg_uint32_t x){ + x= ((x>>16)&0x0000ffffUL) | ((x<<16)&0xffff0000UL); + x= ((x>> 8)&0x00ff00ffUL) | ((x<< 8)&0xff00ff00UL); + x= ((x>> 4)&0x0f0f0f0fUL) | ((x<< 4)&0xf0f0f0f0UL); + x= ((x>> 2)&0x33333333UL) | ((x<< 2)&0xccccccccUL); + return((x>> 1)&0x55555555UL) | ((x<< 1)&0xaaaaaaaaUL); +} + +static int sort32a(const void *a,const void *b){ + return ( **(ogg_uint32_t **)a>**(ogg_uint32_t **)b)- + ( **(ogg_uint32_t **)a<**(ogg_uint32_t **)b); +} + +/* decode codebook arrangement is more heavily optimized than encode */ +int vorbis_book_init_decode(codebook *c,const static_codebook *s){ + int i,j,n=0,tabn; + int *sortindex; + memset(c,0,sizeof(*c)); + + /* count actually used entries */ + for(i=0;ientries;i++) + if(s->lengthlist[i]>0) + n++; + + c->entries=s->entries; + c->used_entries=n; + c->dim=s->dim; + + if(n>0){ + + /* two different remappings go on here. + + First, we collapse the likely sparse codebook down only to + actually represented values/words. This collapsing needs to be + indexed as map-valueless books are used to encode original entry + positions as integers. + + Second, we reorder all vectors, including the entry index above, + by sorted bitreversed codeword to allow treeless decode. */ + + /* perform sort */ + ogg_uint32_t *codes=_make_words(s->lengthlist,s->entries,c->used_entries); + ogg_uint32_t **codep=alloca(sizeof(*codep)*n); + + if(codes==NULL)goto err_out; + + for(i=0;icodelist=_ogg_malloc(n*sizeof(*c->codelist)); + /* the index is a reverse index */ + for(i=0;icodelist[sortindex[i]]=codes[i]; + _ogg_free(codes); + + + c->valuelist=_book_unquantize(s,n,sortindex); + c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index)); + + for(n=0,i=0;ientries;i++) + if(s->lengthlist[i]>0) + c->dec_index[sortindex[n++]]=i; + + c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths)); + for(n=0,i=0;ientries;i++) + if(s->lengthlist[i]>0) + c->dec_codelengths[sortindex[n++]]=s->lengthlist[i]; + + c->dec_firsttablen=_ilog(c->used_entries)-4; /* this is magic */ + if(c->dec_firsttablen<5)c->dec_firsttablen=5; + if(c->dec_firsttablen>8)c->dec_firsttablen=8; + + tabn=1<dec_firsttablen; + c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable)); + c->dec_maxlength=0; + + for(i=0;idec_maxlengthdec_codelengths[i]) + c->dec_maxlength=c->dec_codelengths[i]; + if(c->dec_codelengths[i]<=c->dec_firsttablen){ + ogg_uint32_t orig=bitreverse(c->codelist[i]); + for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++) + c->dec_firsttable[orig|(j<dec_codelengths[i])]=i+1; + } + } + + /* now fill in 'unused' entries in the firsttable with hi/lo search + hints for the non-direct-hits */ + { + ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen); + long lo=0,hi=0; + + for(i=0;idec_firsttablen); + if(c->dec_firsttable[bitreverse(word)]==0){ + while((lo+1)codelist[lo+1]<=word)lo++; + while( hi=(c->codelist[hi]&mask))hi++; + + /* we only actually have 15 bits per hint to play with here. + In order to overflow gracefully (nothing breaks, efficiency + just drops), encode as the difference from the extremes. */ + { + unsigned long loval=lo; + unsigned long hival=n-hi; + + if(loval>0x7fff)loval=0x7fff; + if(hival>0x7fff)hival=0x7fff; + c->dec_firsttable[bitreverse(word)]= + 0x80000000UL | (loval<<15) | hival; + } + } + } + } + } + + return(0); + err_out: + vorbis_book_clear(c); + return(-1); +} + +long vorbis_book_codeword(codebook *book,int entry){ + if(book->c) /* only use with encode; decode optimizations are + allowed to break this */ + return book->codelist[entry]; + return -1; +} + +long vorbis_book_codelen(codebook *book,int entry){ + if(book->c) /* only use with encode; decode optimizations are + allowed to break this */ + return book->c->lengthlist[entry]; + return -1; +} + +#ifdef _V_SELFTEST + +/* Unit tests of the dequantizer; this stuff will be OK + cross-platform, I simply want to be sure that special mapping cases + actually work properly; a bug could go unnoticed for a while */ + +#include + +/* cases: + + no mapping + full, explicit mapping + algorithmic mapping + + nonsequential + sequential +*/ + +static long full_quantlist1[]={0,1,2,3, 4,5,6,7, 8,3,6,1}; +static long partial_quantlist1[]={0,7,2}; + +/* no mapping */ +static_codebook test1={ + 4,16, + NULL, + 0, + 0,0,0,0, + NULL, + 0 +}; +static float *test1_result=NULL; + +/* linear, full mapping, nonsequential */ +static_codebook test2={ + 4,3, + NULL, + 2, + -533200896,1611661312,4,0, + full_quantlist1, + 0 +}; +static float test2_result[]={-3,-2,-1,0, 1,2,3,4, 5,0,3,-2}; + +/* linear, full mapping, sequential */ +static_codebook test3={ + 4,3, + NULL, + 2, + -533200896,1611661312,4,1, + full_quantlist1, + 0 +}; +static float test3_result[]={-3,-5,-6,-6, 1,3,6,10, 5,5,8,6}; + +/* linear, algorithmic mapping, nonsequential */ +static_codebook test4={ + 3,27, + NULL, + 1, + -533200896,1611661312,4,0, + partial_quantlist1, + 0 +}; +static float test4_result[]={-3,-3,-3, 4,-3,-3, -1,-3,-3, + -3, 4,-3, 4, 4,-3, -1, 4,-3, + -3,-1,-3, 4,-1,-3, -1,-1,-3, + -3,-3, 4, 4,-3, 4, -1,-3, 4, + -3, 4, 4, 4, 4, 4, -1, 4, 4, + -3,-1, 4, 4,-1, 4, -1,-1, 4, + -3,-3,-1, 4,-3,-1, -1,-3,-1, + -3, 4,-1, 4, 4,-1, -1, 4,-1, + -3,-1,-1, 4,-1,-1, -1,-1,-1}; + +/* linear, algorithmic mapping, sequential */ +static_codebook test5={ + 3,27, + NULL, + 1, + -533200896,1611661312,4,1, + partial_quantlist1, + 0 +}; +static float test5_result[]={-3,-6,-9, 4, 1,-2, -1,-4,-7, + -3, 1,-2, 4, 8, 5, -1, 3, 0, + -3,-4,-7, 4, 3, 0, -1,-2,-5, + -3,-6,-2, 4, 1, 5, -1,-4, 0, + -3, 1, 5, 4, 8,12, -1, 3, 7, + -3,-4, 0, 4, 3, 7, -1,-2, 2, + -3,-6,-7, 4, 1, 0, -1,-4,-5, + -3, 1, 0, 4, 8, 7, -1, 3, 2, + -3,-4,-5, 4, 3, 2, -1,-2,-3}; + +void run_test(static_codebook *b,float *comp){ + float *out=_book_unquantize(b,b->entries,NULL); + int i; + + if(comp){ + if(!out){ + fprintf(stderr,"_book_unquantize incorrectly returned NULL\n"); + exit(1); + } + + for(i=0;ientries*b->dim;i++) + if(fabs(out[i]-comp[i])>.0001){ + fprintf(stderr,"disagreement in unquantized and reference data:\n" + "position %d, %g != %g\n",i,out[i],comp[i]); + exit(1); + } + + }else{ + if(out){ + fprintf(stderr,"_book_unquantize returned a value array: \n" + " correct result should have been NULL\n"); + exit(1); + } + } +} + +int main(){ + /* run the nine dequant tests, and compare to the hand-rolled results */ + fprintf(stderr,"Dequant test 1... "); + run_test(&test1,test1_result); + fprintf(stderr,"OK\nDequant test 2... "); + run_test(&test2,test2_result); + fprintf(stderr,"OK\nDequant test 3... "); + run_test(&test3,test3_result); + fprintf(stderr,"OK\nDequant test 4... "); + run_test(&test4,test4_result); + fprintf(stderr,"OK\nDequant test 5... "); + run_test(&test5,test5_result); + fprintf(stderr,"OK\n\n"); + + return(0); +} + +#endif diff --git a/code/libvorbis-1.3.4/lib/smallft.c b/code/libvorbis-1.3.4/lib/smallft.c new file mode 100644 index 00000000..ae2bc41b --- /dev/null +++ b/code/libvorbis-1.3.4/lib/smallft.c @@ -0,0 +1,1255 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: *unnormalized* fft transform + last mod: $Id: smallft.c 16227 2009-07-08 06:58:46Z xiphmont $ + + ********************************************************************/ + +/* FFT implementation from OggSquish, minus cosine transforms, + * minus all but radix 2/4 case. In Vorbis we only need this + * cut-down version. + * + * To do more than just power-of-two sized vectors, see the full + * version I wrote for NetLib. + * + * Note that the packing is a little strange; rather than the FFT r/i + * packing following R_0, I_n, R_1, I_1, R_2, I_2 ... R_n-1, I_n-1, + * it follows R_0, R_1, I_1, R_2, I_2 ... R_n-1, I_n-1, I_n like the + * FORTRAN version + */ + +#include +#include +#include +#include "smallft.h" +#include "os.h" +#include "misc.h" + +static void drfti1(int n, float *wa, int *ifac){ + static int ntryh[4] = { 4,2,3,5 }; + static float tpi = 6.28318530717958648f; + float arg,argh,argld,fi; + int ntry=0,i,j=-1; + int k1, l1, l2, ib; + int ld, ii, ip, is, nq, nr; + int ido, ipm, nfm1; + int nl=n; + int nf=0; + + L101: + j++; + if (j < 4) + ntry=ntryh[j]; + else + ntry+=2; + + L104: + nq=nl/ntry; + nr=nl-ntry*nq; + if (nr!=0) goto L101; + + nf++; + ifac[nf+1]=ntry; + nl=nq; + if(ntry!=2)goto L107; + if(nf==1)goto L107; + + for (i=1;i>1; + ipp2=ip; + idp2=ido; + nbd=(ido-1)>>1; + t0=l1*ido; + t10=ip*ido; + + if(ido==1)goto L119; + for(ik=0;ikl1){ + for(j=1;j>1; + ipp2=ip; + ipph=(ip+1)>>1; + if(idol1)goto L139; + + is= -ido-1; + t1=0; + for(j=1;jn==1)return; + drftf1(l->n,data,l->trigcache,l->trigcache+l->n,l->splitcache); +} + +void drft_backward(drft_lookup *l,float *data){ + if (l->n==1)return; + drftb1(l->n,data,l->trigcache,l->trigcache+l->n,l->splitcache); +} + +void drft_init(drft_lookup *l,int n){ + l->n=n; + l->trigcache=_ogg_calloc(3*n,sizeof(*l->trigcache)); + l->splitcache=_ogg_calloc(32,sizeof(*l->splitcache)); + fdrffti(n, l->trigcache, l->splitcache); +} + +void drft_clear(drft_lookup *l){ + if(l){ + if(l->trigcache)_ogg_free(l->trigcache); + if(l->splitcache)_ogg_free(l->splitcache); + memset(l,0,sizeof(*l)); + } +} diff --git a/code/libvorbis-1.3.4/lib/smallft.h b/code/libvorbis-1.3.4/lib/smallft.h new file mode 100644 index 00000000..45649732 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/smallft.h @@ -0,0 +1,34 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: fft transform + last mod: $Id: smallft.h 13293 2007-07-24 00:09:47Z xiphmont $ + + ********************************************************************/ + +#ifndef _V_SMFT_H_ +#define _V_SMFT_H_ + +#include "vorbis/codec.h" + +typedef struct { + int n; + float *trigcache; + int *splitcache; +} drft_lookup; + +extern void drft_forward(drft_lookup *l,float *data); +extern void drft_backward(drft_lookup *l,float *data); +extern void drft_init(drft_lookup *l,int n); +extern void drft_clear(drft_lookup *l); + +#endif diff --git a/code/libvorbis-1.3.4/lib/synthesis.c b/code/libvorbis-1.3.4/lib/synthesis.c new file mode 100644 index 00000000..1af211d0 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/synthesis.c @@ -0,0 +1,184 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: single-block PCM synthesis + last mod: $Id: synthesis.c 17474 2010-09-30 03:41:41Z gmaxwell $ + + ********************************************************************/ + +#include +#include +#include "vorbis/codec.h" +#include "codec_internal.h" +#include "registry.h" +#include "misc.h" +#include "os.h" + +int vorbis_synthesis(vorbis_block *vb,ogg_packet *op){ + vorbis_dsp_state *vd= vb ? vb->vd : 0; + private_state *b= vd ? vd->backend_state : 0; + vorbis_info *vi= vd ? vd->vi : 0; + codec_setup_info *ci= vi ? vi->codec_setup : 0; + oggpack_buffer *opb=vb ? &vb->opb : 0; + int type,mode,i; + + if (!vd || !b || !vi || !ci || !opb) { + return OV_EBADPACKET; + } + + /* first things first. Make sure decode is ready */ + _vorbis_block_ripcord(vb); + oggpack_readinit(opb,op->packet,op->bytes); + + /* Check the packet type */ + if(oggpack_read(opb,1)!=0){ + /* Oops. This is not an audio data packet */ + return(OV_ENOTAUDIO); + } + + /* read our mode and pre/post windowsize */ + mode=oggpack_read(opb,b->modebits); + if(mode==-1){ + return(OV_EBADPACKET); + } + + vb->mode=mode; + if(!ci->mode_param[mode]){ + return(OV_EBADPACKET); + } + + vb->W=ci->mode_param[mode]->blockflag; + if(vb->W){ + + /* this doesn;t get mapped through mode selection as it's used + only for window selection */ + vb->lW=oggpack_read(opb,1); + vb->nW=oggpack_read(opb,1); + if(vb->nW==-1){ + return(OV_EBADPACKET); + } + }else{ + vb->lW=0; + vb->nW=0; + } + + /* more setup */ + vb->granulepos=op->granulepos; + vb->sequence=op->packetno; + vb->eofflag=op->e_o_s; + + /* alloc pcm passback storage */ + vb->pcmend=ci->blocksizes[vb->W]; + vb->pcm=_vorbis_block_alloc(vb,sizeof(*vb->pcm)*vi->channels); + for(i=0;ichannels;i++) + vb->pcm[i]=_vorbis_block_alloc(vb,vb->pcmend*sizeof(*vb->pcm[i])); + + /* unpack_header enforces range checking */ + type=ci->map_type[ci->mode_param[mode]->mapping]; + + return(_mapping_P[type]->inverse(vb,ci->map_param[ci->mode_param[mode]-> + mapping])); +} + +/* used to track pcm position without actually performing decode. + Useful for sequential 'fast forward' */ +int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op){ + vorbis_dsp_state *vd=vb->vd; + private_state *b=vd->backend_state; + vorbis_info *vi=vd->vi; + codec_setup_info *ci=vi->codec_setup; + oggpack_buffer *opb=&vb->opb; + int mode; + + /* first things first. Make sure decode is ready */ + _vorbis_block_ripcord(vb); + oggpack_readinit(opb,op->packet,op->bytes); + + /* Check the packet type */ + if(oggpack_read(opb,1)!=0){ + /* Oops. This is not an audio data packet */ + return(OV_ENOTAUDIO); + } + + /* read our mode and pre/post windowsize */ + mode=oggpack_read(opb,b->modebits); + if(mode==-1)return(OV_EBADPACKET); + + vb->mode=mode; + if(!ci->mode_param[mode]){ + return(OV_EBADPACKET); + } + + vb->W=ci->mode_param[mode]->blockflag; + if(vb->W){ + vb->lW=oggpack_read(opb,1); + vb->nW=oggpack_read(opb,1); + if(vb->nW==-1) return(OV_EBADPACKET); + }else{ + vb->lW=0; + vb->nW=0; + } + + /* more setup */ + vb->granulepos=op->granulepos; + vb->sequence=op->packetno; + vb->eofflag=op->e_o_s; + + /* no pcm */ + vb->pcmend=0; + vb->pcm=NULL; + + return(0); +} + +long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op){ + codec_setup_info *ci=vi->codec_setup; + oggpack_buffer opb; + int mode; + + oggpack_readinit(&opb,op->packet,op->bytes); + + /* Check the packet type */ + if(oggpack_read(&opb,1)!=0){ + /* Oops. This is not an audio data packet */ + return(OV_ENOTAUDIO); + } + + { + int modebits=0; + int v=ci->modes; + while(v>1){ + modebits++; + v>>=1; + } + + /* read our mode and pre/post windowsize */ + mode=oggpack_read(&opb,modebits); + } + if(mode==-1)return(OV_EBADPACKET); + return(ci->blocksizes[ci->mode_param[mode]->blockflag]); +} + +int vorbis_synthesis_halfrate(vorbis_info *vi,int flag){ + /* set / clear half-sample-rate mode */ + codec_setup_info *ci=vi->codec_setup; + + /* right now, our MDCT can't handle < 64 sample windows. */ + if(ci->blocksizes[0]<=64 && flag)return -1; + ci->halfrate_flag=(flag?1:0); + return 0; +} + +int vorbis_synthesis_halfrate_p(vorbis_info *vi){ + codec_setup_info *ci=vi->codec_setup; + return ci->halfrate_flag; +} diff --git a/code/libvorbis-1.3.4/lib/vorbisenc.c b/code/libvorbis-1.3.4/lib/vorbisenc.c new file mode 100644 index 00000000..f0f7c085 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/vorbisenc.c @@ -0,0 +1,1215 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: simple programmatic interface for encoder mode setup + last mod: $Id: vorbisenc.c 17028 2010-03-25 05:22:15Z xiphmont $ + + ********************************************************************/ + +#include +#include +#include + +#include "vorbis/codec.h" +#include "vorbis/vorbisenc.h" + +#include "codec_internal.h" + +#include "os.h" +#include "misc.h" + +/* careful with this; it's using static array sizing to make managing + all the modes a little less annoying. If we use a residue backend + with > 12 partition types, or a different division of iteration, + this needs to be updated. */ +typedef struct { + const static_codebook *books[12][4]; +} static_bookblock; + +typedef struct { + int res_type; + int limit_type; /* 0 lowpass limited, 1 point stereo limited */ + int grouping; + const vorbis_info_residue0 *res; + const static_codebook *book_aux; + const static_codebook *book_aux_managed; + const static_bookblock *books_base; + const static_bookblock *books_base_managed; +} vorbis_residue_template; + +typedef struct { + const vorbis_info_mapping0 *map; + const vorbis_residue_template *res; +} vorbis_mapping_template; + +typedef struct vp_adjblock{ + int block[P_BANDS]; +} vp_adjblock; + +typedef struct { + int data[NOISE_COMPAND_LEVELS]; +} compandblock; + +/* high level configuration information for setting things up + step-by-step with the detailed vorbis_encode_ctl interface. + There's a fair amount of redundancy such that interactive setup + does not directly deal with any vorbis_info or codec_setup_info + initialization; it's all stored (until full init) in this highlevel + setup, then flushed out to the real codec setup structs later. */ + +typedef struct { + int att[P_NOISECURVES]; + float boost; + float decay; +} att3; +typedef struct { int data[P_NOISECURVES]; } adj3; + +typedef struct { + int pre[PACKETBLOBS]; + int post[PACKETBLOBS]; + float kHz[PACKETBLOBS]; + float lowpasskHz[PACKETBLOBS]; +} adj_stereo; + +typedef struct { + int lo; + int hi; + int fixed; +} noiseguard; +typedef struct { + int data[P_NOISECURVES][17]; +} noise3; + +typedef struct { + int mappings; + const double *rate_mapping; + const double *quality_mapping; + int coupling_restriction; + long samplerate_min_restriction; + long samplerate_max_restriction; + + + const int *blocksize_short; + const int *blocksize_long; + + const att3 *psy_tone_masteratt; + const int *psy_tone_0dB; + const int *psy_tone_dBsuppress; + + const vp_adjblock *psy_tone_adj_impulse; + const vp_adjblock *psy_tone_adj_long; + const vp_adjblock *psy_tone_adj_other; + + const noiseguard *psy_noiseguards; + const noise3 *psy_noise_bias_impulse; + const noise3 *psy_noise_bias_padding; + const noise3 *psy_noise_bias_trans; + const noise3 *psy_noise_bias_long; + const int *psy_noise_dBsuppress; + + const compandblock *psy_noise_compand; + const double *psy_noise_compand_short_mapping; + const double *psy_noise_compand_long_mapping; + + const int *psy_noise_normal_start[2]; + const int *psy_noise_normal_partition[2]; + const double *psy_noise_normal_thresh; + + const int *psy_ath_float; + const int *psy_ath_abs; + + const double *psy_lowpass; + + const vorbis_info_psy_global *global_params; + const double *global_mapping; + const adj_stereo *stereo_modes; + + const static_codebook *const *const *const floor_books; + const vorbis_info_floor1 *floor_params; + const int floor_mappings; + const int **floor_mapping_list; + + const vorbis_mapping_template *maps; +} ve_setup_data_template; + +/* a few static coder conventions */ +static const vorbis_info_mode _mode_template[2]={ + {0,0,0,0}, + {1,0,0,1} +}; + +static const vorbis_info_mapping0 _map_nominal[2]={ + {1, {0,0}, {0}, {0}, 1,{0},{1}}, + {1, {0,0}, {1}, {1}, 1,{0},{1}} +}; + +#include "modes/setup_44.h" +#include "modes/setup_44u.h" +#include "modes/setup_44p51.h" +#include "modes/setup_32.h" +#include "modes/setup_8.h" +#include "modes/setup_11.h" +#include "modes/setup_16.h" +#include "modes/setup_22.h" +#include "modes/setup_X.h" + +static const ve_setup_data_template *const setup_list[]={ + &ve_setup_44_stereo, + &ve_setup_44_51, + &ve_setup_44_uncoupled, + + &ve_setup_32_stereo, + &ve_setup_32_uncoupled, + + &ve_setup_22_stereo, + &ve_setup_22_uncoupled, + &ve_setup_16_stereo, + &ve_setup_16_uncoupled, + + &ve_setup_11_stereo, + &ve_setup_11_uncoupled, + &ve_setup_8_stereo, + &ve_setup_8_uncoupled, + + &ve_setup_X_stereo, + &ve_setup_X_uncoupled, + &ve_setup_XX_stereo, + &ve_setup_XX_uncoupled, + 0 +}; + +static void vorbis_encode_floor_setup(vorbis_info *vi,int s, + const static_codebook *const *const *const books, + const vorbis_info_floor1 *in, + const int *x){ + int i,k,is=s; + vorbis_info_floor1 *f=_ogg_calloc(1,sizeof(*f)); + codec_setup_info *ci=vi->codec_setup; + + memcpy(f,in+x[is],sizeof(*f)); + + /* books */ + { + int partitions=f->partitions; + int maxclass=-1; + int maxbook=-1; + for(i=0;ipartitionclass[i]>maxclass)maxclass=f->partitionclass[i]; + for(i=0;i<=maxclass;i++){ + if(f->class_book[i]>maxbook)maxbook=f->class_book[i]; + f->class_book[i]+=ci->books; + for(k=0;k<(1<class_subs[i]);k++){ + if(f->class_subbook[i][k]>maxbook)maxbook=f->class_subbook[i][k]; + if(f->class_subbook[i][k]>=0)f->class_subbook[i][k]+=ci->books; + } + } + + for(i=0;i<=maxbook;i++) + ci->book_param[ci->books++]=(static_codebook *)books[x[is]][i]; + } + + /* for now, we're only using floor 1 */ + ci->floor_type[ci->floors]=1; + ci->floor_param[ci->floors]=f; + ci->floors++; + + return; +} + +static void vorbis_encode_global_psych_setup(vorbis_info *vi,double s, + const vorbis_info_psy_global *in, + const double *x){ + int i,is=s; + double ds=s-is; + codec_setup_info *ci=vi->codec_setup; + vorbis_info_psy_global *g=&ci->psy_g_param; + + memcpy(g,in+(int)x[is],sizeof(*g)); + + ds=x[is]*(1.-ds)+x[is+1]*ds; + is=(int)ds; + ds-=is; + if(ds==0 && is>0){ + is--; + ds=1.; + } + + /* interpolate the trigger threshholds */ + for(i=0;i<4;i++){ + g->preecho_thresh[i]=in[is].preecho_thresh[i]*(1.-ds)+in[is+1].preecho_thresh[i]*ds; + g->postecho_thresh[i]=in[is].postecho_thresh[i]*(1.-ds)+in[is+1].postecho_thresh[i]*ds; + } + g->ampmax_att_per_sec=ci->hi.amplitude_track_dBpersec; + return; +} + +static void vorbis_encode_global_stereo(vorbis_info *vi, + const highlevel_encode_setup *const hi, + const adj_stereo *p){ + float s=hi->stereo_point_setting; + int i,is=s; + double ds=s-is; + codec_setup_info *ci=vi->codec_setup; + vorbis_info_psy_global *g=&ci->psy_g_param; + + if(p){ + memcpy(g->coupling_prepointamp,p[is].pre,sizeof(*p[is].pre)*PACKETBLOBS); + memcpy(g->coupling_postpointamp,p[is].post,sizeof(*p[is].post)*PACKETBLOBS); + + if(hi->managed){ + /* interpolate the kHz threshholds */ + for(i=0;icoupling_pointlimit[0][i]=kHz*1000./vi->rate*ci->blocksizes[0]; + g->coupling_pointlimit[1][i]=kHz*1000./vi->rate*ci->blocksizes[1]; + g->coupling_pkHz[i]=kHz; + + kHz=p[is].lowpasskHz[i]*(1.-ds)+p[is+1].lowpasskHz[i]*ds; + g->sliding_lowpass[0][i]=kHz*1000./vi->rate*ci->blocksizes[0]; + g->sliding_lowpass[1][i]=kHz*1000./vi->rate*ci->blocksizes[1]; + + } + }else{ + float kHz=p[is].kHz[PACKETBLOBS/2]*(1.-ds)+p[is+1].kHz[PACKETBLOBS/2]*ds; + for(i=0;icoupling_pointlimit[0][i]=kHz*1000./vi->rate*ci->blocksizes[0]; + g->coupling_pointlimit[1][i]=kHz*1000./vi->rate*ci->blocksizes[1]; + g->coupling_pkHz[i]=kHz; + } + + kHz=p[is].lowpasskHz[PACKETBLOBS/2]*(1.-ds)+p[is+1].lowpasskHz[PACKETBLOBS/2]*ds; + for(i=0;isliding_lowpass[0][i]=kHz*1000./vi->rate*ci->blocksizes[0]; + g->sliding_lowpass[1][i]=kHz*1000./vi->rate*ci->blocksizes[1]; + } + } + }else{ + for(i=0;isliding_lowpass[0][i]=ci->blocksizes[0]; + g->sliding_lowpass[1][i]=ci->blocksizes[1]; + } + } + return; +} + +static void vorbis_encode_psyset_setup(vorbis_info *vi,double s, + const int *nn_start, + const int *nn_partition, + const double *nn_thresh, + int block){ + codec_setup_info *ci=vi->codec_setup; + vorbis_info_psy *p=ci->psy_param[block]; + highlevel_encode_setup *hi=&ci->hi; + int is=s; + + if(block>=ci->psys) + ci->psys=block+1; + if(!p){ + p=_ogg_calloc(1,sizeof(*p)); + ci->psy_param[block]=p; + } + + memcpy(p,&_psy_info_template,sizeof(*p)); + p->blockflag=block>>1; + + if(hi->noise_normalize_p){ + p->normal_p=1; + p->normal_start=nn_start[is]; + p->normal_partition=nn_partition[is]; + p->normal_thresh=nn_thresh[is]; + } + + return; +} + +static void vorbis_encode_tonemask_setup(vorbis_info *vi,double s,int block, + const att3 *att, + const int *max, + const vp_adjblock *in){ + int i,is=s; + double ds=s-is; + codec_setup_info *ci=vi->codec_setup; + vorbis_info_psy *p=ci->psy_param[block]; + + /* 0 and 2 are only used by bitmanagement, but there's no harm to always + filling the values in here */ + p->tone_masteratt[0]=att[is].att[0]*(1.-ds)+att[is+1].att[0]*ds; + p->tone_masteratt[1]=att[is].att[1]*(1.-ds)+att[is+1].att[1]*ds; + p->tone_masteratt[2]=att[is].att[2]*(1.-ds)+att[is+1].att[2]*ds; + p->tone_centerboost=att[is].boost*(1.-ds)+att[is+1].boost*ds; + p->tone_decay=att[is].decay*(1.-ds)+att[is+1].decay*ds; + + p->max_curve_dB=max[is]*(1.-ds)+max[is+1]*ds; + + for(i=0;itoneatt[i]=in[is].block[i]*(1.-ds)+in[is+1].block[i]*ds; + return; +} + + +static void vorbis_encode_compand_setup(vorbis_info *vi,double s,int block, + const compandblock *in, + const double *x){ + int i,is=s; + double ds=s-is; + codec_setup_info *ci=vi->codec_setup; + vorbis_info_psy *p=ci->psy_param[block]; + + ds=x[is]*(1.-ds)+x[is+1]*ds; + is=(int)ds; + ds-=is; + if(ds==0 && is>0){ + is--; + ds=1.; + } + + /* interpolate the compander settings */ + for(i=0;inoisecompand[i]=in[is].data[i]*(1.-ds)+in[is+1].data[i]*ds; + return; +} + +static void vorbis_encode_peak_setup(vorbis_info *vi,double s,int block, + const int *suppress){ + int is=s; + double ds=s-is; + codec_setup_info *ci=vi->codec_setup; + vorbis_info_psy *p=ci->psy_param[block]; + + p->tone_abs_limit=suppress[is]*(1.-ds)+suppress[is+1]*ds; + + return; +} + +static void vorbis_encode_noisebias_setup(vorbis_info *vi,double s,int block, + const int *suppress, + const noise3 *in, + const noiseguard *guard, + double userbias){ + int i,is=s,j; + double ds=s-is; + codec_setup_info *ci=vi->codec_setup; + vorbis_info_psy *p=ci->psy_param[block]; + + p->noisemaxsupp=suppress[is]*(1.-ds)+suppress[is+1]*ds; + p->noisewindowlomin=guard[block].lo; + p->noisewindowhimin=guard[block].hi; + p->noisewindowfixed=guard[block].fixed; + + for(j=0;jnoiseoff[j][i]=in[is].data[j][i]*(1.-ds)+in[is+1].data[j][i]*ds; + + /* impulse blocks may take a user specified bias to boost the + nominal/high noise encoding depth */ + for(j=0;jnoiseoff[j][0]+6; /* the lowest it can go */ + for(i=0;inoiseoff[j][i]+=userbias; + if(p->noiseoff[j][i]noiseoff[j][i]=min; + } + } + + return; +} + +static void vorbis_encode_ath_setup(vorbis_info *vi,int block){ + codec_setup_info *ci=vi->codec_setup; + vorbis_info_psy *p=ci->psy_param[block]; + + p->ath_adjatt=ci->hi.ath_floating_dB; + p->ath_maxatt=ci->hi.ath_absolute_dB; + return; +} + + +static int book_dup_or_new(codec_setup_info *ci,const static_codebook *book){ + int i; + for(i=0;ibooks;i++) + if(ci->book_param[i]==book)return(i); + + return(ci->books++); +} + +static void vorbis_encode_blocksize_setup(vorbis_info *vi,double s, + const int *shortb,const int *longb){ + + codec_setup_info *ci=vi->codec_setup; + int is=s; + + int blockshort=shortb[is]; + int blocklong=longb[is]; + ci->blocksizes[0]=blockshort; + ci->blocksizes[1]=blocklong; + +} + +static void vorbis_encode_residue_setup(vorbis_info *vi, + int number, int block, + const vorbis_residue_template *res){ + + codec_setup_info *ci=vi->codec_setup; + int i; + + vorbis_info_residue0 *r=ci->residue_param[number]= + _ogg_malloc(sizeof(*r)); + + memcpy(r,res->res,sizeof(*r)); + if(ci->residues<=number)ci->residues=number+1; + + r->grouping=res->grouping; + ci->residue_type[number]=res->res_type; + + /* fill in all the books */ + { + int booklist=0,k; + + if(ci->hi.managed){ + for(i=0;ipartitions;i++) + for(k=0;k<4;k++) + if(res->books_base_managed->books[i][k]) + r->secondstages[i]|=(1<groupbook=book_dup_or_new(ci,res->book_aux_managed); + ci->book_param[r->groupbook]=(static_codebook *)res->book_aux_managed; + + for(i=0;ipartitions;i++){ + for(k=0;k<4;k++){ + if(res->books_base_managed->books[i][k]){ + int bookid=book_dup_or_new(ci,res->books_base_managed->books[i][k]); + r->booklist[booklist++]=bookid; + ci->book_param[bookid]=(static_codebook *)res->books_base_managed->books[i][k]; + } + } + } + + }else{ + + for(i=0;ipartitions;i++) + for(k=0;k<4;k++) + if(res->books_base->books[i][k]) + r->secondstages[i]|=(1<groupbook=book_dup_or_new(ci,res->book_aux); + ci->book_param[r->groupbook]=(static_codebook *)res->book_aux; + + for(i=0;ipartitions;i++){ + for(k=0;k<4;k++){ + if(res->books_base->books[i][k]){ + int bookid=book_dup_or_new(ci,res->books_base->books[i][k]); + r->booklist[booklist++]=bookid; + ci->book_param[bookid]=(static_codebook *)res->books_base->books[i][k]; + } + } + } + } + } + + /* lowpass setup/pointlimit */ + { + double freq=ci->hi.lowpass_kHz*1000.; + vorbis_info_floor1 *f=ci->floor_param[block]; /* by convention */ + double nyq=vi->rate/2.; + long blocksize=ci->blocksizes[block]>>1; + + /* lowpass needs to be set in the floor and the residue. */ + if(freq>nyq)freq=nyq; + /* in the floor, the granularity can be very fine; it doesn't alter + the encoding structure, only the samples used to fit the floor + approximation */ + f->n=freq/nyq*blocksize; + + /* this res may by limited by the maximum pointlimit of the mode, + not the lowpass. the floor is always lowpass limited. */ + switch(res->limit_type){ + case 1: /* point stereo limited */ + if(ci->hi.managed) + freq=ci->psy_g_param.coupling_pkHz[PACKETBLOBS-1]*1000.; + else + freq=ci->psy_g_param.coupling_pkHz[PACKETBLOBS/2]*1000.; + if(freq>nyq)freq=nyq; + break; + case 2: /* LFE channel; lowpass at ~ 250Hz */ + freq=250; + break; + default: + /* already set */ + break; + } + + /* in the residue, we're constrained, physically, by partition + boundaries. We still lowpass 'wherever', but we have to round up + here to next boundary, or the vorbis spec will round it *down* to + previous boundary in encode/decode */ + if(ci->residue_type[number]==2){ + /* residue 2 bundles together multiple channels; used by stereo + and surround. Count the channels in use */ + /* Multiple maps/submaps can point to the same residue. In the case + of residue 2, they all better have the same number of + channels/samples. */ + int j,k,ch=0; + for(i=0;imaps&&ch==0;i++){ + vorbis_info_mapping0 *mi=(vorbis_info_mapping0 *)ci->map_param[i]; + for(j=0;jsubmaps && ch==0;j++) + if(mi->residuesubmap[j]==number) /* we found a submap referencing theis residue backend */ + for(k=0;kchannels;k++) + if(mi->chmuxlist[k]==j) /* this channel belongs to the submap */ + ch++; + } + + r->end=(int)((freq/nyq*blocksize*ch)/r->grouping+.9)* /* round up only if we're well past */ + r->grouping; + /* the blocksize and grouping may disagree at the end */ + if(r->end>blocksize*ch)r->end=blocksize*ch/r->grouping*r->grouping; + + }else{ + + r->end=(int)((freq/nyq*blocksize)/r->grouping+.9)* /* round up only if we're well past */ + r->grouping; + /* the blocksize and grouping may disagree at the end */ + if(r->end>blocksize)r->end=blocksize/r->grouping*r->grouping; + + } + + if(r->end==0)r->end=r->grouping; /* LFE channel */ + + } +} + +/* we assume two maps in this encoder */ +static void vorbis_encode_map_n_res_setup(vorbis_info *vi,double s, + const vorbis_mapping_template *maps){ + + codec_setup_info *ci=vi->codec_setup; + int i,j,is=s,modes=2; + const vorbis_info_mapping0 *map=maps[is].map; + const vorbis_info_mode *mode=_mode_template; + const vorbis_residue_template *res=maps[is].res; + + if(ci->blocksizes[0]==ci->blocksizes[1])modes=1; + + for(i=0;imap_param[i]=_ogg_calloc(1,sizeof(*map)); + ci->mode_param[i]=_ogg_calloc(1,sizeof(*mode)); + + memcpy(ci->mode_param[i],mode+i,sizeof(*_mode_template)); + if(i>=ci->modes)ci->modes=i+1; + + ci->map_type[i]=0; + memcpy(ci->map_param[i],map+i,sizeof(*map)); + if(i>=ci->maps)ci->maps=i+1; + + for(j=0;jcodec_setup; + highlevel_encode_setup *hi=&ci->hi; + ve_setup_data_template *setup=(ve_setup_data_template *)hi->setup; + int is=hi->base_setting; + double ds=hi->base_setting-is; + int ch=vi->channels; + const double *r=setup->rate_mapping; + + if(r==NULL) + return(-1); + + return((r[is]*(1.-ds)+r[is+1]*ds)*ch); +} + +static const void *get_setup_template(long ch,long srate, + double req,int q_or_bitrate, + double *base_setting){ + int i=0,j; + if(q_or_bitrate)req/=ch; + + while(setup_list[i]){ + if(setup_list[i]->coupling_restriction==-1 || + setup_list[i]->coupling_restriction==ch){ + if(srate>=setup_list[i]->samplerate_min_restriction && + srate<=setup_list[i]->samplerate_max_restriction){ + int mappings=setup_list[i]->mappings; + const double *map=(q_or_bitrate? + setup_list[i]->rate_mapping: + setup_list[i]->quality_mapping); + + /* the template matches. Does the requested quality mode + fall within this template's modes? */ + if(reqmap[setup_list[i]->mappings]){++i;continue;} + for(j=0;j=map[j] && reqcodec_setup; + ve_setup_data_template *setup=NULL; + highlevel_encode_setup *hi=&ci->hi; + + if(ci==NULL)return(OV_EINVAL); + if(!hi->impulse_block_p)i0=1; + + /* too low/high an ATH floater is nonsensical, but doesn't break anything */ + if(hi->ath_floating_dB>-80)hi->ath_floating_dB=-80; + if(hi->ath_floating_dB<-200)hi->ath_floating_dB=-200; + + /* again, bound this to avoid the app shooting itself int he foot + too badly */ + if(hi->amplitude_track_dBpersec>0.)hi->amplitude_track_dBpersec=0.; + if(hi->amplitude_track_dBpersec<-99999.)hi->amplitude_track_dBpersec=-99999.; + + /* get the appropriate setup template; matches the fetch in previous + stages */ + setup=(ve_setup_data_template *)hi->setup; + if(setup==NULL)return(OV_EINVAL); + + hi->set_in_stone=1; + /* choose block sizes from configured sizes as well as paying + attention to long_block_p and short_block_p. If the configured + short and long blocks are the same length, we set long_block_p + and unset short_block_p */ + vorbis_encode_blocksize_setup(vi,hi->base_setting, + setup->blocksize_short, + setup->blocksize_long); + if(ci->blocksizes[0]==ci->blocksizes[1])singleblock=1; + + /* floor setup; choose proper floor params. Allocated on the floor + stack in order; if we alloc only a single long floor, it's 0 */ + for(i=0;ifloor_mappings;i++) + vorbis_encode_floor_setup(vi,hi->base_setting, + setup->floor_books, + setup->floor_params, + setup->floor_mapping_list[i]); + + /* setup of [mostly] short block detection and stereo*/ + vorbis_encode_global_psych_setup(vi,hi->trigger_setting, + setup->global_params, + setup->global_mapping); + vorbis_encode_global_stereo(vi,hi,setup->stereo_modes); + + /* basic psych setup and noise normalization */ + vorbis_encode_psyset_setup(vi,hi->base_setting, + setup->psy_noise_normal_start[0], + setup->psy_noise_normal_partition[0], + setup->psy_noise_normal_thresh, + 0); + vorbis_encode_psyset_setup(vi,hi->base_setting, + setup->psy_noise_normal_start[0], + setup->psy_noise_normal_partition[0], + setup->psy_noise_normal_thresh, + 1); + if(!singleblock){ + vorbis_encode_psyset_setup(vi,hi->base_setting, + setup->psy_noise_normal_start[1], + setup->psy_noise_normal_partition[1], + setup->psy_noise_normal_thresh, + 2); + vorbis_encode_psyset_setup(vi,hi->base_setting, + setup->psy_noise_normal_start[1], + setup->psy_noise_normal_partition[1], + setup->psy_noise_normal_thresh, + 3); + } + + /* tone masking setup */ + vorbis_encode_tonemask_setup(vi,hi->block[i0].tone_mask_setting,0, + setup->psy_tone_masteratt, + setup->psy_tone_0dB, + setup->psy_tone_adj_impulse); + vorbis_encode_tonemask_setup(vi,hi->block[1].tone_mask_setting,1, + setup->psy_tone_masteratt, + setup->psy_tone_0dB, + setup->psy_tone_adj_other); + if(!singleblock){ + vorbis_encode_tonemask_setup(vi,hi->block[2].tone_mask_setting,2, + setup->psy_tone_masteratt, + setup->psy_tone_0dB, + setup->psy_tone_adj_other); + vorbis_encode_tonemask_setup(vi,hi->block[3].tone_mask_setting,3, + setup->psy_tone_masteratt, + setup->psy_tone_0dB, + setup->psy_tone_adj_long); + } + + /* noise companding setup */ + vorbis_encode_compand_setup(vi,hi->block[i0].noise_compand_setting,0, + setup->psy_noise_compand, + setup->psy_noise_compand_short_mapping); + vorbis_encode_compand_setup(vi,hi->block[1].noise_compand_setting,1, + setup->psy_noise_compand, + setup->psy_noise_compand_short_mapping); + if(!singleblock){ + vorbis_encode_compand_setup(vi,hi->block[2].noise_compand_setting,2, + setup->psy_noise_compand, + setup->psy_noise_compand_long_mapping); + vorbis_encode_compand_setup(vi,hi->block[3].noise_compand_setting,3, + setup->psy_noise_compand, + setup->psy_noise_compand_long_mapping); + } + + /* peak guarding setup */ + vorbis_encode_peak_setup(vi,hi->block[i0].tone_peaklimit_setting,0, + setup->psy_tone_dBsuppress); + vorbis_encode_peak_setup(vi,hi->block[1].tone_peaklimit_setting,1, + setup->psy_tone_dBsuppress); + if(!singleblock){ + vorbis_encode_peak_setup(vi,hi->block[2].tone_peaklimit_setting,2, + setup->psy_tone_dBsuppress); + vorbis_encode_peak_setup(vi,hi->block[3].tone_peaklimit_setting,3, + setup->psy_tone_dBsuppress); + } + + /* noise bias setup */ + vorbis_encode_noisebias_setup(vi,hi->block[i0].noise_bias_setting,0, + setup->psy_noise_dBsuppress, + setup->psy_noise_bias_impulse, + setup->psy_noiseguards, + (i0==0?hi->impulse_noisetune:0.)); + vorbis_encode_noisebias_setup(vi,hi->block[1].noise_bias_setting,1, + setup->psy_noise_dBsuppress, + setup->psy_noise_bias_padding, + setup->psy_noiseguards,0.); + if(!singleblock){ + vorbis_encode_noisebias_setup(vi,hi->block[2].noise_bias_setting,2, + setup->psy_noise_dBsuppress, + setup->psy_noise_bias_trans, + setup->psy_noiseguards,0.); + vorbis_encode_noisebias_setup(vi,hi->block[3].noise_bias_setting,3, + setup->psy_noise_dBsuppress, + setup->psy_noise_bias_long, + setup->psy_noiseguards,0.); + } + + vorbis_encode_ath_setup(vi,0); + vorbis_encode_ath_setup(vi,1); + if(!singleblock){ + vorbis_encode_ath_setup(vi,2); + vorbis_encode_ath_setup(vi,3); + } + + vorbis_encode_map_n_res_setup(vi,hi->base_setting,setup->maps); + + /* set bitrate readonlies and management */ + if(hi->bitrate_av>0) + vi->bitrate_nominal=hi->bitrate_av; + else{ + vi->bitrate_nominal=setting_to_approx_bitrate(vi); + } + + vi->bitrate_lower=hi->bitrate_min; + vi->bitrate_upper=hi->bitrate_max; + if(hi->bitrate_av) + vi->bitrate_window=(double)hi->bitrate_reservoir/hi->bitrate_av; + else + vi->bitrate_window=0.; + + if(hi->managed){ + ci->bi.avg_rate=hi->bitrate_av; + ci->bi.min_rate=hi->bitrate_min; + ci->bi.max_rate=hi->bitrate_max; + + ci->bi.reservoir_bits=hi->bitrate_reservoir; + ci->bi.reservoir_bias= + hi->bitrate_reservoir_bias; + + ci->bi.slew_damp=hi->bitrate_av_damp; + + } + + return(0); + +} + +static void vorbis_encode_setup_setting(vorbis_info *vi, + long channels, + long rate){ + int i,is; + codec_setup_info *ci=vi->codec_setup; + highlevel_encode_setup *hi=&ci->hi; + const ve_setup_data_template *setup=hi->setup; + double ds; + + vi->version=0; + vi->channels=channels; + vi->rate=rate; + + hi->impulse_block_p=1; + hi->noise_normalize_p=1; + + is=hi->base_setting; + ds=hi->base_setting-is; + + hi->stereo_point_setting=hi->base_setting; + + if(!hi->lowpass_altered) + hi->lowpass_kHz= + setup->psy_lowpass[is]*(1.-ds)+setup->psy_lowpass[is+1]*ds; + + hi->ath_floating_dB=setup->psy_ath_float[is]*(1.-ds)+ + setup->psy_ath_float[is+1]*ds; + hi->ath_absolute_dB=setup->psy_ath_abs[is]*(1.-ds)+ + setup->psy_ath_abs[is+1]*ds; + + hi->amplitude_track_dBpersec=-6.; + hi->trigger_setting=hi->base_setting; + + for(i=0;i<4;i++){ + hi->block[i].tone_mask_setting=hi->base_setting; + hi->block[i].tone_peaklimit_setting=hi->base_setting; + hi->block[i].noise_bias_setting=hi->base_setting; + hi->block[i].noise_compand_setting=hi->base_setting; + } +} + +int vorbis_encode_setup_vbr(vorbis_info *vi, + long channels, + long rate, + float quality){ + codec_setup_info *ci=vi->codec_setup; + highlevel_encode_setup *hi=&ci->hi; + + quality+=.0000001; + if(quality>=1.)quality=.9999; + + hi->req=quality; + hi->setup=get_setup_template(channels,rate,quality,0,&hi->base_setting); + if(!hi->setup)return OV_EIMPL; + + vorbis_encode_setup_setting(vi,channels,rate); + hi->managed=0; + hi->coupling_p=1; + + return 0; +} + +int vorbis_encode_init_vbr(vorbis_info *vi, + long channels, + long rate, + + float base_quality /* 0. to 1. */ + ){ + int ret=0; + + ret=vorbis_encode_setup_vbr(vi,channels,rate,base_quality); + + if(ret){ + vorbis_info_clear(vi); + return ret; + } + ret=vorbis_encode_setup_init(vi); + if(ret) + vorbis_info_clear(vi); + return(ret); +} + +int vorbis_encode_setup_managed(vorbis_info *vi, + long channels, + long rate, + + long max_bitrate, + long nominal_bitrate, + long min_bitrate){ + + codec_setup_info *ci=vi->codec_setup; + highlevel_encode_setup *hi=&ci->hi; + double tnominal=nominal_bitrate; + + if(nominal_bitrate<=0.){ + if(max_bitrate>0.){ + if(min_bitrate>0.) + nominal_bitrate=(max_bitrate+min_bitrate)*.5; + else + nominal_bitrate=max_bitrate*.875; + }else{ + if(min_bitrate>0.){ + nominal_bitrate=min_bitrate; + }else{ + return(OV_EINVAL); + } + } + } + + hi->req=nominal_bitrate; + hi->setup=get_setup_template(channels,rate,nominal_bitrate,1,&hi->base_setting); + if(!hi->setup)return OV_EIMPL; + + vorbis_encode_setup_setting(vi,channels,rate); + + /* initialize management with sane defaults */ + hi->coupling_p=1; + hi->managed=1; + hi->bitrate_min=min_bitrate; + hi->bitrate_max=max_bitrate; + hi->bitrate_av=tnominal; + hi->bitrate_av_damp=1.5f; /* full range in no less than 1.5 second */ + hi->bitrate_reservoir=nominal_bitrate*2; + hi->bitrate_reservoir_bias=.1; /* bias toward hoarding bits */ + + return(0); + +} + +int vorbis_encode_init(vorbis_info *vi, + long channels, + long rate, + + long max_bitrate, + long nominal_bitrate, + long min_bitrate){ + + int ret=vorbis_encode_setup_managed(vi,channels,rate, + max_bitrate, + nominal_bitrate, + min_bitrate); + if(ret){ + vorbis_info_clear(vi); + return(ret); + } + + ret=vorbis_encode_setup_init(vi); + if(ret) + vorbis_info_clear(vi); + return(ret); +} + +int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg){ + if(vi){ + codec_setup_info *ci=vi->codec_setup; + highlevel_encode_setup *hi=&ci->hi; + int setp=(number&0xf); /* a read request has a low nibble of 0 */ + + if(setp && hi->set_in_stone)return(OV_EINVAL); + + switch(number){ + + /* now deprecated *****************/ + case OV_ECTL_RATEMANAGE_GET: + { + + struct ovectl_ratemanage_arg *ai= + (struct ovectl_ratemanage_arg *)arg; + + ai->management_active=hi->managed; + ai->bitrate_hard_window=ai->bitrate_av_window= + (double)hi->bitrate_reservoir/vi->rate; + ai->bitrate_av_window_center=1.; + ai->bitrate_hard_min=hi->bitrate_min; + ai->bitrate_hard_max=hi->bitrate_max; + ai->bitrate_av_lo=hi->bitrate_av; + ai->bitrate_av_hi=hi->bitrate_av; + + } + return(0); + + /* now deprecated *****************/ + case OV_ECTL_RATEMANAGE_SET: + { + struct ovectl_ratemanage_arg *ai= + (struct ovectl_ratemanage_arg *)arg; + if(ai==NULL){ + hi->managed=0; + }else{ + hi->managed=ai->management_active; + vorbis_encode_ctl(vi,OV_ECTL_RATEMANAGE_AVG,arg); + vorbis_encode_ctl(vi,OV_ECTL_RATEMANAGE_HARD,arg); + } + } + return 0; + + /* now deprecated *****************/ + case OV_ECTL_RATEMANAGE_AVG: + { + struct ovectl_ratemanage_arg *ai= + (struct ovectl_ratemanage_arg *)arg; + if(ai==NULL){ + hi->bitrate_av=0; + }else{ + hi->bitrate_av=(ai->bitrate_av_lo+ai->bitrate_av_hi)*.5; + } + } + return(0); + /* now deprecated *****************/ + case OV_ECTL_RATEMANAGE_HARD: + { + struct ovectl_ratemanage_arg *ai= + (struct ovectl_ratemanage_arg *)arg; + if(ai==NULL){ + hi->bitrate_min=0; + hi->bitrate_max=0; + }else{ + hi->bitrate_min=ai->bitrate_hard_min; + hi->bitrate_max=ai->bitrate_hard_max; + hi->bitrate_reservoir=ai->bitrate_hard_window* + (hi->bitrate_max+hi->bitrate_min)*.5; + } + if(hi->bitrate_reservoir<128.) + hi->bitrate_reservoir=128.; + } + return(0); + + /* replacement ratemanage interface */ + case OV_ECTL_RATEMANAGE2_GET: + { + struct ovectl_ratemanage2_arg *ai= + (struct ovectl_ratemanage2_arg *)arg; + if(ai==NULL)return OV_EINVAL; + + ai->management_active=hi->managed; + ai->bitrate_limit_min_kbps=hi->bitrate_min/1000; + ai->bitrate_limit_max_kbps=hi->bitrate_max/1000; + ai->bitrate_average_kbps=hi->bitrate_av/1000; + ai->bitrate_average_damping=hi->bitrate_av_damp; + ai->bitrate_limit_reservoir_bits=hi->bitrate_reservoir; + ai->bitrate_limit_reservoir_bias=hi->bitrate_reservoir_bias; + } + return (0); + case OV_ECTL_RATEMANAGE2_SET: + { + struct ovectl_ratemanage2_arg *ai= + (struct ovectl_ratemanage2_arg *)arg; + if(ai==NULL){ + hi->managed=0; + }else{ + /* sanity check; only catch invariant violations */ + if(ai->bitrate_limit_min_kbps>0 && + ai->bitrate_average_kbps>0 && + ai->bitrate_limit_min_kbps>ai->bitrate_average_kbps) + return OV_EINVAL; + + if(ai->bitrate_limit_max_kbps>0 && + ai->bitrate_average_kbps>0 && + ai->bitrate_limit_max_kbpsbitrate_average_kbps) + return OV_EINVAL; + + if(ai->bitrate_limit_min_kbps>0 && + ai->bitrate_limit_max_kbps>0 && + ai->bitrate_limit_min_kbps>ai->bitrate_limit_max_kbps) + return OV_EINVAL; + + if(ai->bitrate_average_damping <= 0.) + return OV_EINVAL; + + if(ai->bitrate_limit_reservoir_bits < 0) + return OV_EINVAL; + + if(ai->bitrate_limit_reservoir_bias < 0.) + return OV_EINVAL; + + if(ai->bitrate_limit_reservoir_bias > 1.) + return OV_EINVAL; + + hi->managed=ai->management_active; + hi->bitrate_min=ai->bitrate_limit_min_kbps * 1000; + hi->bitrate_max=ai->bitrate_limit_max_kbps * 1000; + hi->bitrate_av=ai->bitrate_average_kbps * 1000; + hi->bitrate_av_damp=ai->bitrate_average_damping; + hi->bitrate_reservoir=ai->bitrate_limit_reservoir_bits; + hi->bitrate_reservoir_bias=ai->bitrate_limit_reservoir_bias; + } + } + return 0; + + case OV_ECTL_LOWPASS_GET: + { + double *farg=(double *)arg; + *farg=hi->lowpass_kHz; + } + return(0); + case OV_ECTL_LOWPASS_SET: + { + double *farg=(double *)arg; + hi->lowpass_kHz=*farg; + + if(hi->lowpass_kHz<2.)hi->lowpass_kHz=2.; + if(hi->lowpass_kHz>99.)hi->lowpass_kHz=99.; + hi->lowpass_altered=1; + } + return(0); + case OV_ECTL_IBLOCK_GET: + { + double *farg=(double *)arg; + *farg=hi->impulse_noisetune; + } + return(0); + case OV_ECTL_IBLOCK_SET: + { + double *farg=(double *)arg; + hi->impulse_noisetune=*farg; + + if(hi->impulse_noisetune>0.)hi->impulse_noisetune=0.; + if(hi->impulse_noisetune<-15.)hi->impulse_noisetune=-15.; + } + return(0); + case OV_ECTL_COUPLING_GET: + { + int *iarg=(int *)arg; + *iarg=hi->coupling_p; + } + return(0); + case OV_ECTL_COUPLING_SET: + { + const void *new_template; + double new_base=0.; + int *iarg=(int *)arg; + hi->coupling_p=((*iarg)!=0); + + /* Fetching a new template can alter the base_setting, which + many other parameters are based on. Right now, the only + parameter drawn from the base_setting that can be altered + by an encctl is the lowpass, so that is explictly flagged + to not be overwritten when we fetch a new template and + recompute the dependant settings */ + new_template = get_setup_template(hi->coupling_p?vi->channels:-1, + vi->rate, + hi->req, + hi->managed, + &new_base); + if(!hi->setup)return OV_EIMPL; + hi->setup=new_template; + hi->base_setting=new_base; + vorbis_encode_setup_setting(vi,vi->channels,vi->rate); + } + return(0); + } + return(OV_EIMPL); + } + return(OV_EINVAL); +} diff --git a/code/libvorbis-1.3.4/lib/vorbisfile.c b/code/libvorbis-1.3.4/lib/vorbisfile.c new file mode 100644 index 00000000..84bf8c31 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/vorbisfile.c @@ -0,0 +1,2341 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: stdio-based convenience library for opening/seeking/decoding + last mod: $Id: vorbisfile.c 19031 2013-12-03 19:20:50Z tterribe $ + + ********************************************************************/ + +#include +#include +#include +#include +#include + +#include "vorbis/codec.h" + +/* we don't need or want the static callback symbols here */ +#define OV_EXCLUDE_STATIC_CALLBACKS +#include "vorbis/vorbisfile.h" + +#include "os.h" +#include "misc.h" + +/* A 'chained bitstream' is a Vorbis bitstream that contains more than + one logical bitstream arranged end to end (the only form of Ogg + multiplexing allowed in a Vorbis bitstream; grouping [parallel + multiplexing] is not allowed in Vorbis) */ + +/* A Vorbis file can be played beginning to end (streamed) without + worrying ahead of time about chaining (see decoder_example.c). If + we have the whole file, however, and want random access + (seeking/scrubbing) or desire to know the total length/time of a + file, we need to account for the possibility of chaining. */ + +/* We can handle things a number of ways; we can determine the entire + bitstream structure right off the bat, or find pieces on demand. + This example determines and caches structure for the entire + bitstream, but builds a virtual decoder on the fly when moving + between links in the chain. */ + +/* There are also different ways to implement seeking. Enough + information exists in an Ogg bitstream to seek to + sample-granularity positions in the output. Or, one can seek by + picking some portion of the stream roughly in the desired area if + we only want coarse navigation through the stream. */ + +/************************************************************************* + * Many, many internal helpers. The intention is not to be confusing; + * rampant duplication and monolithic function implementation would be + * harder to understand anyway. The high level functions are last. Begin + * grokking near the end of the file */ + +/* read a little more data from the file/pipe into the ogg_sync framer +*/ +#define CHUNKSIZE 65536 /* greater-than-page-size granularity seeking */ +#define READSIZE 2048 /* a smaller read size is needed for low-rate streaming. */ + +static long _get_data(OggVorbis_File *vf){ + errno=0; + if(!(vf->callbacks.read_func))return(-1); + if(vf->datasource){ + char *buffer=ogg_sync_buffer(&vf->oy,READSIZE); + long bytes=(vf->callbacks.read_func)(buffer,1,READSIZE,vf->datasource); + if(bytes>0)ogg_sync_wrote(&vf->oy,bytes); + if(bytes==0 && errno)return(-1); + return(bytes); + }else + return(0); +} + +/* save a tiny smidge of verbosity to make the code more readable */ +static int _seek_helper(OggVorbis_File *vf,ogg_int64_t offset){ + if(vf->datasource){ + if(!(vf->callbacks.seek_func)|| + (vf->callbacks.seek_func)(vf->datasource, offset, SEEK_SET) == -1) + return OV_EREAD; + vf->offset=offset; + ogg_sync_reset(&vf->oy); + }else{ + /* shouldn't happen unless someone writes a broken callback */ + return OV_EFAULT; + } + return 0; +} + +/* The read/seek functions track absolute position within the stream */ + +/* from the head of the stream, get the next page. boundary specifies + if the function is allowed to fetch more data from the stream (and + how much) or only use internally buffered data. + + boundary: -1) unbounded search + 0) read no additional data; use cached only + n) search for a new page beginning for n bytes + + return: <0) did not find a page (OV_FALSE, OV_EOF, OV_EREAD) + n) found a page at absolute offset n */ + +static ogg_int64_t _get_next_page(OggVorbis_File *vf,ogg_page *og, + ogg_int64_t boundary){ + if(boundary>0)boundary+=vf->offset; + while(1){ + long more; + + if(boundary>0 && vf->offset>=boundary)return(OV_FALSE); + more=ogg_sync_pageseek(&vf->oy,og); + + if(more<0){ + /* skipped n bytes */ + vf->offset-=more; + }else{ + if(more==0){ + /* send more paramedics */ + if(!boundary)return(OV_FALSE); + { + long ret=_get_data(vf); + if(ret==0)return(OV_EOF); + if(ret<0)return(OV_EREAD); + } + }else{ + /* got a page. Return the offset at the page beginning, + advance the internal offset past the page end */ + ogg_int64_t ret=vf->offset; + vf->offset+=more; + return(ret); + + } + } + } +} + +/* find the latest page beginning before the current stream cursor + position. Much dirtier than the above as Ogg doesn't have any + backward search linkage. no 'readp' as it will certainly have to + read. */ +/* returns offset or OV_EREAD, OV_FAULT */ +static ogg_int64_t _get_prev_page(OggVorbis_File *vf,ogg_page *og){ + ogg_int64_t begin=vf->offset; + ogg_int64_t end=begin; + ogg_int64_t ret; + ogg_int64_t offset=-1; + + while(offset==-1){ + begin-=CHUNKSIZE; + if(begin<0) + begin=0; + + ret=_seek_helper(vf,begin); + if(ret)return(ret); + + while(vf->offsetoffset); + if(ret==OV_EREAD)return(OV_EREAD); + if(ret<0){ + break; + }else{ + offset=ret; + } + } + } + + /* In a fully compliant, non-multiplexed stream, we'll still be + holding the last page. In multiplexed (or noncompliant streams), + we will probably have to re-read the last page we saw */ + if(og->header_len==0){ + ret=_seek_helper(vf,offset); + if(ret)return(ret); + + ret=_get_next_page(vf,og,CHUNKSIZE); + if(ret<0) + /* this shouldn't be possible */ + return(OV_EFAULT); + } + + return(offset); +} + +static void _add_serialno(ogg_page *og,long **serialno_list, int *n){ + long s = ogg_page_serialno(og); + (*n)++; + + if(*serialno_list){ + *serialno_list = _ogg_realloc(*serialno_list, sizeof(**serialno_list)*(*n)); + }else{ + *serialno_list = _ogg_malloc(sizeof(**serialno_list)); + } + + (*serialno_list)[(*n)-1] = s; +} + +/* returns nonzero if found */ +static int _lookup_serialno(long s, long *serialno_list, int n){ + if(serialno_list){ + while(n--){ + if(*serialno_list == s) return 1; + serialno_list++; + } + } + return 0; +} + +static int _lookup_page_serialno(ogg_page *og, long *serialno_list, int n){ + long s = ogg_page_serialno(og); + return _lookup_serialno(s,serialno_list,n); +} + +/* performs the same search as _get_prev_page, but prefers pages of + the specified serial number. If a page of the specified serialno is + spotted during the seek-back-and-read-forward, it will return the + info of last page of the matching serial number instead of the very + last page. If no page of the specified serialno is seen, it will + return the info of last page and alter *serialno. */ +static ogg_int64_t _get_prev_page_serial(OggVorbis_File *vf, + long *serial_list, int serial_n, + int *serialno, ogg_int64_t *granpos){ + ogg_page og; + ogg_int64_t begin=vf->offset; + ogg_int64_t end=begin; + ogg_int64_t ret; + + ogg_int64_t prefoffset=-1; + ogg_int64_t offset=-1; + ogg_int64_t ret_serialno=-1; + ogg_int64_t ret_gran=-1; + + while(offset==-1){ + begin-=CHUNKSIZE; + if(begin<0) + begin=0; + + ret=_seek_helper(vf,begin); + if(ret)return(ret); + + while(vf->offsetoffset); + if(ret==OV_EREAD)return(OV_EREAD); + if(ret<0){ + break; + }else{ + ret_serialno=ogg_page_serialno(&og); + ret_gran=ogg_page_granulepos(&og); + offset=ret; + + if(ret_serialno == *serialno){ + prefoffset=ret; + *granpos=ret_gran; + } + + if(!_lookup_serialno(ret_serialno,serial_list,serial_n)){ + /* we fell off the end of the link, which means we seeked + back too far and shouldn't have been looking in that link + to begin with. If we found the preferred serial number, + forget that we saw it. */ + prefoffset=-1; + } + } + } + } + + /* we're not interested in the page... just the serialno and granpos. */ + if(prefoffset>=0)return(prefoffset); + + *serialno = ret_serialno; + *granpos = ret_gran; + return(offset); + +} + +/* uses the local ogg_stream storage in vf; this is important for + non-streaming input sources */ +static int _fetch_headers(OggVorbis_File *vf,vorbis_info *vi,vorbis_comment *vc, + long **serialno_list, int *serialno_n, + ogg_page *og_ptr){ + ogg_page og; + ogg_packet op; + int i,ret; + int allbos=0; + + if(!og_ptr){ + ogg_int64_t llret=_get_next_page(vf,&og,CHUNKSIZE); + if(llret==OV_EREAD)return(OV_EREAD); + if(llret<0)return(OV_ENOTVORBIS); + og_ptr=&og; + } + + vorbis_info_init(vi); + vorbis_comment_init(vc); + vf->ready_state=OPENED; + + /* extract the serialnos of all BOS pages + the first set of vorbis + headers we see in the link */ + + while(ogg_page_bos(og_ptr)){ + if(serialno_list){ + if(_lookup_page_serialno(og_ptr,*serialno_list,*serialno_n)){ + /* a dupe serialnumber in an initial header packet set == invalid stream */ + if(*serialno_list)_ogg_free(*serialno_list); + *serialno_list=0; + *serialno_n=0; + ret=OV_EBADHEADER; + goto bail_header; + } + + _add_serialno(og_ptr,serialno_list,serialno_n); + } + + if(vf->ready_stateos,ogg_page_serialno(og_ptr)); + ogg_stream_pagein(&vf->os,og_ptr); + + if(ogg_stream_packetout(&vf->os,&op) > 0 && + vorbis_synthesis_idheader(&op)){ + /* vorbis header; continue setup */ + vf->ready_state=STREAMSET; + if((ret=vorbis_synthesis_headerin(vi,vc,&op))){ + ret=OV_EBADHEADER; + goto bail_header; + } + } + } + + /* get next page */ + { + ogg_int64_t llret=_get_next_page(vf,og_ptr,CHUNKSIZE); + if(llret==OV_EREAD){ + ret=OV_EREAD; + goto bail_header; + } + if(llret<0){ + ret=OV_ENOTVORBIS; + goto bail_header; + } + + /* if this page also belongs to our vorbis stream, submit it and break */ + if(vf->ready_state==STREAMSET && + vf->os.serialno == ogg_page_serialno(og_ptr)){ + ogg_stream_pagein(&vf->os,og_ptr); + break; + } + } + } + + if(vf->ready_state!=STREAMSET){ + ret = OV_ENOTVORBIS; + goto bail_header; + } + + while(1){ + + i=0; + while(i<2){ /* get a page loop */ + + while(i<2){ /* get a packet loop */ + + int result=ogg_stream_packetout(&vf->os,&op); + if(result==0)break; + if(result==-1){ + ret=OV_EBADHEADER; + goto bail_header; + } + + if((ret=vorbis_synthesis_headerin(vi,vc,&op))) + goto bail_header; + + i++; + } + + while(i<2){ + if(_get_next_page(vf,og_ptr,CHUNKSIZE)<0){ + ret=OV_EBADHEADER; + goto bail_header; + } + + /* if this page belongs to the correct stream, go parse it */ + if(vf->os.serialno == ogg_page_serialno(og_ptr)){ + ogg_stream_pagein(&vf->os,og_ptr); + break; + } + + /* if we never see the final vorbis headers before the link + ends, abort */ + if(ogg_page_bos(og_ptr)){ + if(allbos){ + ret = OV_EBADHEADER; + goto bail_header; + }else + allbos=1; + } + + /* otherwise, keep looking */ + } + } + + return 0; + } + + bail_header: + vorbis_info_clear(vi); + vorbis_comment_clear(vc); + vf->ready_state=OPENED; + + return ret; +} + +/* Starting from current cursor position, get initial PCM offset of + next page. Consumes the page in the process without decoding + audio, however this is only called during stream parsing upon + seekable open. */ +static ogg_int64_t _initial_pcmoffset(OggVorbis_File *vf, vorbis_info *vi){ + ogg_page og; + ogg_int64_t accumulated=0; + long lastblock=-1; + int result; + int serialno = vf->os.serialno; + + while(1){ + ogg_packet op; + if(_get_next_page(vf,&og,-1)<0) + break; /* should not be possible unless the file is truncated/mangled */ + + if(ogg_page_bos(&og)) break; + if(ogg_page_serialno(&og)!=serialno) continue; + + /* count blocksizes of all frames in the page */ + ogg_stream_pagein(&vf->os,&og); + while((result=ogg_stream_packetout(&vf->os,&op))){ + if(result>0){ /* ignore holes */ + long thisblock=vorbis_packet_blocksize(vi,&op); + if(lastblock!=-1) + accumulated+=(lastblock+thisblock)>>2; + lastblock=thisblock; + } + } + + if(ogg_page_granulepos(&og)!=-1){ + /* pcm offset of last packet on the first audio page */ + accumulated= ogg_page_granulepos(&og)-accumulated; + break; + } + } + + /* less than zero? Either a corrupt file or a stream with samples + trimmed off the beginning, a normal occurrence; in both cases set + the offset to zero */ + if(accumulated<0)accumulated=0; + + return accumulated; +} + +/* finds each bitstream link one at a time using a bisection search + (has to begin by knowing the offset of the lb's initial page). + Recurses for each link so it can alloc the link storage after + finding them all, then unroll and fill the cache at the same time */ +static int _bisect_forward_serialno(OggVorbis_File *vf, + ogg_int64_t begin, + ogg_int64_t searched, + ogg_int64_t end, + ogg_int64_t endgran, + int endserial, + long *currentno_list, + int currentnos, + long m){ + ogg_int64_t pcmoffset; + ogg_int64_t dataoffset=searched; + ogg_int64_t endsearched=end; + ogg_int64_t next=end; + ogg_int64_t searchgran=-1; + ogg_page og; + ogg_int64_t ret,last; + int serialno = vf->os.serialno; + + /* invariants: + we have the headers and serialnos for the link beginning at 'begin' + we have the offset and granpos of the last page in the file (potentially + not a page we care about) + */ + + /* Is the last page in our list of current serialnumbers? */ + if(_lookup_serialno(endserial,currentno_list,currentnos)){ + + /* last page is in the starting serialno list, so we've bisected + down to (or just started with) a single link. Now we need to + find the last vorbis page belonging to the first vorbis stream + for this link. */ + + while(endserial != serialno){ + endserial = serialno; + vf->offset=_get_prev_page_serial(vf,currentno_list,currentnos,&endserial,&endgran); + } + + vf->links=m+1; + if(vf->offsets)_ogg_free(vf->offsets); + if(vf->serialnos)_ogg_free(vf->serialnos); + if(vf->dataoffsets)_ogg_free(vf->dataoffsets); + + vf->offsets=_ogg_malloc((vf->links+1)*sizeof(*vf->offsets)); + vf->vi=_ogg_realloc(vf->vi,vf->links*sizeof(*vf->vi)); + vf->vc=_ogg_realloc(vf->vc,vf->links*sizeof(*vf->vc)); + vf->serialnos=_ogg_malloc(vf->links*sizeof(*vf->serialnos)); + vf->dataoffsets=_ogg_malloc(vf->links*sizeof(*vf->dataoffsets)); + vf->pcmlengths=_ogg_malloc(vf->links*2*sizeof(*vf->pcmlengths)); + + vf->offsets[m+1]=end; + vf->offsets[m]=begin; + vf->pcmlengths[m*2+1]=(endgran<0?0:endgran); + + }else{ + + long *next_serialno_list=NULL; + int next_serialnos=0; + vorbis_info vi; + vorbis_comment vc; + + /* the below guards against garbage seperating the last and + first pages of two links. */ + while(searchedoffset){ + ret=_seek_helper(vf,bisect); + if(ret)return(ret); + } + + last=_get_next_page(vf,&og,-1); + if(last==OV_EREAD)return(OV_EREAD); + if(last<0 || !_lookup_page_serialno(&og,currentno_list,currentnos)){ + endsearched=bisect; + if(last>=0)next=last; + }else{ + searched=vf->offset; + } + } + + /* Bisection point found */ + + /* for the time being, fetch end PCM offset the simple way */ + { + int testserial = serialno+1; + vf->offset = next; + while(testserial != serialno){ + testserial = serialno; + vf->offset=_get_prev_page_serial(vf,currentno_list,currentnos,&testserial,&searchgran); + } + } + + if(vf->offset!=next){ + ret=_seek_helper(vf,next); + if(ret)return(ret); + } + + ret=_fetch_headers(vf,&vi,&vc,&next_serialno_list,&next_serialnos,NULL); + if(ret)return(ret); + serialno = vf->os.serialno; + dataoffset = vf->offset; + + /* this will consume a page, however the next bistection always + starts with a raw seek */ + pcmoffset = _initial_pcmoffset(vf,&vi); + + ret=_bisect_forward_serialno(vf,next,vf->offset,end,endgran,endserial, + next_serialno_list,next_serialnos,m+1); + if(ret)return(ret); + + if(next_serialno_list)_ogg_free(next_serialno_list); + + vf->offsets[m+1]=next; + vf->serialnos[m+1]=serialno; + vf->dataoffsets[m+1]=dataoffset; + + vf->vi[m+1]=vi; + vf->vc[m+1]=vc; + + vf->pcmlengths[m*2+1]=searchgran; + vf->pcmlengths[m*2+2]=pcmoffset; + vf->pcmlengths[m*2+3]-=pcmoffset; + if(vf->pcmlengths[m*2+3]<0)vf->pcmlengths[m*2+3]=0; + } + return(0); +} + +static int _make_decode_ready(OggVorbis_File *vf){ + if(vf->ready_state>STREAMSET)return 0; + if(vf->ready_stateseekable){ + if(vorbis_synthesis_init(&vf->vd,vf->vi+vf->current_link)) + return OV_EBADLINK; + }else{ + if(vorbis_synthesis_init(&vf->vd,vf->vi)) + return OV_EBADLINK; + } + vorbis_block_init(&vf->vd,&vf->vb); + vf->ready_state=INITSET; + vf->bittrack=0.f; + vf->samptrack=0.f; + return 0; +} + +static int _open_seekable2(OggVorbis_File *vf){ + ogg_int64_t dataoffset=vf->dataoffsets[0],end,endgran=-1; + int endserial=vf->os.serialno; + int serialno=vf->os.serialno; + + /* we're partially open and have a first link header state in + storage in vf */ + + /* fetch initial PCM offset */ + ogg_int64_t pcmoffset = _initial_pcmoffset(vf,vf->vi); + + /* we can seek, so set out learning all about this file */ + if(vf->callbacks.seek_func && vf->callbacks.tell_func){ + (vf->callbacks.seek_func)(vf->datasource,0,SEEK_END); + vf->offset=vf->end=(vf->callbacks.tell_func)(vf->datasource); + }else{ + vf->offset=vf->end=-1; + } + + /* If seek_func is implemented, tell_func must also be implemented */ + if(vf->end==-1) return(OV_EINVAL); + + /* Get the offset of the last page of the physical bitstream, or, if + we're lucky the last vorbis page of this link as most OggVorbis + files will contain a single logical bitstream */ + end=_get_prev_page_serial(vf,vf->serialnos+2,vf->serialnos[1],&endserial,&endgran); + if(end<0)return(end); + + /* now determine bitstream structure recursively */ + if(_bisect_forward_serialno(vf,0,dataoffset,vf->offset,endgran,endserial, + vf->serialnos+2,vf->serialnos[1],0)<0)return(OV_EREAD); + + vf->offsets[0]=0; + vf->serialnos[0]=serialno; + vf->dataoffsets[0]=dataoffset; + vf->pcmlengths[0]=pcmoffset; + vf->pcmlengths[1]-=pcmoffset; + if(vf->pcmlengths[1]<0)vf->pcmlengths[1]=0; + + return(ov_raw_seek(vf,dataoffset)); +} + +/* clear out the current logical bitstream decoder */ +static void _decode_clear(OggVorbis_File *vf){ + vorbis_dsp_clear(&vf->vd); + vorbis_block_clear(&vf->vb); + vf->ready_state=OPENED; +} + +/* fetch and process a packet. Handles the case where we're at a + bitstream boundary and dumps the decoding machine. If the decoding + machine is unloaded, it loads it. It also keeps pcm_offset up to + date (seek and read both use this. seek uses a special hack with + readp). + + return: <0) error, OV_HOLE (lost packet) or OV_EOF + 0) need more data (only if readp==0) + 1) got a packet +*/ + +static int _fetch_and_process_packet(OggVorbis_File *vf, + ogg_packet *op_in, + int readp, + int spanp){ + ogg_page og; + + /* handle one packet. Try to fetch it from current stream state */ + /* extract packets from page */ + while(1){ + + if(vf->ready_state==STREAMSET){ + int ret=_make_decode_ready(vf); + if(ret<0)return ret; + } + + /* process a packet if we can. */ + + if(vf->ready_state==INITSET){ + int hs=vorbis_synthesis_halfrate_p(vf->vi); + + while(1) { + ogg_packet op; + ogg_packet *op_ptr=(op_in?op_in:&op); + int result=ogg_stream_packetout(&vf->os,op_ptr); + ogg_int64_t granulepos; + + op_in=NULL; + if(result==-1)return(OV_HOLE); /* hole in the data. */ + if(result>0){ + /* got a packet. process it */ + granulepos=op_ptr->granulepos; + if(!vorbis_synthesis(&vf->vb,op_ptr)){ /* lazy check for lazy + header handling. The + header packets aren't + audio, so if/when we + submit them, + vorbis_synthesis will + reject them */ + + /* suck in the synthesis data and track bitrate */ + { + int oldsamples=vorbis_synthesis_pcmout(&vf->vd,NULL); + /* for proper use of libvorbis within libvorbisfile, + oldsamples will always be zero. */ + if(oldsamples)return(OV_EFAULT); + + vorbis_synthesis_blockin(&vf->vd,&vf->vb); + vf->samptrack+=(vorbis_synthesis_pcmout(&vf->vd,NULL)<bittrack+=op_ptr->bytes*8; + } + + /* update the pcm offset. */ + if(granulepos!=-1 && !op_ptr->e_o_s){ + int link=(vf->seekable?vf->current_link:0); + int i,samples; + + /* this packet has a pcm_offset on it (the last packet + completed on a page carries the offset) After processing + (above), we know the pcm position of the *last* sample + ready to be returned. Find the offset of the *first* + + As an aside, this trick is inaccurate if we begin + reading anew right at the last page; the end-of-stream + granulepos declares the last frame in the stream, and the + last packet of the last page may be a partial frame. + So, we need a previous granulepos from an in-sequence page + to have a reference point. Thus the !op_ptr->e_o_s clause + above */ + + if(vf->seekable && link>0) + granulepos-=vf->pcmlengths[link*2]; + if(granulepos<0)granulepos=0; /* actually, this + shouldn't be possible + here unless the stream + is very broken */ + + samples=(vorbis_synthesis_pcmout(&vf->vd,NULL)<pcmlengths[i*2+1]; + vf->pcm_offset=granulepos; + } + return(1); + } + } + else + break; + } + } + + if(vf->ready_state>=OPENED){ + ogg_int64_t ret; + + while(1){ + /* the loop is not strictly necessary, but there's no sense in + doing the extra checks of the larger loop for the common + case in a multiplexed bistream where the page is simply + part of a different logical bitstream; keep reading until + we get one with the correct serialno */ + + if(!readp)return(0); + if((ret=_get_next_page(vf,&og,-1))<0){ + return(OV_EOF); /* eof. leave unitialized */ + } + + /* bitrate tracking; add the header's bytes here, the body bytes + are done by packet above */ + vf->bittrack+=og.header_len*8; + + if(vf->ready_state==INITSET){ + if(vf->current_serialno!=ogg_page_serialno(&og)){ + + /* two possibilities: + 1) our decoding just traversed a bitstream boundary + 2) another stream is multiplexed into this logical section */ + + if(ogg_page_bos(&og)){ + /* boundary case */ + if(!spanp) + return(OV_EOF); + + _decode_clear(vf); + + if(!vf->seekable){ + vorbis_info_clear(vf->vi); + vorbis_comment_clear(vf->vc); + } + break; + + }else + continue; /* possibility #2 */ + } + } + + break; + } + } + + /* Do we need to load a new machine before submitting the page? */ + /* This is different in the seekable and non-seekable cases. + + In the seekable case, we already have all the header + information loaded and cached; we just initialize the machine + with it and continue on our merry way. + + In the non-seekable (streaming) case, we'll only be at a + boundary if we just left the previous logical bitstream and + we're now nominally at the header of the next bitstream + */ + + if(vf->ready_state!=INITSET){ + int link; + + if(vf->ready_stateseekable){ + long serialno = ogg_page_serialno(&og); + + /* match the serialno to bitstream section. We use this rather than + offset positions to avoid problems near logical bitstream + boundaries */ + + for(link=0;linklinks;link++) + if(vf->serialnos[link]==serialno)break; + + if(link==vf->links) continue; /* not the desired Vorbis + bitstream section; keep + trying */ + + vf->current_serialno=serialno; + vf->current_link=link; + + ogg_stream_reset_serialno(&vf->os,vf->current_serialno); + vf->ready_state=STREAMSET; + + }else{ + /* we're streaming */ + /* fetch the three header packets, build the info struct */ + + int ret=_fetch_headers(vf,vf->vi,vf->vc,NULL,NULL,&og); + if(ret)return(ret); + vf->current_serialno=vf->os.serialno; + vf->current_link++; + link=0; + } + } + } + + /* the buffered page is the data we want, and we're ready for it; + add it to the stream state */ + ogg_stream_pagein(&vf->os,&og); + + } +} + +/* if, eg, 64 bit stdio is configured by default, this will build with + fseek64 */ +static int _fseek64_wrap(FILE *f,ogg_int64_t off,int whence){ + if(f==NULL)return(-1); + return fseek(f,off,whence); +} + +static int _ov_open1(void *f,OggVorbis_File *vf,const char *initial, + long ibytes, ov_callbacks callbacks){ + int offsettest=((f && callbacks.seek_func)?callbacks.seek_func(f,0,SEEK_CUR):-1); + long *serialno_list=NULL; + int serialno_list_size=0; + int ret; + + memset(vf,0,sizeof(*vf)); + vf->datasource=f; + vf->callbacks = callbacks; + + /* init the framing state */ + ogg_sync_init(&vf->oy); + + /* perhaps some data was previously read into a buffer for testing + against other stream types. Allow initialization from this + previously read data (especially as we may be reading from a + non-seekable stream) */ + if(initial){ + char *buffer=ogg_sync_buffer(&vf->oy,ibytes); + memcpy(buffer,initial,ibytes); + ogg_sync_wrote(&vf->oy,ibytes); + } + + /* can we seek? Stevens suggests the seek test was portable */ + if(offsettest!=-1)vf->seekable=1; + + /* No seeking yet; Set up a 'single' (current) logical bitstream + entry for partial open */ + vf->links=1; + vf->vi=_ogg_calloc(vf->links,sizeof(*vf->vi)); + vf->vc=_ogg_calloc(vf->links,sizeof(*vf->vc)); + ogg_stream_init(&vf->os,-1); /* fill in the serialno later */ + + /* Fetch all BOS pages, store the vorbis header and all seen serial + numbers, load subsequent vorbis setup headers */ + if((ret=_fetch_headers(vf,vf->vi,vf->vc,&serialno_list,&serialno_list_size,NULL))<0){ + vf->datasource=NULL; + ov_clear(vf); + }else{ + /* serial number list for first link needs to be held somewhere + for second stage of seekable stream open; this saves having to + seek/reread first link's serialnumber data then. */ + vf->serialnos=_ogg_calloc(serialno_list_size+2,sizeof(*vf->serialnos)); + vf->serialnos[0]=vf->current_serialno=vf->os.serialno; + vf->serialnos[1]=serialno_list_size; + memcpy(vf->serialnos+2,serialno_list,serialno_list_size*sizeof(*vf->serialnos)); + + vf->offsets=_ogg_calloc(1,sizeof(*vf->offsets)); + vf->dataoffsets=_ogg_calloc(1,sizeof(*vf->dataoffsets)); + vf->offsets[0]=0; + vf->dataoffsets[0]=vf->offset; + + vf->ready_state=PARTOPEN; + } + if(serialno_list)_ogg_free(serialno_list); + return(ret); +} + +static int _ov_open2(OggVorbis_File *vf){ + if(vf->ready_state != PARTOPEN) return OV_EINVAL; + vf->ready_state=OPENED; + if(vf->seekable){ + int ret=_open_seekable2(vf); + if(ret){ + vf->datasource=NULL; + ov_clear(vf); + } + return(ret); + }else + vf->ready_state=STREAMSET; + + return 0; +} + + +/* clear out the OggVorbis_File struct */ +int ov_clear(OggVorbis_File *vf){ + if(vf){ + vorbis_block_clear(&vf->vb); + vorbis_dsp_clear(&vf->vd); + ogg_stream_clear(&vf->os); + + if(vf->vi && vf->links){ + int i; + for(i=0;ilinks;i++){ + vorbis_info_clear(vf->vi+i); + vorbis_comment_clear(vf->vc+i); + } + _ogg_free(vf->vi); + _ogg_free(vf->vc); + } + if(vf->dataoffsets)_ogg_free(vf->dataoffsets); + if(vf->pcmlengths)_ogg_free(vf->pcmlengths); + if(vf->serialnos)_ogg_free(vf->serialnos); + if(vf->offsets)_ogg_free(vf->offsets); + ogg_sync_clear(&vf->oy); + if(vf->datasource && vf->callbacks.close_func) + (vf->callbacks.close_func)(vf->datasource); + memset(vf,0,sizeof(*vf)); + } +#ifdef DEBUG_LEAKS + _VDBG_dump(); +#endif + return(0); +} + +/* inspects the OggVorbis file and finds/documents all the logical + bitstreams contained in it. Tries to be tolerant of logical + bitstream sections that are truncated/woogie. + + return: -1) error + 0) OK +*/ + +int ov_open_callbacks(void *f,OggVorbis_File *vf, + const char *initial,long ibytes,ov_callbacks callbacks){ + int ret=_ov_open1(f,vf,initial,ibytes,callbacks); + if(ret)return ret; + return _ov_open2(vf); +} + +int ov_open(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes){ + ov_callbacks callbacks = { + (size_t (*)(void *, size_t, size_t, void *)) fread, + (int (*)(void *, ogg_int64_t, int)) _fseek64_wrap, + (int (*)(void *)) fclose, + (long (*)(void *)) ftell + }; + + return ov_open_callbacks((void *)f, vf, initial, ibytes, callbacks); +} + +int ov_fopen(const char *path,OggVorbis_File *vf){ + int ret; + FILE *f = fopen(path,"rb"); + if(!f) return -1; + + ret = ov_open(f,vf,NULL,0); + if(ret) fclose(f); + return ret; +} + + +/* cheap hack for game usage where downsampling is desirable; there's + no need for SRC as we can just do it cheaply in libvorbis. */ + +int ov_halfrate(OggVorbis_File *vf,int flag){ + int i; + if(vf->vi==NULL)return OV_EINVAL; + if(vf->ready_state>STREAMSET){ + /* clear out stream state; dumping the decode machine is needed to + reinit the MDCT lookups. */ + vorbis_dsp_clear(&vf->vd); + vorbis_block_clear(&vf->vb); + vf->ready_state=STREAMSET; + if(vf->pcm_offset>=0){ + ogg_int64_t pos=vf->pcm_offset; + vf->pcm_offset=-1; /* make sure the pos is dumped if unseekable */ + ov_pcm_seek(vf,pos); + } + } + + for(i=0;ilinks;i++){ + if(vorbis_synthesis_halfrate(vf->vi+i,flag)){ + if(flag) ov_halfrate(vf,0); + return OV_EINVAL; + } + } + return 0; +} + +int ov_halfrate_p(OggVorbis_File *vf){ + if(vf->vi==NULL)return OV_EINVAL; + return vorbis_synthesis_halfrate_p(vf->vi); +} + +/* Only partially open the vorbis file; test for Vorbisness, and load + the headers for the first chain. Do not seek (although test for + seekability). Use ov_test_open to finish opening the file, else + ov_clear to close/free it. Same return codes as open. + + Note that vorbisfile does _not_ take ownership of the file if the + call fails; the calling applicaiton is responsible for closing the file + if this call returns an error. */ + +int ov_test_callbacks(void *f,OggVorbis_File *vf, + const char *initial,long ibytes,ov_callbacks callbacks) +{ + return _ov_open1(f,vf,initial,ibytes,callbacks); +} + +int ov_test(FILE *f,OggVorbis_File *vf,const char *initial,long ibytes){ + ov_callbacks callbacks = { + (size_t (*)(void *, size_t, size_t, void *)) fread, + (int (*)(void *, ogg_int64_t, int)) _fseek64_wrap, + (int (*)(void *)) fclose, + (long (*)(void *)) ftell + }; + + return ov_test_callbacks((void *)f, vf, initial, ibytes, callbacks); +} + +int ov_test_open(OggVorbis_File *vf){ + if(vf->ready_state!=PARTOPEN)return(OV_EINVAL); + return _ov_open2(vf); +} + +/* How many logical bitstreams in this physical bitstream? */ +long ov_streams(OggVorbis_File *vf){ + return vf->links; +} + +/* Is the FILE * associated with vf seekable? */ +long ov_seekable(OggVorbis_File *vf){ + return vf->seekable; +} + +/* returns the bitrate for a given logical bitstream or the entire + physical bitstream. If the file is open for random access, it will + find the *actual* average bitrate. If the file is streaming, it + returns the nominal bitrate (if set) else the average of the + upper/lower bounds (if set) else -1 (unset). + + If you want the actual bitrate field settings, get them from the + vorbis_info structs */ + +long ov_bitrate(OggVorbis_File *vf,int i){ + if(vf->ready_state=vf->links)return(OV_EINVAL); + if(!vf->seekable && i!=0)return(ov_bitrate(vf,0)); + if(i<0){ + ogg_int64_t bits=0; + int i; + float br; + for(i=0;ilinks;i++) + bits+=(vf->offsets[i+1]-vf->dataoffsets[i])*8; + /* This once read: return(rint(bits/ov_time_total(vf,-1))); + * gcc 3.x on x86 miscompiled this at optimisation level 2 and above, + * so this is slightly transformed to make it work. + */ + br = bits/ov_time_total(vf,-1); + return(rint(br)); + }else{ + if(vf->seekable){ + /* return the actual bitrate */ + return(rint((vf->offsets[i+1]-vf->dataoffsets[i])*8/ov_time_total(vf,i))); + }else{ + /* return nominal if set */ + if(vf->vi[i].bitrate_nominal>0){ + return vf->vi[i].bitrate_nominal; + }else{ + if(vf->vi[i].bitrate_upper>0){ + if(vf->vi[i].bitrate_lower>0){ + return (vf->vi[i].bitrate_upper+vf->vi[i].bitrate_lower)/2; + }else{ + return vf->vi[i].bitrate_upper; + } + } + return(OV_FALSE); + } + } + } +} + +/* returns the actual bitrate since last call. returns -1 if no + additional data to offer since last call (or at beginning of stream), + EINVAL if stream is only partially open +*/ +long ov_bitrate_instant(OggVorbis_File *vf){ + int link=(vf->seekable?vf->current_link:0); + long ret; + if(vf->ready_statesamptrack==0)return(OV_FALSE); + ret=vf->bittrack/vf->samptrack*vf->vi[link].rate+.5; + vf->bittrack=0.f; + vf->samptrack=0.f; + return(ret); +} + +/* Guess */ +long ov_serialnumber(OggVorbis_File *vf,int i){ + if(i>=vf->links)return(ov_serialnumber(vf,vf->links-1)); + if(!vf->seekable && i>=0)return(ov_serialnumber(vf,-1)); + if(i<0){ + return(vf->current_serialno); + }else{ + return(vf->serialnos[i]); + } +} + +/* returns: total raw (compressed) length of content if i==-1 + raw (compressed) length of that logical bitstream for i==0 to n + OV_EINVAL if the stream is not seekable (we can't know the length) + or if stream is only partially open +*/ +ogg_int64_t ov_raw_total(OggVorbis_File *vf,int i){ + if(vf->ready_stateseekable || i>=vf->links)return(OV_EINVAL); + if(i<0){ + ogg_int64_t acc=0; + int i; + for(i=0;ilinks;i++) + acc+=ov_raw_total(vf,i); + return(acc); + }else{ + return(vf->offsets[i+1]-vf->offsets[i]); + } +} + +/* returns: total PCM length (samples) of content if i==-1 PCM length + (samples) of that logical bitstream for i==0 to n + OV_EINVAL if the stream is not seekable (we can't know the + length) or only partially open +*/ +ogg_int64_t ov_pcm_total(OggVorbis_File *vf,int i){ + if(vf->ready_stateseekable || i>=vf->links)return(OV_EINVAL); + if(i<0){ + ogg_int64_t acc=0; + int i; + for(i=0;ilinks;i++) + acc+=ov_pcm_total(vf,i); + return(acc); + }else{ + return(vf->pcmlengths[i*2+1]); + } +} + +/* returns: total seconds of content if i==-1 + seconds in that logical bitstream for i==0 to n + OV_EINVAL if the stream is not seekable (we can't know the + length) or only partially open +*/ +double ov_time_total(OggVorbis_File *vf,int i){ + if(vf->ready_stateseekable || i>=vf->links)return(OV_EINVAL); + if(i<0){ + double acc=0; + int i; + for(i=0;ilinks;i++) + acc+=ov_time_total(vf,i); + return(acc); + }else{ + return((double)(vf->pcmlengths[i*2+1])/vf->vi[i].rate); + } +} + +/* seek to an offset relative to the *compressed* data. This also + scans packets to update the PCM cursor. It will cross a logical + bitstream boundary, but only if it can't get any packets out of the + tail of the bitstream we seek to (so no surprises). + + returns zero on success, nonzero on failure */ + +int ov_raw_seek(OggVorbis_File *vf,ogg_int64_t pos){ + ogg_stream_state work_os; + int ret; + + if(vf->ready_stateseekable) + return(OV_ENOSEEK); /* don't dump machine if we can't seek */ + + if(pos<0 || pos>vf->end)return(OV_EINVAL); + + /* is the seek position outside our current link [if any]? */ + if(vf->ready_state>=STREAMSET){ + if(posoffsets[vf->current_link] || pos>=vf->offsets[vf->current_link+1]) + _decode_clear(vf); /* clear out stream state */ + } + + /* don't yet clear out decoding machine (if it's initialized), in + the case we're in the same link. Restart the decode lapping, and + let _fetch_and_process_packet deal with a potential bitstream + boundary */ + vf->pcm_offset=-1; + ogg_stream_reset_serialno(&vf->os, + vf->current_serialno); /* must set serialno */ + vorbis_synthesis_restart(&vf->vd); + + ret=_seek_helper(vf,pos); + if(ret)goto seek_error; + + /* we need to make sure the pcm_offset is set, but we don't want to + advance the raw cursor past good packets just to get to the first + with a granulepos. That's not equivalent behavior to beginning + decoding as immediately after the seek position as possible. + + So, a hack. We use two stream states; a local scratch state and + the shared vf->os stream state. We use the local state to + scan, and the shared state as a buffer for later decode. + + Unfortuantely, on the last page we still advance to last packet + because the granulepos on the last page is not necessarily on a + packet boundary, and we need to make sure the granpos is + correct. + */ + + { + ogg_page og; + ogg_packet op; + int lastblock=0; + int accblock=0; + int thisblock=0; + int lastflag=0; + int firstflag=0; + ogg_int64_t pagepos=-1; + + ogg_stream_init(&work_os,vf->current_serialno); /* get the memory ready */ + ogg_stream_reset(&work_os); /* eliminate the spurious OV_HOLE + return from not necessarily + starting from the beginning */ + + while(1){ + if(vf->ready_state>=STREAMSET){ + /* snarf/scan a packet if we can */ + int result=ogg_stream_packetout(&work_os,&op); + + if(result>0){ + + if(vf->vi[vf->current_link].codec_setup){ + thisblock=vorbis_packet_blocksize(vf->vi+vf->current_link,&op); + if(thisblock<0){ + ogg_stream_packetout(&vf->os,NULL); + thisblock=0; + }else{ + + /* We can't get a guaranteed correct pcm position out of the + last page in a stream because it might have a 'short' + granpos, which can only be detected in the presence of a + preceding page. However, if the last page is also the first + page, the granpos rules of a first page take precedence. Not + only that, but for first==last, the EOS page must be treated + as if its a normal first page for the stream to open/play. */ + if(lastflag && !firstflag) + ogg_stream_packetout(&vf->os,NULL); + else + if(lastblock)accblock+=(lastblock+thisblock)>>2; + } + + if(op.granulepos!=-1){ + int i,link=vf->current_link; + ogg_int64_t granulepos=op.granulepos-vf->pcmlengths[link*2]; + if(granulepos<0)granulepos=0; + + for(i=0;ipcmlengths[i*2+1]; + vf->pcm_offset=granulepos-accblock; + if(vf->pcm_offset<0)vf->pcm_offset=0; + break; + } + lastblock=thisblock; + continue; + }else + ogg_stream_packetout(&vf->os,NULL); + } + } + + if(!lastblock){ + pagepos=_get_next_page(vf,&og,-1); + if(pagepos<0){ + vf->pcm_offset=ov_pcm_total(vf,-1); + break; + } + }else{ + /* huh? Bogus stream with packets but no granulepos */ + vf->pcm_offset=-1; + break; + } + + /* has our decoding just traversed a bitstream boundary? */ + if(vf->ready_state>=STREAMSET){ + if(vf->current_serialno!=ogg_page_serialno(&og)){ + + /* two possibilities: + 1) our decoding just traversed a bitstream boundary + 2) another stream is multiplexed into this logical section? */ + + if(ogg_page_bos(&og)){ + /* we traversed */ + _decode_clear(vf); /* clear out stream state */ + ogg_stream_clear(&work_os); + } /* else, do nothing; next loop will scoop another page */ + } + } + + if(vf->ready_statelinks;link++) + if(vf->serialnos[link]==serialno)break; + + if(link==vf->links) continue; /* not the desired Vorbis + bitstream section; keep + trying */ + vf->current_link=link; + vf->current_serialno=serialno; + ogg_stream_reset_serialno(&vf->os,serialno); + ogg_stream_reset_serialno(&work_os,serialno); + vf->ready_state=STREAMSET; + firstflag=(pagepos<=vf->dataoffsets[link]); + } + + ogg_stream_pagein(&vf->os,&og); + ogg_stream_pagein(&work_os,&og); + lastflag=ogg_page_eos(&og); + + } + } + + ogg_stream_clear(&work_os); + vf->bittrack=0.f; + vf->samptrack=0.f; + return(0); + + seek_error: + /* dump the machine so we're in a known state */ + vf->pcm_offset=-1; + ogg_stream_clear(&work_os); + _decode_clear(vf); + return OV_EBADLINK; +} + +/* Page granularity seek (faster than sample granularity because we + don't do the last bit of decode to find a specific sample). + + Seek to the last [granule marked] page preceding the specified pos + location, such that decoding past the returned point will quickly + arrive at the requested position. */ +int ov_pcm_seek_page(OggVorbis_File *vf,ogg_int64_t pos){ + int link=-1; + ogg_int64_t result=0; + ogg_int64_t total=ov_pcm_total(vf,-1); + + if(vf->ready_stateseekable)return(OV_ENOSEEK); + + if(pos<0 || pos>total)return(OV_EINVAL); + + /* which bitstream section does this pcm offset occur in? */ + for(link=vf->links-1;link>=0;link--){ + total-=vf->pcmlengths[link*2+1]; + if(pos>=total)break; + } + + /* search within the logical bitstream for the page with the highest + pcm_pos preceding (or equal to) pos. There is a danger here; + missing pages or incorrect frame number information in the + bitstream could make our task impossible. Account for that (it + would be an error condition) */ + + /* new search algorithm by HB (Nicholas Vinen) */ + { + ogg_int64_t end=vf->offsets[link+1]; + ogg_int64_t begin=vf->offsets[link]; + ogg_int64_t begintime = vf->pcmlengths[link*2]; + ogg_int64_t endtime = vf->pcmlengths[link*2+1]+begintime; + ogg_int64_t target=pos-total+begintime; + ogg_int64_t best=begin; + + ogg_page og; + while(beginoffset){ + result=_seek_helper(vf,bisect); + if(result) goto seek_error; + } + + while(beginoffset); + if(result==OV_EREAD) goto seek_error; + if(result<0){ + if(bisect<=begin+1) + end=begin; /* found it */ + else{ + if(bisect==0) goto seek_error; + bisect-=CHUNKSIZE; + if(bisect<=begin)bisect=begin+1; + result=_seek_helper(vf,bisect); + if(result) goto seek_error; + } + }else{ + ogg_int64_t granulepos; + + if(ogg_page_serialno(&og)!=vf->serialnos[link]) + continue; + + granulepos=ogg_page_granulepos(&og); + if(granulepos==-1)continue; + + if(granuleposoffset; /* raw offset of next page */ + begintime=granulepos; + + if(target-begintime>44100)break; + bisect=begin; /* *not* begin + 1 */ + }else{ + if(bisect<=begin+1) + end=begin; /* found it */ + else{ + if(end==vf->offset){ /* we're pretty close - we'd be stuck in */ + end=result; + bisect-=CHUNKSIZE; /* an endless loop otherwise. */ + if(bisect<=begin)bisect=begin+1; + result=_seek_helper(vf,bisect); + if(result) goto seek_error; + }else{ + end=bisect; + endtime=granulepos; + break; + } + } + } + } + } + } + + /* found our page. seek to it, update pcm offset. Easier case than + raw_seek, don't keep packets preceding granulepos. */ + { + ogg_page og; + ogg_packet op; + + /* seek */ + result=_seek_helper(vf,best); + vf->pcm_offset=-1; + if(result) goto seek_error; + result=_get_next_page(vf,&og,-1); + if(result<0) goto seek_error; + + if(link!=vf->current_link){ + /* Different link; dump entire decode machine */ + _decode_clear(vf); + + vf->current_link=link; + vf->current_serialno=vf->serialnos[link]; + vf->ready_state=STREAMSET; + + }else{ + vorbis_synthesis_restart(&vf->vd); + } + + ogg_stream_reset_serialno(&vf->os,vf->current_serialno); + ogg_stream_pagein(&vf->os,&og); + + /* pull out all but last packet; the one with granulepos */ + while(1){ + result=ogg_stream_packetpeek(&vf->os,&op); + if(result==0){ + /* !!! the packet finishing this page originated on a + preceding page. Keep fetching previous pages until we + get one with a granulepos or without the 'continued' flag + set. Then just use raw_seek for simplicity. */ + + result=_seek_helper(vf,best); + if(result<0) goto seek_error; + + while(1){ + result=_get_prev_page(vf,&og); + if(result<0) goto seek_error; + if(ogg_page_serialno(&og)==vf->current_serialno && + (ogg_page_granulepos(&og)>-1 || + !ogg_page_continued(&og))){ + return ov_raw_seek(vf,result); + } + vf->offset=result; + } + } + if(result<0){ + result = OV_EBADPACKET; + goto seek_error; + } + if(op.granulepos!=-1){ + vf->pcm_offset=op.granulepos-vf->pcmlengths[vf->current_link*2]; + if(vf->pcm_offset<0)vf->pcm_offset=0; + vf->pcm_offset+=total; + break; + }else + result=ogg_stream_packetout(&vf->os,NULL); + } + } + } + + /* verify result */ + if(vf->pcm_offset>pos || pos>ov_pcm_total(vf,-1)){ + result=OV_EFAULT; + goto seek_error; + } + vf->bittrack=0.f; + vf->samptrack=0.f; + return(0); + + seek_error: + /* dump machine so we're in a known state */ + vf->pcm_offset=-1; + _decode_clear(vf); + return (int)result; +} + +/* seek to a sample offset relative to the decompressed pcm stream + returns zero on success, nonzero on failure */ + +int ov_pcm_seek(OggVorbis_File *vf,ogg_int64_t pos){ + int thisblock,lastblock=0; + int ret=ov_pcm_seek_page(vf,pos); + if(ret<0)return(ret); + if((ret=_make_decode_ready(vf)))return ret; + + /* discard leading packets we don't need for the lapping of the + position we want; don't decode them */ + + while(1){ + ogg_packet op; + ogg_page og; + + int ret=ogg_stream_packetpeek(&vf->os,&op); + if(ret>0){ + thisblock=vorbis_packet_blocksize(vf->vi+vf->current_link,&op); + if(thisblock<0){ + ogg_stream_packetout(&vf->os,NULL); + continue; /* non audio packet */ + } + if(lastblock)vf->pcm_offset+=(lastblock+thisblock)>>2; + + if(vf->pcm_offset+((thisblock+ + vorbis_info_blocksize(vf->vi,1))>>2)>=pos)break; + + /* remove the packet from packet queue and track its granulepos */ + ogg_stream_packetout(&vf->os,NULL); + vorbis_synthesis_trackonly(&vf->vb,&op); /* set up a vb with + only tracking, no + pcm_decode */ + vorbis_synthesis_blockin(&vf->vd,&vf->vb); + + /* end of logical stream case is hard, especially with exact + length positioning. */ + + if(op.granulepos>-1){ + int i; + /* always believe the stream markers */ + vf->pcm_offset=op.granulepos-vf->pcmlengths[vf->current_link*2]; + if(vf->pcm_offset<0)vf->pcm_offset=0; + for(i=0;icurrent_link;i++) + vf->pcm_offset+=vf->pcmlengths[i*2+1]; + } + + lastblock=thisblock; + + }else{ + if(ret<0 && ret!=OV_HOLE)break; + + /* suck in a new page */ + if(_get_next_page(vf,&og,-1)<0)break; + if(ogg_page_bos(&og))_decode_clear(vf); + + if(vf->ready_statelinks;link++) + if(vf->serialnos[link]==serialno)break; + if(link==vf->links) continue; + vf->current_link=link; + + vf->ready_state=STREAMSET; + vf->current_serialno=ogg_page_serialno(&og); + ogg_stream_reset_serialno(&vf->os,serialno); + ret=_make_decode_ready(vf); + if(ret)return ret; + lastblock=0; + } + + ogg_stream_pagein(&vf->os,&og); + } + } + + vf->bittrack=0.f; + vf->samptrack=0.f; + /* discard samples until we reach the desired position. Crossing a + logical bitstream boundary with abandon is OK. */ + { + /* note that halfrate could be set differently in each link, but + vorbisfile encoforces all links are set or unset */ + int hs=vorbis_synthesis_halfrate_p(vf->vi); + while(vf->pcm_offset<((pos>>hs)<pcm_offset)>>hs; + long samples=vorbis_synthesis_pcmout(&vf->vd,NULL); + + if(samples>target)samples=target; + vorbis_synthesis_read(&vf->vd,samples); + vf->pcm_offset+=samples<pcm_offset=ov_pcm_total(vf,-1); /* eof */ + } + } + return 0; +} + +/* seek to a playback time relative to the decompressed pcm stream + returns zero on success, nonzero on failure */ +int ov_time_seek(OggVorbis_File *vf,double seconds){ + /* translate time to PCM position and call ov_pcm_seek */ + + int link=-1; + ogg_int64_t pcm_total=0; + double time_total=0.; + + if(vf->ready_stateseekable)return(OV_ENOSEEK); + if(seconds<0)return(OV_EINVAL); + + /* which bitstream section does this time offset occur in? */ + for(link=0;linklinks;link++){ + double addsec = ov_time_total(vf,link); + if(secondspcmlengths[link*2+1]; + } + + if(link==vf->links)return(OV_EINVAL); + + /* enough information to convert time offset to pcm offset */ + { + ogg_int64_t target=pcm_total+(seconds-time_total)*vf->vi[link].rate; + return(ov_pcm_seek(vf,target)); + } +} + +/* page-granularity version of ov_time_seek + returns zero on success, nonzero on failure */ +int ov_time_seek_page(OggVorbis_File *vf,double seconds){ + /* translate time to PCM position and call ov_pcm_seek */ + + int link=-1; + ogg_int64_t pcm_total=0; + double time_total=0.; + + if(vf->ready_stateseekable)return(OV_ENOSEEK); + if(seconds<0)return(OV_EINVAL); + + /* which bitstream section does this time offset occur in? */ + for(link=0;linklinks;link++){ + double addsec = ov_time_total(vf,link); + if(secondspcmlengths[link*2+1]; + } + + if(link==vf->links)return(OV_EINVAL); + + /* enough information to convert time offset to pcm offset */ + { + ogg_int64_t target=pcm_total+(seconds-time_total)*vf->vi[link].rate; + return(ov_pcm_seek_page(vf,target)); + } +} + +/* tell the current stream offset cursor. Note that seek followed by + tell will likely not give the set offset due to caching */ +ogg_int64_t ov_raw_tell(OggVorbis_File *vf){ + if(vf->ready_stateoffset); +} + +/* return PCM offset (sample) of next PCM sample to be read */ +ogg_int64_t ov_pcm_tell(OggVorbis_File *vf){ + if(vf->ready_statepcm_offset); +} + +/* return time offset (seconds) of next PCM sample to be read */ +double ov_time_tell(OggVorbis_File *vf){ + int link=0; + ogg_int64_t pcm_total=0; + double time_total=0.f; + + if(vf->ready_stateseekable){ + pcm_total=ov_pcm_total(vf,-1); + time_total=ov_time_total(vf,-1); + + /* which bitstream section does this time offset occur in? */ + for(link=vf->links-1;link>=0;link--){ + pcm_total-=vf->pcmlengths[link*2+1]; + time_total-=ov_time_total(vf,link); + if(vf->pcm_offset>=pcm_total)break; + } + } + + return((double)time_total+(double)(vf->pcm_offset-pcm_total)/vf->vi[link].rate); +} + +/* link: -1) return the vorbis_info struct for the bitstream section + currently being decoded + 0-n) to request information for a specific bitstream section + + In the case of a non-seekable bitstream, any call returns the + current bitstream. NULL in the case that the machine is not + initialized */ + +vorbis_info *ov_info(OggVorbis_File *vf,int link){ + if(vf->seekable){ + if(link<0) + if(vf->ready_state>=STREAMSET) + return vf->vi+vf->current_link; + else + return vf->vi; + else + if(link>=vf->links) + return NULL; + else + return vf->vi+link; + }else{ + return vf->vi; + } +} + +/* grr, strong typing, grr, no templates/inheritence, grr */ +vorbis_comment *ov_comment(OggVorbis_File *vf,int link){ + if(vf->seekable){ + if(link<0) + if(vf->ready_state>=STREAMSET) + return vf->vc+vf->current_link; + else + return vf->vc; + else + if(link>=vf->links) + return NULL; + else + return vf->vc+link; + }else{ + return vf->vc; + } +} + +static int host_is_big_endian() { + ogg_int32_t pattern = 0xfeedface; /* deadbeef */ + unsigned char *bytewise = (unsigned char *)&pattern; + if (bytewise[0] == 0xfe) return 1; + return 0; +} + +/* up to this point, everything could more or less hide the multiple + logical bitstream nature of chaining from the toplevel application + if the toplevel application didn't particularly care. However, at + the point that we actually read audio back, the multiple-section + nature must surface: Multiple bitstream sections do not necessarily + have to have the same number of channels or sampling rate. + + ov_read returns the sequential logical bitstream number currently + being decoded along with the PCM data in order that the toplevel + application can take action on channel/sample rate changes. This + number will be incremented even for streamed (non-seekable) streams + (for seekable streams, it represents the actual logical bitstream + index within the physical bitstream. Note that the accessor + functions above are aware of this dichotomy). + + ov_read_filter is exactly the same as ov_read except that it processes + the decoded audio data through a filter before packing it into the + requested format. This gives greater accuracy than applying a filter + after the audio has been converted into integral PCM. + + input values: buffer) a buffer to hold packed PCM data for return + length) the byte length requested to be placed into buffer + bigendianp) should the data be packed LSB first (0) or + MSB first (1) + word) word size for output. currently 1 (byte) or + 2 (16 bit short) + + return values: <0) error/hole in data (OV_HOLE), partial open (OV_EINVAL) + 0) EOF + n) number of bytes of PCM actually returned. The + below works on a packet-by-packet basis, so the + return length is not related to the 'length' passed + in, just guaranteed to fit. + + *section) set to the logical bitstream number */ + +long ov_read_filter(OggVorbis_File *vf,char *buffer,int length, + int bigendianp,int word,int sgned,int *bitstream, + void (*filter)(float **pcm,long channels,long samples,void *filter_param),void *filter_param){ + int i,j; + int host_endian = host_is_big_endian(); + int hs; + + float **pcm; + long samples; + + if(vf->ready_stateready_state==INITSET){ + samples=vorbis_synthesis_pcmout(&vf->vd,&pcm); + if(samples)break; + } + + /* suck in another packet */ + { + int ret=_fetch_and_process_packet(vf,NULL,1,1); + if(ret==OV_EOF) + return(0); + if(ret<=0) + return(ret); + } + + } + + if(samples>0){ + + /* yay! proceed to pack data into the byte buffer */ + + long channels=ov_info(vf,-1)->channels; + long bytespersample=word * channels; + vorbis_fpu_control fpu; + if(samples>length/bytespersample)samples=length/bytespersample; + + if(samples <= 0) + return OV_EINVAL; + + /* Here. */ + if(filter) + filter(pcm,channels,samples,filter_param); + + /* a tight loop to pack each size */ + { + int val; + if(word==1){ + int off=(sgned?0:128); + vorbis_fpu_setround(&fpu); + for(j=0;j127)val=127; + else if(val<-128)val=-128; + *buffer++=val+off; + } + vorbis_fpu_restore(fpu); + }else{ + int off=(sgned?0:32768); + + if(host_endian==bigendianp){ + if(sgned){ + + vorbis_fpu_setround(&fpu); + for(i=0;i32767)val=32767; + else if(val<-32768)val=-32768; + *dest=val; + dest+=channels; + } + } + vorbis_fpu_restore(fpu); + + }else{ + + vorbis_fpu_setround(&fpu); + for(i=0;i32767)val=32767; + else if(val<-32768)val=-32768; + *dest=val+off; + dest+=channels; + } + } + vorbis_fpu_restore(fpu); + + } + }else if(bigendianp){ + + vorbis_fpu_setround(&fpu); + for(j=0;j32767)val=32767; + else if(val<-32768)val=-32768; + val+=off; + *buffer++=(val>>8); + *buffer++=(val&0xff); + } + vorbis_fpu_restore(fpu); + + }else{ + int val; + vorbis_fpu_setround(&fpu); + for(j=0;j32767)val=32767; + else if(val<-32768)val=-32768; + val+=off; + *buffer++=(val&0xff); + *buffer++=(val>>8); + } + vorbis_fpu_restore(fpu); + + } + } + } + + vorbis_synthesis_read(&vf->vd,samples); + hs=vorbis_synthesis_halfrate_p(vf->vi); + vf->pcm_offset+=(samples<current_link; + return(samples*bytespersample); + }else{ + return(samples); + } +} + +long ov_read(OggVorbis_File *vf,char *buffer,int length, + int bigendianp,int word,int sgned,int *bitstream){ + return ov_read_filter(vf, buffer, length, bigendianp, word, sgned, bitstream, NULL, NULL); +} + +/* input values: pcm_channels) a float vector per channel of output + length) the sample length being read by the app + + return values: <0) error/hole in data (OV_HOLE), partial open (OV_EINVAL) + 0) EOF + n) number of samples of PCM actually returned. The + below works on a packet-by-packet basis, so the + return length is not related to the 'length' passed + in, just guaranteed to fit. + + *section) set to the logical bitstream number */ + + + +long ov_read_float(OggVorbis_File *vf,float ***pcm_channels,int length, + int *bitstream){ + + if(vf->ready_stateready_state==INITSET){ + float **pcm; + long samples=vorbis_synthesis_pcmout(&vf->vd,&pcm); + if(samples){ + int hs=vorbis_synthesis_halfrate_p(vf->vi); + if(pcm_channels)*pcm_channels=pcm; + if(samples>length)samples=length; + vorbis_synthesis_read(&vf->vd,samples); + vf->pcm_offset+=samples<current_link; + return samples; + + } + } + + /* suck in another packet */ + { + int ret=_fetch_and_process_packet(vf,NULL,1,1); + if(ret==OV_EOF)return(0); + if(ret<=0)return(ret); + } + + } +} + +extern const float *vorbis_window(vorbis_dsp_state *v,int W); + +static void _ov_splice(float **pcm,float **lappcm, + int n1, int n2, + int ch1, int ch2, + const float *w1, const float *w2){ + int i,j; + const float *w=w1; + int n=n1; + + if(n1>n2){ + n=n2; + w=w2; + } + + /* splice */ + for(j=0;jready_state==INITSET)break; + /* suck in another packet */ + { + int ret=_fetch_and_process_packet(vf,NULL,1,0); + if(ret<0 && ret!=OV_HOLE)return(ret); + } + } + return 0; +} + +/* make sure vf is INITSET and that we have a primed buffer; if + we're crosslapping at a stream section boundary, this also makes + sure we're sanity checking against the right stream information */ +static int _ov_initprime(OggVorbis_File *vf){ + vorbis_dsp_state *vd=&vf->vd; + while(1){ + if(vf->ready_state==INITSET) + if(vorbis_synthesis_pcmout(vd,NULL))break; + + /* suck in another packet */ + { + int ret=_fetch_and_process_packet(vf,NULL,1,0); + if(ret<0 && ret!=OV_HOLE)return(ret); + } + } + return 0; +} + +/* grab enough data for lapping from vf; this may be in the form of + unreturned, already-decoded pcm, remaining PCM we will need to + decode, or synthetic postextrapolation from last packets. */ +static void _ov_getlap(OggVorbis_File *vf,vorbis_info *vi,vorbis_dsp_state *vd, + float **lappcm,int lapsize){ + int lapcount=0,i; + float **pcm; + + /* try first to decode the lapping data */ + while(lapcountlapsize-lapcount)samples=lapsize-lapcount; + for(i=0;ichannels;i++) + memcpy(lappcm[i]+lapcount,pcm[i],sizeof(**pcm)*samples); + lapcount+=samples; + vorbis_synthesis_read(vd,samples); + }else{ + /* suck in another packet */ + int ret=_fetch_and_process_packet(vf,NULL,1,0); /* do *not* span */ + if(ret==OV_EOF)break; + } + } + if(lapcountvd,&pcm); + if(samples==0){ + for(i=0;ichannels;i++) + memset(lappcm[i]+lapcount,0,sizeof(**pcm)*lapsize-lapcount); + lapcount=lapsize; + }else{ + if(samples>lapsize-lapcount)samples=lapsize-lapcount; + for(i=0;ichannels;i++) + memcpy(lappcm[i]+lapcount,pcm[i],sizeof(**pcm)*samples); + lapcount+=samples; + } + } +} + +/* this sets up crosslapping of a sample by using trailing data from + sample 1 and lapping it into the windowing buffer of sample 2 */ +int ov_crosslap(OggVorbis_File *vf1, OggVorbis_File *vf2){ + vorbis_info *vi1,*vi2; + float **lappcm; + float **pcm; + const float *w1,*w2; + int n1,n2,i,ret,hs1,hs2; + + if(vf1==vf2)return(0); /* degenerate case */ + if(vf1->ready_stateready_statechannels); + n1=vorbis_info_blocksize(vi1,0)>>(1+hs1); + n2=vorbis_info_blocksize(vi2,0)>>(1+hs2); + w1=vorbis_window(&vf1->vd,0); + w2=vorbis_window(&vf2->vd,0); + + for(i=0;ichannels;i++) + lappcm[i]=alloca(sizeof(**lappcm)*n1); + + _ov_getlap(vf1,vi1,&vf1->vd,lappcm,n1); + + /* have a lapping buffer from vf1; now to splice it into the lapping + buffer of vf2 */ + /* consolidate and expose the buffer. */ + vorbis_synthesis_lapout(&vf2->vd,&pcm); + +#if 0 + _analysis_output_always("pcmL",0,pcm[0],n1*2,0,0,0); + _analysis_output_always("pcmR",0,pcm[1],n1*2,0,0,0); +#endif + + /* splice */ + _ov_splice(pcm,lappcm,n1,n2,vi1->channels,vi2->channels,w1,w2); + + /* done */ + return(0); +} + +static int _ov_64_seek_lap(OggVorbis_File *vf,ogg_int64_t pos, + int (*localseek)(OggVorbis_File *,ogg_int64_t)){ + vorbis_info *vi; + float **lappcm; + float **pcm; + const float *w1,*w2; + int n1,n2,ch1,ch2,hs; + int i,ret; + + if(vf->ready_statechannels; + n1=vorbis_info_blocksize(vi,0)>>(1+hs); + w1=vorbis_window(&vf->vd,0); /* window arrays from libvorbis are + persistent; even if the decode state + from this link gets dumped, this + window array continues to exist */ + + lappcm=alloca(sizeof(*lappcm)*ch1); + for(i=0;ivd,lappcm,n1); + + /* have lapping data; seek and prime the buffer */ + ret=localseek(vf,pos); + if(ret)return ret; + ret=_ov_initprime(vf); + if(ret)return(ret); + + /* Guard against cross-link changes; they're perfectly legal */ + vi=ov_info(vf,-1); + ch2=vi->channels; + n2=vorbis_info_blocksize(vi,0)>>(1+hs); + w2=vorbis_window(&vf->vd,0); + + /* consolidate and expose the buffer. */ + vorbis_synthesis_lapout(&vf->vd,&pcm); + + /* splice */ + _ov_splice(pcm,lappcm,n1,n2,ch1,ch2,w1,w2); + + /* done */ + return(0); +} + +int ov_raw_seek_lap(OggVorbis_File *vf,ogg_int64_t pos){ + return _ov_64_seek_lap(vf,pos,ov_raw_seek); +} + +int ov_pcm_seek_lap(OggVorbis_File *vf,ogg_int64_t pos){ + return _ov_64_seek_lap(vf,pos,ov_pcm_seek); +} + +int ov_pcm_seek_page_lap(OggVorbis_File *vf,ogg_int64_t pos){ + return _ov_64_seek_lap(vf,pos,ov_pcm_seek_page); +} + +static int _ov_d_seek_lap(OggVorbis_File *vf,double pos, + int (*localseek)(OggVorbis_File *,double)){ + vorbis_info *vi; + float **lappcm; + float **pcm; + const float *w1,*w2; + int n1,n2,ch1,ch2,hs; + int i,ret; + + if(vf->ready_statechannels; + n1=vorbis_info_blocksize(vi,0)>>(1+hs); + w1=vorbis_window(&vf->vd,0); /* window arrays from libvorbis are + persistent; even if the decode state + from this link gets dumped, this + window array continues to exist */ + + lappcm=alloca(sizeof(*lappcm)*ch1); + for(i=0;ivd,lappcm,n1); + + /* have lapping data; seek and prime the buffer */ + ret=localseek(vf,pos); + if(ret)return ret; + ret=_ov_initprime(vf); + if(ret)return(ret); + + /* Guard against cross-link changes; they're perfectly legal */ + vi=ov_info(vf,-1); + ch2=vi->channels; + n2=vorbis_info_blocksize(vi,0)>>(1+hs); + w2=vorbis_window(&vf->vd,0); + + /* consolidate and expose the buffer. */ + vorbis_synthesis_lapout(&vf->vd,&pcm); + + /* splice */ + _ov_splice(pcm,lappcm,n1,n2,ch1,ch2,w1,w2); + + /* done */ + return(0); +} + +int ov_time_seek_lap(OggVorbis_File *vf,double pos){ + return _ov_d_seek_lap(vf,pos,ov_time_seek); +} + +int ov_time_seek_page_lap(OggVorbis_File *vf,double pos){ + return _ov_d_seek_lap(vf,pos,ov_time_seek_page); +} diff --git a/code/libvorbis-1.3.4/lib/window.c b/code/libvorbis-1.3.4/lib/window.c new file mode 100644 index 00000000..0305b792 --- /dev/null +++ b/code/libvorbis-1.3.4/lib/window.c @@ -0,0 +1,2136 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: window functions + last mod: $Id: window.c 19028 2013-12-02 23:23:39Z tterribe $ + + ********************************************************************/ + +#include +#include +#include "os.h" +#include "misc.h" +#include "window.h" + +static const float vwin64[32] = { + 0.0009460463F, 0.0085006468F, 0.0235352254F, 0.0458950567F, + 0.0753351908F, 0.1115073077F, 0.1539457973F, 0.2020557475F, + 0.2551056759F, 0.3122276645F, 0.3724270287F, 0.4346027792F, + 0.4975789974F, 0.5601459521F, 0.6211085051F, 0.6793382689F, + 0.7338252629F, 0.7837245849F, 0.8283939355F, 0.8674186656F, + 0.9006222429F, 0.9280614787F, 0.9500073081F, 0.9669131782F, + 0.9793740220F, 0.9880792941F, 0.9937636139F, 0.9971582668F, + 0.9989462667F, 0.9997230082F, 0.9999638688F, 0.9999995525F, +}; + +static const float vwin128[64] = { + 0.0002365472F, 0.0021280687F, 0.0059065254F, 0.0115626550F, + 0.0190823442F, 0.0284463735F, 0.0396300935F, 0.0526030430F, + 0.0673285281F, 0.0837631763F, 0.1018564887F, 0.1215504095F, + 0.1427789367F, 0.1654677960F, 0.1895342001F, 0.2148867160F, + 0.2414252576F, 0.2690412240F, 0.2976177952F, 0.3270303960F, + 0.3571473350F, 0.3878306189F, 0.4189369387F, 0.4503188188F, + 0.4818259135F, 0.5133064334F, 0.5446086751F, 0.5755826278F, + 0.6060816248F, 0.6359640047F, 0.6650947483F, 0.6933470543F, + 0.7206038179F, 0.7467589810F, 0.7717187213F, 0.7954024542F, + 0.8177436264F, 0.8386902831F, 0.8582053981F, 0.8762669622F, + 0.8928678298F, 0.9080153310F, 0.9217306608F, 0.9340480615F, + 0.9450138200F, 0.9546851041F, 0.9631286621F, 0.9704194171F, + 0.9766389810F, 0.9818741197F, 0.9862151938F, 0.9897546035F, + 0.9925852598F, 0.9947991032F, 0.9964856900F, 0.9977308602F, + 0.9986155015F, 0.9992144193F, 0.9995953200F, 0.9998179155F, + 0.9999331503F, 0.9999825563F, 0.9999977357F, 0.9999999720F, +}; + +static const float vwin256[128] = { + 0.0000591390F, 0.0005321979F, 0.0014780301F, 0.0028960636F, + 0.0047854363F, 0.0071449926F, 0.0099732775F, 0.0132685298F, + 0.0170286741F, 0.0212513119F, 0.0259337111F, 0.0310727950F, + 0.0366651302F, 0.0427069140F, 0.0491939614F, 0.0561216907F, + 0.0634851102F, 0.0712788035F, 0.0794969160F, 0.0881331402F, + 0.0971807028F, 0.1066323515F, 0.1164803426F, 0.1267164297F, + 0.1373318534F, 0.1483173323F, 0.1596630553F, 0.1713586755F, + 0.1833933062F, 0.1957555184F, 0.2084333404F, 0.2214142599F, + 0.2346852280F, 0.2482326664F, 0.2620424757F, 0.2761000481F, + 0.2903902813F, 0.3048975959F, 0.3196059553F, 0.3344988887F, + 0.3495595160F, 0.3647705766F, 0.3801144597F, 0.3955732382F, + 0.4111287047F, 0.4267624093F, 0.4424557009F, 0.4581897696F, + 0.4739456913F, 0.4897044744F, 0.5054471075F, 0.5211546088F, + 0.5368080763F, 0.5523887395F, 0.5678780103F, 0.5832575361F, + 0.5985092508F, 0.6136154277F, 0.6285587300F, 0.6433222619F, + 0.6578896175F, 0.6722449294F, 0.6863729144F, 0.7002589187F, + 0.7138889597F, 0.7272497662F, 0.7403288154F, 0.7531143679F, + 0.7655954985F, 0.7777621249F, 0.7896050322F, 0.8011158947F, + 0.8122872932F, 0.8231127294F, 0.8335866365F, 0.8437043850F, + 0.8534622861F, 0.8628575905F, 0.8718884835F, 0.8805540765F, + 0.8888543947F, 0.8967903616F, 0.9043637797F, 0.9115773078F, + 0.9184344360F, 0.9249394562F, 0.9310974312F, 0.9369141608F, + 0.9423961446F, 0.9475505439F, 0.9523851406F, 0.9569082947F, + 0.9611289005F, 0.9650563408F, 0.9687004405F, 0.9720714191F, + 0.9751798427F, 0.9780365753F, 0.9806527301F, 0.9830396204F, + 0.9852087111F, 0.9871715701F, 0.9889398207F, 0.9905250941F, + 0.9919389832F, 0.9931929973F, 0.9942985174F, 0.9952667537F, + 0.9961087037F, 0.9968351119F, 0.9974564312F, 0.9979827858F, + 0.9984239359F, 0.9987892441F, 0.9990876435F, 0.9993276081F, + 0.9995171241F, 0.9996636648F, 0.9997741654F, 0.9998550016F, + 0.9999119692F, 0.9999502656F, 0.9999744742F, 0.9999885497F, + 0.9999958064F, 0.9999989077F, 0.9999998584F, 0.9999999983F, +}; + +static const float vwin512[256] = { + 0.0000147849F, 0.0001330607F, 0.0003695946F, 0.0007243509F, + 0.0011972759F, 0.0017882983F, 0.0024973285F, 0.0033242588F, + 0.0042689632F, 0.0053312973F, 0.0065110982F, 0.0078081841F, + 0.0092223540F, 0.0107533880F, 0.0124010466F, 0.0141650703F, + 0.0160451800F, 0.0180410758F, 0.0201524373F, 0.0223789233F, + 0.0247201710F, 0.0271757958F, 0.0297453914F, 0.0324285286F, + 0.0352247556F, 0.0381335972F, 0.0411545545F, 0.0442871045F, + 0.0475306997F, 0.0508847676F, 0.0543487103F, 0.0579219038F, + 0.0616036982F, 0.0653934164F, 0.0692903546F, 0.0732937809F, + 0.0774029356F, 0.0816170305F, 0.0859352485F, 0.0903567428F, + 0.0948806375F, 0.0995060259F, 0.1042319712F, 0.1090575056F, + 0.1139816300F, 0.1190033137F, 0.1241214941F, 0.1293350764F, + 0.1346429333F, 0.1400439046F, 0.1455367974F, 0.1511203852F, + 0.1567934083F, 0.1625545735F, 0.1684025537F, 0.1743359881F, + 0.1803534820F, 0.1864536069F, 0.1926349000F, 0.1988958650F, + 0.2052349715F, 0.2116506555F, 0.2181413191F, 0.2247053313F, + 0.2313410275F, 0.2380467105F, 0.2448206500F, 0.2516610835F, + 0.2585662164F, 0.2655342226F, 0.2725632448F, 0.2796513950F, + 0.2867967551F, 0.2939973773F, 0.3012512852F, 0.3085564739F, + 0.3159109111F, 0.3233125375F, 0.3307592680F, 0.3382489922F, + 0.3457795756F, 0.3533488602F, 0.3609546657F, 0.3685947904F, + 0.3762670121F, 0.3839690896F, 0.3916987634F, 0.3994537572F, + 0.4072317788F, 0.4150305215F, 0.4228476653F, 0.4306808783F, + 0.4385278181F, 0.4463861329F, 0.4542534630F, 0.4621274424F, + 0.4700057001F, 0.4778858615F, 0.4857655502F, 0.4936423891F, + 0.5015140023F, 0.5093780165F, 0.5172320626F, 0.5250737772F, + 0.5329008043F, 0.5407107971F, 0.5485014192F, 0.5562703465F, + 0.5640152688F, 0.5717338914F, 0.5794239366F, 0.5870831457F, + 0.5947092801F, 0.6023001235F, 0.6098534829F, 0.6173671907F, + 0.6248391059F, 0.6322671161F, 0.6396491384F, 0.6469831217F, + 0.6542670475F, 0.6614989319F, 0.6686768267F, 0.6757988210F, + 0.6828630426F, 0.6898676592F, 0.6968108799F, 0.7036909564F, + 0.7105061843F, 0.7172549043F, 0.7239355032F, 0.7305464154F, + 0.7370861235F, 0.7435531598F, 0.7499461068F, 0.7562635986F, + 0.7625043214F, 0.7686670148F, 0.7747504721F, 0.7807535410F, + 0.7866751247F, 0.7925141825F, 0.7982697296F, 0.8039408387F, + 0.8095266395F, 0.8150263196F, 0.8204391248F, 0.8257643590F, + 0.8310013848F, 0.8361496236F, 0.8412085555F, 0.8461777194F, + 0.8510567129F, 0.8558451924F, 0.8605428730F, 0.8651495278F, + 0.8696649882F, 0.8740891432F, 0.8784219392F, 0.8826633797F, + 0.8868135244F, 0.8908724888F, 0.8948404441F, 0.8987176157F, + 0.9025042831F, 0.9062007791F, 0.9098074886F, 0.9133248482F, + 0.9167533451F, 0.9200935163F, 0.9233459472F, 0.9265112712F, + 0.9295901680F, 0.9325833632F, 0.9354916263F, 0.9383157705F, + 0.9410566504F, 0.9437151618F, 0.9462922398F, 0.9487888576F, + 0.9512060252F, 0.9535447882F, 0.9558062262F, 0.9579914516F, + 0.9601016078F, 0.9621378683F, 0.9641014348F, 0.9659935361F, + 0.9678154261F, 0.9695683830F, 0.9712537071F, 0.9728727198F, + 0.9744267618F, 0.9759171916F, 0.9773453842F, 0.9787127293F, + 0.9800206298F, 0.9812705006F, 0.9824637665F, 0.9836018613F, + 0.9846862258F, 0.9857183066F, 0.9866995544F, 0.9876314227F, + 0.9885153662F, 0.9893528393F, 0.9901452948F, 0.9908941823F, + 0.9916009470F, 0.9922670279F, 0.9928938570F, 0.9934828574F, + 0.9940354423F, 0.9945530133F, 0.9950369595F, 0.9954886562F, + 0.9959094633F, 0.9963007242F, 0.9966637649F, 0.9969998925F, + 0.9973103939F, 0.9975965351F, 0.9978595598F, 0.9981006885F, + 0.9983211172F, 0.9985220166F, 0.9987045311F, 0.9988697776F, + 0.9990188449F, 0.9991527924F, 0.9992726499F, 0.9993794157F, + 0.9994740570F, 0.9995575079F, 0.9996306699F, 0.9996944099F, + 0.9997495605F, 0.9997969190F, 0.9998372465F, 0.9998712678F, + 0.9998996704F, 0.9999231041F, 0.9999421807F, 0.9999574732F, + 0.9999695157F, 0.9999788026F, 0.9999857885F, 0.9999908879F, + 0.9999944746F, 0.9999968817F, 0.9999984010F, 0.9999992833F, + 0.9999997377F, 0.9999999317F, 0.9999999911F, 0.9999999999F, +}; + +static const float vwin1024[512] = { + 0.0000036962F, 0.0000332659F, 0.0000924041F, 0.0001811086F, + 0.0002993761F, 0.0004472021F, 0.0006245811F, 0.0008315063F, + 0.0010679699F, 0.0013339631F, 0.0016294757F, 0.0019544965F, + 0.0023090133F, 0.0026930125F, 0.0031064797F, 0.0035493989F, + 0.0040217533F, 0.0045235250F, 0.0050546946F, 0.0056152418F, + 0.0062051451F, 0.0068243817F, 0.0074729278F, 0.0081507582F, + 0.0088578466F, 0.0095941655F, 0.0103596863F, 0.0111543789F, + 0.0119782122F, 0.0128311538F, 0.0137131701F, 0.0146242260F, + 0.0155642855F, 0.0165333111F, 0.0175312640F, 0.0185581042F, + 0.0196137903F, 0.0206982797F, 0.0218115284F, 0.0229534910F, + 0.0241241208F, 0.0253233698F, 0.0265511886F, 0.0278075263F, + 0.0290923308F, 0.0304055484F, 0.0317471241F, 0.0331170013F, + 0.0345151222F, 0.0359414274F, 0.0373958560F, 0.0388783456F, + 0.0403888325F, 0.0419272511F, 0.0434935347F, 0.0450876148F, + 0.0467094213F, 0.0483588828F, 0.0500359261F, 0.0517404765F, + 0.0534724575F, 0.0552317913F, 0.0570183983F, 0.0588321971F, + 0.0606731048F, 0.0625410369F, 0.0644359070F, 0.0663576272F, + 0.0683061077F, 0.0702812571F, 0.0722829821F, 0.0743111878F, + 0.0763657775F, 0.0784466526F, 0.0805537129F, 0.0826868561F, + 0.0848459782F, 0.0870309736F, 0.0892417345F, 0.0914781514F, + 0.0937401128F, 0.0960275056F, 0.0983402145F, 0.1006781223F, + 0.1030411101F, 0.1054290568F, 0.1078418397F, 0.1102793336F, + 0.1127414119F, 0.1152279457F, 0.1177388042F, 0.1202738544F, + 0.1228329618F, 0.1254159892F, 0.1280227980F, 0.1306532471F, + 0.1333071937F, 0.1359844927F, 0.1386849970F, 0.1414085575F, + 0.1441550230F, 0.1469242403F, 0.1497160539F, 0.1525303063F, + 0.1553668381F, 0.1582254875F, 0.1611060909F, 0.1640084822F, + 0.1669324936F, 0.1698779549F, 0.1728446939F, 0.1758325362F, + 0.1788413055F, 0.1818708232F, 0.1849209084F, 0.1879913785F, + 0.1910820485F, 0.1941927312F, 0.1973232376F, 0.2004733764F, + 0.2036429541F, 0.2068317752F, 0.2100396421F, 0.2132663552F, + 0.2165117125F, 0.2197755102F, 0.2230575422F, 0.2263576007F, + 0.2296754753F, 0.2330109540F, 0.2363638225F, 0.2397338646F, + 0.2431208619F, 0.2465245941F, 0.2499448389F, 0.2533813719F, + 0.2568339669F, 0.2603023956F, 0.2637864277F, 0.2672858312F, + 0.2708003718F, 0.2743298135F, 0.2778739186F, 0.2814324472F, + 0.2850051576F, 0.2885918065F, 0.2921921485F, 0.2958059366F, + 0.2994329219F, 0.3030728538F, 0.3067254799F, 0.3103905462F, + 0.3140677969F, 0.3177569747F, 0.3214578205F, 0.3251700736F, + 0.3288934718F, 0.3326277513F, 0.3363726468F, 0.3401278914F, + 0.3438932168F, 0.3476683533F, 0.3514530297F, 0.3552469734F, + 0.3590499106F, 0.3628615659F, 0.3666816630F, 0.3705099239F, + 0.3743460698F, 0.3781898204F, 0.3820408945F, 0.3858990095F, + 0.3897638820F, 0.3936352274F, 0.3975127601F, 0.4013961936F, + 0.4052852405F, 0.4091796123F, 0.4130790198F, 0.4169831732F, + 0.4208917815F, 0.4248045534F, 0.4287211965F, 0.4326414181F, + 0.4365649248F, 0.4404914225F, 0.4444206167F, 0.4483522125F, + 0.4522859146F, 0.4562214270F, 0.4601584538F, 0.4640966984F, + 0.4680358644F, 0.4719756548F, 0.4759157726F, 0.4798559209F, + 0.4837958024F, 0.4877351199F, 0.4916735765F, 0.4956108751F, + 0.4995467188F, 0.5034808109F, 0.5074128550F, 0.5113425550F, + 0.5152696149F, 0.5191937395F, 0.5231146336F, 0.5270320028F, + 0.5309455530F, 0.5348549910F, 0.5387600239F, 0.5426603597F, + 0.5465557070F, 0.5504457754F, 0.5543302752F, 0.5582089175F, + 0.5620814145F, 0.5659474793F, 0.5698068262F, 0.5736591704F, + 0.5775042283F, 0.5813417176F, 0.5851713571F, 0.5889928670F, + 0.5928059689F, 0.5966103856F, 0.6004058415F, 0.6041920626F, + 0.6079687761F, 0.6117357113F, 0.6154925986F, 0.6192391705F, + 0.6229751612F, 0.6267003064F, 0.6304143441F, 0.6341170137F, + 0.6378080569F, 0.6414872173F, 0.6451542405F, 0.6488088741F, + 0.6524508681F, 0.6560799742F, 0.6596959469F, 0.6632985424F, + 0.6668875197F, 0.6704626398F, 0.6740236662F, 0.6775703649F, + 0.6811025043F, 0.6846198554F, 0.6881221916F, 0.6916092892F, + 0.6950809269F, 0.6985368861F, 0.7019769510F, 0.7054009085F, + 0.7088085484F, 0.7121996632F, 0.7155740484F, 0.7189315023F, + 0.7222718263F, 0.7255948245F, 0.7289003043F, 0.7321880760F, + 0.7354579530F, 0.7387097518F, 0.7419432921F, 0.7451583966F, + 0.7483548915F, 0.7515326059F, 0.7546913723F, 0.7578310265F, + 0.7609514077F, 0.7640523581F, 0.7671337237F, 0.7701953535F, + 0.7732371001F, 0.7762588195F, 0.7792603711F, 0.7822416178F, + 0.7852024259F, 0.7881426654F, 0.7910622097F, 0.7939609356F, + 0.7968387237F, 0.7996954579F, 0.8025310261F, 0.8053453193F, + 0.8081382324F, 0.8109096638F, 0.8136595156F, 0.8163876936F, + 0.8190941071F, 0.8217786690F, 0.8244412960F, 0.8270819086F, + 0.8297004305F, 0.8322967896F, 0.8348709171F, 0.8374227481F, + 0.8399522213F, 0.8424592789F, 0.8449438672F, 0.8474059356F, + 0.8498454378F, 0.8522623306F, 0.8546565748F, 0.8570281348F, + 0.8593769787F, 0.8617030779F, 0.8640064080F, 0.8662869477F, + 0.8685446796F, 0.8707795899F, 0.8729916682F, 0.8751809079F, + 0.8773473059F, 0.8794908626F, 0.8816115819F, 0.8837094713F, + 0.8857845418F, 0.8878368079F, 0.8898662874F, 0.8918730019F, + 0.8938569760F, 0.8958182380F, 0.8977568194F, 0.8996727552F, + 0.9015660837F, 0.9034368465F, 0.9052850885F, 0.9071108577F, + 0.9089142057F, 0.9106951869F, 0.9124538591F, 0.9141902832F, + 0.9159045233F, 0.9175966464F, 0.9192667228F, 0.9209148257F, + 0.9225410313F, 0.9241454187F, 0.9257280701F, 0.9272890704F, + 0.9288285075F, 0.9303464720F, 0.9318430576F, 0.9333183603F, + 0.9347724792F, 0.9362055158F, 0.9376175745F, 0.9390087622F, + 0.9403791881F, 0.9417289644F, 0.9430582055F, 0.9443670283F, + 0.9456555521F, 0.9469238986F, 0.9481721917F, 0.9494005577F, + 0.9506091252F, 0.9517980248F, 0.9529673894F, 0.9541173540F, + 0.9552480557F, 0.9563596334F, 0.9574522282F, 0.9585259830F, + 0.9595810428F, 0.9606175542F, 0.9616356656F, 0.9626355274F, + 0.9636172915F, 0.9645811114F, 0.9655271425F, 0.9664555414F, + 0.9673664664F, 0.9682600774F, 0.9691365355F, 0.9699960034F, + 0.9708386448F, 0.9716646250F, 0.9724741103F, 0.9732672685F, + 0.9740442683F, 0.9748052795F, 0.9755504729F, 0.9762800205F, + 0.9769940950F, 0.9776928703F, 0.9783765210F, 0.9790452223F, + 0.9796991504F, 0.9803384823F, 0.9809633954F, 0.9815740679F, + 0.9821706784F, 0.9827534063F, 0.9833224312F, 0.9838779332F, + 0.9844200928F, 0.9849490910F, 0.9854651087F, 0.9859683274F, + 0.9864589286F, 0.9869370940F, 0.9874030054F, 0.9878568447F, + 0.9882987937F, 0.9887290343F, 0.9891477481F, 0.9895551169F, + 0.9899513220F, 0.9903365446F, 0.9907109658F, 0.9910747662F, + 0.9914281260F, 0.9917712252F, 0.9921042433F, 0.9924273593F, + 0.9927407516F, 0.9930445982F, 0.9933390763F, 0.9936243626F, + 0.9939006331F, 0.9941680631F, 0.9944268269F, 0.9946770982F, + 0.9949190498F, 0.9951528537F, 0.9953786808F, 0.9955967011F, + 0.9958070836F, 0.9960099963F, 0.9962056061F, 0.9963940787F, + 0.9965755786F, 0.9967502693F, 0.9969183129F, 0.9970798704F, + 0.9972351013F, 0.9973841640F, 0.9975272151F, 0.9976644103F, + 0.9977959036F, 0.9979218476F, 0.9980423932F, 0.9981576901F, + 0.9982678862F, 0.9983731278F, 0.9984735596F, 0.9985693247F, + 0.9986605645F, 0.9987474186F, 0.9988300248F, 0.9989085193F, + 0.9989830364F, 0.9990537085F, 0.9991206662F, 0.9991840382F, + 0.9992439513F, 0.9993005303F, 0.9993538982F, 0.9994041757F, + 0.9994514817F, 0.9994959330F, 0.9995376444F, 0.9995767286F, + 0.9996132960F, 0.9996474550F, 0.9996793121F, 0.9997089710F, + 0.9997365339F, 0.9997621003F, 0.9997857677F, 0.9998076311F, + 0.9998277836F, 0.9998463156F, 0.9998633155F, 0.9998788692F, + 0.9998930603F, 0.9999059701F, 0.9999176774F, 0.9999282586F, + 0.9999377880F, 0.9999463370F, 0.9999539749F, 0.9999607685F, + 0.9999667820F, 0.9999720773F, 0.9999767136F, 0.9999807479F, + 0.9999842344F, 0.9999872249F, 0.9999897688F, 0.9999919127F, + 0.9999937009F, 0.9999951749F, 0.9999963738F, 0.9999973342F, + 0.9999980900F, 0.9999986724F, 0.9999991103F, 0.9999994297F, + 0.9999996543F, 0.9999998049F, 0.9999999000F, 0.9999999552F, + 0.9999999836F, 0.9999999957F, 0.9999999994F, 1.0000000000F, +}; + +static const float vwin2048[1024] = { + 0.0000009241F, 0.0000083165F, 0.0000231014F, 0.0000452785F, + 0.0000748476F, 0.0001118085F, 0.0001561608F, 0.0002079041F, + 0.0002670379F, 0.0003335617F, 0.0004074748F, 0.0004887765F, + 0.0005774661F, 0.0006735427F, 0.0007770054F, 0.0008878533F, + 0.0010060853F, 0.0011317002F, 0.0012646969F, 0.0014050742F, + 0.0015528307F, 0.0017079650F, 0.0018704756F, 0.0020403610F, + 0.0022176196F, 0.0024022497F, 0.0025942495F, 0.0027936173F, + 0.0030003511F, 0.0032144490F, 0.0034359088F, 0.0036647286F, + 0.0039009061F, 0.0041444391F, 0.0043953253F, 0.0046535621F, + 0.0049191472F, 0.0051920781F, 0.0054723520F, 0.0057599664F, + 0.0060549184F, 0.0063572052F, 0.0066668239F, 0.0069837715F, + 0.0073080449F, 0.0076396410F, 0.0079785566F, 0.0083247884F, + 0.0086783330F, 0.0090391871F, 0.0094073470F, 0.0097828092F, + 0.0101655700F, 0.0105556258F, 0.0109529726F, 0.0113576065F, + 0.0117695237F, 0.0121887200F, 0.0126151913F, 0.0130489335F, + 0.0134899422F, 0.0139382130F, 0.0143937415F, 0.0148565233F, + 0.0153265536F, 0.0158038279F, 0.0162883413F, 0.0167800889F, + 0.0172790660F, 0.0177852675F, 0.0182986882F, 0.0188193231F, + 0.0193471668F, 0.0198822141F, 0.0204244594F, 0.0209738974F, + 0.0215305225F, 0.0220943289F, 0.0226653109F, 0.0232434627F, + 0.0238287784F, 0.0244212519F, 0.0250208772F, 0.0256276481F, + 0.0262415582F, 0.0268626014F, 0.0274907711F, 0.0281260608F, + 0.0287684638F, 0.0294179736F, 0.0300745833F, 0.0307382859F, + 0.0314090747F, 0.0320869424F, 0.0327718819F, 0.0334638860F, + 0.0341629474F, 0.0348690586F, 0.0355822122F, 0.0363024004F, + 0.0370296157F, 0.0377638502F, 0.0385050960F, 0.0392533451F, + 0.0400085896F, 0.0407708211F, 0.0415400315F, 0.0423162123F, + 0.0430993552F, 0.0438894515F, 0.0446864926F, 0.0454904698F, + 0.0463013742F, 0.0471191969F, 0.0479439288F, 0.0487755607F, + 0.0496140836F, 0.0504594879F, 0.0513117642F, 0.0521709031F, + 0.0530368949F, 0.0539097297F, 0.0547893979F, 0.0556758894F, + 0.0565691941F, 0.0574693019F, 0.0583762026F, 0.0592898858F, + 0.0602103410F, 0.0611375576F, 0.0620715250F, 0.0630122324F, + 0.0639596688F, 0.0649138234F, 0.0658746848F, 0.0668422421F, + 0.0678164838F, 0.0687973985F, 0.0697849746F, 0.0707792005F, + 0.0717800645F, 0.0727875547F, 0.0738016591F, 0.0748223656F, + 0.0758496620F, 0.0768835359F, 0.0779239751F, 0.0789709668F, + 0.0800244985F, 0.0810845574F, 0.0821511306F, 0.0832242052F, + 0.0843037679F, 0.0853898056F, 0.0864823050F, 0.0875812525F, + 0.0886866347F, 0.0897984378F, 0.0909166480F, 0.0920412513F, + 0.0931722338F, 0.0943095813F, 0.0954532795F, 0.0966033140F, + 0.0977596702F, 0.0989223336F, 0.1000912894F, 0.1012665227F, + 0.1024480185F, 0.1036357616F, 0.1048297369F, 0.1060299290F, + 0.1072363224F, 0.1084489014F, 0.1096676504F, 0.1108925534F, + 0.1121235946F, 0.1133607577F, 0.1146040267F, 0.1158533850F, + 0.1171088163F, 0.1183703040F, 0.1196378312F, 0.1209113812F, + 0.1221909370F, 0.1234764815F, 0.1247679974F, 0.1260654674F, + 0.1273688740F, 0.1286781995F, 0.1299934263F, 0.1313145365F, + 0.1326415121F, 0.1339743349F, 0.1353129866F, 0.1366574490F, + 0.1380077035F, 0.1393637315F, 0.1407255141F, 0.1420930325F, + 0.1434662677F, 0.1448452004F, 0.1462298115F, 0.1476200814F, + 0.1490159906F, 0.1504175195F, 0.1518246482F, 0.1532373569F, + 0.1546556253F, 0.1560794333F, 0.1575087606F, 0.1589435866F, + 0.1603838909F, 0.1618296526F, 0.1632808509F, 0.1647374648F, + 0.1661994731F, 0.1676668546F, 0.1691395880F, 0.1706176516F, + 0.1721010238F, 0.1735896829F, 0.1750836068F, 0.1765827736F, + 0.1780871610F, 0.1795967468F, 0.1811115084F, 0.1826314234F, + 0.1841564689F, 0.1856866221F, 0.1872218600F, 0.1887621595F, + 0.1903074974F, 0.1918578503F, 0.1934131947F, 0.1949735068F, + 0.1965387630F, 0.1981089393F, 0.1996840117F, 0.2012639560F, + 0.2028487479F, 0.2044383630F, 0.2060327766F, 0.2076319642F, + 0.2092359007F, 0.2108445614F, 0.2124579211F, 0.2140759545F, + 0.2156986364F, 0.2173259411F, 0.2189578432F, 0.2205943168F, + 0.2222353361F, 0.2238808751F, 0.2255309076F, 0.2271854073F, + 0.2288443480F, 0.2305077030F, 0.2321754457F, 0.2338475493F, + 0.2355239869F, 0.2372047315F, 0.2388897560F, 0.2405790329F, + 0.2422725350F, 0.2439702347F, 0.2456721043F, 0.2473781159F, + 0.2490882418F, 0.2508024539F, 0.2525207240F, 0.2542430237F, + 0.2559693248F, 0.2576995986F, 0.2594338166F, 0.2611719498F, + 0.2629139695F, 0.2646598466F, 0.2664095520F, 0.2681630564F, + 0.2699203304F, 0.2716813445F, 0.2734460691F, 0.2752144744F, + 0.2769865307F, 0.2787622079F, 0.2805414760F, 0.2823243047F, + 0.2841106637F, 0.2859005227F, 0.2876938509F, 0.2894906179F, + 0.2912907928F, 0.2930943447F, 0.2949012426F, 0.2967114554F, + 0.2985249520F, 0.3003417009F, 0.3021616708F, 0.3039848301F, + 0.3058111471F, 0.3076405901F, 0.3094731273F, 0.3113087266F, + 0.3131473560F, 0.3149889833F, 0.3168335762F, 0.3186811024F, + 0.3205315294F, 0.3223848245F, 0.3242409552F, 0.3260998886F, + 0.3279615918F, 0.3298260319F, 0.3316931758F, 0.3335629903F, + 0.3354354423F, 0.3373104982F, 0.3391881247F, 0.3410682882F, + 0.3429509551F, 0.3448360917F, 0.3467236642F, 0.3486136387F, + 0.3505059811F, 0.3524006575F, 0.3542976336F, 0.3561968753F, + 0.3580983482F, 0.3600020179F, 0.3619078499F, 0.3638158096F, + 0.3657258625F, 0.3676379737F, 0.3695521086F, 0.3714682321F, + 0.3733863094F, 0.3753063055F, 0.3772281852F, 0.3791519134F, + 0.3810774548F, 0.3830047742F, 0.3849338362F, 0.3868646053F, + 0.3887970459F, 0.3907311227F, 0.3926667998F, 0.3946040417F, + 0.3965428125F, 0.3984830765F, 0.4004247978F, 0.4023679403F, + 0.4043124683F, 0.4062583455F, 0.4082055359F, 0.4101540034F, + 0.4121037117F, 0.4140546246F, 0.4160067058F, 0.4179599190F, + 0.4199142277F, 0.4218695956F, 0.4238259861F, 0.4257833627F, + 0.4277416888F, 0.4297009279F, 0.4316610433F, 0.4336219983F, + 0.4355837562F, 0.4375462803F, 0.4395095337F, 0.4414734797F, + 0.4434380815F, 0.4454033021F, 0.4473691046F, 0.4493354521F, + 0.4513023078F, 0.4532696345F, 0.4552373954F, 0.4572055533F, + 0.4591740713F, 0.4611429123F, 0.4631120393F, 0.4650814151F, + 0.4670510028F, 0.4690207650F, 0.4709906649F, 0.4729606651F, + 0.4749307287F, 0.4769008185F, 0.4788708972F, 0.4808409279F, + 0.4828108732F, 0.4847806962F, 0.4867503597F, 0.4887198264F, + 0.4906890593F, 0.4926580213F, 0.4946266753F, 0.4965949840F, + 0.4985629105F, 0.5005304176F, 0.5024974683F, 0.5044640255F, + 0.5064300522F, 0.5083955114F, 0.5103603659F, 0.5123245790F, + 0.5142881136F, 0.5162509328F, 0.5182129997F, 0.5201742774F, + 0.5221347290F, 0.5240943178F, 0.5260530070F, 0.5280107598F, + 0.5299675395F, 0.5319233095F, 0.5338780330F, 0.5358316736F, + 0.5377841946F, 0.5397355596F, 0.5416857320F, 0.5436346755F, + 0.5455823538F, 0.5475287304F, 0.5494737691F, 0.5514174337F, + 0.5533596881F, 0.5553004962F, 0.5572398218F, 0.5591776291F, + 0.5611138821F, 0.5630485449F, 0.5649815818F, 0.5669129570F, + 0.5688426349F, 0.5707705799F, 0.5726967564F, 0.5746211290F, + 0.5765436624F, 0.5784643212F, 0.5803830702F, 0.5822998743F, + 0.5842146984F, 0.5861275076F, 0.5880382669F, 0.5899469416F, + 0.5918534968F, 0.5937578981F, 0.5956601107F, 0.5975601004F, + 0.5994578326F, 0.6013532732F, 0.6032463880F, 0.6051371429F, + 0.6070255039F, 0.6089114372F, 0.6107949090F, 0.6126758856F, + 0.6145543334F, 0.6164302191F, 0.6183035092F, 0.6201741706F, + 0.6220421700F, 0.6239074745F, 0.6257700513F, 0.6276298674F, + 0.6294868903F, 0.6313410873F, 0.6331924262F, 0.6350408745F, + 0.6368864001F, 0.6387289710F, 0.6405685552F, 0.6424051209F, + 0.6442386364F, 0.6460690702F, 0.6478963910F, 0.6497205673F, + 0.6515415682F, 0.6533593625F, 0.6551739194F, 0.6569852082F, + 0.6587931984F, 0.6605978593F, 0.6623991609F, 0.6641970728F, + 0.6659915652F, 0.6677826081F, 0.6695701718F, 0.6713542268F, + 0.6731347437F, 0.6749116932F, 0.6766850461F, 0.6784547736F, + 0.6802208469F, 0.6819832374F, 0.6837419164F, 0.6854968559F, + 0.6872480275F, 0.6889954034F, 0.6907389556F, 0.6924786566F, + 0.6942144788F, 0.6959463950F, 0.6976743780F, 0.6993984008F, + 0.7011184365F, 0.7028344587F, 0.7045464407F, 0.7062543564F, + 0.7079581796F, 0.7096578844F, 0.7113534450F, 0.7130448359F, + 0.7147320316F, 0.7164150070F, 0.7180937371F, 0.7197681970F, + 0.7214383620F, 0.7231042077F, 0.7247657098F, 0.7264228443F, + 0.7280755871F, 0.7297239147F, 0.7313678035F, 0.7330072301F, + 0.7346421715F, 0.7362726046F, 0.7378985069F, 0.7395198556F, + 0.7411366285F, 0.7427488034F, 0.7443563584F, 0.7459592717F, + 0.7475575218F, 0.7491510873F, 0.7507399471F, 0.7523240803F, + 0.7539034661F, 0.7554780839F, 0.7570479136F, 0.7586129349F, + 0.7601731279F, 0.7617284730F, 0.7632789506F, 0.7648245416F, + 0.7663652267F, 0.7679009872F, 0.7694318044F, 0.7709576599F, + 0.7724785354F, 0.7739944130F, 0.7755052749F, 0.7770111035F, + 0.7785118815F, 0.7800075916F, 0.7814982170F, 0.7829837410F, + 0.7844641472F, 0.7859394191F, 0.7874095408F, 0.7888744965F, + 0.7903342706F, 0.7917888476F, 0.7932382124F, 0.7946823501F, + 0.7961212460F, 0.7975548855F, 0.7989832544F, 0.8004063386F, + 0.8018241244F, 0.8032365981F, 0.8046437463F, 0.8060455560F, + 0.8074420141F, 0.8088331080F, 0.8102188253F, 0.8115991536F, + 0.8129740810F, 0.8143435957F, 0.8157076861F, 0.8170663409F, + 0.8184195489F, 0.8197672994F, 0.8211095817F, 0.8224463853F, + 0.8237777001F, 0.8251035161F, 0.8264238235F, 0.8277386129F, + 0.8290478750F, 0.8303516008F, 0.8316497814F, 0.8329424083F, + 0.8342294731F, 0.8355109677F, 0.8367868841F, 0.8380572148F, + 0.8393219523F, 0.8405810893F, 0.8418346190F, 0.8430825345F, + 0.8443248294F, 0.8455614974F, 0.8467925323F, 0.8480179285F, + 0.8492376802F, 0.8504517822F, 0.8516602292F, 0.8528630164F, + 0.8540601391F, 0.8552515928F, 0.8564373733F, 0.8576174766F, + 0.8587918990F, 0.8599606368F, 0.8611236868F, 0.8622810460F, + 0.8634327113F, 0.8645786802F, 0.8657189504F, 0.8668535195F, + 0.8679823857F, 0.8691055472F, 0.8702230025F, 0.8713347503F, + 0.8724407896F, 0.8735411194F, 0.8746357394F, 0.8757246489F, + 0.8768078479F, 0.8778853364F, 0.8789571146F, 0.8800231832F, + 0.8810835427F, 0.8821381942F, 0.8831871387F, 0.8842303777F, + 0.8852679127F, 0.8862997456F, 0.8873258784F, 0.8883463132F, + 0.8893610527F, 0.8903700994F, 0.8913734562F, 0.8923711263F, + 0.8933631129F, 0.8943494196F, 0.8953300500F, 0.8963050083F, + 0.8972742985F, 0.8982379249F, 0.8991958922F, 0.9001482052F, + 0.9010948688F, 0.9020358883F, 0.9029712690F, 0.9039010165F, + 0.9048251367F, 0.9057436357F, 0.9066565195F, 0.9075637946F, + 0.9084654678F, 0.9093615456F, 0.9102520353F, 0.9111369440F, + 0.9120162792F, 0.9128900484F, 0.9137582595F, 0.9146209204F, + 0.9154780394F, 0.9163296248F, 0.9171756853F, 0.9180162296F, + 0.9188512667F, 0.9196808057F, 0.9205048559F, 0.9213234270F, + 0.9221365285F, 0.9229441704F, 0.9237463629F, 0.9245431160F, + 0.9253344404F, 0.9261203465F, 0.9269008453F, 0.9276759477F, + 0.9284456648F, 0.9292100080F, 0.9299689889F, 0.9307226190F, + 0.9314709103F, 0.9322138747F, 0.9329515245F, 0.9336838721F, + 0.9344109300F, 0.9351327108F, 0.9358492275F, 0.9365604931F, + 0.9372665208F, 0.9379673239F, 0.9386629160F, 0.9393533107F, + 0.9400385220F, 0.9407185637F, 0.9413934501F, 0.9420631954F, + 0.9427278141F, 0.9433873208F, 0.9440417304F, 0.9446910576F, + 0.9453353176F, 0.9459745255F, 0.9466086968F, 0.9472378469F, + 0.9478619915F, 0.9484811463F, 0.9490953274F, 0.9497045506F, + 0.9503088323F, 0.9509081888F, 0.9515026365F, 0.9520921921F, + 0.9526768723F, 0.9532566940F, 0.9538316742F, 0.9544018300F, + 0.9549671786F, 0.9555277375F, 0.9560835241F, 0.9566345562F, + 0.9571808513F, 0.9577224275F, 0.9582593027F, 0.9587914949F, + 0.9593190225F, 0.9598419038F, 0.9603601571F, 0.9608738012F, + 0.9613828546F, 0.9618873361F, 0.9623872646F, 0.9628826591F, + 0.9633735388F, 0.9638599227F, 0.9643418303F, 0.9648192808F, + 0.9652922939F, 0.9657608890F, 0.9662250860F, 0.9666849046F, + 0.9671403646F, 0.9675914861F, 0.9680382891F, 0.9684807937F, + 0.9689190202F, 0.9693529890F, 0.9697827203F, 0.9702082347F, + 0.9706295529F, 0.9710466953F, 0.9714596828F, 0.9718685362F, + 0.9722732762F, 0.9726739240F, 0.9730705005F, 0.9734630267F, + 0.9738515239F, 0.9742360134F, 0.9746165163F, 0.9749930540F, + 0.9753656481F, 0.9757343198F, 0.9760990909F, 0.9764599829F, + 0.9768170175F, 0.9771702164F, 0.9775196013F, 0.9778651941F, + 0.9782070167F, 0.9785450909F, 0.9788794388F, 0.9792100824F, + 0.9795370437F, 0.9798603449F, 0.9801800080F, 0.9804960554F, + 0.9808085092F, 0.9811173916F, 0.9814227251F, 0.9817245318F, + 0.9820228343F, 0.9823176549F, 0.9826090160F, 0.9828969402F, + 0.9831814498F, 0.9834625674F, 0.9837403156F, 0.9840147169F, + 0.9842857939F, 0.9845535692F, 0.9848180654F, 0.9850793052F, + 0.9853373113F, 0.9855921062F, 0.9858437127F, 0.9860921535F, + 0.9863374512F, 0.9865796287F, 0.9868187085F, 0.9870547136F, + 0.9872876664F, 0.9875175899F, 0.9877445067F, 0.9879684396F, + 0.9881894112F, 0.9884074444F, 0.9886225619F, 0.9888347863F, + 0.9890441404F, 0.9892506468F, 0.9894543284F, 0.9896552077F, + 0.9898533074F, 0.9900486502F, 0.9902412587F, 0.9904311555F, + 0.9906183633F, 0.9908029045F, 0.9909848019F, 0.9911640779F, + 0.9913407550F, 0.9915148557F, 0.9916864025F, 0.9918554179F, + 0.9920219241F, 0.9921859437F, 0.9923474989F, 0.9925066120F, + 0.9926633054F, 0.9928176012F, 0.9929695218F, 0.9931190891F, + 0.9932663254F, 0.9934112527F, 0.9935538932F, 0.9936942686F, + 0.9938324012F, 0.9939683126F, 0.9941020248F, 0.9942335597F, + 0.9943629388F, 0.9944901841F, 0.9946153170F, 0.9947383593F, + 0.9948593325F, 0.9949782579F, 0.9950951572F, 0.9952100516F, + 0.9953229625F, 0.9954339111F, 0.9955429186F, 0.9956500062F, + 0.9957551948F, 0.9958585056F, 0.9959599593F, 0.9960595769F, + 0.9961573792F, 0.9962533869F, 0.9963476206F, 0.9964401009F, + 0.9965308483F, 0.9966198833F, 0.9967072261F, 0.9967928971F, + 0.9968769164F, 0.9969593041F, 0.9970400804F, 0.9971192651F, + 0.9971968781F, 0.9972729391F, 0.9973474680F, 0.9974204842F, + 0.9974920074F, 0.9975620569F, 0.9976306521F, 0.9976978122F, + 0.9977635565F, 0.9978279039F, 0.9978908736F, 0.9979524842F, + 0.9980127547F, 0.9980717037F, 0.9981293499F, 0.9981857116F, + 0.9982408073F, 0.9982946554F, 0.9983472739F, 0.9983986810F, + 0.9984488947F, 0.9984979328F, 0.9985458132F, 0.9985925534F, + 0.9986381711F, 0.9986826838F, 0.9987261086F, 0.9987684630F, + 0.9988097640F, 0.9988500286F, 0.9988892738F, 0.9989275163F, + 0.9989647727F, 0.9990010597F, 0.9990363938F, 0.9990707911F, + 0.9991042679F, 0.9991368404F, 0.9991685244F, 0.9991993358F, + 0.9992292905F, 0.9992584038F, 0.9992866914F, 0.9993141686F, + 0.9993408506F, 0.9993667526F, 0.9993918895F, 0.9994162761F, + 0.9994399273F, 0.9994628576F, 0.9994850815F, 0.9995066133F, + 0.9995274672F, 0.9995476574F, 0.9995671978F, 0.9995861021F, + 0.9996043841F, 0.9996220573F, 0.9996391352F, 0.9996556310F, + 0.9996715579F, 0.9996869288F, 0.9997017568F, 0.9997160543F, + 0.9997298342F, 0.9997431088F, 0.9997558905F, 0.9997681914F, + 0.9997800236F, 0.9997913990F, 0.9998023292F, 0.9998128261F, + 0.9998229009F, 0.9998325650F, 0.9998418296F, 0.9998507058F, + 0.9998592044F, 0.9998673362F, 0.9998751117F, 0.9998825415F, + 0.9998896358F, 0.9998964047F, 0.9999028584F, 0.9999090066F, + 0.9999148590F, 0.9999204253F, 0.9999257148F, 0.9999307368F, + 0.9999355003F, 0.9999400144F, 0.9999442878F, 0.9999483293F, + 0.9999521472F, 0.9999557499F, 0.9999591457F, 0.9999623426F, + 0.9999653483F, 0.9999681708F, 0.9999708175F, 0.9999732959F, + 0.9999756132F, 0.9999777765F, 0.9999797928F, 0.9999816688F, + 0.9999834113F, 0.9999850266F, 0.9999865211F, 0.9999879009F, + 0.9999891721F, 0.9999903405F, 0.9999914118F, 0.9999923914F, + 0.9999932849F, 0.9999940972F, 0.9999948336F, 0.9999954989F, + 0.9999960978F, 0.9999966349F, 0.9999971146F, 0.9999975411F, + 0.9999979185F, 0.9999982507F, 0.9999985414F, 0.9999987944F, + 0.9999990129F, 0.9999992003F, 0.9999993596F, 0.9999994939F, + 0.9999996059F, 0.9999996981F, 0.9999997732F, 0.9999998333F, + 0.9999998805F, 0.9999999170F, 0.9999999444F, 0.9999999643F, + 0.9999999784F, 0.9999999878F, 0.9999999937F, 0.9999999972F, + 0.9999999990F, 0.9999999997F, 1.0000000000F, 1.0000000000F, +}; + +static const float vwin4096[2048] = { + 0.0000002310F, 0.0000020791F, 0.0000057754F, 0.0000113197F, + 0.0000187121F, 0.0000279526F, 0.0000390412F, 0.0000519777F, + 0.0000667623F, 0.0000833949F, 0.0001018753F, 0.0001222036F, + 0.0001443798F, 0.0001684037F, 0.0001942754F, 0.0002219947F, + 0.0002515616F, 0.0002829761F, 0.0003162380F, 0.0003513472F, + 0.0003883038F, 0.0004271076F, 0.0004677584F, 0.0005102563F, + 0.0005546011F, 0.0006007928F, 0.0006488311F, 0.0006987160F, + 0.0007504474F, 0.0008040251F, 0.0008594490F, 0.0009167191F, + 0.0009758351F, 0.0010367969F, 0.0010996044F, 0.0011642574F, + 0.0012307558F, 0.0012990994F, 0.0013692880F, 0.0014413216F, + 0.0015151998F, 0.0015909226F, 0.0016684898F, 0.0017479011F, + 0.0018291565F, 0.0019122556F, 0.0019971983F, 0.0020839845F, + 0.0021726138F, 0.0022630861F, 0.0023554012F, 0.0024495588F, + 0.0025455588F, 0.0026434008F, 0.0027430847F, 0.0028446103F, + 0.0029479772F, 0.0030531853F, 0.0031602342F, 0.0032691238F, + 0.0033798538F, 0.0034924239F, 0.0036068338F, 0.0037230833F, + 0.0038411721F, 0.0039610999F, 0.0040828664F, 0.0042064714F, + 0.0043319145F, 0.0044591954F, 0.0045883139F, 0.0047192696F, + 0.0048520622F, 0.0049866914F, 0.0051231569F, 0.0052614583F, + 0.0054015953F, 0.0055435676F, 0.0056873748F, 0.0058330166F, + 0.0059804926F, 0.0061298026F, 0.0062809460F, 0.0064339226F, + 0.0065887320F, 0.0067453738F, 0.0069038476F, 0.0070641531F, + 0.0072262899F, 0.0073902575F, 0.0075560556F, 0.0077236838F, + 0.0078931417F, 0.0080644288F, 0.0082375447F, 0.0084124891F, + 0.0085892615F, 0.0087678614F, 0.0089482885F, 0.0091305422F, + 0.0093146223F, 0.0095005281F, 0.0096882592F, 0.0098778153F, + 0.0100691958F, 0.0102624002F, 0.0104574281F, 0.0106542791F, + 0.0108529525F, 0.0110534480F, 0.0112557651F, 0.0114599032F, + 0.0116658618F, 0.0118736405F, 0.0120832387F, 0.0122946560F, + 0.0125078917F, 0.0127229454F, 0.0129398166F, 0.0131585046F, + 0.0133790090F, 0.0136013292F, 0.0138254647F, 0.0140514149F, + 0.0142791792F, 0.0145087572F, 0.0147401481F, 0.0149733515F, + 0.0152083667F, 0.0154451932F, 0.0156838304F, 0.0159242777F, + 0.0161665345F, 0.0164106001F, 0.0166564741F, 0.0169041557F, + 0.0171536443F, 0.0174049393F, 0.0176580401F, 0.0179129461F, + 0.0181696565F, 0.0184281708F, 0.0186884883F, 0.0189506084F, + 0.0192145303F, 0.0194802535F, 0.0197477772F, 0.0200171008F, + 0.0202882236F, 0.0205611449F, 0.0208358639F, 0.0211123801F, + 0.0213906927F, 0.0216708011F, 0.0219527043F, 0.0222364019F, + 0.0225218930F, 0.0228091769F, 0.0230982529F, 0.0233891203F, + 0.0236817782F, 0.0239762259F, 0.0242724628F, 0.0245704880F, + 0.0248703007F, 0.0251719002F, 0.0254752858F, 0.0257804565F, + 0.0260874117F, 0.0263961506F, 0.0267066722F, 0.0270189760F, + 0.0273330609F, 0.0276489263F, 0.0279665712F, 0.0282859949F, + 0.0286071966F, 0.0289301753F, 0.0292549303F, 0.0295814607F, + 0.0299097656F, 0.0302398442F, 0.0305716957F, 0.0309053191F, + 0.0312407135F, 0.0315778782F, 0.0319168122F, 0.0322575145F, + 0.0325999844F, 0.0329442209F, 0.0332902231F, 0.0336379900F, + 0.0339875208F, 0.0343388146F, 0.0346918703F, 0.0350466871F, + 0.0354032640F, 0.0357616000F, 0.0361216943F, 0.0364835458F, + 0.0368471535F, 0.0372125166F, 0.0375796339F, 0.0379485046F, + 0.0383191276F, 0.0386915020F, 0.0390656267F, 0.0394415008F, + 0.0398191231F, 0.0401984927F, 0.0405796086F, 0.0409624698F, + 0.0413470751F, 0.0417334235F, 0.0421215141F, 0.0425113457F, + 0.0429029172F, 0.0432962277F, 0.0436912760F, 0.0440880610F, + 0.0444865817F, 0.0448868370F, 0.0452888257F, 0.0456925468F, + 0.0460979992F, 0.0465051816F, 0.0469140931F, 0.0473247325F, + 0.0477370986F, 0.0481511902F, 0.0485670064F, 0.0489845458F, + 0.0494038074F, 0.0498247899F, 0.0502474922F, 0.0506719131F, + 0.0510980514F, 0.0515259060F, 0.0519554756F, 0.0523867590F, + 0.0528197550F, 0.0532544624F, 0.0536908800F, 0.0541290066F, + 0.0545688408F, 0.0550103815F, 0.0554536274F, 0.0558985772F, + 0.0563452297F, 0.0567935837F, 0.0572436377F, 0.0576953907F, + 0.0581488412F, 0.0586039880F, 0.0590608297F, 0.0595193651F, + 0.0599795929F, 0.0604415117F, 0.0609051202F, 0.0613704170F, + 0.0618374009F, 0.0623060704F, 0.0627764243F, 0.0632484611F, + 0.0637221795F, 0.0641975781F, 0.0646746555F, 0.0651534104F, + 0.0656338413F, 0.0661159469F, 0.0665997257F, 0.0670851763F, + 0.0675722973F, 0.0680610873F, 0.0685515448F, 0.0690436684F, + 0.0695374567F, 0.0700329081F, 0.0705300213F, 0.0710287947F, + 0.0715292269F, 0.0720313163F, 0.0725350616F, 0.0730404612F, + 0.0735475136F, 0.0740562172F, 0.0745665707F, 0.0750785723F, + 0.0755922207F, 0.0761075143F, 0.0766244515F, 0.0771430307F, + 0.0776632505F, 0.0781851092F, 0.0787086052F, 0.0792337371F, + 0.0797605032F, 0.0802889018F, 0.0808189315F, 0.0813505905F, + 0.0818838773F, 0.0824187903F, 0.0829553277F, 0.0834934881F, + 0.0840332697F, 0.0845746708F, 0.0851176899F, 0.0856623252F, + 0.0862085751F, 0.0867564379F, 0.0873059119F, 0.0878569954F, + 0.0884096867F, 0.0889639840F, 0.0895198858F, 0.0900773902F, + 0.0906364955F, 0.0911972000F, 0.0917595019F, 0.0923233995F, + 0.0928888909F, 0.0934559745F, 0.0940246485F, 0.0945949110F, + 0.0951667604F, 0.0957401946F, 0.0963152121F, 0.0968918109F, + 0.0974699893F, 0.0980497454F, 0.0986310773F, 0.0992139832F, + 0.0997984614F, 0.1003845098F, 0.1009721267F, 0.1015613101F, + 0.1021520582F, 0.1027443692F, 0.1033382410F, 0.1039336718F, + 0.1045306597F, 0.1051292027F, 0.1057292990F, 0.1063309466F, + 0.1069341435F, 0.1075388878F, 0.1081451776F, 0.1087530108F, + 0.1093623856F, 0.1099732998F, 0.1105857516F, 0.1111997389F, + 0.1118152597F, 0.1124323121F, 0.1130508939F, 0.1136710032F, + 0.1142926379F, 0.1149157960F, 0.1155404755F, 0.1161666742F, + 0.1167943901F, 0.1174236211F, 0.1180543652F, 0.1186866202F, + 0.1193203841F, 0.1199556548F, 0.1205924300F, 0.1212307078F, + 0.1218704860F, 0.1225117624F, 0.1231545349F, 0.1237988013F, + 0.1244445596F, 0.1250918074F, 0.1257405427F, 0.1263907632F, + 0.1270424667F, 0.1276956512F, 0.1283503142F, 0.1290064537F, + 0.1296640674F, 0.1303231530F, 0.1309837084F, 0.1316457312F, + 0.1323092193F, 0.1329741703F, 0.1336405820F, 0.1343084520F, + 0.1349777782F, 0.1356485582F, 0.1363207897F, 0.1369944704F, + 0.1376695979F, 0.1383461700F, 0.1390241842F, 0.1397036384F, + 0.1403845300F, 0.1410668567F, 0.1417506162F, 0.1424358061F, + 0.1431224240F, 0.1438104674F, 0.1444999341F, 0.1451908216F, + 0.1458831274F, 0.1465768492F, 0.1472719844F, 0.1479685308F, + 0.1486664857F, 0.1493658468F, 0.1500666115F, 0.1507687775F, + 0.1514723422F, 0.1521773031F, 0.1528836577F, 0.1535914035F, + 0.1543005380F, 0.1550110587F, 0.1557229631F, 0.1564362485F, + 0.1571509124F, 0.1578669524F, 0.1585843657F, 0.1593031499F, + 0.1600233024F, 0.1607448205F, 0.1614677017F, 0.1621919433F, + 0.1629175428F, 0.1636444975F, 0.1643728047F, 0.1651024619F, + 0.1658334665F, 0.1665658156F, 0.1672995067F, 0.1680345371F, + 0.1687709041F, 0.1695086050F, 0.1702476372F, 0.1709879978F, + 0.1717296843F, 0.1724726938F, 0.1732170237F, 0.1739626711F, + 0.1747096335F, 0.1754579079F, 0.1762074916F, 0.1769583819F, + 0.1777105760F, 0.1784640710F, 0.1792188642F, 0.1799749529F, + 0.1807323340F, 0.1814910049F, 0.1822509628F, 0.1830122046F, + 0.1837747277F, 0.1845385292F, 0.1853036062F, 0.1860699558F, + 0.1868375751F, 0.1876064613F, 0.1883766114F, 0.1891480226F, + 0.1899206919F, 0.1906946164F, 0.1914697932F, 0.1922462194F, + 0.1930238919F, 0.1938028079F, 0.1945829643F, 0.1953643583F, + 0.1961469868F, 0.1969308468F, 0.1977159353F, 0.1985022494F, + 0.1992897859F, 0.2000785420F, 0.2008685145F, 0.2016597005F, + 0.2024520968F, 0.2032457005F, 0.2040405084F, 0.2048365175F, + 0.2056337247F, 0.2064321269F, 0.2072317211F, 0.2080325041F, + 0.2088344727F, 0.2096376240F, 0.2104419547F, 0.2112474618F, + 0.2120541420F, 0.2128619923F, 0.2136710094F, 0.2144811902F, + 0.2152925315F, 0.2161050301F, 0.2169186829F, 0.2177334866F, + 0.2185494381F, 0.2193665340F, 0.2201847712F, 0.2210041465F, + 0.2218246565F, 0.2226462981F, 0.2234690680F, 0.2242929629F, + 0.2251179796F, 0.2259441147F, 0.2267713650F, 0.2275997272F, + 0.2284291979F, 0.2292597739F, 0.2300914518F, 0.2309242283F, + 0.2317581001F, 0.2325930638F, 0.2334291160F, 0.2342662534F, + 0.2351044727F, 0.2359437703F, 0.2367841431F, 0.2376255875F, + 0.2384681001F, 0.2393116776F, 0.2401563165F, 0.2410020134F, + 0.2418487649F, 0.2426965675F, 0.2435454178F, 0.2443953122F, + 0.2452462474F, 0.2460982199F, 0.2469512262F, 0.2478052628F, + 0.2486603262F, 0.2495164129F, 0.2503735194F, 0.2512316421F, + 0.2520907776F, 0.2529509222F, 0.2538120726F, 0.2546742250F, + 0.2555373760F, 0.2564015219F, 0.2572666593F, 0.2581327845F, + 0.2589998939F, 0.2598679840F, 0.2607370510F, 0.2616070916F, + 0.2624781019F, 0.2633500783F, 0.2642230173F, 0.2650969152F, + 0.2659717684F, 0.2668475731F, 0.2677243257F, 0.2686020226F, + 0.2694806601F, 0.2703602344F, 0.2712407419F, 0.2721221789F, + 0.2730045417F, 0.2738878265F, 0.2747720297F, 0.2756571474F, + 0.2765431760F, 0.2774301117F, 0.2783179508F, 0.2792066895F, + 0.2800963240F, 0.2809868505F, 0.2818782654F, 0.2827705647F, + 0.2836637447F, 0.2845578016F, 0.2854527315F, 0.2863485307F, + 0.2872451953F, 0.2881427215F, 0.2890411055F, 0.2899403433F, + 0.2908404312F, 0.2917413654F, 0.2926431418F, 0.2935457567F, + 0.2944492061F, 0.2953534863F, 0.2962585932F, 0.2971645230F, + 0.2980712717F, 0.2989788356F, 0.2998872105F, 0.3007963927F, + 0.3017063781F, 0.3026171629F, 0.3035287430F, 0.3044411145F, + 0.3053542736F, 0.3062682161F, 0.3071829381F, 0.3080984356F, + 0.3090147047F, 0.3099317413F, 0.3108495414F, 0.3117681011F, + 0.3126874163F, 0.3136074830F, 0.3145282972F, 0.3154498548F, + 0.3163721517F, 0.3172951841F, 0.3182189477F, 0.3191434385F, + 0.3200686525F, 0.3209945856F, 0.3219212336F, 0.3228485927F, + 0.3237766585F, 0.3247054271F, 0.3256348943F, 0.3265650560F, + 0.3274959081F, 0.3284274465F, 0.3293596671F, 0.3302925657F, + 0.3312261382F, 0.3321603804F, 0.3330952882F, 0.3340308574F, + 0.3349670838F, 0.3359039634F, 0.3368414919F, 0.3377796651F, + 0.3387184789F, 0.3396579290F, 0.3405980113F, 0.3415387216F, + 0.3424800556F, 0.3434220091F, 0.3443645779F, 0.3453077578F, + 0.3462515446F, 0.3471959340F, 0.3481409217F, 0.3490865036F, + 0.3500326754F, 0.3509794328F, 0.3519267715F, 0.3528746873F, + 0.3538231759F, 0.3547722330F, 0.3557218544F, 0.3566720357F, + 0.3576227727F, 0.3585740610F, 0.3595258964F, 0.3604782745F, + 0.3614311910F, 0.3623846417F, 0.3633386221F, 0.3642931280F, + 0.3652481549F, 0.3662036987F, 0.3671597548F, 0.3681163191F, + 0.3690733870F, 0.3700309544F, 0.3709890167F, 0.3719475696F, + 0.3729066089F, 0.3738661299F, 0.3748261285F, 0.3757866002F, + 0.3767475406F, 0.3777089453F, 0.3786708100F, 0.3796331302F, + 0.3805959014F, 0.3815591194F, 0.3825227796F, 0.3834868777F, + 0.3844514093F, 0.3854163698F, 0.3863817549F, 0.3873475601F, + 0.3883137810F, 0.3892804131F, 0.3902474521F, 0.3912148933F, + 0.3921827325F, 0.3931509650F, 0.3941195865F, 0.3950885925F, + 0.3960579785F, 0.3970277400F, 0.3979978725F, 0.3989683716F, + 0.3999392328F, 0.4009104516F, 0.4018820234F, 0.4028539438F, + 0.4038262084F, 0.4047988125F, 0.4057717516F, 0.4067450214F, + 0.4077186172F, 0.4086925345F, 0.4096667688F, 0.4106413155F, + 0.4116161703F, 0.4125913284F, 0.4135667854F, 0.4145425368F, + 0.4155185780F, 0.4164949044F, 0.4174715116F, 0.4184483949F, + 0.4194255498F, 0.4204029718F, 0.4213806563F, 0.4223585987F, + 0.4233367946F, 0.4243152392F, 0.4252939281F, 0.4262728566F, + 0.4272520202F, 0.4282314144F, 0.4292110345F, 0.4301908760F, + 0.4311709343F, 0.4321512047F, 0.4331316828F, 0.4341123639F, + 0.4350932435F, 0.4360743168F, 0.4370555794F, 0.4380370267F, + 0.4390186540F, 0.4400004567F, 0.4409824303F, 0.4419645701F, + 0.4429468716F, 0.4439293300F, 0.4449119409F, 0.4458946996F, + 0.4468776014F, 0.4478606418F, 0.4488438162F, 0.4498271199F, + 0.4508105483F, 0.4517940967F, 0.4527777607F, 0.4537615355F, + 0.4547454165F, 0.4557293991F, 0.4567134786F, 0.4576976505F, + 0.4586819101F, 0.4596662527F, 0.4606506738F, 0.4616351687F, + 0.4626197328F, 0.4636043614F, 0.4645890499F, 0.4655737936F, + 0.4665585880F, 0.4675434284F, 0.4685283101F, 0.4695132286F, + 0.4704981791F, 0.4714831570F, 0.4724681577F, 0.4734531766F, + 0.4744382089F, 0.4754232501F, 0.4764082956F, 0.4773933406F, + 0.4783783806F, 0.4793634108F, 0.4803484267F, 0.4813334237F, + 0.4823183969F, 0.4833033419F, 0.4842882540F, 0.4852731285F, + 0.4862579608F, 0.4872427462F, 0.4882274802F, 0.4892121580F, + 0.4901967751F, 0.4911813267F, 0.4921658083F, 0.4931502151F, + 0.4941345427F, 0.4951187863F, 0.4961029412F, 0.4970870029F, + 0.4980709667F, 0.4990548280F, 0.5000385822F, 0.5010222245F, + 0.5020057505F, 0.5029891553F, 0.5039724345F, 0.5049555834F, + 0.5059385973F, 0.5069214716F, 0.5079042018F, 0.5088867831F, + 0.5098692110F, 0.5108514808F, 0.5118335879F, 0.5128155277F, + 0.5137972956F, 0.5147788869F, 0.5157602971F, 0.5167415215F, + 0.5177225555F, 0.5187033945F, 0.5196840339F, 0.5206644692F, + 0.5216446956F, 0.5226247086F, 0.5236045035F, 0.5245840759F, + 0.5255634211F, 0.5265425344F, 0.5275214114F, 0.5285000474F, + 0.5294784378F, 0.5304565781F, 0.5314344637F, 0.5324120899F, + 0.5333894522F, 0.5343665461F, 0.5353433670F, 0.5363199102F, + 0.5372961713F, 0.5382721457F, 0.5392478287F, 0.5402232159F, + 0.5411983027F, 0.5421730845F, 0.5431475569F, 0.5441217151F, + 0.5450955548F, 0.5460690714F, 0.5470422602F, 0.5480151169F, + 0.5489876368F, 0.5499598155F, 0.5509316484F, 0.5519031310F, + 0.5528742587F, 0.5538450271F, 0.5548154317F, 0.5557854680F, + 0.5567551314F, 0.5577244174F, 0.5586933216F, 0.5596618395F, + 0.5606299665F, 0.5615976983F, 0.5625650302F, 0.5635319580F, + 0.5644984770F, 0.5654645828F, 0.5664302709F, 0.5673955370F, + 0.5683603765F, 0.5693247850F, 0.5702887580F, 0.5712522912F, + 0.5722153800F, 0.5731780200F, 0.5741402069F, 0.5751019362F, + 0.5760632034F, 0.5770240042F, 0.5779843341F, 0.5789441889F, + 0.5799035639F, 0.5808624549F, 0.5818208575F, 0.5827787673F, + 0.5837361800F, 0.5846930910F, 0.5856494961F, 0.5866053910F, + 0.5875607712F, 0.5885156324F, 0.5894699703F, 0.5904237804F, + 0.5913770586F, 0.5923298004F, 0.5932820016F, 0.5942336578F, + 0.5951847646F, 0.5961353179F, 0.5970853132F, 0.5980347464F, + 0.5989836131F, 0.5999319090F, 0.6008796298F, 0.6018267713F, + 0.6027733292F, 0.6037192993F, 0.6046646773F, 0.6056094589F, + 0.6065536400F, 0.6074972162F, 0.6084401833F, 0.6093825372F, + 0.6103242736F, 0.6112653884F, 0.6122058772F, 0.6131457359F, + 0.6140849604F, 0.6150235464F, 0.6159614897F, 0.6168987862F, + 0.6178354318F, 0.6187714223F, 0.6197067535F, 0.6206414213F, + 0.6215754215F, 0.6225087501F, 0.6234414028F, 0.6243733757F, + 0.6253046646F, 0.6262352654F, 0.6271651739F, 0.6280943862F, + 0.6290228982F, 0.6299507057F, 0.6308778048F, 0.6318041913F, + 0.6327298612F, 0.6336548105F, 0.6345790352F, 0.6355025312F, + 0.6364252945F, 0.6373473211F, 0.6382686070F, 0.6391891483F, + 0.6401089409F, 0.6410279808F, 0.6419462642F, 0.6428637869F, + 0.6437805452F, 0.6446965350F, 0.6456117524F, 0.6465261935F, + 0.6474398544F, 0.6483527311F, 0.6492648197F, 0.6501761165F, + 0.6510866174F, 0.6519963186F, 0.6529052162F, 0.6538133064F, + 0.6547205854F, 0.6556270492F, 0.6565326941F, 0.6574375162F, + 0.6583415117F, 0.6592446769F, 0.6601470079F, 0.6610485009F, + 0.6619491521F, 0.6628489578F, 0.6637479143F, 0.6646460177F, + 0.6655432643F, 0.6664396505F, 0.6673351724F, 0.6682298264F, + 0.6691236087F, 0.6700165157F, 0.6709085436F, 0.6717996889F, + 0.6726899478F, 0.6735793167F, 0.6744677918F, 0.6753553697F, + 0.6762420466F, 0.6771278190F, 0.6780126832F, 0.6788966357F, + 0.6797796728F, 0.6806617909F, 0.6815429866F, 0.6824232562F, + 0.6833025961F, 0.6841810030F, 0.6850584731F, 0.6859350031F, + 0.6868105894F, 0.6876852284F, 0.6885589168F, 0.6894316510F, + 0.6903034275F, 0.6911742430F, 0.6920440939F, 0.6929129769F, + 0.6937808884F, 0.6946478251F, 0.6955137837F, 0.6963787606F, + 0.6972427525F, 0.6981057560F, 0.6989677678F, 0.6998287845F, + 0.7006888028F, 0.7015478194F, 0.7024058309F, 0.7032628340F, + 0.7041188254F, 0.7049738019F, 0.7058277601F, 0.7066806969F, + 0.7075326089F, 0.7083834929F, 0.7092333457F, 0.7100821640F, + 0.7109299447F, 0.7117766846F, 0.7126223804F, 0.7134670291F, + 0.7143106273F, 0.7151531721F, 0.7159946602F, 0.7168350885F, + 0.7176744539F, 0.7185127534F, 0.7193499837F, 0.7201861418F, + 0.7210212247F, 0.7218552293F, 0.7226881526F, 0.7235199914F, + 0.7243507428F, 0.7251804039F, 0.7260089715F, 0.7268364426F, + 0.7276628144F, 0.7284880839F, 0.7293122481F, 0.7301353040F, + 0.7309572487F, 0.7317780794F, 0.7325977930F, 0.7334163868F, + 0.7342338579F, 0.7350502033F, 0.7358654202F, 0.7366795059F, + 0.7374924573F, 0.7383042718F, 0.7391149465F, 0.7399244787F, + 0.7407328655F, 0.7415401041F, 0.7423461920F, 0.7431511261F, + 0.7439549040F, 0.7447575227F, 0.7455589797F, 0.7463592723F, + 0.7471583976F, 0.7479563532F, 0.7487531363F, 0.7495487443F, + 0.7503431745F, 0.7511364244F, 0.7519284913F, 0.7527193726F, + 0.7535090658F, 0.7542975683F, 0.7550848776F, 0.7558709910F, + 0.7566559062F, 0.7574396205F, 0.7582221314F, 0.7590034366F, + 0.7597835334F, 0.7605624194F, 0.7613400923F, 0.7621165495F, + 0.7628917886F, 0.7636658072F, 0.7644386030F, 0.7652101735F, + 0.7659805164F, 0.7667496292F, 0.7675175098F, 0.7682841556F, + 0.7690495645F, 0.7698137341F, 0.7705766622F, 0.7713383463F, + 0.7720987844F, 0.7728579741F, 0.7736159132F, 0.7743725994F, + 0.7751280306F, 0.7758822046F, 0.7766351192F, 0.7773867722F, + 0.7781371614F, 0.7788862848F, 0.7796341401F, 0.7803807253F, + 0.7811260383F, 0.7818700769F, 0.7826128392F, 0.7833543230F, + 0.7840945263F, 0.7848334471F, 0.7855710833F, 0.7863074330F, + 0.7870424941F, 0.7877762647F, 0.7885087428F, 0.7892399264F, + 0.7899698137F, 0.7906984026F, 0.7914256914F, 0.7921516780F, + 0.7928763607F, 0.7935997375F, 0.7943218065F, 0.7950425661F, + 0.7957620142F, 0.7964801492F, 0.7971969692F, 0.7979124724F, + 0.7986266570F, 0.7993395214F, 0.8000510638F, 0.8007612823F, + 0.8014701754F, 0.8021777413F, 0.8028839784F, 0.8035888849F, + 0.8042924592F, 0.8049946997F, 0.8056956048F, 0.8063951727F, + 0.8070934020F, 0.8077902910F, 0.8084858381F, 0.8091800419F, + 0.8098729007F, 0.8105644130F, 0.8112545774F, 0.8119433922F, + 0.8126308561F, 0.8133169676F, 0.8140017251F, 0.8146851272F, + 0.8153671726F, 0.8160478598F, 0.8167271874F, 0.8174051539F, + 0.8180817582F, 0.8187569986F, 0.8194308741F, 0.8201033831F, + 0.8207745244F, 0.8214442966F, 0.8221126986F, 0.8227797290F, + 0.8234453865F, 0.8241096700F, 0.8247725781F, 0.8254341097F, + 0.8260942636F, 0.8267530385F, 0.8274104334F, 0.8280664470F, + 0.8287210782F, 0.8293743259F, 0.8300261889F, 0.8306766662F, + 0.8313257566F, 0.8319734591F, 0.8326197727F, 0.8332646963F, + 0.8339082288F, 0.8345503692F, 0.8351911167F, 0.8358304700F, + 0.8364684284F, 0.8371049907F, 0.8377401562F, 0.8383739238F, + 0.8390062927F, 0.8396372618F, 0.8402668305F, 0.8408949977F, + 0.8415217626F, 0.8421471245F, 0.8427710823F, 0.8433936354F, + 0.8440147830F, 0.8446345242F, 0.8452528582F, 0.8458697844F, + 0.8464853020F, 0.8470994102F, 0.8477121084F, 0.8483233958F, + 0.8489332718F, 0.8495417356F, 0.8501487866F, 0.8507544243F, + 0.8513586479F, 0.8519614568F, 0.8525628505F, 0.8531628283F, + 0.8537613897F, 0.8543585341F, 0.8549542611F, 0.8555485699F, + 0.8561414603F, 0.8567329315F, 0.8573229832F, 0.8579116149F, + 0.8584988262F, 0.8590846165F, 0.8596689855F, 0.8602519327F, + 0.8608334577F, 0.8614135603F, 0.8619922399F, 0.8625694962F, + 0.8631453289F, 0.8637197377F, 0.8642927222F, 0.8648642821F, + 0.8654344172F, 0.8660031272F, 0.8665704118F, 0.8671362708F, + 0.8677007039F, 0.8682637109F, 0.8688252917F, 0.8693854460F, + 0.8699441737F, 0.8705014745F, 0.8710573485F, 0.8716117953F, + 0.8721648150F, 0.8727164073F, 0.8732665723F, 0.8738153098F, + 0.8743626197F, 0.8749085021F, 0.8754529569F, 0.8759959840F, + 0.8765375835F, 0.8770777553F, 0.8776164996F, 0.8781538162F, + 0.8786897054F, 0.8792241670F, 0.8797572013F, 0.8802888082F, + 0.8808189880F, 0.8813477407F, 0.8818750664F, 0.8824009653F, + 0.8829254375F, 0.8834484833F, 0.8839701028F, 0.8844902961F, + 0.8850090636F, 0.8855264054F, 0.8860423218F, 0.8865568131F, + 0.8870698794F, 0.8875815212F, 0.8880917386F, 0.8886005319F, + 0.8891079016F, 0.8896138479F, 0.8901183712F, 0.8906214719F, + 0.8911231503F, 0.8916234067F, 0.8921222417F, 0.8926196556F, + 0.8931156489F, 0.8936102219F, 0.8941033752F, 0.8945951092F, + 0.8950854244F, 0.8955743212F, 0.8960618003F, 0.8965478621F, + 0.8970325071F, 0.8975157359F, 0.8979975490F, 0.8984779471F, + 0.8989569307F, 0.8994345004F, 0.8999106568F, 0.9003854005F, + 0.9008587323F, 0.9013306526F, 0.9018011623F, 0.9022702619F, + 0.9027379521F, 0.9032042337F, 0.9036691074F, 0.9041325739F, + 0.9045946339F, 0.9050552882F, 0.9055145376F, 0.9059723828F, + 0.9064288246F, 0.9068838638F, 0.9073375013F, 0.9077897379F, + 0.9082405743F, 0.9086900115F, 0.9091380503F, 0.9095846917F, + 0.9100299364F, 0.9104737854F, 0.9109162397F, 0.9113573001F, + 0.9117969675F, 0.9122352430F, 0.9126721275F, 0.9131076219F, + 0.9135417273F, 0.9139744447F, 0.9144057750F, 0.9148357194F, + 0.9152642787F, 0.9156914542F, 0.9161172468F, 0.9165416576F, + 0.9169646877F, 0.9173863382F, 0.9178066102F, 0.9182255048F, + 0.9186430232F, 0.9190591665F, 0.9194739359F, 0.9198873324F, + 0.9202993574F, 0.9207100120F, 0.9211192973F, 0.9215272147F, + 0.9219337653F, 0.9223389504F, 0.9227427713F, 0.9231452290F, + 0.9235463251F, 0.9239460607F, 0.9243444371F, 0.9247414557F, + 0.9251371177F, 0.9255314245F, 0.9259243774F, 0.9263159778F, + 0.9267062270F, 0.9270951264F, 0.9274826774F, 0.9278688814F, + 0.9282537398F, 0.9286372540F, 0.9290194254F, 0.9294002555F, + 0.9297797458F, 0.9301578976F, 0.9305347125F, 0.9309101919F, + 0.9312843373F, 0.9316571503F, 0.9320286323F, 0.9323987849F, + 0.9327676097F, 0.9331351080F, 0.9335012816F, 0.9338661320F, + 0.9342296607F, 0.9345918694F, 0.9349527596F, 0.9353123330F, + 0.9356705911F, 0.9360275357F, 0.9363831683F, 0.9367374905F, + 0.9370905042F, 0.9374422108F, 0.9377926122F, 0.9381417099F, + 0.9384895057F, 0.9388360014F, 0.9391811985F, 0.9395250989F, + 0.9398677043F, 0.9402090165F, 0.9405490371F, 0.9408877680F, + 0.9412252110F, 0.9415613678F, 0.9418962402F, 0.9422298301F, + 0.9425621392F, 0.9428931695F, 0.9432229226F, 0.9435514005F, + 0.9438786050F, 0.9442045381F, 0.9445292014F, 0.9448525971F, + 0.9451747268F, 0.9454955926F, 0.9458151963F, 0.9461335399F, + 0.9464506253F, 0.9467664545F, 0.9470810293F, 0.9473943517F, + 0.9477064238F, 0.9480172474F, 0.9483268246F, 0.9486351573F, + 0.9489422475F, 0.9492480973F, 0.9495527087F, 0.9498560837F, + 0.9501582243F, 0.9504591325F, 0.9507588105F, 0.9510572603F, + 0.9513544839F, 0.9516504834F, 0.9519452609F, 0.9522388186F, + 0.9525311584F, 0.9528222826F, 0.9531121932F, 0.9534008923F, + 0.9536883821F, 0.9539746647F, 0.9542597424F, 0.9545436171F, + 0.9548262912F, 0.9551077667F, 0.9553880459F, 0.9556671309F, + 0.9559450239F, 0.9562217272F, 0.9564972429F, 0.9567715733F, + 0.9570447206F, 0.9573166871F, 0.9575874749F, 0.9578570863F, + 0.9581255236F, 0.9583927890F, 0.9586588849F, 0.9589238134F, + 0.9591875769F, 0.9594501777F, 0.9597116180F, 0.9599719003F, + 0.9602310267F, 0.9604889995F, 0.9607458213F, 0.9610014942F, + 0.9612560206F, 0.9615094028F, 0.9617616433F, 0.9620127443F, + 0.9622627083F, 0.9625115376F, 0.9627592345F, 0.9630058016F, + 0.9632512411F, 0.9634955555F, 0.9637387471F, 0.9639808185F, + 0.9642217720F, 0.9644616100F, 0.9647003349F, 0.9649379493F, + 0.9651744556F, 0.9654098561F, 0.9656441534F, 0.9658773499F, + 0.9661094480F, 0.9663404504F, 0.9665703593F, 0.9667991774F, + 0.9670269071F, 0.9672535509F, 0.9674791114F, 0.9677035909F, + 0.9679269921F, 0.9681493174F, 0.9683705694F, 0.9685907506F, + 0.9688098636F, 0.9690279108F, 0.9692448948F, 0.9694608182F, + 0.9696756836F, 0.9698894934F, 0.9701022503F, 0.9703139569F, + 0.9705246156F, 0.9707342291F, 0.9709428000F, 0.9711503309F, + 0.9713568243F, 0.9715622829F, 0.9717667093F, 0.9719701060F, + 0.9721724757F, 0.9723738210F, 0.9725741446F, 0.9727734490F, + 0.9729717369F, 0.9731690109F, 0.9733652737F, 0.9735605279F, + 0.9737547762F, 0.9739480212F, 0.9741402656F, 0.9743315120F, + 0.9745217631F, 0.9747110216F, 0.9748992901F, 0.9750865714F, + 0.9752728681F, 0.9754581829F, 0.9756425184F, 0.9758258775F, + 0.9760082627F, 0.9761896768F, 0.9763701224F, 0.9765496024F, + 0.9767281193F, 0.9769056760F, 0.9770822751F, 0.9772579193F, + 0.9774326114F, 0.9776063542F, 0.9777791502F, 0.9779510023F, + 0.9781219133F, 0.9782918858F, 0.9784609226F, 0.9786290264F, + 0.9787962000F, 0.9789624461F, 0.9791277676F, 0.9792921671F, + 0.9794556474F, 0.9796182113F, 0.9797798615F, 0.9799406009F, + 0.9801004321F, 0.9802593580F, 0.9804173813F, 0.9805745049F, + 0.9807307314F, 0.9808860637F, 0.9810405046F, 0.9811940568F, + 0.9813467232F, 0.9814985065F, 0.9816494095F, 0.9817994351F, + 0.9819485860F, 0.9820968650F, 0.9822442750F, 0.9823908186F, + 0.9825364988F, 0.9826813184F, 0.9828252801F, 0.9829683868F, + 0.9831106413F, 0.9832520463F, 0.9833926048F, 0.9835323195F, + 0.9836711932F, 0.9838092288F, 0.9839464291F, 0.9840827969F, + 0.9842183351F, 0.9843530464F, 0.9844869337F, 0.9846199998F, + 0.9847522475F, 0.9848836798F, 0.9850142993F, 0.9851441090F, + 0.9852731117F, 0.9854013101F, 0.9855287073F, 0.9856553058F, + 0.9857811087F, 0.9859061188F, 0.9860303388F, 0.9861537717F, + 0.9862764202F, 0.9863982872F, 0.9865193756F, 0.9866396882F, + 0.9867592277F, 0.9868779972F, 0.9869959993F, 0.9871132370F, + 0.9872297131F, 0.9873454304F, 0.9874603918F, 0.9875746001F, + 0.9876880581F, 0.9878007688F, 0.9879127348F, 0.9880239592F, + 0.9881344447F, 0.9882441941F, 0.9883532104F, 0.9884614962F, + 0.9885690546F, 0.9886758883F, 0.9887820001F, 0.9888873930F, + 0.9889920697F, 0.9890960331F, 0.9891992859F, 0.9893018312F, + 0.9894036716F, 0.9895048100F, 0.9896052493F, 0.9897049923F, + 0.9898040418F, 0.9899024006F, 0.9900000717F, 0.9900970577F, + 0.9901933616F, 0.9902889862F, 0.9903839343F, 0.9904782087F, + 0.9905718122F, 0.9906647477F, 0.9907570180F, 0.9908486259F, + 0.9909395742F, 0.9910298658F, 0.9911195034F, 0.9912084899F, + 0.9912968281F, 0.9913845208F, 0.9914715708F, 0.9915579810F, + 0.9916437540F, 0.9917288928F, 0.9918134001F, 0.9918972788F, + 0.9919805316F, 0.9920631613F, 0.9921451707F, 0.9922265626F, + 0.9923073399F, 0.9923875052F, 0.9924670615F, 0.9925460114F, + 0.9926243577F, 0.9927021033F, 0.9927792508F, 0.9928558032F, + 0.9929317631F, 0.9930071333F, 0.9930819167F, 0.9931561158F, + 0.9932297337F, 0.9933027728F, 0.9933752362F, 0.9934471264F, + 0.9935184462F, 0.9935891985F, 0.9936593859F, 0.9937290112F, + 0.9937980771F, 0.9938665864F, 0.9939345418F, 0.9940019460F, + 0.9940688018F, 0.9941351118F, 0.9942008789F, 0.9942661057F, + 0.9943307950F, 0.9943949494F, 0.9944585717F, 0.9945216645F, + 0.9945842307F, 0.9946462728F, 0.9947077936F, 0.9947687957F, + 0.9948292820F, 0.9948892550F, 0.9949487174F, 0.9950076719F, + 0.9950661212F, 0.9951240679F, 0.9951815148F, 0.9952384645F, + 0.9952949196F, 0.9953508828F, 0.9954063568F, 0.9954613442F, + 0.9955158476F, 0.9955698697F, 0.9956234132F, 0.9956764806F, + 0.9957290746F, 0.9957811978F, 0.9958328528F, 0.9958840423F, + 0.9959347688F, 0.9959850351F, 0.9960348435F, 0.9960841969F, + 0.9961330977F, 0.9961815486F, 0.9962295521F, 0.9962771108F, + 0.9963242274F, 0.9963709043F, 0.9964171441F, 0.9964629494F, + 0.9965083228F, 0.9965532668F, 0.9965977840F, 0.9966418768F, + 0.9966855479F, 0.9967287998F, 0.9967716350F, 0.9968140559F, + 0.9968560653F, 0.9968976655F, 0.9969388591F, 0.9969796485F, + 0.9970200363F, 0.9970600250F, 0.9970996170F, 0.9971388149F, + 0.9971776211F, 0.9972160380F, 0.9972540683F, 0.9972917142F, + 0.9973289783F, 0.9973658631F, 0.9974023709F, 0.9974385042F, + 0.9974742655F, 0.9975096571F, 0.9975446816F, 0.9975793413F, + 0.9976136386F, 0.9976475759F, 0.9976811557F, 0.9977143803F, + 0.9977472521F, 0.9977797736F, 0.9978119470F, 0.9978437748F, + 0.9978752593F, 0.9979064029F, 0.9979372079F, 0.9979676768F, + 0.9979978117F, 0.9980276151F, 0.9980570893F, 0.9980862367F, + 0.9981150595F, 0.9981435600F, 0.9981717406F, 0.9981996035F, + 0.9982271511F, 0.9982543856F, 0.9982813093F, 0.9983079246F, + 0.9983342336F, 0.9983602386F, 0.9983859418F, 0.9984113456F, + 0.9984364522F, 0.9984612638F, 0.9984857825F, 0.9985100108F, + 0.9985339507F, 0.9985576044F, 0.9985809743F, 0.9986040624F, + 0.9986268710F, 0.9986494022F, 0.9986716583F, 0.9986936413F, + 0.9987153535F, 0.9987367969F, 0.9987579738F, 0.9987788864F, + 0.9987995366F, 0.9988199267F, 0.9988400587F, 0.9988599348F, + 0.9988795572F, 0.9988989278F, 0.9989180487F, 0.9989369222F, + 0.9989555501F, 0.9989739347F, 0.9989920780F, 0.9990099820F, + 0.9990276487F, 0.9990450803F, 0.9990622787F, 0.9990792460F, + 0.9990959841F, 0.9991124952F, 0.9991287812F, 0.9991448440F, + 0.9991606858F, 0.9991763084F, 0.9991917139F, 0.9992069042F, + 0.9992218813F, 0.9992366471F, 0.9992512035F, 0.9992655525F, + 0.9992796961F, 0.9992936361F, 0.9993073744F, 0.9993209131F, + 0.9993342538F, 0.9993473987F, 0.9993603494F, 0.9993731080F, + 0.9993856762F, 0.9993980559F, 0.9994102490F, 0.9994222573F, + 0.9994340827F, 0.9994457269F, 0.9994571918F, 0.9994684793F, + 0.9994795910F, 0.9994905288F, 0.9995012945F, 0.9995118898F, + 0.9995223165F, 0.9995325765F, 0.9995426713F, 0.9995526029F, + 0.9995623728F, 0.9995719829F, 0.9995814349F, 0.9995907304F, + 0.9995998712F, 0.9996088590F, 0.9996176954F, 0.9996263821F, + 0.9996349208F, 0.9996433132F, 0.9996515609F, 0.9996596656F, + 0.9996676288F, 0.9996754522F, 0.9996831375F, 0.9996906862F, + 0.9996981000F, 0.9997053804F, 0.9997125290F, 0.9997195474F, + 0.9997264371F, 0.9997331998F, 0.9997398369F, 0.9997463500F, + 0.9997527406F, 0.9997590103F, 0.9997651606F, 0.9997711930F, + 0.9997771089F, 0.9997829098F, 0.9997885973F, 0.9997941728F, + 0.9997996378F, 0.9998049936F, 0.9998102419F, 0.9998153839F, + 0.9998204211F, 0.9998253550F, 0.9998301868F, 0.9998349182F, + 0.9998395503F, 0.9998440847F, 0.9998485226F, 0.9998528654F, + 0.9998571146F, 0.9998612713F, 0.9998653370F, 0.9998693130F, + 0.9998732007F, 0.9998770012F, 0.9998807159F, 0.9998843461F, + 0.9998878931F, 0.9998913581F, 0.9998947424F, 0.9998980473F, + 0.9999012740F, 0.9999044237F, 0.9999074976F, 0.9999104971F, + 0.9999134231F, 0.9999162771F, 0.9999190601F, 0.9999217733F, + 0.9999244179F, 0.9999269950F, 0.9999295058F, 0.9999319515F, + 0.9999343332F, 0.9999366519F, 0.9999389088F, 0.9999411050F, + 0.9999432416F, 0.9999453196F, 0.9999473402F, 0.9999493044F, + 0.9999512132F, 0.9999530677F, 0.9999548690F, 0.9999566180F, + 0.9999583157F, 0.9999599633F, 0.9999615616F, 0.9999631116F, + 0.9999646144F, 0.9999660709F, 0.9999674820F, 0.9999688487F, + 0.9999701719F, 0.9999714526F, 0.9999726917F, 0.9999738900F, + 0.9999750486F, 0.9999761682F, 0.9999772497F, 0.9999782941F, + 0.9999793021F, 0.9999802747F, 0.9999812126F, 0.9999821167F, + 0.9999829878F, 0.9999838268F, 0.9999846343F, 0.9999854113F, + 0.9999861584F, 0.9999868765F, 0.9999875664F, 0.9999882287F, + 0.9999888642F, 0.9999894736F, 0.9999900577F, 0.9999906172F, + 0.9999911528F, 0.9999916651F, 0.9999921548F, 0.9999926227F, + 0.9999930693F, 0.9999934954F, 0.9999939015F, 0.9999942883F, + 0.9999946564F, 0.9999950064F, 0.9999953390F, 0.9999956547F, + 0.9999959541F, 0.9999962377F, 0.9999965062F, 0.9999967601F, + 0.9999969998F, 0.9999972260F, 0.9999974392F, 0.9999976399F, + 0.9999978285F, 0.9999980056F, 0.9999981716F, 0.9999983271F, + 0.9999984724F, 0.9999986081F, 0.9999987345F, 0.9999988521F, + 0.9999989613F, 0.9999990625F, 0.9999991562F, 0.9999992426F, + 0.9999993223F, 0.9999993954F, 0.9999994625F, 0.9999995239F, + 0.9999995798F, 0.9999996307F, 0.9999996768F, 0.9999997184F, + 0.9999997559F, 0.9999997895F, 0.9999998195F, 0.9999998462F, + 0.9999998698F, 0.9999998906F, 0.9999999088F, 0.9999999246F, + 0.9999999383F, 0.9999999500F, 0.9999999600F, 0.9999999684F, + 0.9999999754F, 0.9999999811F, 0.9999999858F, 0.9999999896F, + 0.9999999925F, 0.9999999948F, 0.9999999965F, 0.9999999978F, + 0.9999999986F, 0.9999999992F, 0.9999999996F, 0.9999999998F, + 0.9999999999F, 1.0000000000F, 1.0000000000F, 1.0000000000F, +}; + +static const float vwin8192[4096] = { + 0.0000000578F, 0.0000005198F, 0.0000014438F, 0.0000028299F, + 0.0000046780F, 0.0000069882F, 0.0000097604F, 0.0000129945F, + 0.0000166908F, 0.0000208490F, 0.0000254692F, 0.0000305515F, + 0.0000360958F, 0.0000421021F, 0.0000485704F, 0.0000555006F, + 0.0000628929F, 0.0000707472F, 0.0000790635F, 0.0000878417F, + 0.0000970820F, 0.0001067842F, 0.0001169483F, 0.0001275744F, + 0.0001386625F, 0.0001502126F, 0.0001622245F, 0.0001746984F, + 0.0001876343F, 0.0002010320F, 0.0002148917F, 0.0002292132F, + 0.0002439967F, 0.0002592421F, 0.0002749493F, 0.0002911184F, + 0.0003077493F, 0.0003248421F, 0.0003423967F, 0.0003604132F, + 0.0003788915F, 0.0003978316F, 0.0004172335F, 0.0004370971F, + 0.0004574226F, 0.0004782098F, 0.0004994587F, 0.0005211694F, + 0.0005433418F, 0.0005659759F, 0.0005890717F, 0.0006126292F, + 0.0006366484F, 0.0006611292F, 0.0006860716F, 0.0007114757F, + 0.0007373414F, 0.0007636687F, 0.0007904576F, 0.0008177080F, + 0.0008454200F, 0.0008735935F, 0.0009022285F, 0.0009313250F, + 0.0009608830F, 0.0009909025F, 0.0010213834F, 0.0010523257F, + 0.0010837295F, 0.0011155946F, 0.0011479211F, 0.0011807090F, + 0.0012139582F, 0.0012476687F, 0.0012818405F, 0.0013164736F, + 0.0013515679F, 0.0013871235F, 0.0014231402F, 0.0014596182F, + 0.0014965573F, 0.0015339576F, 0.0015718190F, 0.0016101415F, + 0.0016489251F, 0.0016881698F, 0.0017278754F, 0.0017680421F, + 0.0018086698F, 0.0018497584F, 0.0018913080F, 0.0019333185F, + 0.0019757898F, 0.0020187221F, 0.0020621151F, 0.0021059690F, + 0.0021502837F, 0.0021950591F, 0.0022402953F, 0.0022859921F, + 0.0023321497F, 0.0023787679F, 0.0024258467F, 0.0024733861F, + 0.0025213861F, 0.0025698466F, 0.0026187676F, 0.0026681491F, + 0.0027179911F, 0.0027682935F, 0.0028190562F, 0.0028702794F, + 0.0029219628F, 0.0029741066F, 0.0030267107F, 0.0030797749F, + 0.0031332994F, 0.0031872841F, 0.0032417289F, 0.0032966338F, + 0.0033519988F, 0.0034078238F, 0.0034641089F, 0.0035208539F, + 0.0035780589F, 0.0036357237F, 0.0036938485F, 0.0037524331F, + 0.0038114775F, 0.0038709817F, 0.0039309456F, 0.0039913692F, + 0.0040522524F, 0.0041135953F, 0.0041753978F, 0.0042376599F, + 0.0043003814F, 0.0043635624F, 0.0044272029F, 0.0044913028F, + 0.0045558620F, 0.0046208806F, 0.0046863585F, 0.0047522955F, + 0.0048186919F, 0.0048855473F, 0.0049528619F, 0.0050206356F, + 0.0050888684F, 0.0051575601F, 0.0052267108F, 0.0052963204F, + 0.0053663890F, 0.0054369163F, 0.0055079025F, 0.0055793474F, + 0.0056512510F, 0.0057236133F, 0.0057964342F, 0.0058697137F, + 0.0059434517F, 0.0060176482F, 0.0060923032F, 0.0061674166F, + 0.0062429883F, 0.0063190183F, 0.0063955066F, 0.0064724532F, + 0.0065498579F, 0.0066277207F, 0.0067060416F, 0.0067848205F, + 0.0068640575F, 0.0069437523F, 0.0070239051F, 0.0071045157F, + 0.0071855840F, 0.0072671102F, 0.0073490940F, 0.0074315355F, + 0.0075144345F, 0.0075977911F, 0.0076816052F, 0.0077658768F, + 0.0078506057F, 0.0079357920F, 0.0080214355F, 0.0081075363F, + 0.0081940943F, 0.0082811094F, 0.0083685816F, 0.0084565108F, + 0.0085448970F, 0.0086337401F, 0.0087230401F, 0.0088127969F, + 0.0089030104F, 0.0089936807F, 0.0090848076F, 0.0091763911F, + 0.0092684311F, 0.0093609276F, 0.0094538805F, 0.0095472898F, + 0.0096411554F, 0.0097354772F, 0.0098302552F, 0.0099254894F, + 0.0100211796F, 0.0101173259F, 0.0102139281F, 0.0103109863F, + 0.0104085002F, 0.0105064700F, 0.0106048955F, 0.0107037766F, + 0.0108031133F, 0.0109029056F, 0.0110031534F, 0.0111038565F, + 0.0112050151F, 0.0113066289F, 0.0114086980F, 0.0115112222F, + 0.0116142015F, 0.0117176359F, 0.0118215252F, 0.0119258695F, + 0.0120306686F, 0.0121359225F, 0.0122416312F, 0.0123477944F, + 0.0124544123F, 0.0125614847F, 0.0126690116F, 0.0127769928F, + 0.0128854284F, 0.0129943182F, 0.0131036623F, 0.0132134604F, + 0.0133237126F, 0.0134344188F, 0.0135455790F, 0.0136571929F, + 0.0137692607F, 0.0138817821F, 0.0139947572F, 0.0141081859F, + 0.0142220681F, 0.0143364037F, 0.0144511927F, 0.0145664350F, + 0.0146821304F, 0.0147982791F, 0.0149148808F, 0.0150319355F, + 0.0151494431F, 0.0152674036F, 0.0153858168F, 0.0155046828F, + 0.0156240014F, 0.0157437726F, 0.0158639962F, 0.0159846723F, + 0.0161058007F, 0.0162273814F, 0.0163494142F, 0.0164718991F, + 0.0165948361F, 0.0167182250F, 0.0168420658F, 0.0169663584F, + 0.0170911027F, 0.0172162987F, 0.0173419462F, 0.0174680452F, + 0.0175945956F, 0.0177215974F, 0.0178490504F, 0.0179769545F, + 0.0181053098F, 0.0182341160F, 0.0183633732F, 0.0184930812F, + 0.0186232399F, 0.0187538494F, 0.0188849094F, 0.0190164200F, + 0.0191483809F, 0.0192807923F, 0.0194136539F, 0.0195469656F, + 0.0196807275F, 0.0198149394F, 0.0199496012F, 0.0200847128F, + 0.0202202742F, 0.0203562853F, 0.0204927460F, 0.0206296561F, + 0.0207670157F, 0.0209048245F, 0.0210430826F, 0.0211817899F, + 0.0213209462F, 0.0214605515F, 0.0216006057F, 0.0217411086F, + 0.0218820603F, 0.0220234605F, 0.0221653093F, 0.0223076066F, + 0.0224503521F, 0.0225935459F, 0.0227371879F, 0.0228812779F, + 0.0230258160F, 0.0231708018F, 0.0233162355F, 0.0234621169F, + 0.0236084459F, 0.0237552224F, 0.0239024462F, 0.0240501175F, + 0.0241982359F, 0.0243468015F, 0.0244958141F, 0.0246452736F, + 0.0247951800F, 0.0249455331F, 0.0250963329F, 0.0252475792F, + 0.0253992720F, 0.0255514111F, 0.0257039965F, 0.0258570281F, + 0.0260105057F, 0.0261644293F, 0.0263187987F, 0.0264736139F, + 0.0266288747F, 0.0267845811F, 0.0269407330F, 0.0270973302F, + 0.0272543727F, 0.0274118604F, 0.0275697930F, 0.0277281707F, + 0.0278869932F, 0.0280462604F, 0.0282059723F, 0.0283661287F, + 0.0285267295F, 0.0286877747F, 0.0288492641F, 0.0290111976F, + 0.0291735751F, 0.0293363965F, 0.0294996617F, 0.0296633706F, + 0.0298275231F, 0.0299921190F, 0.0301571583F, 0.0303226409F, + 0.0304885667F, 0.0306549354F, 0.0308217472F, 0.0309890017F, + 0.0311566989F, 0.0313248388F, 0.0314934211F, 0.0316624459F, + 0.0318319128F, 0.0320018220F, 0.0321721732F, 0.0323429663F, + 0.0325142013F, 0.0326858779F, 0.0328579962F, 0.0330305559F, + 0.0332035570F, 0.0333769994F, 0.0335508829F, 0.0337252074F, + 0.0338999728F, 0.0340751790F, 0.0342508259F, 0.0344269134F, + 0.0346034412F, 0.0347804094F, 0.0349578178F, 0.0351356663F, + 0.0353139548F, 0.0354926831F, 0.0356718511F, 0.0358514588F, + 0.0360315059F, 0.0362119924F, 0.0363929182F, 0.0365742831F, + 0.0367560870F, 0.0369383297F, 0.0371210113F, 0.0373041315F, + 0.0374876902F, 0.0376716873F, 0.0378561226F, 0.0380409961F, + 0.0382263077F, 0.0384120571F, 0.0385982443F, 0.0387848691F, + 0.0389719315F, 0.0391594313F, 0.0393473683F, 0.0395357425F, + 0.0397245537F, 0.0399138017F, 0.0401034866F, 0.0402936080F, + 0.0404841660F, 0.0406751603F, 0.0408665909F, 0.0410584576F, + 0.0412507603F, 0.0414434988F, 0.0416366731F, 0.0418302829F, + 0.0420243282F, 0.0422188088F, 0.0424137246F, 0.0426090755F, + 0.0428048613F, 0.0430010819F, 0.0431977371F, 0.0433948269F, + 0.0435923511F, 0.0437903095F, 0.0439887020F, 0.0441875285F, + 0.0443867889F, 0.0445864830F, 0.0447866106F, 0.0449871717F, + 0.0451881661F, 0.0453895936F, 0.0455914542F, 0.0457937477F, + 0.0459964738F, 0.0461996326F, 0.0464032239F, 0.0466072475F, + 0.0468117032F, 0.0470165910F, 0.0472219107F, 0.0474276622F, + 0.0476338452F, 0.0478404597F, 0.0480475056F, 0.0482549827F, + 0.0484628907F, 0.0486712297F, 0.0488799994F, 0.0490891998F, + 0.0492988306F, 0.0495088917F, 0.0497193830F, 0.0499303043F, + 0.0501416554F, 0.0503534363F, 0.0505656468F, 0.0507782867F, + 0.0509913559F, 0.0512048542F, 0.0514187815F, 0.0516331376F, + 0.0518479225F, 0.0520631358F, 0.0522787775F, 0.0524948475F, + 0.0527113455F, 0.0529282715F, 0.0531456252F, 0.0533634066F, + 0.0535816154F, 0.0538002515F, 0.0540193148F, 0.0542388051F, + 0.0544587222F, 0.0546790660F, 0.0548998364F, 0.0551210331F, + 0.0553426561F, 0.0555647051F, 0.0557871801F, 0.0560100807F, + 0.0562334070F, 0.0564571587F, 0.0566813357F, 0.0569059378F, + 0.0571309649F, 0.0573564168F, 0.0575822933F, 0.0578085942F, + 0.0580353195F, 0.0582624689F, 0.0584900423F, 0.0587180396F, + 0.0589464605F, 0.0591753049F, 0.0594045726F, 0.0596342635F, + 0.0598643774F, 0.0600949141F, 0.0603258735F, 0.0605572555F, + 0.0607890597F, 0.0610212862F, 0.0612539346F, 0.0614870049F, + 0.0617204968F, 0.0619544103F, 0.0621887451F, 0.0624235010F, + 0.0626586780F, 0.0628942758F, 0.0631302942F, 0.0633667331F, + 0.0636035923F, 0.0638408717F, 0.0640785710F, 0.0643166901F, + 0.0645552288F, 0.0647941870F, 0.0650335645F, 0.0652733610F, + 0.0655135765F, 0.0657542108F, 0.0659952636F, 0.0662367348F, + 0.0664786242F, 0.0667209316F, 0.0669636570F, 0.0672068000F, + 0.0674503605F, 0.0676943384F, 0.0679387334F, 0.0681835454F, + 0.0684287742F, 0.0686744196F, 0.0689204814F, 0.0691669595F, + 0.0694138536F, 0.0696611637F, 0.0699088894F, 0.0701570307F, + 0.0704055873F, 0.0706545590F, 0.0709039458F, 0.0711537473F, + 0.0714039634F, 0.0716545939F, 0.0719056387F, 0.0721570975F, + 0.0724089702F, 0.0726612565F, 0.0729139563F, 0.0731670694F, + 0.0734205956F, 0.0736745347F, 0.0739288866F, 0.0741836510F, + 0.0744388277F, 0.0746944166F, 0.0749504175F, 0.0752068301F, + 0.0754636543F, 0.0757208899F, 0.0759785367F, 0.0762365946F, + 0.0764950632F, 0.0767539424F, 0.0770132320F, 0.0772729319F, + 0.0775330418F, 0.0777935616F, 0.0780544909F, 0.0783158298F, + 0.0785775778F, 0.0788397349F, 0.0791023009F, 0.0793652755F, + 0.0796286585F, 0.0798924498F, 0.0801566492F, 0.0804212564F, + 0.0806862712F, 0.0809516935F, 0.0812175231F, 0.0814837597F, + 0.0817504031F, 0.0820174532F, 0.0822849097F, 0.0825527724F, + 0.0828210412F, 0.0830897158F, 0.0833587960F, 0.0836282816F, + 0.0838981724F, 0.0841684682F, 0.0844391688F, 0.0847102740F, + 0.0849817835F, 0.0852536973F, 0.0855260150F, 0.0857987364F, + 0.0860718614F, 0.0863453897F, 0.0866193211F, 0.0868936554F, + 0.0871683924F, 0.0874435319F, 0.0877190737F, 0.0879950175F, + 0.0882713632F, 0.0885481105F, 0.0888252592F, 0.0891028091F, + 0.0893807600F, 0.0896591117F, 0.0899378639F, 0.0902170165F, + 0.0904965692F, 0.0907765218F, 0.0910568740F, 0.0913376258F, + 0.0916187767F, 0.0919003268F, 0.0921822756F, 0.0924646230F, + 0.0927473687F, 0.0930305126F, 0.0933140545F, 0.0935979940F, + 0.0938823310F, 0.0941670653F, 0.0944521966F, 0.0947377247F, + 0.0950236494F, 0.0953099704F, 0.0955966876F, 0.0958838007F, + 0.0961713094F, 0.0964592136F, 0.0967475131F, 0.0970362075F, + 0.0973252967F, 0.0976147805F, 0.0979046585F, 0.0981949307F, + 0.0984855967F, 0.0987766563F, 0.0990681093F, 0.0993599555F, + 0.0996521945F, 0.0999448263F, 0.1002378506F, 0.1005312671F, + 0.1008250755F, 0.1011192757F, 0.1014138675F, 0.1017088505F, + 0.1020042246F, 0.1022999895F, 0.1025961450F, 0.1028926909F, + 0.1031896268F, 0.1034869526F, 0.1037846680F, 0.1040827729F, + 0.1043812668F, 0.1046801497F, 0.1049794213F, 0.1052790813F, + 0.1055791294F, 0.1058795656F, 0.1061803894F, 0.1064816006F, + 0.1067831991F, 0.1070851846F, 0.1073875568F, 0.1076903155F, + 0.1079934604F, 0.1082969913F, 0.1086009079F, 0.1089052101F, + 0.1092098975F, 0.1095149699F, 0.1098204270F, 0.1101262687F, + 0.1104324946F, 0.1107391045F, 0.1110460982F, 0.1113534754F, + 0.1116612359F, 0.1119693793F, 0.1122779055F, 0.1125868142F, + 0.1128961052F, 0.1132057781F, 0.1135158328F, 0.1138262690F, + 0.1141370863F, 0.1144482847F, 0.1147598638F, 0.1150718233F, + 0.1153841631F, 0.1156968828F, 0.1160099822F, 0.1163234610F, + 0.1166373190F, 0.1169515559F, 0.1172661714F, 0.1175811654F, + 0.1178965374F, 0.1182122874F, 0.1185284149F, 0.1188449198F, + 0.1191618018F, 0.1194790606F, 0.1197966960F, 0.1201147076F, + 0.1204330953F, 0.1207518587F, 0.1210709976F, 0.1213905118F, + 0.1217104009F, 0.1220306647F, 0.1223513029F, 0.1226723153F, + 0.1229937016F, 0.1233154615F, 0.1236375948F, 0.1239601011F, + 0.1242829803F, 0.1246062319F, 0.1249298559F, 0.1252538518F, + 0.1255782195F, 0.1259029586F, 0.1262280689F, 0.1265535501F, + 0.1268794019F, 0.1272056241F, 0.1275322163F, 0.1278591784F, + 0.1281865099F, 0.1285142108F, 0.1288422805F, 0.1291707190F, + 0.1294995259F, 0.1298287009F, 0.1301582437F, 0.1304881542F, + 0.1308184319F, 0.1311490766F, 0.1314800881F, 0.1318114660F, + 0.1321432100F, 0.1324753200F, 0.1328077955F, 0.1331406364F, + 0.1334738422F, 0.1338074129F, 0.1341413479F, 0.1344756472F, + 0.1348103103F, 0.1351453370F, 0.1354807270F, 0.1358164801F, + 0.1361525959F, 0.1364890741F, 0.1368259145F, 0.1371631167F, + 0.1375006805F, 0.1378386056F, 0.1381768917F, 0.1385155384F, + 0.1388545456F, 0.1391939129F, 0.1395336400F, 0.1398737266F, + 0.1402141724F, 0.1405549772F, 0.1408961406F, 0.1412376623F, + 0.1415795421F, 0.1419217797F, 0.1422643746F, 0.1426073268F, + 0.1429506358F, 0.1432943013F, 0.1436383231F, 0.1439827008F, + 0.1443274342F, 0.1446725229F, 0.1450179667F, 0.1453637652F, + 0.1457099181F, 0.1460564252F, 0.1464032861F, 0.1467505006F, + 0.1470980682F, 0.1474459888F, 0.1477942620F, 0.1481428875F, + 0.1484918651F, 0.1488411942F, 0.1491908748F, 0.1495409065F, + 0.1498912889F, 0.1502420218F, 0.1505931048F, 0.1509445376F, + 0.1512963200F, 0.1516484516F, 0.1520009321F, 0.1523537612F, + 0.1527069385F, 0.1530604638F, 0.1534143368F, 0.1537685571F, + 0.1541231244F, 0.1544780384F, 0.1548332987F, 0.1551889052F, + 0.1555448574F, 0.1559011550F, 0.1562577978F, 0.1566147853F, + 0.1569721173F, 0.1573297935F, 0.1576878135F, 0.1580461771F, + 0.1584048838F, 0.1587639334F, 0.1591233255F, 0.1594830599F, + 0.1598431361F, 0.1602035540F, 0.1605643131F, 0.1609254131F, + 0.1612868537F, 0.1616486346F, 0.1620107555F, 0.1623732160F, + 0.1627360158F, 0.1630991545F, 0.1634626319F, 0.1638264476F, + 0.1641906013F, 0.1645550926F, 0.1649199212F, 0.1652850869F, + 0.1656505892F, 0.1660164278F, 0.1663826024F, 0.1667491127F, + 0.1671159583F, 0.1674831388F, 0.1678506541F, 0.1682185036F, + 0.1685866872F, 0.1689552044F, 0.1693240549F, 0.1696932384F, + 0.1700627545F, 0.1704326029F, 0.1708027833F, 0.1711732952F, + 0.1715441385F, 0.1719153127F, 0.1722868175F, 0.1726586526F, + 0.1730308176F, 0.1734033121F, 0.1737761359F, 0.1741492886F, + 0.1745227698F, 0.1748965792F, 0.1752707164F, 0.1756451812F, + 0.1760199731F, 0.1763950918F, 0.1767705370F, 0.1771463083F, + 0.1775224054F, 0.1778988279F, 0.1782755754F, 0.1786526477F, + 0.1790300444F, 0.1794077651F, 0.1797858094F, 0.1801641771F, + 0.1805428677F, 0.1809218810F, 0.1813012165F, 0.1816808739F, + 0.1820608528F, 0.1824411530F, 0.1828217739F, 0.1832027154F, + 0.1835839770F, 0.1839655584F, 0.1843474592F, 0.1847296790F, + 0.1851122175F, 0.1854950744F, 0.1858782492F, 0.1862617417F, + 0.1866455514F, 0.1870296780F, 0.1874141211F, 0.1877988804F, + 0.1881839555F, 0.1885693461F, 0.1889550517F, 0.1893410721F, + 0.1897274068F, 0.1901140555F, 0.1905010178F, 0.1908882933F, + 0.1912758818F, 0.1916637828F, 0.1920519959F, 0.1924405208F, + 0.1928293571F, 0.1932185044F, 0.1936079625F, 0.1939977308F, + 0.1943878091F, 0.1947781969F, 0.1951688939F, 0.1955598998F, + 0.1959512141F, 0.1963428364F, 0.1967347665F, 0.1971270038F, + 0.1975195482F, 0.1979123990F, 0.1983055561F, 0.1986990190F, + 0.1990927873F, 0.1994868607F, 0.1998812388F, 0.2002759212F, + 0.2006709075F, 0.2010661974F, 0.2014617904F, 0.2018576862F, + 0.2022538844F, 0.2026503847F, 0.2030471865F, 0.2034442897F, + 0.2038416937F, 0.2042393982F, 0.2046374028F, 0.2050357071F, + 0.2054343107F, 0.2058332133F, 0.2062324145F, 0.2066319138F, + 0.2070317110F, 0.2074318055F, 0.2078321970F, 0.2082328852F, + 0.2086338696F, 0.2090351498F, 0.2094367255F, 0.2098385962F, + 0.2102407617F, 0.2106432213F, 0.2110459749F, 0.2114490220F, + 0.2118523621F, 0.2122559950F, 0.2126599202F, 0.2130641373F, + 0.2134686459F, 0.2138734456F, 0.2142785361F, 0.2146839168F, + 0.2150895875F, 0.2154955478F, 0.2159017972F, 0.2163083353F, + 0.2167151617F, 0.2171222761F, 0.2175296780F, 0.2179373670F, + 0.2183453428F, 0.2187536049F, 0.2191621529F, 0.2195709864F, + 0.2199801051F, 0.2203895085F, 0.2207991961F, 0.2212091677F, + 0.2216194228F, 0.2220299610F, 0.2224407818F, 0.2228518850F, + 0.2232632699F, 0.2236749364F, 0.2240868839F, 0.2244991121F, + 0.2249116204F, 0.2253244086F, 0.2257374763F, 0.2261508229F, + 0.2265644481F, 0.2269783514F, 0.2273925326F, 0.2278069911F, + 0.2282217265F, 0.2286367384F, 0.2290520265F, 0.2294675902F, + 0.2298834292F, 0.2302995431F, 0.2307159314F, 0.2311325937F, + 0.2315495297F, 0.2319667388F, 0.2323842207F, 0.2328019749F, + 0.2332200011F, 0.2336382988F, 0.2340568675F, 0.2344757070F, + 0.2348948166F, 0.2353141961F, 0.2357338450F, 0.2361537629F, + 0.2365739493F, 0.2369944038F, 0.2374151261F, 0.2378361156F, + 0.2382573720F, 0.2386788948F, 0.2391006836F, 0.2395227380F, + 0.2399450575F, 0.2403676417F, 0.2407904902F, 0.2412136026F, + 0.2416369783F, 0.2420606171F, 0.2424845185F, 0.2429086820F, + 0.2433331072F, 0.2437577936F, 0.2441827409F, 0.2446079486F, + 0.2450334163F, 0.2454591435F, 0.2458851298F, 0.2463113747F, + 0.2467378779F, 0.2471646389F, 0.2475916573F, 0.2480189325F, + 0.2484464643F, 0.2488742521F, 0.2493022955F, 0.2497305940F, + 0.2501591473F, 0.2505879549F, 0.2510170163F, 0.2514463311F, + 0.2518758989F, 0.2523057193F, 0.2527357916F, 0.2531661157F, + 0.2535966909F, 0.2540275169F, 0.2544585931F, 0.2548899193F, + 0.2553214948F, 0.2557533193F, 0.2561853924F, 0.2566177135F, + 0.2570502822F, 0.2574830981F, 0.2579161608F, 0.2583494697F, + 0.2587830245F, 0.2592168246F, 0.2596508697F, 0.2600851593F, + 0.2605196929F, 0.2609544701F, 0.2613894904F, 0.2618247534F, + 0.2622602586F, 0.2626960055F, 0.2631319938F, 0.2635682230F, + 0.2640046925F, 0.2644414021F, 0.2648783511F, 0.2653155391F, + 0.2657529657F, 0.2661906305F, 0.2666285329F, 0.2670666725F, + 0.2675050489F, 0.2679436616F, 0.2683825101F, 0.2688215940F, + 0.2692609127F, 0.2697004660F, 0.2701402532F, 0.2705802739F, + 0.2710205278F, 0.2714610142F, 0.2719017327F, 0.2723426830F, + 0.2727838644F, 0.2732252766F, 0.2736669191F, 0.2741087914F, + 0.2745508930F, 0.2749932235F, 0.2754357824F, 0.2758785693F, + 0.2763215837F, 0.2767648251F, 0.2772082930F, 0.2776519870F, + 0.2780959066F, 0.2785400513F, 0.2789844207F, 0.2794290143F, + 0.2798738316F, 0.2803188722F, 0.2807641355F, 0.2812096211F, + 0.2816553286F, 0.2821012574F, 0.2825474071F, 0.2829937773F, + 0.2834403673F, 0.2838871768F, 0.2843342053F, 0.2847814523F, + 0.2852289174F, 0.2856765999F, 0.2861244996F, 0.2865726159F, + 0.2870209482F, 0.2874694962F, 0.2879182594F, 0.2883672372F, + 0.2888164293F, 0.2892658350F, 0.2897154540F, 0.2901652858F, + 0.2906153298F, 0.2910655856F, 0.2915160527F, 0.2919667306F, + 0.2924176189F, 0.2928687171F, 0.2933200246F, 0.2937715409F, + 0.2942232657F, 0.2946751984F, 0.2951273386F, 0.2955796856F, + 0.2960322391F, 0.2964849986F, 0.2969379636F, 0.2973911335F, + 0.2978445080F, 0.2982980864F, 0.2987518684F, 0.2992058534F, + 0.2996600409F, 0.3001144305F, 0.3005690217F, 0.3010238139F, + 0.3014788067F, 0.3019339995F, 0.3023893920F, 0.3028449835F, + 0.3033007736F, 0.3037567618F, 0.3042129477F, 0.3046693306F, + 0.3051259102F, 0.3055826859F, 0.3060396572F, 0.3064968236F, + 0.3069541847F, 0.3074117399F, 0.3078694887F, 0.3083274307F, + 0.3087855653F, 0.3092438920F, 0.3097024104F, 0.3101611199F, + 0.3106200200F, 0.3110791103F, 0.3115383902F, 0.3119978592F, + 0.3124575169F, 0.3129173627F, 0.3133773961F, 0.3138376166F, + 0.3142980238F, 0.3147586170F, 0.3152193959F, 0.3156803598F, + 0.3161415084F, 0.3166028410F, 0.3170643573F, 0.3175260566F, + 0.3179879384F, 0.3184500023F, 0.3189122478F, 0.3193746743F, + 0.3198372814F, 0.3203000685F, 0.3207630351F, 0.3212261807F, + 0.3216895048F, 0.3221530069F, 0.3226166865F, 0.3230805430F, + 0.3235445760F, 0.3240087849F, 0.3244731693F, 0.3249377285F, + 0.3254024622F, 0.3258673698F, 0.3263324507F, 0.3267977045F, + 0.3272631306F, 0.3277287286F, 0.3281944978F, 0.3286604379F, + 0.3291265482F, 0.3295928284F, 0.3300592777F, 0.3305258958F, + 0.3309926821F, 0.3314596361F, 0.3319267573F, 0.3323940451F, + 0.3328614990F, 0.3333291186F, 0.3337969033F, 0.3342648525F, + 0.3347329658F, 0.3352012427F, 0.3356696825F, 0.3361382849F, + 0.3366070492F, 0.3370759749F, 0.3375450616F, 0.3380143087F, + 0.3384837156F, 0.3389532819F, 0.3394230071F, 0.3398928905F, + 0.3403629317F, 0.3408331302F, 0.3413034854F, 0.3417739967F, + 0.3422446638F, 0.3427154860F, 0.3431864628F, 0.3436575938F, + 0.3441288782F, 0.3446003158F, 0.3450719058F, 0.3455436478F, + 0.3460155412F, 0.3464875856F, 0.3469597804F, 0.3474321250F, + 0.3479046189F, 0.3483772617F, 0.3488500527F, 0.3493229914F, + 0.3497960774F, 0.3502693100F, 0.3507426887F, 0.3512162131F, + 0.3516898825F, 0.3521636965F, 0.3526376545F, 0.3531117559F, + 0.3535860003F, 0.3540603870F, 0.3545349157F, 0.3550095856F, + 0.3554843964F, 0.3559593474F, 0.3564344381F, 0.3569096680F, + 0.3573850366F, 0.3578605432F, 0.3583361875F, 0.3588119687F, + 0.3592878865F, 0.3597639402F, 0.3602401293F, 0.3607164533F, + 0.3611929117F, 0.3616695038F, 0.3621462292F, 0.3626230873F, + 0.3631000776F, 0.3635771995F, 0.3640544525F, 0.3645318360F, + 0.3650093496F, 0.3654869926F, 0.3659647645F, 0.3664426648F, + 0.3669206930F, 0.3673988484F, 0.3678771306F, 0.3683555390F, + 0.3688340731F, 0.3693127322F, 0.3697915160F, 0.3702704237F, + 0.3707494549F, 0.3712286091F, 0.3717078857F, 0.3721872840F, + 0.3726668037F, 0.3731464441F, 0.3736262047F, 0.3741060850F, + 0.3745860843F, 0.3750662023F, 0.3755464382F, 0.3760267915F, + 0.3765072618F, 0.3769878484F, 0.3774685509F, 0.3779493686F, + 0.3784303010F, 0.3789113475F, 0.3793925076F, 0.3798737809F, + 0.3803551666F, 0.3808366642F, 0.3813182733F, 0.3817999932F, + 0.3822818234F, 0.3827637633F, 0.3832458124F, 0.3837279702F, + 0.3842102360F, 0.3846926093F, 0.3851750897F, 0.3856576764F, + 0.3861403690F, 0.3866231670F, 0.3871060696F, 0.3875890765F, + 0.3880721870F, 0.3885554007F, 0.3890387168F, 0.3895221349F, + 0.3900056544F, 0.3904892748F, 0.3909729955F, 0.3914568160F, + 0.3919407356F, 0.3924247539F, 0.3929088702F, 0.3933930841F, + 0.3938773949F, 0.3943618021F, 0.3948463052F, 0.3953309035F, + 0.3958155966F, 0.3963003838F, 0.3967852646F, 0.3972702385F, + 0.3977553048F, 0.3982404631F, 0.3987257127F, 0.3992110531F, + 0.3996964838F, 0.4001820041F, 0.4006676136F, 0.4011533116F, + 0.4016390976F, 0.4021249710F, 0.4026109313F, 0.4030969779F, + 0.4035831102F, 0.4040693277F, 0.4045556299F, 0.4050420160F, + 0.4055284857F, 0.4060150383F, 0.4065016732F, 0.4069883899F, + 0.4074751879F, 0.4079620665F, 0.4084490252F, 0.4089360635F, + 0.4094231807F, 0.4099103763F, 0.4103976498F, 0.4108850005F, + 0.4113724280F, 0.4118599315F, 0.4123475107F, 0.4128351648F, + 0.4133228934F, 0.4138106959F, 0.4142985716F, 0.4147865201F, + 0.4152745408F, 0.4157626330F, 0.4162507963F, 0.4167390301F, + 0.4172273337F, 0.4177157067F, 0.4182041484F, 0.4186926583F, + 0.4191812359F, 0.4196698805F, 0.4201585915F, 0.4206473685F, + 0.4211362108F, 0.4216251179F, 0.4221140892F, 0.4226031241F, + 0.4230922221F, 0.4235813826F, 0.4240706050F, 0.4245598887F, + 0.4250492332F, 0.4255386379F, 0.4260281022F, 0.4265176256F, + 0.4270072075F, 0.4274968473F, 0.4279865445F, 0.4284762984F, + 0.4289661086F, 0.4294559743F, 0.4299458951F, 0.4304358704F, + 0.4309258996F, 0.4314159822F, 0.4319061175F, 0.4323963050F, + 0.4328865441F, 0.4333768342F, 0.4338671749F, 0.4343575654F, + 0.4348480052F, 0.4353384938F, 0.4358290306F, 0.4363196149F, + 0.4368102463F, 0.4373009241F, 0.4377916478F, 0.4382824168F, + 0.4387732305F, 0.4392640884F, 0.4397549899F, 0.4402459343F, + 0.4407369212F, 0.4412279499F, 0.4417190198F, 0.4422101305F, + 0.4427012813F, 0.4431924717F, 0.4436837010F, 0.4441749686F, + 0.4446662742F, 0.4451576169F, 0.4456489963F, 0.4461404118F, + 0.4466318628F, 0.4471233487F, 0.4476148690F, 0.4481064230F, + 0.4485980103F, 0.4490896302F, 0.4495812821F, 0.4500729654F, + 0.4505646797F, 0.4510564243F, 0.4515481986F, 0.4520400021F, + 0.4525318341F, 0.4530236942F, 0.4535155816F, 0.4540074959F, + 0.4544994365F, 0.4549914028F, 0.4554833941F, 0.4559754100F, + 0.4564674499F, 0.4569595131F, 0.4574515991F, 0.4579437074F, + 0.4584358372F, 0.4589279881F, 0.4594201595F, 0.4599123508F, + 0.4604045615F, 0.4608967908F, 0.4613890383F, 0.4618813034F, + 0.4623735855F, 0.4628658841F, 0.4633581984F, 0.4638505281F, + 0.4643428724F, 0.4648352308F, 0.4653276028F, 0.4658199877F, + 0.4663123849F, 0.4668047940F, 0.4672972143F, 0.4677896451F, + 0.4682820861F, 0.4687745365F, 0.4692669958F, 0.4697594634F, + 0.4702519387F, 0.4707444211F, 0.4712369102F, 0.4717294052F, + 0.4722219056F, 0.4727144109F, 0.4732069204F, 0.4736994336F, + 0.4741919498F, 0.4746844686F, 0.4751769893F, 0.4756695113F, + 0.4761620341F, 0.4766545571F, 0.4771470797F, 0.4776396013F, + 0.4781321213F, 0.4786246392F, 0.4791171544F, 0.4796096663F, + 0.4801021744F, 0.4805946779F, 0.4810871765F, 0.4815796694F, + 0.4820721561F, 0.4825646360F, 0.4830571086F, 0.4835495732F, + 0.4840420293F, 0.4845344763F, 0.4850269136F, 0.4855193407F, + 0.4860117569F, 0.4865041617F, 0.4869965545F, 0.4874889347F, + 0.4879813018F, 0.4884736551F, 0.4889659941F, 0.4894583182F, + 0.4899506268F, 0.4904429193F, 0.4909351952F, 0.4914274538F, + 0.4919196947F, 0.4924119172F, 0.4929041207F, 0.4933963046F, + 0.4938884685F, 0.4943806116F, 0.4948727335F, 0.4953648335F, + 0.4958569110F, 0.4963489656F, 0.4968409965F, 0.4973330032F, + 0.4978249852F, 0.4983169419F, 0.4988088726F, 0.4993007768F, + 0.4997926539F, 0.5002845034F, 0.5007763247F, 0.5012681171F, + 0.5017598801F, 0.5022516132F, 0.5027433157F, 0.5032349871F, + 0.5037266268F, 0.5042182341F, 0.5047098086F, 0.5052013497F, + 0.5056928567F, 0.5061843292F, 0.5066757664F, 0.5071671679F, + 0.5076585330F, 0.5081498613F, 0.5086411520F, 0.5091324047F, + 0.5096236187F, 0.5101147934F, 0.5106059284F, 0.5110970230F, + 0.5115880766F, 0.5120790887F, 0.5125700587F, 0.5130609860F, + 0.5135518700F, 0.5140427102F, 0.5145335059F, 0.5150242566F, + 0.5155149618F, 0.5160056208F, 0.5164962331F, 0.5169867980F, + 0.5174773151F, 0.5179677837F, 0.5184582033F, 0.5189485733F, + 0.5194388931F, 0.5199291621F, 0.5204193798F, 0.5209095455F, + 0.5213996588F, 0.5218897190F, 0.5223797256F, 0.5228696779F, + 0.5233595755F, 0.5238494177F, 0.5243392039F, 0.5248289337F, + 0.5253186063F, 0.5258082213F, 0.5262977781F, 0.5267872760F, + 0.5272767146F, 0.5277660932F, 0.5282554112F, 0.5287446682F, + 0.5292338635F, 0.5297229965F, 0.5302120667F, 0.5307010736F, + 0.5311900164F, 0.5316788947F, 0.5321677079F, 0.5326564554F, + 0.5331451366F, 0.5336337511F, 0.5341222981F, 0.5346107771F, + 0.5350991876F, 0.5355875290F, 0.5360758007F, 0.5365640021F, + 0.5370521327F, 0.5375401920F, 0.5380281792F, 0.5385160939F, + 0.5390039355F, 0.5394917034F, 0.5399793971F, 0.5404670159F, + 0.5409545594F, 0.5414420269F, 0.5419294179F, 0.5424167318F, + 0.5429039680F, 0.5433911261F, 0.5438782053F, 0.5443652051F, + 0.5448521250F, 0.5453389644F, 0.5458257228F, 0.5463123995F, + 0.5467989940F, 0.5472855057F, 0.5477719341F, 0.5482582786F, + 0.5487445387F, 0.5492307137F, 0.5497168031F, 0.5502028063F, + 0.5506887228F, 0.5511745520F, 0.5516602934F, 0.5521459463F, + 0.5526315103F, 0.5531169847F, 0.5536023690F, 0.5540876626F, + 0.5545728649F, 0.5550579755F, 0.5555429937F, 0.5560279189F, + 0.5565127507F, 0.5569974884F, 0.5574821315F, 0.5579666794F, + 0.5584511316F, 0.5589354875F, 0.5594197465F, 0.5599039080F, + 0.5603879716F, 0.5608719367F, 0.5613558026F, 0.5618395689F, + 0.5623232350F, 0.5628068002F, 0.5632902642F, 0.5637736262F, + 0.5642568858F, 0.5647400423F, 0.5652230953F, 0.5657060442F, + 0.5661888883F, 0.5666716272F, 0.5671542603F, 0.5676367870F, + 0.5681192069F, 0.5686015192F, 0.5690837235F, 0.5695658192F, + 0.5700478058F, 0.5705296827F, 0.5710114494F, 0.5714931052F, + 0.5719746497F, 0.5724560822F, 0.5729374023F, 0.5734186094F, + 0.5738997029F, 0.5743806823F, 0.5748615470F, 0.5753422965F, + 0.5758229301F, 0.5763034475F, 0.5767838480F, 0.5772641310F, + 0.5777442960F, 0.5782243426F, 0.5787042700F, 0.5791840778F, + 0.5796637654F, 0.5801433322F, 0.5806227778F, 0.5811021016F, + 0.5815813029F, 0.5820603814F, 0.5825393363F, 0.5830181673F, + 0.5834968737F, 0.5839754549F, 0.5844539105F, 0.5849322399F, + 0.5854104425F, 0.5858885179F, 0.5863664653F, 0.5868442844F, + 0.5873219746F, 0.5877995353F, 0.5882769660F, 0.5887542661F, + 0.5892314351F, 0.5897084724F, 0.5901853776F, 0.5906621500F, + 0.5911387892F, 0.5916152945F, 0.5920916655F, 0.5925679016F, + 0.5930440022F, 0.5935199669F, 0.5939957950F, 0.5944714861F, + 0.5949470396F, 0.5954224550F, 0.5958977317F, 0.5963728692F, + 0.5968478669F, 0.5973227244F, 0.5977974411F, 0.5982720163F, + 0.5987464497F, 0.5992207407F, 0.5996948887F, 0.6001688932F, + 0.6006427537F, 0.6011164696F, 0.6015900405F, 0.6020634657F, + 0.6025367447F, 0.6030098770F, 0.6034828621F, 0.6039556995F, + 0.6044283885F, 0.6049009288F, 0.6053733196F, 0.6058455606F, + 0.6063176512F, 0.6067895909F, 0.6072613790F, 0.6077330152F, + 0.6082044989F, 0.6086758295F, 0.6091470065F, 0.6096180294F, + 0.6100888977F, 0.6105596108F, 0.6110301682F, 0.6115005694F, + 0.6119708139F, 0.6124409011F, 0.6129108305F, 0.6133806017F, + 0.6138502139F, 0.6143196669F, 0.6147889599F, 0.6152580926F, + 0.6157270643F, 0.6161958746F, 0.6166645230F, 0.6171330088F, + 0.6176013317F, 0.6180694910F, 0.6185374863F, 0.6190053171F, + 0.6194729827F, 0.6199404828F, 0.6204078167F, 0.6208749841F, + 0.6213419842F, 0.6218088168F, 0.6222754811F, 0.6227419768F, + 0.6232083032F, 0.6236744600F, 0.6241404465F, 0.6246062622F, + 0.6250719067F, 0.6255373795F, 0.6260026799F, 0.6264678076F, + 0.6269327619F, 0.6273975425F, 0.6278621487F, 0.6283265800F, + 0.6287908361F, 0.6292549163F, 0.6297188201F, 0.6301825471F, + 0.6306460966F, 0.6311094683F, 0.6315726617F, 0.6320356761F, + 0.6324985111F, 0.6329611662F, 0.6334236410F, 0.6338859348F, + 0.6343480472F, 0.6348099777F, 0.6352717257F, 0.6357332909F, + 0.6361946726F, 0.6366558704F, 0.6371168837F, 0.6375777122F, + 0.6380383552F, 0.6384988123F, 0.6389590830F, 0.6394191668F, + 0.6398790631F, 0.6403387716F, 0.6407982916F, 0.6412576228F, + 0.6417167645F, 0.6421757163F, 0.6426344778F, 0.6430930483F, + 0.6435514275F, 0.6440096149F, 0.6444676098F, 0.6449254119F, + 0.6453830207F, 0.6458404356F, 0.6462976562F, 0.6467546820F, + 0.6472115125F, 0.6476681472F, 0.6481245856F, 0.6485808273F, + 0.6490368717F, 0.6494927183F, 0.6499483667F, 0.6504038164F, + 0.6508590670F, 0.6513141178F, 0.6517689684F, 0.6522236185F, + 0.6526780673F, 0.6531323146F, 0.6535863598F, 0.6540402024F, + 0.6544938419F, 0.6549472779F, 0.6554005099F, 0.6558535373F, + 0.6563063598F, 0.6567589769F, 0.6572113880F, 0.6576635927F, + 0.6581155906F, 0.6585673810F, 0.6590189637F, 0.6594703380F, + 0.6599215035F, 0.6603724598F, 0.6608232064F, 0.6612737427F, + 0.6617240684F, 0.6621741829F, 0.6626240859F, 0.6630737767F, + 0.6635232550F, 0.6639725202F, 0.6644215720F, 0.6648704098F, + 0.6653190332F, 0.6657674417F, 0.6662156348F, 0.6666636121F, + 0.6671113731F, 0.6675589174F, 0.6680062445F, 0.6684533538F, + 0.6689002450F, 0.6693469177F, 0.6697933712F, 0.6702396052F, + 0.6706856193F, 0.6711314129F, 0.6715769855F, 0.6720223369F, + 0.6724674664F, 0.6729123736F, 0.6733570581F, 0.6738015194F, + 0.6742457570F, 0.6746897706F, 0.6751335596F, 0.6755771236F, + 0.6760204621F, 0.6764635747F, 0.6769064609F, 0.6773491204F, + 0.6777915525F, 0.6782337570F, 0.6786757332F, 0.6791174809F, + 0.6795589995F, 0.6800002886F, 0.6804413477F, 0.6808821765F, + 0.6813227743F, 0.6817631409F, 0.6822032758F, 0.6826431785F, + 0.6830828485F, 0.6835222855F, 0.6839614890F, 0.6844004585F, + 0.6848391936F, 0.6852776939F, 0.6857159589F, 0.6861539883F, + 0.6865917815F, 0.6870293381F, 0.6874666576F, 0.6879037398F, + 0.6883405840F, 0.6887771899F, 0.6892135571F, 0.6896496850F, + 0.6900855733F, 0.6905212216F, 0.6909566294F, 0.6913917963F, + 0.6918267218F, 0.6922614055F, 0.6926958471F, 0.6931300459F, + 0.6935640018F, 0.6939977141F, 0.6944311825F, 0.6948644066F, + 0.6952973859F, 0.6957301200F, 0.6961626085F, 0.6965948510F, + 0.6970268470F, 0.6974585961F, 0.6978900980F, 0.6983213521F, + 0.6987523580F, 0.6991831154F, 0.6996136238F, 0.7000438828F, + 0.7004738921F, 0.7009036510F, 0.7013331594F, 0.7017624166F, + 0.7021914224F, 0.7026201763F, 0.7030486779F, 0.7034769268F, + 0.7039049226F, 0.7043326648F, 0.7047601531F, 0.7051873870F, + 0.7056143662F, 0.7060410902F, 0.7064675586F, 0.7068937711F, + 0.7073197271F, 0.7077454264F, 0.7081708684F, 0.7085960529F, + 0.7090209793F, 0.7094456474F, 0.7098700566F, 0.7102942066F, + 0.7107180970F, 0.7111417274F, 0.7115650974F, 0.7119882066F, + 0.7124110545F, 0.7128336409F, 0.7132559653F, 0.7136780272F, + 0.7140998264F, 0.7145213624F, 0.7149426348F, 0.7153636433F, + 0.7157843874F, 0.7162048668F, 0.7166250810F, 0.7170450296F, + 0.7174647124F, 0.7178841289F, 0.7183032786F, 0.7187221613F, + 0.7191407765F, 0.7195591239F, 0.7199772030F, 0.7203950135F, + 0.7208125550F, 0.7212298271F, 0.7216468294F, 0.7220635616F, + 0.7224800233F, 0.7228962140F, 0.7233121335F, 0.7237277813F, + 0.7241431571F, 0.7245582604F, 0.7249730910F, 0.7253876484F, + 0.7258019322F, 0.7262159422F, 0.7266296778F, 0.7270431388F, + 0.7274563247F, 0.7278692353F, 0.7282818700F, 0.7286942287F, + 0.7291063108F, 0.7295181160F, 0.7299296440F, 0.7303408944F, + 0.7307518669F, 0.7311625609F, 0.7315729763F, 0.7319831126F, + 0.7323929695F, 0.7328025466F, 0.7332118435F, 0.7336208600F, + 0.7340295955F, 0.7344380499F, 0.7348462226F, 0.7352541134F, + 0.7356617220F, 0.7360690478F, 0.7364760907F, 0.7368828502F, + 0.7372893259F, 0.7376955176F, 0.7381014249F, 0.7385070475F, + 0.7389123849F, 0.7393174368F, 0.7397222029F, 0.7401266829F, + 0.7405308763F, 0.7409347829F, 0.7413384023F, 0.7417417341F, + 0.7421447780F, 0.7425475338F, 0.7429500009F, 0.7433521791F, + 0.7437540681F, 0.7441556674F, 0.7445569769F, 0.7449579960F, + 0.7453587245F, 0.7457591621F, 0.7461593084F, 0.7465591631F, + 0.7469587259F, 0.7473579963F, 0.7477569741F, 0.7481556590F, + 0.7485540506F, 0.7489521486F, 0.7493499526F, 0.7497474623F, + 0.7501446775F, 0.7505415977F, 0.7509382227F, 0.7513345521F, + 0.7517305856F, 0.7521263229F, 0.7525217636F, 0.7529169074F, + 0.7533117541F, 0.7537063032F, 0.7541005545F, 0.7544945076F, + 0.7548881623F, 0.7552815182F, 0.7556745749F, 0.7560673323F, + 0.7564597899F, 0.7568519474F, 0.7572438046F, 0.7576353611F, + 0.7580266166F, 0.7584175708F, 0.7588082235F, 0.7591985741F, + 0.7595886226F, 0.7599783685F, 0.7603678116F, 0.7607569515F, + 0.7611457879F, 0.7615343206F, 0.7619225493F, 0.7623104735F, + 0.7626980931F, 0.7630854078F, 0.7634724171F, 0.7638591209F, + 0.7642455188F, 0.7646316106F, 0.7650173959F, 0.7654028744F, + 0.7657880459F, 0.7661729100F, 0.7665574664F, 0.7669417150F, + 0.7673256553F, 0.7677092871F, 0.7680926100F, 0.7684756239F, + 0.7688583284F, 0.7692407232F, 0.7696228080F, 0.7700045826F, + 0.7703860467F, 0.7707671999F, 0.7711480420F, 0.7715285728F, + 0.7719087918F, 0.7722886989F, 0.7726682938F, 0.7730475762F, + 0.7734265458F, 0.7738052023F, 0.7741835454F, 0.7745615750F, + 0.7749392906F, 0.7753166921F, 0.7756937791F, 0.7760705514F, + 0.7764470087F, 0.7768231508F, 0.7771989773F, 0.7775744880F, + 0.7779496827F, 0.7783245610F, 0.7786991227F, 0.7790733676F, + 0.7794472953F, 0.7798209056F, 0.7801941982F, 0.7805671729F, + 0.7809398294F, 0.7813121675F, 0.7816841869F, 0.7820558873F, + 0.7824272684F, 0.7827983301F, 0.7831690720F, 0.7835394940F, + 0.7839095957F, 0.7842793768F, 0.7846488373F, 0.7850179767F, + 0.7853867948F, 0.7857552914F, 0.7861234663F, 0.7864913191F, + 0.7868588497F, 0.7872260578F, 0.7875929431F, 0.7879595055F, + 0.7883257445F, 0.7886916601F, 0.7890572520F, 0.7894225198F, + 0.7897874635F, 0.7901520827F, 0.7905163772F, 0.7908803468F, + 0.7912439912F, 0.7916073102F, 0.7919703035F, 0.7923329710F, + 0.7926953124F, 0.7930573274F, 0.7934190158F, 0.7937803774F, + 0.7941414120F, 0.7945021193F, 0.7948624991F, 0.7952225511F, + 0.7955822752F, 0.7959416711F, 0.7963007387F, 0.7966594775F, + 0.7970178875F, 0.7973759685F, 0.7977337201F, 0.7980911422F, + 0.7984482346F, 0.7988049970F, 0.7991614292F, 0.7995175310F, + 0.7998733022F, 0.8002287426F, 0.8005838519F, 0.8009386299F, + 0.8012930765F, 0.8016471914F, 0.8020009744F, 0.8023544253F, + 0.8027075438F, 0.8030603298F, 0.8034127831F, 0.8037649035F, + 0.8041166906F, 0.8044681445F, 0.8048192647F, 0.8051700512F, + 0.8055205038F, 0.8058706222F, 0.8062204062F, 0.8065698556F, + 0.8069189702F, 0.8072677499F, 0.8076161944F, 0.8079643036F, + 0.8083120772F, 0.8086595151F, 0.8090066170F, 0.8093533827F, + 0.8096998122F, 0.8100459051F, 0.8103916613F, 0.8107370806F, + 0.8110821628F, 0.8114269077F, 0.8117713151F, 0.8121153849F, + 0.8124591169F, 0.8128025108F, 0.8131455666F, 0.8134882839F, + 0.8138306627F, 0.8141727027F, 0.8145144038F, 0.8148557658F, + 0.8151967886F, 0.8155374718F, 0.8158778154F, 0.8162178192F, + 0.8165574830F, 0.8168968067F, 0.8172357900F, 0.8175744328F, + 0.8179127349F, 0.8182506962F, 0.8185883164F, 0.8189255955F, + 0.8192625332F, 0.8195991295F, 0.8199353840F, 0.8202712967F, + 0.8206068673F, 0.8209420958F, 0.8212769820F, 0.8216115256F, + 0.8219457266F, 0.8222795848F, 0.8226131000F, 0.8229462721F, + 0.8232791009F, 0.8236115863F, 0.8239437280F, 0.8242755260F, + 0.8246069801F, 0.8249380901F, 0.8252688559F, 0.8255992774F, + 0.8259293544F, 0.8262590867F, 0.8265884741F, 0.8269175167F, + 0.8272462141F, 0.8275745663F, 0.8279025732F, 0.8282302344F, + 0.8285575501F, 0.8288845199F, 0.8292111437F, 0.8295374215F, + 0.8298633530F, 0.8301889382F, 0.8305141768F, 0.8308390688F, + 0.8311636141F, 0.8314878124F, 0.8318116637F, 0.8321351678F, + 0.8324583246F, 0.8327811340F, 0.8331035957F, 0.8334257098F, + 0.8337474761F, 0.8340688944F, 0.8343899647F, 0.8347106867F, + 0.8350310605F, 0.8353510857F, 0.8356707624F, 0.8359900904F, + 0.8363090696F, 0.8366276999F, 0.8369459811F, 0.8372639131F, + 0.8375814958F, 0.8378987292F, 0.8382156130F, 0.8385321472F, + 0.8388483316F, 0.8391641662F, 0.8394796508F, 0.8397947853F, + 0.8401095697F, 0.8404240037F, 0.8407380873F, 0.8410518204F, + 0.8413652029F, 0.8416782347F, 0.8419909156F, 0.8423032456F, + 0.8426152245F, 0.8429268523F, 0.8432381289F, 0.8435490541F, + 0.8438596279F, 0.8441698502F, 0.8444797208F, 0.8447892396F, + 0.8450984067F, 0.8454072218F, 0.8457156849F, 0.8460237959F, + 0.8463315547F, 0.8466389612F, 0.8469460154F, 0.8472527170F, + 0.8475590661F, 0.8478650625F, 0.8481707063F, 0.8484759971F, + 0.8487809351F, 0.8490855201F, 0.8493897521F, 0.8496936308F, + 0.8499971564F, 0.8503003286F, 0.8506031474F, 0.8509056128F, + 0.8512077246F, 0.8515094828F, 0.8518108872F, 0.8521119379F, + 0.8524126348F, 0.8527129777F, 0.8530129666F, 0.8533126015F, + 0.8536118822F, 0.8539108087F, 0.8542093809F, 0.8545075988F, + 0.8548054623F, 0.8551029712F, 0.8554001257F, 0.8556969255F, + 0.8559933707F, 0.8562894611F, 0.8565851968F, 0.8568805775F, + 0.8571756034F, 0.8574702743F, 0.8577645902F, 0.8580585509F, + 0.8583521566F, 0.8586454070F, 0.8589383021F, 0.8592308420F, + 0.8595230265F, 0.8598148556F, 0.8601063292F, 0.8603974473F, + 0.8606882098F, 0.8609786167F, 0.8612686680F, 0.8615583636F, + 0.8618477034F, 0.8621366874F, 0.8624253156F, 0.8627135878F, + 0.8630015042F, 0.8632890646F, 0.8635762690F, 0.8638631173F, + 0.8641496096F, 0.8644357457F, 0.8647215257F, 0.8650069495F, + 0.8652920171F, 0.8655767283F, 0.8658610833F, 0.8661450820F, + 0.8664287243F, 0.8667120102F, 0.8669949397F, 0.8672775127F, + 0.8675597293F, 0.8678415894F, 0.8681230929F, 0.8684042398F, + 0.8686850302F, 0.8689654640F, 0.8692455412F, 0.8695252617F, + 0.8698046255F, 0.8700836327F, 0.8703622831F, 0.8706405768F, + 0.8709185138F, 0.8711960940F, 0.8714733174F, 0.8717501840F, + 0.8720266939F, 0.8723028469F, 0.8725786430F, 0.8728540824F, + 0.8731291648F, 0.8734038905F, 0.8736782592F, 0.8739522711F, + 0.8742259261F, 0.8744992242F, 0.8747721653F, 0.8750447496F, + 0.8753169770F, 0.8755888475F, 0.8758603611F, 0.8761315177F, + 0.8764023175F, 0.8766727603F, 0.8769428462F, 0.8772125752F, + 0.8774819474F, 0.8777509626F, 0.8780196209F, 0.8782879224F, + 0.8785558669F, 0.8788234546F, 0.8790906854F, 0.8793575594F, + 0.8796240765F, 0.8798902368F, 0.8801560403F, 0.8804214870F, + 0.8806865768F, 0.8809513099F, 0.8812156863F, 0.8814797059F, + 0.8817433687F, 0.8820066749F, 0.8822696243F, 0.8825322171F, + 0.8827944532F, 0.8830563327F, 0.8833178556F, 0.8835790219F, + 0.8838398316F, 0.8841002848F, 0.8843603815F, 0.8846201217F, + 0.8848795054F, 0.8851385327F, 0.8853972036F, 0.8856555182F, + 0.8859134764F, 0.8861710783F, 0.8864283239F, 0.8866852133F, + 0.8869417464F, 0.8871979234F, 0.8874537443F, 0.8877092090F, + 0.8879643177F, 0.8882190704F, 0.8884734671F, 0.8887275078F, + 0.8889811927F, 0.8892345216F, 0.8894874948F, 0.8897401122F, + 0.8899923738F, 0.8902442798F, 0.8904958301F, 0.8907470248F, + 0.8909978640F, 0.8912483477F, 0.8914984759F, 0.8917482487F, + 0.8919976662F, 0.8922467284F, 0.8924954353F, 0.8927437871F, + 0.8929917837F, 0.8932394252F, 0.8934867118F, 0.8937336433F, + 0.8939802199F, 0.8942264417F, 0.8944723087F, 0.8947178210F, + 0.8949629785F, 0.8952077815F, 0.8954522299F, 0.8956963239F, + 0.8959400634F, 0.8961834486F, 0.8964264795F, 0.8966691561F, + 0.8969114786F, 0.8971534470F, 0.8973950614F, 0.8976363219F, + 0.8978772284F, 0.8981177812F, 0.8983579802F, 0.8985978256F, + 0.8988373174F, 0.8990764556F, 0.8993152405F, 0.8995536720F, + 0.8997917502F, 0.9000294751F, 0.9002668470F, 0.9005038658F, + 0.9007405317F, 0.9009768446F, 0.9012128048F, 0.9014484123F, + 0.9016836671F, 0.9019185693F, 0.9021531191F, 0.9023873165F, + 0.9026211616F, 0.9028546546F, 0.9030877954F, 0.9033205841F, + 0.9035530210F, 0.9037851059F, 0.9040168392F, 0.9042482207F, + 0.9044792507F, 0.9047099293F, 0.9049402564F, 0.9051702323F, + 0.9053998569F, 0.9056291305F, 0.9058580531F, 0.9060866248F, + 0.9063148457F, 0.9065427159F, 0.9067702355F, 0.9069974046F, + 0.9072242233F, 0.9074506917F, 0.9076768100F, 0.9079025782F, + 0.9081279964F, 0.9083530647F, 0.9085777833F, 0.9088021523F, + 0.9090261717F, 0.9092498417F, 0.9094731623F, 0.9096961338F, + 0.9099187561F, 0.9101410295F, 0.9103629540F, 0.9105845297F, + 0.9108057568F, 0.9110266354F, 0.9112471656F, 0.9114673475F, + 0.9116871812F, 0.9119066668F, 0.9121258046F, 0.9123445945F, + 0.9125630367F, 0.9127811314F, 0.9129988786F, 0.9132162785F, + 0.9134333312F, 0.9136500368F, 0.9138663954F, 0.9140824073F, + 0.9142980724F, 0.9145133910F, 0.9147283632F, 0.9149429890F, + 0.9151572687F, 0.9153712023F, 0.9155847900F, 0.9157980319F, + 0.9160109282F, 0.9162234790F, 0.9164356844F, 0.9166475445F, + 0.9168590595F, 0.9170702296F, 0.9172810548F, 0.9174915354F, + 0.9177016714F, 0.9179114629F, 0.9181209102F, 0.9183300134F, + 0.9185387726F, 0.9187471879F, 0.9189552595F, 0.9191629876F, + 0.9193703723F, 0.9195774136F, 0.9197841119F, 0.9199904672F, + 0.9201964797F, 0.9204021495F, 0.9206074767F, 0.9208124616F, + 0.9210171043F, 0.9212214049F, 0.9214253636F, 0.9216289805F, + 0.9218322558F, 0.9220351896F, 0.9222377821F, 0.9224400335F, + 0.9226419439F, 0.9228435134F, 0.9230447423F, 0.9232456307F, + 0.9234461787F, 0.9236463865F, 0.9238462543F, 0.9240457822F, + 0.9242449704F, 0.9244438190F, 0.9246423282F, 0.9248404983F, + 0.9250383293F, 0.9252358214F, 0.9254329747F, 0.9256297896F, + 0.9258262660F, 0.9260224042F, 0.9262182044F, 0.9264136667F, + 0.9266087913F, 0.9268035783F, 0.9269980280F, 0.9271921405F, + 0.9273859160F, 0.9275793546F, 0.9277724566F, 0.9279652221F, + 0.9281576513F, 0.9283497443F, 0.9285415014F, 0.9287329227F, + 0.9289240084F, 0.9291147586F, 0.9293051737F, 0.9294952536F, + 0.9296849987F, 0.9298744091F, 0.9300634850F, 0.9302522266F, + 0.9304406340F, 0.9306287074F, 0.9308164471F, 0.9310038532F, + 0.9311909259F, 0.9313776654F, 0.9315640719F, 0.9317501455F, + 0.9319358865F, 0.9321212951F, 0.9323063713F, 0.9324911155F, + 0.9326755279F, 0.9328596085F, 0.9330433577F, 0.9332267756F, + 0.9334098623F, 0.9335926182F, 0.9337750434F, 0.9339571380F, + 0.9341389023F, 0.9343203366F, 0.9345014409F, 0.9346822155F, + 0.9348626606F, 0.9350427763F, 0.9352225630F, 0.9354020207F, + 0.9355811498F, 0.9357599503F, 0.9359384226F, 0.9361165667F, + 0.9362943830F, 0.9364718716F, 0.9366490327F, 0.9368258666F, + 0.9370023733F, 0.9371785533F, 0.9373544066F, 0.9375299335F, + 0.9377051341F, 0.9378800087F, 0.9380545576F, 0.9382287809F, + 0.9384026787F, 0.9385762515F, 0.9387494993F, 0.9389224223F, + 0.9390950209F, 0.9392672951F, 0.9394392453F, 0.9396108716F, + 0.9397821743F, 0.9399531536F, 0.9401238096F, 0.9402941427F, + 0.9404641530F, 0.9406338407F, 0.9408032061F, 0.9409722495F, + 0.9411409709F, 0.9413093707F, 0.9414774491F, 0.9416452062F, + 0.9418126424F, 0.9419797579F, 0.9421465528F, 0.9423130274F, + 0.9424791819F, 0.9426450166F, 0.9428105317F, 0.9429757274F, + 0.9431406039F, 0.9433051616F, 0.9434694005F, 0.9436333209F, + 0.9437969232F, 0.9439602074F, 0.9441231739F, 0.9442858229F, + 0.9444481545F, 0.9446101691F, 0.9447718669F, 0.9449332481F, + 0.9450943129F, 0.9452550617F, 0.9454154945F, 0.9455756118F, + 0.9457354136F, 0.9458949003F, 0.9460540721F, 0.9462129292F, + 0.9463714719F, 0.9465297003F, 0.9466876149F, 0.9468452157F, + 0.9470025031F, 0.9471594772F, 0.9473161384F, 0.9474724869F, + 0.9476285229F, 0.9477842466F, 0.9479396584F, 0.9480947585F, + 0.9482495470F, 0.9484040243F, 0.9485581906F, 0.9487120462F, + 0.9488655913F, 0.9490188262F, 0.9491717511F, 0.9493243662F, + 0.9494766718F, 0.9496286683F, 0.9497803557F, 0.9499317345F, + 0.9500828047F, 0.9502335668F, 0.9503840209F, 0.9505341673F, + 0.9506840062F, 0.9508335380F, 0.9509827629F, 0.9511316810F, + 0.9512802928F, 0.9514285984F, 0.9515765982F, 0.9517242923F, + 0.9518716810F, 0.9520187646F, 0.9521655434F, 0.9523120176F, + 0.9524581875F, 0.9526040534F, 0.9527496154F, 0.9528948739F, + 0.9530398292F, 0.9531844814F, 0.9533288310F, 0.9534728780F, + 0.9536166229F, 0.9537600659F, 0.9539032071F, 0.9540460470F, + 0.9541885858F, 0.9543308237F, 0.9544727611F, 0.9546143981F, + 0.9547557351F, 0.9548967723F, 0.9550375100F, 0.9551779485F, + 0.9553180881F, 0.9554579290F, 0.9555974714F, 0.9557367158F, + 0.9558756623F, 0.9560143112F, 0.9561526628F, 0.9562907174F, + 0.9564284752F, 0.9565659366F, 0.9567031017F, 0.9568399710F, + 0.9569765446F, 0.9571128229F, 0.9572488061F, 0.9573844944F, + 0.9575198883F, 0.9576549879F, 0.9577897936F, 0.9579243056F, + 0.9580585242F, 0.9581924497F, 0.9583260824F, 0.9584594226F, + 0.9585924705F, 0.9587252264F, 0.9588576906F, 0.9589898634F, + 0.9591217452F, 0.9592533360F, 0.9593846364F, 0.9595156465F, + 0.9596463666F, 0.9597767971F, 0.9599069382F, 0.9600367901F, + 0.9601663533F, 0.9602956279F, 0.9604246143F, 0.9605533128F, + 0.9606817236F, 0.9608098471F, 0.9609376835F, 0.9610652332F, + 0.9611924963F, 0.9613194733F, 0.9614461644F, 0.9615725699F, + 0.9616986901F, 0.9618245253F, 0.9619500757F, 0.9620753418F, + 0.9622003238F, 0.9623250219F, 0.9624494365F, 0.9625735679F, + 0.9626974163F, 0.9628209821F, 0.9629442656F, 0.9630672671F, + 0.9631899868F, 0.9633124251F, 0.9634345822F, 0.9635564585F, + 0.9636780543F, 0.9637993699F, 0.9639204056F, 0.9640411616F, + 0.9641616383F, 0.9642818359F, 0.9644017549F, 0.9645213955F, + 0.9646407579F, 0.9647598426F, 0.9648786497F, 0.9649971797F, + 0.9651154328F, 0.9652334092F, 0.9653511095F, 0.9654685337F, + 0.9655856823F, 0.9657025556F, 0.9658191538F, 0.9659354773F, + 0.9660515263F, 0.9661673013F, 0.9662828024F, 0.9663980300F, + 0.9665129845F, 0.9666276660F, 0.9667420750F, 0.9668562118F, + 0.9669700766F, 0.9670836698F, 0.9671969917F, 0.9673100425F, + 0.9674228227F, 0.9675353325F, 0.9676475722F, 0.9677595422F, + 0.9678712428F, 0.9679826742F, 0.9680938368F, 0.9682047309F, + 0.9683153569F, 0.9684257150F, 0.9685358056F, 0.9686456289F, + 0.9687551853F, 0.9688644752F, 0.9689734987F, 0.9690822564F, + 0.9691907483F, 0.9692989750F, 0.9694069367F, 0.9695146337F, + 0.9696220663F, 0.9697292349F, 0.9698361398F, 0.9699427813F, + 0.9700491597F, 0.9701552754F, 0.9702611286F, 0.9703667197F, + 0.9704720490F, 0.9705771169F, 0.9706819236F, 0.9707864695F, + 0.9708907549F, 0.9709947802F, 0.9710985456F, 0.9712020514F, + 0.9713052981F, 0.9714082859F, 0.9715110151F, 0.9716134862F, + 0.9717156993F, 0.9718176549F, 0.9719193532F, 0.9720207946F, + 0.9721219794F, 0.9722229080F, 0.9723235806F, 0.9724239976F, + 0.9725241593F, 0.9726240661F, 0.9727237183F, 0.9728231161F, + 0.9729222601F, 0.9730211503F, 0.9731197873F, 0.9732181713F, + 0.9733163027F, 0.9734141817F, 0.9735118088F, 0.9736091842F, + 0.9737063083F, 0.9738031814F, 0.9738998039F, 0.9739961760F, + 0.9740922981F, 0.9741881706F, 0.9742837938F, 0.9743791680F, + 0.9744742935F, 0.9745691707F, 0.9746637999F, 0.9747581814F, + 0.9748523157F, 0.9749462029F, 0.9750398435F, 0.9751332378F, + 0.9752263861F, 0.9753192887F, 0.9754119461F, 0.9755043585F, + 0.9755965262F, 0.9756884496F, 0.9757801291F, 0.9758715650F, + 0.9759627575F, 0.9760537071F, 0.9761444141F, 0.9762348789F, + 0.9763251016F, 0.9764150828F, 0.9765048228F, 0.9765943218F, + 0.9766835802F, 0.9767725984F, 0.9768613767F, 0.9769499154F, + 0.9770382149F, 0.9771262755F, 0.9772140976F, 0.9773016815F, + 0.9773890275F, 0.9774761360F, 0.9775630073F, 0.9776496418F, + 0.9777360398F, 0.9778222016F, 0.9779081277F, 0.9779938182F, + 0.9780792736F, 0.9781644943F, 0.9782494805F, 0.9783342326F, + 0.9784187509F, 0.9785030359F, 0.9785870877F, 0.9786709069F, + 0.9787544936F, 0.9788378484F, 0.9789209714F, 0.9790038631F, + 0.9790865238F, 0.9791689538F, 0.9792511535F, 0.9793331232F, + 0.9794148633F, 0.9794963742F, 0.9795776561F, 0.9796587094F, + 0.9797395345F, 0.9798201316F, 0.9799005013F, 0.9799806437F, + 0.9800605593F, 0.9801402483F, 0.9802197112F, 0.9802989483F, + 0.9803779600F, 0.9804567465F, 0.9805353082F, 0.9806136455F, + 0.9806917587F, 0.9807696482F, 0.9808473143F, 0.9809247574F, + 0.9810019778F, 0.9810789759F, 0.9811557519F, 0.9812323064F, + 0.9813086395F, 0.9813847517F, 0.9814606433F, 0.9815363147F, + 0.9816117662F, 0.9816869981F, 0.9817620108F, 0.9818368047F, + 0.9819113801F, 0.9819857374F, 0.9820598769F, 0.9821337989F, + 0.9822075038F, 0.9822809920F, 0.9823542638F, 0.9824273195F, + 0.9825001596F, 0.9825727843F, 0.9826451940F, 0.9827173891F, + 0.9827893700F, 0.9828611368F, 0.9829326901F, 0.9830040302F, + 0.9830751574F, 0.9831460720F, 0.9832167745F, 0.9832872652F, + 0.9833575444F, 0.9834276124F, 0.9834974697F, 0.9835671166F, + 0.9836365535F, 0.9837057806F, 0.9837747983F, 0.9838436071F, + 0.9839122072F, 0.9839805990F, 0.9840487829F, 0.9841167591F, + 0.9841845282F, 0.9842520903F, 0.9843194459F, 0.9843865953F, + 0.9844535389F, 0.9845202771F, 0.9845868101F, 0.9846531383F, + 0.9847192622F, 0.9847851820F, 0.9848508980F, 0.9849164108F, + 0.9849817205F, 0.9850468276F, 0.9851117324F, 0.9851764352F, + 0.9852409365F, 0.9853052366F, 0.9853693358F, 0.9854332344F, + 0.9854969330F, 0.9855604317F, 0.9856237309F, 0.9856868310F, + 0.9857497325F, 0.9858124355F, 0.9858749404F, 0.9859372477F, + 0.9859993577F, 0.9860612707F, 0.9861229871F, 0.9861845072F, + 0.9862458315F, 0.9863069601F, 0.9863678936F, 0.9864286322F, + 0.9864891764F, 0.9865495264F, 0.9866096826F, 0.9866696454F, + 0.9867294152F, 0.9867889922F, 0.9868483769F, 0.9869075695F, + 0.9869665706F, 0.9870253803F, 0.9870839991F, 0.9871424273F, + 0.9872006653F, 0.9872587135F, 0.9873165721F, 0.9873742415F, + 0.9874317222F, 0.9874890144F, 0.9875461185F, 0.9876030348F, + 0.9876597638F, 0.9877163057F, 0.9877726610F, 0.9878288300F, + 0.9878848130F, 0.9879406104F, 0.9879962225F, 0.9880516497F, + 0.9881068924F, 0.9881619509F, 0.9882168256F, 0.9882715168F, + 0.9883260249F, 0.9883803502F, 0.9884344931F, 0.9884884539F, + 0.9885422331F, 0.9885958309F, 0.9886492477F, 0.9887024838F, + 0.9887555397F, 0.9888084157F, 0.9888611120F, 0.9889136292F, + 0.9889659675F, 0.9890181273F, 0.9890701089F, 0.9891219128F, + 0.9891735392F, 0.9892249885F, 0.9892762610F, 0.9893273572F, + 0.9893782774F, 0.9894290219F, 0.9894795911F, 0.9895299853F, + 0.9895802049F, 0.9896302502F, 0.9896801217F, 0.9897298196F, + 0.9897793443F, 0.9898286961F, 0.9898778755F, 0.9899268828F, + 0.9899757183F, 0.9900243823F, 0.9900728753F, 0.9901211976F, + 0.9901693495F, 0.9902173314F, 0.9902651436F, 0.9903127865F, + 0.9903602605F, 0.9904075659F, 0.9904547031F, 0.9905016723F, + 0.9905484740F, 0.9905951086F, 0.9906415763F, 0.9906878775F, + 0.9907340126F, 0.9907799819F, 0.9908257858F, 0.9908714247F, + 0.9909168988F, 0.9909622086F, 0.9910073543F, 0.9910523364F, + 0.9910971552F, 0.9911418110F, 0.9911863042F, 0.9912306351F, + 0.9912748042F, 0.9913188117F, 0.9913626580F, 0.9914063435F, + 0.9914498684F, 0.9914932333F, 0.9915364383F, 0.9915794839F, + 0.9916223703F, 0.9916650981F, 0.9917076674F, 0.9917500787F, + 0.9917923323F, 0.9918344286F, 0.9918763679F, 0.9919181505F, + 0.9919597769F, 0.9920012473F, 0.9920425621F, 0.9920837217F, + 0.9921247263F, 0.9921655765F, 0.9922062724F, 0.9922468145F, + 0.9922872030F, 0.9923274385F, 0.9923675211F, 0.9924074513F, + 0.9924472294F, 0.9924868557F, 0.9925263306F, 0.9925656544F, + 0.9926048275F, 0.9926438503F, 0.9926827230F, 0.9927214461F, + 0.9927600199F, 0.9927984446F, 0.9928367208F, 0.9928748486F, + 0.9929128285F, 0.9929506608F, 0.9929883459F, 0.9930258841F, + 0.9930632757F, 0.9931005211F, 0.9931376207F, 0.9931745747F, + 0.9932113836F, 0.9932480476F, 0.9932845671F, 0.9933209425F, + 0.9933571742F, 0.9933932623F, 0.9934292074F, 0.9934650097F, + 0.9935006696F, 0.9935361874F, 0.9935715635F, 0.9936067982F, + 0.9936418919F, 0.9936768448F, 0.9937116574F, 0.9937463300F, + 0.9937808629F, 0.9938152565F, 0.9938495111F, 0.9938836271F, + 0.9939176047F, 0.9939514444F, 0.9939851465F, 0.9940187112F, + 0.9940521391F, 0.9940854303F, 0.9941185853F, 0.9941516044F, + 0.9941844879F, 0.9942172361F, 0.9942498495F, 0.9942823283F, + 0.9943146729F, 0.9943468836F, 0.9943789608F, 0.9944109047F, + 0.9944427158F, 0.9944743944F, 0.9945059408F, 0.9945373553F, + 0.9945686384F, 0.9945997902F, 0.9946308112F, 0.9946617017F, + 0.9946924621F, 0.9947230926F, 0.9947535937F, 0.9947839656F, + 0.9948142086F, 0.9948443232F, 0.9948743097F, 0.9949041683F, + 0.9949338995F, 0.9949635035F, 0.9949929807F, 0.9950223315F, + 0.9950515561F, 0.9950806549F, 0.9951096282F, 0.9951384764F, + 0.9951671998F, 0.9951957987F, 0.9952242735F, 0.9952526245F, + 0.9952808520F, 0.9953089564F, 0.9953369380F, 0.9953647971F, + 0.9953925340F, 0.9954201491F, 0.9954476428F, 0.9954750153F, + 0.9955022670F, 0.9955293981F, 0.9955564092F, 0.9955833003F, + 0.9956100720F, 0.9956367245F, 0.9956632582F, 0.9956896733F, + 0.9957159703F, 0.9957421494F, 0.9957682110F, 0.9957941553F, + 0.9958199828F, 0.9958456937F, 0.9958712884F, 0.9958967672F, + 0.9959221305F, 0.9959473784F, 0.9959725115F, 0.9959975300F, + 0.9960224342F, 0.9960472244F, 0.9960719011F, 0.9960964644F, + 0.9961209148F, 0.9961452525F, 0.9961694779F, 0.9961935913F, + 0.9962175930F, 0.9962414834F, 0.9962652627F, 0.9962889313F, + 0.9963124895F, 0.9963359377F, 0.9963592761F, 0.9963825051F, + 0.9964056250F, 0.9964286361F, 0.9964515387F, 0.9964743332F, + 0.9964970198F, 0.9965195990F, 0.9965420709F, 0.9965644360F, + 0.9965866946F, 0.9966088469F, 0.9966308932F, 0.9966528340F, + 0.9966746695F, 0.9966964001F, 0.9967180260F, 0.9967395475F, + 0.9967609651F, 0.9967822789F, 0.9968034894F, 0.9968245968F, + 0.9968456014F, 0.9968665036F, 0.9968873037F, 0.9969080019F, + 0.9969285987F, 0.9969490942F, 0.9969694889F, 0.9969897830F, + 0.9970099769F, 0.9970300708F, 0.9970500651F, 0.9970699601F, + 0.9970897561F, 0.9971094533F, 0.9971290522F, 0.9971485531F, + 0.9971679561F, 0.9971872617F, 0.9972064702F, 0.9972255818F, + 0.9972445968F, 0.9972635157F, 0.9972823386F, 0.9973010659F, + 0.9973196980F, 0.9973382350F, 0.9973566773F, 0.9973750253F, + 0.9973932791F, 0.9974114392F, 0.9974295059F, 0.9974474793F, + 0.9974653599F, 0.9974831480F, 0.9975008438F, 0.9975184476F, + 0.9975359598F, 0.9975533806F, 0.9975707104F, 0.9975879495F, + 0.9976050981F, 0.9976221566F, 0.9976391252F, 0.9976560043F, + 0.9976727941F, 0.9976894950F, 0.9977061073F, 0.9977226312F, + 0.9977390671F, 0.9977554152F, 0.9977716759F, 0.9977878495F, + 0.9978039361F, 0.9978199363F, 0.9978358501F, 0.9978516780F, + 0.9978674202F, 0.9978830771F, 0.9978986488F, 0.9979141358F, + 0.9979295383F, 0.9979448566F, 0.9979600909F, 0.9979752417F, + 0.9979903091F, 0.9980052936F, 0.9980201952F, 0.9980350145F, + 0.9980497515F, 0.9980644067F, 0.9980789804F, 0.9980934727F, + 0.9981078841F, 0.9981222147F, 0.9981364649F, 0.9981506350F, + 0.9981647253F, 0.9981787360F, 0.9981926674F, 0.9982065199F, + 0.9982202936F, 0.9982339890F, 0.9982476062F, 0.9982611456F, + 0.9982746074F, 0.9982879920F, 0.9983012996F, 0.9983145304F, + 0.9983276849F, 0.9983407632F, 0.9983537657F, 0.9983666926F, + 0.9983795442F, 0.9983923208F, 0.9984050226F, 0.9984176501F, + 0.9984302033F, 0.9984426827F, 0.9984550884F, 0.9984674208F, + 0.9984796802F, 0.9984918667F, 0.9985039808F, 0.9985160227F, + 0.9985279926F, 0.9985398909F, 0.9985517177F, 0.9985634734F, + 0.9985751583F, 0.9985867727F, 0.9985983167F, 0.9986097907F, + 0.9986211949F, 0.9986325297F, 0.9986437953F, 0.9986549919F, + 0.9986661199F, 0.9986771795F, 0.9986881710F, 0.9986990946F, + 0.9987099507F, 0.9987207394F, 0.9987314611F, 0.9987421161F, + 0.9987527045F, 0.9987632267F, 0.9987736829F, 0.9987840734F, + 0.9987943985F, 0.9988046584F, 0.9988148534F, 0.9988249838F, + 0.9988350498F, 0.9988450516F, 0.9988549897F, 0.9988648641F, + 0.9988746753F, 0.9988844233F, 0.9988941086F, 0.9989037313F, + 0.9989132918F, 0.9989227902F, 0.9989322269F, 0.9989416021F, + 0.9989509160F, 0.9989601690F, 0.9989693613F, 0.9989784931F, + 0.9989875647F, 0.9989965763F, 0.9990055283F, 0.9990144208F, + 0.9990232541F, 0.9990320286F, 0.9990407443F, 0.9990494016F, + 0.9990580008F, 0.9990665421F, 0.9990750257F, 0.9990834519F, + 0.9990918209F, 0.9991001331F, 0.9991083886F, 0.9991165877F, + 0.9991247307F, 0.9991328177F, 0.9991408491F, 0.9991488251F, + 0.9991567460F, 0.9991646119F, 0.9991724232F, 0.9991801801F, + 0.9991878828F, 0.9991955316F, 0.9992031267F, 0.9992106684F, + 0.9992181569F, 0.9992255925F, 0.9992329753F, 0.9992403057F, + 0.9992475839F, 0.9992548101F, 0.9992619846F, 0.9992691076F, + 0.9992761793F, 0.9992832001F, 0.9992901701F, 0.9992970895F, + 0.9993039587F, 0.9993107777F, 0.9993175470F, 0.9993242667F, + 0.9993309371F, 0.9993375583F, 0.9993441307F, 0.9993506545F, + 0.9993571298F, 0.9993635570F, 0.9993699362F, 0.9993762678F, + 0.9993825519F, 0.9993887887F, 0.9993949785F, 0.9994011216F, + 0.9994072181F, 0.9994132683F, 0.9994192725F, 0.9994252307F, + 0.9994311434F, 0.9994370107F, 0.9994428327F, 0.9994486099F, + 0.9994543423F, 0.9994600303F, 0.9994656739F, 0.9994712736F, + 0.9994768294F, 0.9994823417F, 0.9994878105F, 0.9994932363F, + 0.9994986191F, 0.9995039592F, 0.9995092568F, 0.9995145122F, + 0.9995197256F, 0.9995248971F, 0.9995300270F, 0.9995351156F, + 0.9995401630F, 0.9995451695F, 0.9995501352F, 0.9995550604F, + 0.9995599454F, 0.9995647903F, 0.9995695953F, 0.9995743607F, + 0.9995790866F, 0.9995837734F, 0.9995884211F, 0.9995930300F, + 0.9995976004F, 0.9996021324F, 0.9996066263F, 0.9996110822F, + 0.9996155004F, 0.9996198810F, 0.9996242244F, 0.9996285306F, + 0.9996327999F, 0.9996370326F, 0.9996412287F, 0.9996453886F, + 0.9996495125F, 0.9996536004F, 0.9996576527F, 0.9996616696F, + 0.9996656512F, 0.9996695977F, 0.9996735094F, 0.9996773865F, + 0.9996812291F, 0.9996850374F, 0.9996888118F, 0.9996925523F, + 0.9996962591F, 0.9996999325F, 0.9997035727F, 0.9997071798F, + 0.9997107541F, 0.9997142957F, 0.9997178049F, 0.9997212818F, + 0.9997247266F, 0.9997281396F, 0.9997315209F, 0.9997348708F, + 0.9997381893F, 0.9997414767F, 0.9997447333F, 0.9997479591F, + 0.9997511544F, 0.9997543194F, 0.9997574542F, 0.9997605591F, + 0.9997636342F, 0.9997666797F, 0.9997696958F, 0.9997726828F, + 0.9997756407F, 0.9997785698F, 0.9997814703F, 0.9997843423F, + 0.9997871860F, 0.9997900016F, 0.9997927894F, 0.9997955494F, + 0.9997982818F, 0.9998009869F, 0.9998036648F, 0.9998063157F, + 0.9998089398F, 0.9998115373F, 0.9998141082F, 0.9998166529F, + 0.9998191715F, 0.9998216642F, 0.9998241311F, 0.9998265724F, + 0.9998289884F, 0.9998313790F, 0.9998337447F, 0.9998360854F, + 0.9998384015F, 0.9998406930F, 0.9998429602F, 0.9998452031F, + 0.9998474221F, 0.9998496171F, 0.9998517885F, 0.9998539364F, + 0.9998560610F, 0.9998581624F, 0.9998602407F, 0.9998622962F, + 0.9998643291F, 0.9998663394F, 0.9998683274F, 0.9998702932F, + 0.9998722370F, 0.9998741589F, 0.9998760591F, 0.9998779378F, + 0.9998797952F, 0.9998816313F, 0.9998834464F, 0.9998852406F, + 0.9998870141F, 0.9998887670F, 0.9998904995F, 0.9998922117F, + 0.9998939039F, 0.9998955761F, 0.9998972285F, 0.9998988613F, + 0.9999004746F, 0.9999020686F, 0.9999036434F, 0.9999051992F, + 0.9999067362F, 0.9999082544F, 0.9999097541F, 0.9999112354F, + 0.9999126984F, 0.9999141433F, 0.9999155703F, 0.9999169794F, + 0.9999183709F, 0.9999197449F, 0.9999211014F, 0.9999224408F, + 0.9999237631F, 0.9999250684F, 0.9999263570F, 0.9999276289F, + 0.9999288843F, 0.9999301233F, 0.9999313461F, 0.9999325529F, + 0.9999337437F, 0.9999349187F, 0.9999360780F, 0.9999372218F, + 0.9999383503F, 0.9999394635F, 0.9999405616F, 0.9999416447F, + 0.9999427129F, 0.9999437665F, 0.9999448055F, 0.9999458301F, + 0.9999468404F, 0.9999478365F, 0.9999488185F, 0.9999497867F, + 0.9999507411F, 0.9999516819F, 0.9999526091F, 0.9999535230F, + 0.9999544236F, 0.9999553111F, 0.9999561856F, 0.9999570472F, + 0.9999578960F, 0.9999587323F, 0.9999595560F, 0.9999603674F, + 0.9999611666F, 0.9999619536F, 0.9999627286F, 0.9999634917F, + 0.9999642431F, 0.9999649828F, 0.9999657110F, 0.9999664278F, + 0.9999671334F, 0.9999678278F, 0.9999685111F, 0.9999691835F, + 0.9999698451F, 0.9999704960F, 0.9999711364F, 0.9999717662F, + 0.9999723858F, 0.9999729950F, 0.9999735942F, 0.9999741834F, + 0.9999747626F, 0.9999753321F, 0.9999758919F, 0.9999764421F, + 0.9999769828F, 0.9999775143F, 0.9999780364F, 0.9999785495F, + 0.9999790535F, 0.9999795485F, 0.9999800348F, 0.9999805124F, + 0.9999809813F, 0.9999814417F, 0.9999818938F, 0.9999823375F, + 0.9999827731F, 0.9999832005F, 0.9999836200F, 0.9999840316F, + 0.9999844353F, 0.9999848314F, 0.9999852199F, 0.9999856008F, + 0.9999859744F, 0.9999863407F, 0.9999866997F, 0.9999870516F, + 0.9999873965F, 0.9999877345F, 0.9999880656F, 0.9999883900F, + 0.9999887078F, 0.9999890190F, 0.9999893237F, 0.9999896220F, + 0.9999899140F, 0.9999901999F, 0.9999904796F, 0.9999907533F, + 0.9999910211F, 0.9999912830F, 0.9999915391F, 0.9999917896F, + 0.9999920345F, 0.9999922738F, 0.9999925077F, 0.9999927363F, + 0.9999929596F, 0.9999931777F, 0.9999933907F, 0.9999935987F, + 0.9999938018F, 0.9999940000F, 0.9999941934F, 0.9999943820F, + 0.9999945661F, 0.9999947456F, 0.9999949206F, 0.9999950912F, + 0.9999952575F, 0.9999954195F, 0.9999955773F, 0.9999957311F, + 0.9999958807F, 0.9999960265F, 0.9999961683F, 0.9999963063F, + 0.9999964405F, 0.9999965710F, 0.9999966979F, 0.9999968213F, + 0.9999969412F, 0.9999970576F, 0.9999971707F, 0.9999972805F, + 0.9999973871F, 0.9999974905F, 0.9999975909F, 0.9999976881F, + 0.9999977824F, 0.9999978738F, 0.9999979624F, 0.9999980481F, + 0.9999981311F, 0.9999982115F, 0.9999982892F, 0.9999983644F, + 0.9999984370F, 0.9999985072F, 0.9999985750F, 0.9999986405F, + 0.9999987037F, 0.9999987647F, 0.9999988235F, 0.9999988802F, + 0.9999989348F, 0.9999989873F, 0.9999990379F, 0.9999990866F, + 0.9999991334F, 0.9999991784F, 0.9999992217F, 0.9999992632F, + 0.9999993030F, 0.9999993411F, 0.9999993777F, 0.9999994128F, + 0.9999994463F, 0.9999994784F, 0.9999995091F, 0.9999995384F, + 0.9999995663F, 0.9999995930F, 0.9999996184F, 0.9999996426F, + 0.9999996657F, 0.9999996876F, 0.9999997084F, 0.9999997282F, + 0.9999997469F, 0.9999997647F, 0.9999997815F, 0.9999997973F, + 0.9999998123F, 0.9999998265F, 0.9999998398F, 0.9999998524F, + 0.9999998642F, 0.9999998753F, 0.9999998857F, 0.9999998954F, + 0.9999999045F, 0.9999999130F, 0.9999999209F, 0.9999999282F, + 0.9999999351F, 0.9999999414F, 0.9999999472F, 0.9999999526F, + 0.9999999576F, 0.9999999622F, 0.9999999664F, 0.9999999702F, + 0.9999999737F, 0.9999999769F, 0.9999999798F, 0.9999999824F, + 0.9999999847F, 0.9999999868F, 0.9999999887F, 0.9999999904F, + 0.9999999919F, 0.9999999932F, 0.9999999943F, 0.9999999953F, + 0.9999999961F, 0.9999999969F, 0.9999999975F, 0.9999999980F, + 0.9999999985F, 0.9999999988F, 0.9999999991F, 0.9999999993F, + 0.9999999995F, 0.9999999997F, 0.9999999998F, 0.9999999999F, + 0.9999999999F, 1.0000000000F, 1.0000000000F, 1.0000000000F, + 1.0000000000F, 1.0000000000F, 1.0000000000F, 1.0000000000F, +}; + +static const float *const vwin[8] = { + vwin64, + vwin128, + vwin256, + vwin512, + vwin1024, + vwin2048, + vwin4096, + vwin8192, +}; + +const float *_vorbis_window_get(int n){ + return vwin[n]; +} + +void _vorbis_apply_window(float *d,int *winno,long *blocksizes, + int lW,int W,int nW){ + lW=(W?lW:0); + nW=(W?nW:0); + + { + const float *windowLW=vwin[winno[lW]]; + const float *windowNW=vwin[winno[nW]]; + + long n=blocksizes[W]; + long ln=blocksizes[lW]; + long rn=blocksizes[nW]; + + long leftbegin=n/4-ln/4; + long leftend=leftbegin+ln/2; + + long rightbegin=n/2+n/4-rn/4; + long rightend=rightbegin+rn/2; + + int i,p; + + for(i=0;i -#include "celt.h" -#include "pitch.h" -#include "bands.h" -#include "modes.h" -#include "entcode.h" -#include "quant_bands.h" -#include "rate.h" -#include "stack_alloc.h" -#include "mathops.h" -#include "float_cast.h" -#include -#include "celt_lpc.h" -#include "vq.h" - -#ifndef OPUS_VERSION -#define OPUS_VERSION "unknown" -#endif - -#ifdef CUSTOM_MODES -#define OPUS_CUSTOM_NOSTATIC -#else -#define OPUS_CUSTOM_NOSTATIC static inline -#endif - -static const unsigned char trim_icdf[11] = {126, 124, 119, 109, 87, 41, 19, 9, 4, 2, 0}; -/* Probs: NONE: 21.875%, LIGHT: 6.25%, NORMAL: 65.625%, AGGRESSIVE: 6.25% */ -static const unsigned char spread_icdf[4] = {25, 23, 2, 0}; - -static const unsigned char tapset_icdf[3]={2,1,0}; - -#ifdef CUSTOM_MODES -static const unsigned char toOpusTable[20] = { - 0xE0, 0xE8, 0xF0, 0xF8, - 0xC0, 0xC8, 0xD0, 0xD8, - 0xA0, 0xA8, 0xB0, 0xB8, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x88, 0x90, 0x98, -}; - -static const unsigned char fromOpusTable[16] = { - 0x80, 0x88, 0x90, 0x98, - 0x40, 0x48, 0x50, 0x58, - 0x20, 0x28, 0x30, 0x38, - 0x00, 0x08, 0x10, 0x18 -}; - -static inline int toOpus(unsigned char c) -{ - int ret=0; - if (c<0xA0) - ret = toOpusTable[c>>3]; - if (ret == 0) - return -1; - else - return ret|(c&0x7); -} - -static inline int fromOpus(unsigned char c) -{ - if (c<0x80) - return -1; - else - return fromOpusTable[(c>>3)-16] | (c&0x7); -} -#endif /* CUSTOM_MODES */ - -#define COMBFILTER_MAXPERIOD 1024 -#define COMBFILTER_MINPERIOD 15 - -static int resampling_factor(opus_int32 rate) -{ - int ret; - switch (rate) - { - case 48000: - ret = 1; - break; - case 24000: - ret = 2; - break; - case 16000: - ret = 3; - break; - case 12000: - ret = 4; - break; - case 8000: - ret = 6; - break; - default: -#ifndef CUSTOM_MODES - celt_assert(0); -#endif - ret = 0; - break; - } - return ret; -} - -/** Encoder state - @brief Encoder state - */ -struct OpusCustomEncoder { - const OpusCustomMode *mode; /**< Mode used by the encoder */ - int overlap; - int channels; - int stream_channels; - - int force_intra; - int clip; - int disable_pf; - int complexity; - int upsample; - int start, end; - - opus_int32 bitrate; - int vbr; - int signalling; - int constrained_vbr; /* If zero, VBR can do whatever it likes with the rate */ - int loss_rate; - int lsb_depth; - - /* Everything beyond this point gets cleared on a reset */ -#define ENCODER_RESET_START rng - - opus_uint32 rng; - int spread_decision; - opus_val32 delayedIntra; - int tonal_average; - int lastCodedBands; - int hf_average; - int tapset_decision; - - int prefilter_period; - opus_val16 prefilter_gain; - int prefilter_tapset; -#ifdef RESYNTH - int prefilter_period_old; - opus_val16 prefilter_gain_old; - int prefilter_tapset_old; -#endif - int consec_transient; - - opus_val32 preemph_memE[2]; - opus_val32 preemph_memD[2]; - - /* VBR-related parameters */ - opus_int32 vbr_reservoir; - opus_int32 vbr_drift; - opus_int32 vbr_offset; - opus_int32 vbr_count; - -#ifdef RESYNTH - celt_sig syn_mem[2][2*MAX_PERIOD]; -#endif - - celt_sig in_mem[1]; /* Size = channels*mode->overlap */ - /* celt_sig prefilter_mem[], Size = channels*COMBFILTER_MAXPERIOD */ - /* opus_val16 oldBandE[], Size = channels*mode->nbEBands */ - /* opus_val16 oldLogE[], Size = channels*mode->nbEBands */ - /* opus_val16 oldLogE2[], Size = channels*mode->nbEBands */ -#ifdef RESYNTH - /* opus_val16 overlap_mem[], Size = channels*overlap */ -#endif -}; - -int celt_encoder_get_size(int channels) -{ - CELTMode *mode = opus_custom_mode_create(48000, 960, NULL); - return opus_custom_encoder_get_size(mode, channels); -} - -OPUS_CUSTOM_NOSTATIC int opus_custom_encoder_get_size(const CELTMode *mode, int channels) -{ - int size = sizeof(struct CELTEncoder) - + (channels*mode->overlap-1)*sizeof(celt_sig) /* celt_sig in_mem[channels*mode->overlap]; */ - + channels*COMBFILTER_MAXPERIOD*sizeof(celt_sig) /* celt_sig prefilter_mem[channels*COMBFILTER_MAXPERIOD]; */ - + 3*channels*mode->nbEBands*sizeof(opus_val16); /* opus_val16 oldBandE[channels*mode->nbEBands]; */ - /* opus_val16 oldLogE[channels*mode->nbEBands]; */ - /* opus_val16 oldLogE2[channels*mode->nbEBands]; */ -#ifdef RESYNTH - size += channels*mode->overlap*sizeof(celt_sig); /* celt_sig overlap_mem[channels*mode->nbEBands]; */ -#endif - return size; -} - -#ifdef CUSTOM_MODES -CELTEncoder *opus_custom_encoder_create(const CELTMode *mode, int channels, int *error) -{ - int ret; - CELTEncoder *st = (CELTEncoder *)opus_alloc(opus_custom_encoder_get_size(mode, channels)); - /* init will handle the NULL case */ - ret = opus_custom_encoder_init(st, mode, channels); - if (ret != OPUS_OK) - { - opus_custom_encoder_destroy(st); - st = NULL; - } - if (error) - *error = ret; - return st; -} -#endif /* CUSTOM_MODES */ - -int celt_encoder_init(CELTEncoder *st, opus_int32 sampling_rate, int channels) -{ - int ret; - ret = opus_custom_encoder_init(st, opus_custom_mode_create(48000, 960, NULL), channels); - if (ret != OPUS_OK) - return ret; - st->upsample = resampling_factor(sampling_rate); - return OPUS_OK; -} - -OPUS_CUSTOM_NOSTATIC int opus_custom_encoder_init(CELTEncoder *st, const CELTMode *mode, int channels) -{ - if (channels < 0 || channels > 2) - return OPUS_BAD_ARG; - - if (st==NULL || mode==NULL) - return OPUS_ALLOC_FAIL; - - OPUS_CLEAR((char*)st, opus_custom_encoder_get_size(mode, channels)); - - st->mode = mode; - st->overlap = mode->overlap; - st->stream_channels = st->channels = channels; - - st->upsample = 1; - st->start = 0; - st->end = st->mode->effEBands; - st->signalling = 1; - - st->constrained_vbr = 1; - st->clip = 1; - - st->bitrate = OPUS_BITRATE_MAX; - st->vbr = 0; - st->force_intra = 0; - st->complexity = 5; - st->lsb_depth=24; - - opus_custom_encoder_ctl(st, OPUS_RESET_STATE); - - return OPUS_OK; -} - -#ifdef CUSTOM_MODES -void opus_custom_encoder_destroy(CELTEncoder *st) -{ - opus_free(st); -} -#endif /* CUSTOM_MODES */ - -static inline opus_val16 SIG2WORD16(celt_sig x) -{ -#ifdef FIXED_POINT - x = PSHR32(x, SIG_SHIFT); - x = MAX32(x, -32768); - x = MIN32(x, 32767); - return EXTRACT16(x); -#else - return (opus_val16)x; -#endif -} - -static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int C, - int overlap) -{ - int i; - VARDECL(opus_val16, tmp); - opus_val32 mem0=0,mem1=0; - int is_transient = 0; - int block; - int N; - VARDECL(opus_val16, bins); - SAVE_STACK; - ALLOC(tmp, len, opus_val16); - - block = overlap/2; - N=len/block; - ALLOC(bins, N, opus_val16); - if (C==1) - { - for (i=0;i=3) - is_transient=1; - conseq = 0; - for (j=i+1;j=7) - is_transient=1; - } - RESTORE_STACK; -#ifdef FUZZING - is_transient = rand()&0x1; -#endif - return is_transient; -} - -/** Apply window and compute the MDCT for all sub-frames and - all channels in a frame */ -static void compute_mdcts(const CELTMode *mode, int shortBlocks, celt_sig * OPUS_RESTRICT in, celt_sig * OPUS_RESTRICT out, int C, int LM) -{ - if (C==1 && !shortBlocks) - { - const int overlap = OVERLAP(mode); - clt_mdct_forward(&mode->mdct, in, out, mode->window, overlap, mode->maxLM-LM, 1); - } else { - const int overlap = OVERLAP(mode); - int N = mode->shortMdctSize<shortMdctSize; - B = shortBlocks; - } - c=0; do { - for (b=0;bmdct, in+c*(B*N+overlap)+b*N, &out[b+c*N*B], mode->window, overlap, shortBlocks ? mode->maxLM : mode->maxLM-LM, B); - } - } while (++cshortMdctSize<shortMdctSize; - B = shortBlocks; - } - /* Prevents problems from the imdct doing the overlap-add */ - OPUS_CLEAR(x, overlap); - - for (b=0;bmdct, &X[b+c*N2*B], x+N2*b, mode->window, overlap, shortBlocks ? mode->maxLM : mode->maxLM-LM, B); - } - - for (j=0;j>LM;j++) - L2 = MAC16_16(L2, tmp[(j<eBands[len]-m->eBands[len-1])<eBands[i+1]-m->eBands[i])<eBands[i]<eBands[i]<>LM); - best_L1 = L1; - /*printf ("%f ", L1);*/ - for (k=0;k>(LM-k), 1<<(LM-k)); - else - haar1(tmp, N>>k, 1<>LM); - - if (L1 < best_L1) - { - best_L1 = L1; - best_level = k+1; - } - } - /*printf ("%d ", isTransient ? LM-best_level : best_level);*/ - if (isTransient) - metric[i] = best_level; - else - metric[i] = -best_level; - *tf_sum += metric[i]; - } - /*printf("\n");*/ - /* NOTE: Future optimized implementations could detect extreme transients and set - tf_select = 1 but so far we have not found a reliable way of making this useful */ - tf_select = 0; - - cost0 = 0; - cost1 = isTransient ? 0 : lambda; - /* Viterbi forward pass */ - for (i=1;i=0;i--) - { - if (tf_res[i+1] == 1) - tf_res[i] = path1[i+1]; - else - tf_res[i] = path0[i+1]; - } - RESTORE_STACK; -#ifdef FUZZING - tf_select = rand()&0x1; - tf_res[0] = rand()&0x1; - for (i=1;istorage*8; - tell = ec_tell(enc); - logp = isTransient ? 2 : 4; - /* Reserve space to code the tf_select decision. */ - tf_select_rsv = LM>0 && tell+logp+1 <= budget; - budget -= tf_select_rsv; - curr = tf_changed = 0; - for (i=start;istorage*8; - tell = ec_tell(dec); - logp = isTransient ? 2 : 4; - tf_select_rsv = LM>0 && tell+logp+1<=budget; - budget -= tf_select_rsv; - tf_changed = curr = 0; - for (i=start;inbEBands;i++) - { - int N; - N=(m->eBands[i+1]-m->eBands[i])<cache.caps[m->nbEBands*(2*LM+C-1)+i]+64)*C*N>>2; - } -} - -static int alloc_trim_analysis(const CELTMode *m, const celt_norm *X, - const opus_val16 *bandLogE, int end, int LM, int C, int N0) -{ - int i; - opus_val32 diff=0; - int c; - int trim_index = 5; - if (C==2) - { - opus_val16 sum = 0; /* Q10 */ - /* Compute inter-channel correlation for low frequencies */ - for (i=0;i<8;i++) - { - int j; - opus_val32 partial = 0; - for (j=m->eBands[i]<eBands[i+1]< QCONST16(.995f,10)) - trim_index-=4; - else if (sum > QCONST16(.92f,10)) - trim_index-=3; - else if (sum > QCONST16(.85f,10)) - trim_index-=2; - else if (sum > QCONST16(.8f,10)) - trim_index-=1; - } - - /* Estimate spectral tilt */ - c=0; do { - for (i=0;inbEBands]*(opus_int32)(2+2*i-m->nbEBands); - } - } while (++c QCONST16(2.f, DB_SHIFT)) - trim_index--; - if (diff > QCONST16(8.f, DB_SHIFT)) - trim_index--; - if (diff < -QCONST16(4.f, DB_SHIFT)) - trim_index++; - if (diff < -QCONST16(10.f, DB_SHIFT)) - trim_index++; - - if (trim_index<0) - trim_index = 0; - if (trim_index>10) - trim_index = 10; -#ifdef FUZZING - trim_index = rand()%11; -#endif - return trim_index; -} - -static int stereo_analysis(const CELTMode *m, const celt_norm *X, - int LM, int N0) -{ - int i; - int thetas; - opus_val32 sumLR = EPSILON, sumMS = EPSILON; - - /* Use the L1 norm to model the entropy of the L/R signal vs the M/S signal */ - for (i=0;i<13;i++) - { - int j; - for (j=m->eBands[i]<eBands[i+1]<eBands[13]<<(LM+1))+thetas, sumMS) - > MULT16_32_Q15(m->eBands[13]<<(LM+1), sumLR); -} - -int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc) -{ - int i, c, N; - opus_int32 bits; - ec_enc _enc; - VARDECL(celt_sig, in); - VARDECL(celt_sig, freq); - VARDECL(celt_norm, X); - VARDECL(celt_ener, bandE); - VARDECL(opus_val16, bandLogE); - VARDECL(int, fine_quant); - VARDECL(opus_val16, error); - VARDECL(int, pulses); - VARDECL(int, cap); - VARDECL(int, offsets); - VARDECL(int, fine_priority); - VARDECL(int, tf_res); - VARDECL(unsigned char, collapse_masks); - celt_sig *prefilter_mem; - opus_val16 *oldBandE, *oldLogE, *oldLogE2; - int shortBlocks=0; - int isTransient=0; - const int CC = st->channels; - const int C = st->stream_channels; - int LM, M; - int tf_select; - int nbFilledBytes, nbAvailableBytes; - int effEnd; - int codedBands; - int tf_sum; - int alloc_trim; - int pitch_index=COMBFILTER_MINPERIOD; - opus_val16 gain1 = 0; - int intensity=0; - int dual_stereo=0; - int effectiveBytes; - opus_val16 pf_threshold; - int dynalloc_logp; - opus_int32 vbr_rate; - opus_int32 total_bits; - opus_int32 total_boost; - opus_int32 balance; - opus_int32 tell; - int prefilter_tapset=0; - int pf_on; - int anti_collapse_rsv; - int anti_collapse_on=0; - int silence=0; - ALLOC_STACK; - - if (nbCompressedBytes<2 || pcm==NULL) - return OPUS_BAD_ARG; - - frame_size *= st->upsample; - for (LM=0;LM<=st->mode->maxLM;LM++) - if (st->mode->shortMdctSize<st->mode->maxLM) - return OPUS_BAD_ARG; - M=1<mode->shortMdctSize; - - prefilter_mem = st->in_mem+CC*(st->overlap); - oldBandE = (opus_val16*)(st->in_mem+CC*(st->overlap+COMBFILTER_MAXPERIOD)); - oldLogE = oldBandE + CC*st->mode->nbEBands; - oldLogE2 = oldLogE + CC*st->mode->nbEBands; - - if (enc==NULL) - { - tell=1; - nbFilledBytes=0; - } else { - tell=ec_tell(enc); - nbFilledBytes=(tell+4)>>3; - } - -#ifdef CUSTOM_MODES - if (st->signalling && enc==NULL) - { - int tmp = (st->mode->effEBands-st->end)>>1; - st->end = IMAX(1, st->mode->effEBands-tmp); - compressed[0] = tmp<<5; - compressed[0] |= LM<<3; - compressed[0] |= (C==2)<<2; - /* Convert "standard mode" to Opus header */ - if (st->mode->Fs==48000 && st->mode->shortMdctSize==120) - { - int c0 = toOpus(compressed[0]); - if (c0<0) - return OPUS_BAD_ARG; - compressed[0] = c0; - } - compressed++; - nbCompressedBytes--; - } -#else - celt_assert(st->signalling==0); -#endif - - /* Can't produce more than 1275 output bytes */ - nbCompressedBytes = IMIN(nbCompressedBytes,1275); - nbAvailableBytes = nbCompressedBytes - nbFilledBytes; - - if (st->vbr && st->bitrate!=OPUS_BITRATE_MAX) - { - opus_int32 den=st->mode->Fs>>BITRES; - vbr_rate=(st->bitrate*frame_size+(den>>1))/den; -#ifdef CUSTOM_MODES - if (st->signalling) - vbr_rate -= 8<>(3+BITRES); - } else { - opus_int32 tmp; - vbr_rate = 0; - tmp = st->bitrate*frame_size; - if (tell>1) - tmp += tell; - if (st->bitrate!=OPUS_BITRATE_MAX) - nbCompressedBytes = IMAX(2, IMIN(nbCompressedBytes, - (tmp+4*st->mode->Fs)/(8*st->mode->Fs)-!!st->signalling)); - effectiveBytes = nbCompressedBytes; - } - - if (enc==NULL) - { - ec_enc_init(&_enc, compressed, nbCompressedBytes); - enc = &_enc; - } - - if (vbr_rate>0) - { - /* Computes the max bit-rate allowed in VBR mode to avoid violating the - target rate and buffering. - We must do this up front so that bust-prevention logic triggers - correctly if we don't have enough bits. */ - if (st->constrained_vbr) - { - opus_int32 vbr_bound; - opus_int32 max_allowed; - /* We could use any multiple of vbr_rate as bound (depending on the - delay). - This is clamped to ensure we use at least two bytes if the encoder - was entirely empty, but to allow 0 in hybrid mode. */ - vbr_bound = vbr_rate; - max_allowed = IMIN(IMAX(tell==1?2:0, - (vbr_rate+vbr_bound-st->vbr_reservoir)>>(BITRES+3)), - nbAvailableBytes); - if(max_allowed < nbAvailableBytes) - { - nbCompressedBytes = nbFilledBytes+max_allowed; - nbAvailableBytes = max_allowed; - ec_enc_shrink(enc, nbCompressedBytes); - } - } - } - total_bits = nbCompressedBytes*8; - - effEnd = st->end; - if (effEnd > st->mode->effEBands) - effEnd = st->mode->effEBands; - - ALLOC(in, CC*(N+st->overlap), celt_sig); - - /* Find pitch period and gain */ - { - VARDECL(celt_sig, _pre); - celt_sig *pre[2]; - SAVE_STACK; - ALLOC(_pre, CC*(N+COMBFILTER_MAXPERIOD), celt_sig); - - pre[0] = _pre; - pre[1] = _pre + (N+COMBFILTER_MAXPERIOD); - - silence = 1; - c=0; do { - int count = 0; - const opus_val16 * OPUS_RESTRICT pcmp = pcm+c; - celt_sig * OPUS_RESTRICT inp = in+c*(N+st->overlap)+st->overlap; - - for (i=0;iclip) - x = MAX32(-65536.f, MIN32(65536.f,x)); -#endif - if (++count==st->upsample) - { - count=0; - pcmp+=CC; - } else { - x = 0; - } - /* Apply pre-emphasis */ - tmp = MULT16_16(st->mode->preemph[2], x); - *inp = tmp + st->preemph_memE[c]; - st->preemph_memE[c] = MULT16_32_Q15(st->mode->preemph[1], *inp) - - MULT16_32_Q15(st->mode->preemph[0], tmp); - silence = silence && *inp == 0; - inp++; - } - OPUS_COPY(pre[c], prefilter_mem+c*COMBFILTER_MAXPERIOD, COMBFILTER_MAXPERIOD); - OPUS_COPY(pre[c]+COMBFILTER_MAXPERIOD, in+c*(N+st->overlap)+st->overlap, N); - } while (++c0) - { - effectiveBytes=nbCompressedBytes=IMIN(nbCompressedBytes, nbFilledBytes+2); - total_bits=nbCompressedBytes*8; - nbAvailableBytes=2; - ec_enc_shrink(enc, nbCompressedBytes); - } - /* Pretend we've filled all the remaining bits with zeros - (that's what the initialiser did anyway) */ - tell = nbCompressedBytes*8; - enc->nbits_total+=tell-ec_tell(enc); - } - if (nbAvailableBytes>12*C && st->start==0 && !silence && !st->disable_pf && st->complexity >= 5) - { - VARDECL(opus_val16, pitch_buf); - ALLOC(pitch_buf, (COMBFILTER_MAXPERIOD+N)>>1, opus_val16); - - pitch_downsample(pre, pitch_buf, COMBFILTER_MAXPERIOD+N, CC); - pitch_search(pitch_buf+(COMBFILTER_MAXPERIOD>>1), pitch_buf, N, - COMBFILTER_MAXPERIOD-COMBFILTER_MINPERIOD, &pitch_index); - pitch_index = COMBFILTER_MAXPERIOD-pitch_index; - - gain1 = remove_doubling(pitch_buf, COMBFILTER_MAXPERIOD, COMBFILTER_MINPERIOD, - N, &pitch_index, st->prefilter_period, st->prefilter_gain); - if (pitch_index > COMBFILTER_MAXPERIOD-2) - pitch_index = COMBFILTER_MAXPERIOD-2; - gain1 = MULT16_16_Q15(QCONST16(.7f,15),gain1); - if (st->loss_rate>2) - gain1 = HALF32(gain1); - if (st->loss_rate>4) - gain1 = HALF32(gain1); - if (st->loss_rate>8) - gain1 = 0; - prefilter_tapset = st->tapset_decision; - } else { - gain1 = 0; - } - - /* Gain threshold for enabling the prefilter/postfilter */ - pf_threshold = QCONST16(.2f,15); - - /* Adjusting the threshold based on rate and continuity */ - if (abs(pitch_index-st->prefilter_period)*10>pitch_index) - pf_threshold += QCONST16(.2f,15); - if (nbAvailableBytes<25) - pf_threshold += QCONST16(.1f,15); - if (nbAvailableBytes<35) - pf_threshold += QCONST16(.1f,15); - if (st->prefilter_gain > QCONST16(.4f,15)) - pf_threshold -= QCONST16(.1f,15); - if (st->prefilter_gain > QCONST16(.55f,15)) - pf_threshold -= QCONST16(.1f,15); - - /* Hard threshold at 0.2 */ - pf_threshold = MAX16(pf_threshold, QCONST16(.2f,15)); - if (gain1start==0 && tell+16<=total_bits) - ec_enc_bit_logp(enc, 0, 1); - gain1 = 0; - pf_on = 0; - } else { - /*This block is not gated by a total bits check only because - of the nbAvailableBytes check above.*/ - int qg; - int octave; - - if (ABS16(gain1-st->prefilter_gain)prefilter_gain; - -#ifdef FIXED_POINT - qg = ((gain1+1536)>>10)/3-1; -#else - qg = (int)floor(.5f+gain1*32/3)-1; -#endif - qg = IMAX(0, IMIN(7, qg)); - ec_enc_bit_logp(enc, 1, 1); - pitch_index += 1; - octave = EC_ILOG(pitch_index)-5; - ec_enc_uint(enc, octave, 6); - ec_enc_bits(enc, pitch_index-(16<mode->shortMdctSize-st->mode->overlap; - st->prefilter_period=IMAX(st->prefilter_period, COMBFILTER_MINPERIOD); - OPUS_COPY(in+c*(N+st->overlap), st->in_mem+c*(st->overlap), st->overlap); - if (offset) - comb_filter(in+c*(N+st->overlap)+st->overlap, pre[c]+COMBFILTER_MAXPERIOD, - st->prefilter_period, st->prefilter_period, offset, -st->prefilter_gain, -st->prefilter_gain, - st->prefilter_tapset, st->prefilter_tapset, NULL, 0); - - comb_filter(in+c*(N+st->overlap)+st->overlap+offset, pre[c]+COMBFILTER_MAXPERIOD+offset, - st->prefilter_period, pitch_index, N-offset, -st->prefilter_gain, -gain1, - st->prefilter_tapset, prefilter_tapset, st->mode->window, st->mode->overlap); - OPUS_COPY(st->in_mem+c*(st->overlap), in+c*(N+st->overlap)+N, st->overlap); - - if (N>COMBFILTER_MAXPERIOD) - { - OPUS_MOVE(prefilter_mem+c*COMBFILTER_MAXPERIOD, pre[c]+N, COMBFILTER_MAXPERIOD); - } else { - OPUS_MOVE(prefilter_mem+c*COMBFILTER_MAXPERIOD, prefilter_mem+c*COMBFILTER_MAXPERIOD+N, COMBFILTER_MAXPERIOD-N); - OPUS_MOVE(prefilter_mem+c*COMBFILTER_MAXPERIOD+COMBFILTER_MAXPERIOD-N, pre[c]+COMBFILTER_MAXPERIOD, N); - } - } while (++c0 && ec_tell(enc)+3<=total_bits) - { - if (st->complexity > 1) - { - isTransient = transient_analysis(in, N+st->overlap, CC, - st->overlap); - if (isTransient) - shortBlocks = M; - } - ec_enc_bit_logp(enc, isTransient, 3); - } - - ALLOC(freq, CC*N, celt_sig); /**< Interleaved signal MDCTs */ - ALLOC(bandE,st->mode->nbEBands*CC, celt_ener); - ALLOC(bandLogE,st->mode->nbEBands*CC, opus_val16); - /* Compute MDCTs */ - compute_mdcts(st->mode, shortBlocks, in, freq, CC, LM); - - if (CC==2&&C==1) - { - for (i=0;iupsample != 1) - { - c=0; do - { - int bound = N/st->upsample; - for (i=0;iupsample; - for (;imode, freq, bandE, effEnd, C, M); - - amp2Log2(st->mode, effEnd, st->end, bandE, bandLogE, C); - - /* Band normalisation */ - normalise_bands(st->mode, freq, X, bandE, effEnd, C, M); - - ALLOC(tf_res, st->mode->nbEBands, int); - tf_select = tf_analysis(st->mode, effEnd, C, isTransient, tf_res, effectiveBytes, X, N, LM, st->start, &tf_sum); - for (i=effEnd;iend;i++) - tf_res[i] = tf_res[effEnd-1]; - - ALLOC(error, C*st->mode->nbEBands, opus_val16); - quant_coarse_energy(st->mode, st->start, st->end, effEnd, bandLogE, - oldBandE, total_bits, error, enc, - C, LM, nbAvailableBytes, st->force_intra, - &st->delayedIntra, st->complexity >= 4, st->loss_rate); - - tf_encode(st->start, st->end, isTransient, tf_res, LM, tf_select, enc); - - if (ec_tell(enc)+4<=total_bits) - { - if (shortBlocks || st->complexity < 3 - || nbAvailableBytes < 10*C || st->start!=0) - { - if (st->complexity == 0) - st->spread_decision = SPREAD_NONE; - else - st->spread_decision = SPREAD_NORMAL; - } else { - st->spread_decision = spreading_decision(st->mode, X, - &st->tonal_average, st->spread_decision, &st->hf_average, - &st->tapset_decision, pf_on&&!shortBlocks, effEnd, C, M); - } - ec_enc_icdf(enc, st->spread_decision, spread_icdf, 5); - } - - ALLOC(cap, st->mode->nbEBands, int); - ALLOC(offsets, st->mode->nbEBands, int); - - init_caps(st->mode,cap,LM,C); - for (i=0;imode->nbEBands;i++) - offsets[i] = 0; - /* Dynamic allocation code */ - /* Make sure that dynamic allocation can't make us bust the budget */ - if (effectiveBytes > 50 && LM>=1) - { - int t1, t2; - if (LM <= 1) - { - t1 = 3; - t2 = 5; - } else { - t1 = 2; - t2 = 4; - } - for (i=st->start+1;iend-1;i++) - { - opus_val32 d2; - d2 = 2*bandLogE[i]-bandLogE[i-1]-bandLogE[i+1]; - if (C==2) - d2 = HALF32(d2 + 2*bandLogE[i+st->mode->nbEBands]- - bandLogE[i-1+st->mode->nbEBands]-bandLogE[i+1+st->mode->nbEBands]); -#ifdef FUZZING - if((rand()&0xF)==0) - { - offsets[i] += 1; - if((rand()&0x3)==0) - offsets[i] += 1+(rand()&0x3); - } -#else - if (d2 > SHL16(t1,DB_SHIFT)) - offsets[i] += 1; - if (d2 > SHL16(t2,DB_SHIFT)) - offsets[i] += 1; -#endif - } - } - dynalloc_logp = 6; - total_bits<<=BITRES; - total_boost = 0; - tell = ec_tell_frac(enc); - for (i=st->start;iend;i++) - { - int width, quanta; - int dynalloc_loop_logp; - int boost; - int j; - width = C*(st->mode->eBands[i+1]-st->mode->eBands[i])<mode, X, bandLogE, - st->end, LM, C, N); - ec_enc_icdf(enc, alloc_trim, trim_icdf, 7); - tell = ec_tell_frac(enc); - } - - /* Variable bitrate */ - if (vbr_rate>0) - { - opus_val16 alpha; - opus_int32 delta; - /* The target rate in 8th bits per frame */ - opus_int32 target; - opus_int32 min_allowed; - int lm_diff = st->mode->maxLM - LM; - - /* Don't attempt to use more than 510 kb/s, even for frames smaller than 20 ms. - The CELT allocator will just not be able to use more than that anyway. */ - nbCompressedBytes = IMIN(nbCompressedBytes,1275>>(3-LM)); - target = vbr_rate + (st->vbr_offset>>lm_diff) - ((40*C+20)<end-st->start)) - target = 7*target/4; - else if (tf_sum < -(st->end-st->start)) - target = 3*target/2; - else if (M > 1) - target-=(target+14)/28; - - /* The current offset is removed from the target and the space used - so far is added*/ - target=target+tell; - - /* In VBR mode the frame size must not be reduced so much that it would - result in the encoder running out of bits. - The margin of 2 bytes ensures that none of the bust-prevention logic - in the decoder will have triggered so far. */ - min_allowed = ((tell+total_boost+(1<<(BITRES+3))-1)>>(BITRES+3)) + 2 - nbFilledBytes; - - nbAvailableBytes = (target+(1<<(BITRES+2)))>>(BITRES+3); - nbAvailableBytes = IMAX(min_allowed,nbAvailableBytes); - nbAvailableBytes = IMIN(nbCompressedBytes,nbAvailableBytes+nbFilledBytes) - nbFilledBytes; - - /* By how much did we "miss" the target on that frame */ - delta = target - vbr_rate; - - target=nbAvailableBytes<<(BITRES+3); - - /*If the frame is silent we don't adjust our drift, otherwise - the encoder will shoot to very high rates after hitting a - span of silence, but we do allow the bitres to refill. - This means that we'll undershoot our target in CVBR/VBR modes - on files with lots of silence. */ - if(silence) - { - nbAvailableBytes = 2; - target = 2*8<vbr_count < 970) - { - st->vbr_count++; - alpha = celt_rcp(SHL32(EXTEND32(st->vbr_count+20),16)); - } else - alpha = QCONST16(.001f,15); - /* How many bits have we used in excess of what we're allowed */ - if (st->constrained_vbr) - st->vbr_reservoir += target - vbr_rate; - /*printf ("%d\n", st->vbr_reservoir);*/ - - /* Compute the offset we need to apply in order to reach the target */ - st->vbr_drift += (opus_int32)MULT16_32_Q15(alpha,(delta*(1<vbr_offset-st->vbr_drift); - st->vbr_offset = -st->vbr_drift; - /*printf ("%d\n", st->vbr_drift);*/ - - if (st->constrained_vbr && st->vbr_reservoir < 0) - { - /* We're under the min value -- increase rate */ - int adjust = (-st->vbr_reservoir)/(8<vbr_reservoir = 0; - /*printf ("+%d\n", adjust);*/ - } - nbCompressedBytes = IMIN(nbCompressedBytes,nbAvailableBytes+nbFilledBytes); - /* This moves the raw bits to take into account the new compressed size */ - ec_enc_shrink(enc, nbCompressedBytes); - } - if (C==2) - { - int effectiveRate; - - /* Always use MS for 2.5 ms frames until we can do a better analysis */ - if (LM!=0) - dual_stereo = stereo_analysis(st->mode, X, LM, N); - - /* Account for coarse energy */ - effectiveRate = (8*effectiveBytes - 80)>>LM; - - /* effectiveRate in kb/s */ - effectiveRate = 2*effectiveRate/5; - if (effectiveRate<35) - intensity = 8; - else if (effectiveRate<50) - intensity = 12; - else if (effectiveRate<68) - intensity = 16; - else if (effectiveRate<84) - intensity = 18; - else if (effectiveRate<102) - intensity = 19; - else if (effectiveRate<130) - intensity = 20; - else - intensity = 100; - intensity = IMIN(st->end,IMAX(st->start, intensity)); - } - - /* Bit allocation */ - ALLOC(fine_quant, st->mode->nbEBands, int); - ALLOC(pulses, st->mode->nbEBands, int); - ALLOC(fine_priority, st->mode->nbEBands, int); - - /* bits = packet size - where we are - safety*/ - bits = (((opus_int32)nbCompressedBytes*8)<=2&&bits>=((LM+2)<mode, st->start, st->end, offsets, cap, - alloc_trim, &intensity, &dual_stereo, bits, &balance, pulses, - fine_quant, fine_priority, C, LM, enc, 1, st->lastCodedBands); - st->lastCodedBands = codedBands; - - quant_fine_energy(st->mode, st->start, st->end, oldBandE, error, fine_quant, enc, C); - -#ifdef MEASURE_NORM_MSE - float X0[3000]; - float bandE0[60]; - c=0; do - for (i=0;imode->nbEBands;i++) - bandE0[i] = bandE[i]; -#endif - - /* Residual quantisation */ - ALLOC(collapse_masks, C*st->mode->nbEBands, unsigned char); - quant_all_bands(1, st->mode, st->start, st->end, X, C==2 ? X+N : NULL, collapse_masks, - bandE, pulses, shortBlocks, st->spread_decision, dual_stereo, intensity, tf_res, - nbCompressedBytes*(8<rng); - - if (anti_collapse_rsv > 0) - { - anti_collapse_on = st->consec_transient<2; -#ifdef FUZZING - anti_collapse_on = rand()&0x1; -#endif - ec_enc_bits(enc, anti_collapse_on, 1); - } - quant_energy_finalise(st->mode, st->start, st->end, oldBandE, error, fine_quant, fine_priority, nbCompressedBytes*8-ec_tell(enc), enc, C); - - if (silence) - { - for (i=0;imode->nbEBands;i++) - oldBandE[i] = -QCONST16(28.f,DB_SHIFT); - } - -#ifdef RESYNTH - /* Re-synthesis of the coded audio if required */ - { - celt_sig *out_mem[2]; - celt_sig *overlap_mem[2]; - - log2Amp(st->mode, st->start, st->end, bandE, oldBandE, C); - if (silence) - { - for (i=0;imode->nbEBands;i++) - bandE[i] = 0; - } - -#ifdef MEASURE_NORM_MSE - measure_norm_mse(st->mode, X, X0, bandE, bandE0, M, N, C); -#endif - if (anti_collapse_on) - { - anti_collapse(st->mode, X, collapse_masks, LM, C, N, - st->start, st->end, oldBandE, oldLogE, oldLogE2, pulses, st->rng); - } - - /* Synthesis */ - denormalise_bands(st->mode, X, freq, bandE, effEnd, C, M); - - OPUS_MOVE(st->syn_mem[0], st->syn_mem[0]+N, MAX_PERIOD); - if (CC==2) - OPUS_MOVE(st->syn_mem[1], st->syn_mem[1]+N, MAX_PERIOD); - - c=0; do - for (i=0;imode->eBands[st->start];i++) - freq[c*N+i] = 0; - while (++cmode->eBands[st->end];isyn_mem[0]+MAX_PERIOD; - if (CC==2) - out_mem[1] = st->syn_mem[1]+MAX_PERIOD; - - overlap_mem[0] = (celt_sig*)(oldLogE2 + CC*st->mode->nbEBands); - if (CC==2) - overlap_mem[1] = overlap_mem[0] + st->overlap; - - compute_inv_mdcts(st->mode, shortBlocks, freq, out_mem, overlap_mem, CC, LM); - - c=0; do { - st->prefilter_period=IMAX(st->prefilter_period, COMBFILTER_MINPERIOD); - st->prefilter_period_old=IMAX(st->prefilter_period_old, COMBFILTER_MINPERIOD); - comb_filter(out_mem[c], out_mem[c], st->prefilter_period_old, st->prefilter_period, st->mode->shortMdctSize, - st->prefilter_gain_old, st->prefilter_gain, st->prefilter_tapset_old, st->prefilter_tapset, - st->mode->window, st->overlap); - if (LM!=0) - comb_filter(out_mem[c]+st->mode->shortMdctSize, out_mem[c]+st->mode->shortMdctSize, st->prefilter_period, pitch_index, N-st->mode->shortMdctSize, - st->prefilter_gain, gain1, st->prefilter_tapset, prefilter_tapset, - st->mode->window, st->mode->overlap); - } while (++cupsample, st->mode->preemph, st->preemph_memD); - st->prefilter_period_old = st->prefilter_period; - st->prefilter_gain_old = st->prefilter_gain; - st->prefilter_tapset_old = st->prefilter_tapset; - } -#endif - - st->prefilter_period = pitch_index; - st->prefilter_gain = gain1; - st->prefilter_tapset = prefilter_tapset; -#ifdef RESYNTH - if (LM!=0) - { - st->prefilter_period_old = st->prefilter_period; - st->prefilter_gain_old = st->prefilter_gain; - st->prefilter_tapset_old = st->prefilter_tapset; - } -#endif - - if (CC==2&&C==1) { - for (i=0;imode->nbEBands;i++) - oldBandE[st->mode->nbEBands+i]=oldBandE[i]; - } - - if (!isTransient) - { - for (i=0;imode->nbEBands;i++) - oldLogE2[i] = oldLogE[i]; - for (i=0;imode->nbEBands;i++) - oldLogE[i] = oldBandE[i]; - } else { - for (i=0;imode->nbEBands;i++) - oldLogE[i] = MIN16(oldLogE[i], oldBandE[i]); - } - /* In case start or end were to change */ - c=0; do - { - for (i=0;istart;i++) - { - oldBandE[c*st->mode->nbEBands+i]=0; - oldLogE[c*st->mode->nbEBands+i]=oldLogE2[c*st->mode->nbEBands+i]=-QCONST16(28.f,DB_SHIFT); - } - for (i=st->end;imode->nbEBands;i++) - { - oldBandE[c*st->mode->nbEBands+i]=0; - oldLogE[c*st->mode->nbEBands+i]=oldLogE2[c*st->mode->nbEBands+i]=-QCONST16(28.f,DB_SHIFT); - } - } while (++cconsec_transient++; - else - st->consec_transient=0; - st->rng = enc->rng; - - /* If there's any room left (can only happen for very high rates), - it's already filled with zeros */ - ec_enc_done(enc); - -#ifdef CUSTOM_MODES - if (st->signalling) - nbCompressedBytes++; -#endif - - RESTORE_STACK; - if (ec_get_error(enc)) - return OPUS_INTERNAL_ERROR; - else - return nbCompressedBytes; -} - - -#ifdef CUSTOM_MODES - -#ifdef FIXED_POINT -int opus_custom_encode(CELTEncoder * OPUS_RESTRICT st, const opus_int16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes) -{ - return celt_encode_with_ec(st, pcm, frame_size, compressed, nbCompressedBytes, NULL); -} - -#ifndef DISABLE_FLOAT_API -int opus_custom_encode_float(CELTEncoder * OPUS_RESTRICT st, const float * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes) -{ - int j, ret, C, N; - VARDECL(opus_int16, in); - ALLOC_STACK; - - if (pcm==NULL) - return OPUS_BAD_ARG; - - C = st->channels; - N = frame_size; - ALLOC(in, C*N, opus_int16); - - for (j=0;jchannels; - N=frame_size; - ALLOC(in, C*N, celt_sig); - for (j=0;j10) - goto bad_arg; - st->complexity = value; - } - break; - case CELT_SET_START_BAND_REQUEST: - { - opus_int32 value = va_arg(ap, opus_int32); - if (value<0 || value>=st->mode->nbEBands) - goto bad_arg; - st->start = value; - } - break; - case CELT_SET_END_BAND_REQUEST: - { - opus_int32 value = va_arg(ap, opus_int32); - if (value<1 || value>st->mode->nbEBands) - goto bad_arg; - st->end = value; - } - break; - case CELT_SET_PREDICTION_REQUEST: - { - int value = va_arg(ap, opus_int32); - if (value<0 || value>2) - goto bad_arg; - st->disable_pf = value<=1; - st->force_intra = value==0; - } - break; - case OPUS_SET_PACKET_LOSS_PERC_REQUEST: - { - int value = va_arg(ap, opus_int32); - if (value<0 || value>100) - goto bad_arg; - st->loss_rate = value; - } - break; - case OPUS_SET_VBR_CONSTRAINT_REQUEST: - { - opus_int32 value = va_arg(ap, opus_int32); - st->constrained_vbr = value; - } - break; - case OPUS_SET_VBR_REQUEST: - { - opus_int32 value = va_arg(ap, opus_int32); - st->vbr = value; - } - break; - case OPUS_SET_BITRATE_REQUEST: - { - opus_int32 value = va_arg(ap, opus_int32); - if (value<=500 && value!=OPUS_BITRATE_MAX) - goto bad_arg; - value = IMIN(value, 260000*st->channels); - st->bitrate = value; - } - break; - case CELT_SET_CHANNELS_REQUEST: - { - opus_int32 value = va_arg(ap, opus_int32); - if (value<1 || value>2) - goto bad_arg; - st->stream_channels = value; - } - break; - case OPUS_SET_LSB_DEPTH_REQUEST: - { - opus_int32 value = va_arg(ap, opus_int32); - if (value<8 || value>24) - goto bad_arg; - st->lsb_depth=value; - } - break; - case OPUS_GET_LSB_DEPTH_REQUEST: - { - opus_int32 *value = va_arg(ap, opus_int32*); - *value=st->lsb_depth; - } - break; - case OPUS_RESET_STATE: - { - int i; - opus_val16 *oldBandE, *oldLogE, *oldLogE2; - oldBandE = (opus_val16*)(st->in_mem+st->channels*(st->overlap+COMBFILTER_MAXPERIOD)); - oldLogE = oldBandE + st->channels*st->mode->nbEBands; - oldLogE2 = oldLogE + st->channels*st->mode->nbEBands; - OPUS_CLEAR((char*)&st->ENCODER_RESET_START, - opus_custom_encoder_get_size(st->mode, st->channels)- - ((char*)&st->ENCODER_RESET_START - (char*)st)); - for (i=0;ichannels*st->mode->nbEBands;i++) - oldLogE[i]=oldLogE2[i]=-QCONST16(28.f,DB_SHIFT); - st->vbr_offset = 0; - st->delayedIntra = 1; - st->spread_decision = SPREAD_NORMAL; - st->tonal_average = 256; - st->hf_average = 0; - st->tapset_decision = 0; - } - break; -#ifdef CUSTOM_MODES - case CELT_SET_INPUT_CLIPPING_REQUEST: - { - opus_int32 value = va_arg(ap, opus_int32); - st->clip = value; - } - break; -#endif - case CELT_SET_SIGNALLING_REQUEST: - { - opus_int32 value = va_arg(ap, opus_int32); - st->signalling = value; - } - break; - case CELT_GET_MODE_REQUEST: - { - const CELTMode ** value = va_arg(ap, const CELTMode**); - if (value==0) - goto bad_arg; - *value=st->mode; - } - break; - case OPUS_GET_FINAL_RANGE_REQUEST: - { - opus_uint32 * value = va_arg(ap, opus_uint32 *); - if (value==0) - goto bad_arg; - *value=st->rng; - } - break; - default: - goto bad_request; - } - va_end(ap); - return OPUS_OK; -bad_arg: - va_end(ap); - return OPUS_BAD_ARG; -bad_request: - va_end(ap); - return OPUS_UNIMPLEMENTED; -} - -/**********************************************************************/ -/* */ -/* DECODER */ -/* */ -/**********************************************************************/ -#define DECODE_BUFFER_SIZE 2048 - -/** Decoder state - @brief Decoder state - */ -struct OpusCustomDecoder { - const OpusCustomMode *mode; - int overlap; - int channels; - int stream_channels; - - int downsample; - int start, end; - int signalling; - - /* Everything beyond this point gets cleared on a reset */ -#define DECODER_RESET_START rng - - opus_uint32 rng; - int error; - int last_pitch_index; - int loss_count; - int postfilter_period; - int postfilter_period_old; - opus_val16 postfilter_gain; - opus_val16 postfilter_gain_old; - int postfilter_tapset; - int postfilter_tapset_old; - - celt_sig preemph_memD[2]; - - celt_sig _decode_mem[1]; /* Size = channels*(DECODE_BUFFER_SIZE+mode->overlap) */ - /* opus_val16 lpc[], Size = channels*LPC_ORDER */ - /* opus_val16 oldEBands[], Size = 2*mode->nbEBands */ - /* opus_val16 oldLogE[], Size = 2*mode->nbEBands */ - /* opus_val16 oldLogE2[], Size = 2*mode->nbEBands */ - /* opus_val16 backgroundLogE[], Size = 2*mode->nbEBands */ -}; - -int celt_decoder_get_size(int channels) -{ - const CELTMode *mode = opus_custom_mode_create(48000, 960, NULL); - return opus_custom_decoder_get_size(mode, channels); -} - -OPUS_CUSTOM_NOSTATIC int opus_custom_decoder_get_size(const CELTMode *mode, int channels) -{ - int size = sizeof(struct CELTDecoder) - + (channels*(DECODE_BUFFER_SIZE+mode->overlap)-1)*sizeof(celt_sig) - + channels*LPC_ORDER*sizeof(opus_val16) - + 4*2*mode->nbEBands*sizeof(opus_val16); - return size; -} - -#ifdef CUSTOM_MODES -CELTDecoder *opus_custom_decoder_create(const CELTMode *mode, int channels, int *error) -{ - int ret; - CELTDecoder *st = (CELTDecoder *)opus_alloc(opus_custom_decoder_get_size(mode, channels)); - ret = opus_custom_decoder_init(st, mode, channels); - if (ret != OPUS_OK) - { - opus_custom_decoder_destroy(st); - st = NULL; - } - if (error) - *error = ret; - return st; -} -#endif /* CUSTOM_MODES */ - -int celt_decoder_init(CELTDecoder *st, opus_int32 sampling_rate, int channels) -{ - int ret; - ret = opus_custom_decoder_init(st, opus_custom_mode_create(48000, 960, NULL), channels); - if (ret != OPUS_OK) - return ret; - st->downsample = resampling_factor(sampling_rate); - if (st->downsample==0) - return OPUS_BAD_ARG; - else - return OPUS_OK; -} - -OPUS_CUSTOM_NOSTATIC int opus_custom_decoder_init(CELTDecoder *st, const CELTMode *mode, int channels) -{ - if (channels < 0 || channels > 2) - return OPUS_BAD_ARG; - - if (st==NULL) - return OPUS_ALLOC_FAIL; - - OPUS_CLEAR((char*)st, opus_custom_decoder_get_size(mode, channels)); - - st->mode = mode; - st->overlap = mode->overlap; - st->stream_channels = st->channels = channels; - - st->downsample = 1; - st->start = 0; - st->end = st->mode->effEBands; - st->signalling = 1; - - st->loss_count = 0; - - opus_custom_decoder_ctl(st, OPUS_RESET_STATE); - - return OPUS_OK; -} - -#ifdef CUSTOM_MODES -void opus_custom_decoder_destroy(CELTDecoder *st) -{ - opus_free(st); -} -#endif /* CUSTOM_MODES */ - -static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, opus_val16 * OPUS_RESTRICT pcm, int N, int LM) -{ - int c; - int pitch_index; - opus_val16 fade = Q15ONE; - int i, len; - const int C = st->channels; - int offset; - celt_sig *out_mem[2]; - celt_sig *decode_mem[2]; - celt_sig *overlap_mem[2]; - opus_val16 *lpc; - opus_val32 *out_syn[2]; - opus_val16 *oldBandE, *oldLogE, *oldLogE2, *backgroundLogE; - const OpusCustomMode *mode; - int nbEBands; - int overlap; - const opus_int16 *eBands; - SAVE_STACK; - - mode = st->mode; - nbEBands = mode->nbEBands; - overlap = mode->overlap; - eBands = mode->eBands; - - c=0; do { - decode_mem[c] = st->_decode_mem + c*(DECODE_BUFFER_SIZE+st->overlap); - out_mem[c] = decode_mem[c]+DECODE_BUFFER_SIZE-MAX_PERIOD; - overlap_mem[c] = decode_mem[c]+DECODE_BUFFER_SIZE; - } while (++c_decode_mem+(DECODE_BUFFER_SIZE+st->overlap)*C); - oldBandE = lpc+C*LPC_ORDER; - oldLogE = oldBandE + 2*nbEBands; - oldLogE2 = oldLogE + 2*nbEBands; - backgroundLogE = oldLogE2 + 2*nbEBands; - - c=0; do { - out_syn[c] = out_mem[c]+MAX_PERIOD-N; - } while (++closs_count >= 5 || st->start!=0) - { - /* Noise-based PLC/CNG */ - VARDECL(celt_sig, freq); - VARDECL(celt_norm, X); - VARDECL(celt_ener, bandE); - opus_uint32 seed; - int effEnd; - - effEnd = st->end; - if (effEnd > mode->effEBands) - effEnd = mode->effEBands; - - ALLOC(freq, C*N, celt_sig); /**< Interleaved signal MDCTs */ - ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */ - ALLOC(bandE, nbEBands*C, celt_ener); - - if (st->loss_count >= 5) - log2Amp(mode, st->start, st->end, bandE, backgroundLogE, C); - else { - /* Energy decay */ - opus_val16 decay = st->loss_count==0 ? QCONST16(1.5f, DB_SHIFT) : QCONST16(.5f, DB_SHIFT); - c=0; do - { - for (i=st->start;iend;i++) - oldBandE[c*nbEBands+i] -= decay; - } while (++cstart, st->end, bandE, oldBandE, C); - } - seed = st->rng; - for (c=0;cmode->eBands[st->start]<start;ieffEBands;i++) - { - int j; - int boffs; - int blen; - boffs = N*c+(eBands[i]<>20); - } - renormalise_vector(X+boffs, blen, Q15ONE); - } - for (i=(st->mode->eBands[st->end]<rng = seed; - - denormalise_bands(mode, X, freq, bandE, mode->effEBands, C, 1<mode->eBands[st->start]<downsample!=1) - bound = IMIN(bound, N/st->downsample); - for (i=bound;iloss_count == 0) - { - opus_val16 pitch_buf[DECODE_BUFFER_SIZE>>1]; - /* Corresponds to a min pitch of 67 Hz. It's possible to save CPU in this - search by using only part of the decode buffer */ - int poffset = 720; - pitch_downsample(decode_mem, pitch_buf, DECODE_BUFFER_SIZE, C); - /* Max pitch is 100 samples (480 Hz) */ - pitch_search(pitch_buf+((poffset)>>1), pitch_buf, DECODE_BUFFER_SIZE-poffset, - poffset-100, &pitch_index); - pitch_index = poffset-pitch_index; - st->last_pitch_index = pitch_index; - } else { - pitch_index = st->last_pitch_index; - fade = QCONST16(.8f,15); - } - - ALLOC(etmp, overlap, opus_val32); - c=0; do { - opus_val16 exc[MAX_PERIOD]; - opus_val32 ac[LPC_ORDER+1]; - opus_val16 decay; - opus_val16 attenuation; - opus_val32 S1=0; - opus_val16 mem[LPC_ORDER]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; - opus_val32 *e = out_syn[c]; - - - offset = MAX_PERIOD-pitch_index; - for (i=0;iloss_count == 0) - { - _celt_autocorr(exc, ac, mode->window, overlap, - LPC_ORDER, MAX_PERIOD); - - /* Noise floor -40 dB */ -#ifdef FIXED_POINT - ac[0] += SHR32(ac[0],13); -#else - ac[0] *= 1.0001f; -#endif - /* Lag windowing */ - for (i=1;i<=LPC_ORDER;i++) - { - /*ac[i] *= exp(-.5*(2*M_PI*.002*i)*(2*M_PI*.002*i));*/ -#ifdef FIXED_POINT - ac[i] -= MULT16_32_Q15(2*i*i, ac[i]); -#else - ac[i] -= ac[i]*(.008f*i)*(.008f*i); -#endif - } - - _celt_lpc(lpc+c*LPC_ORDER, ac, LPC_ORDER); - } - /* Samples just before the beginning of exc */ - for (i=0;i E2) - E1 = E2; - decay = celt_sqrt(frac_div32(SHR32(E1,1),E2)); - attenuation = decay; - } - - /* Move memory one frame to the left */ - OPUS_MOVE(decode_mem[c], decode_mem[c]+N, DECODE_BUFFER_SIZE-N+overlap); - - /* Extrapolate excitation with the right period, taking decay into account */ - for (i=0;i= MAX_PERIOD) - { - offset -= pitch_index; - attenuation = MULT16_16_Q15(attenuation, decay); - } - e[i] = SHL32(EXTEND32(MULT16_16_Q15(attenuation, exc[offset+i])), SIG_SHIFT); - /* Compute the energy of the previously decoded signal whose - excitation we're copying */ - tmp = ROUND16(out_mem[c][-N+offset+i],SIG_SHIFT); - S1 += SHR32(MULT16_16(tmp,tmp),8); - } - - /* Copy the last decoded samples (prior to the overlap region) to - synthesis filter memory so we can have a continuous signal. */ - for (i=0;i SHR32(S2,2))) -#else - /* Float test is written this way to catch NaNs at the same time */ - if (!(S1 > 0.2f*S2)) -#endif - { - for (i=0;iwindow[i], Q15ONE-ratio); - e[i] = MULT16_32_Q15(tmp_g, e[i]); - } - for (i=overlap;ipostfilter_period, st->postfilter_period, st->overlap, - -st->postfilter_gain, -st->postfilter_gain, st->postfilter_tapset, st->postfilter_tapset, - NULL, 0); - - /* Simulate TDAC on the concealed audio so that it blends with the - MDCT of next frames. */ - for (i=0;iwindow[i], etmp[overlap-1-i]) + - MULT16_32_Q15(mode->window[overlap-i-1], etmp[i ]); - out_mem[c][MAX_PERIOD+i] = MULT16_32_Q15(mode->window[overlap-i-1], tmp); - out_mem[c][MAX_PERIOD+overlap-i-1] = MULT16_32_Q15(mode->window[i], tmp); - } - } while (++cdownsample, mode->preemph, st->preemph_memD); - - st->loss_count++; - - RESTORE_STACK; -} - -int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, opus_val16 * OPUS_RESTRICT pcm, int frame_size, ec_dec *dec) -{ - int c, i, N; - int spread_decision; - opus_int32 bits; - ec_dec _dec; - VARDECL(celt_sig, freq); - VARDECL(celt_norm, X); - VARDECL(celt_ener, bandE); - VARDECL(int, fine_quant); - VARDECL(int, pulses); - VARDECL(int, cap); - VARDECL(int, offsets); - VARDECL(int, fine_priority); - VARDECL(int, tf_res); - VARDECL(unsigned char, collapse_masks); - celt_sig *out_mem[2]; - celt_sig *decode_mem[2]; - celt_sig *overlap_mem[2]; - celt_sig *out_syn[2]; - opus_val16 *lpc; - opus_val16 *oldBandE, *oldLogE, *oldLogE2, *backgroundLogE; - - int shortBlocks; - int isTransient; - int intra_ener; - const int CC = st->channels; - int LM, M; - int effEnd; - int codedBands; - int alloc_trim; - int postfilter_pitch; - opus_val16 postfilter_gain; - int intensity=0; - int dual_stereo=0; - opus_int32 total_bits; - opus_int32 balance; - opus_int32 tell; - int dynalloc_logp; - int postfilter_tapset; - int anti_collapse_rsv; - int anti_collapse_on=0; - int silence; - int C = st->stream_channels; - ALLOC_STACK; - - frame_size *= st->downsample; - - c=0; do { - decode_mem[c] = st->_decode_mem + c*(DECODE_BUFFER_SIZE+st->overlap); - out_mem[c] = decode_mem[c]+DECODE_BUFFER_SIZE-MAX_PERIOD; - overlap_mem[c] = decode_mem[c]+DECODE_BUFFER_SIZE; - } while (++c_decode_mem+(DECODE_BUFFER_SIZE+st->overlap)*CC); - oldBandE = lpc+CC*LPC_ORDER; - oldLogE = oldBandE + 2*st->mode->nbEBands; - oldLogE2 = oldLogE + 2*st->mode->nbEBands; - backgroundLogE = oldLogE2 + 2*st->mode->nbEBands; - -#ifdef CUSTOM_MODES - if (st->signalling && data!=NULL) - { - int data0=data[0]; - /* Convert "standard mode" to Opus header */ - if (st->mode->Fs==48000 && st->mode->shortMdctSize==120) - { - data0 = fromOpus(data0); - if (data0<0) - return OPUS_INVALID_PACKET; - } - st->end = IMAX(1, st->mode->effEBands-2*(data0>>5)); - LM = (data0>>3)&0x3; - C = 1 + ((data0>>2)&0x1); - data++; - len--; - if (LM>st->mode->maxLM) - return OPUS_INVALID_PACKET; - if (frame_size < st->mode->shortMdctSize<mode->shortMdctSize<mode->maxLM;LM++) - if (st->mode->shortMdctSize<st->mode->maxLM) - return OPUS_BAD_ARG; - } - M=1<1275 || pcm==NULL) - return OPUS_BAD_ARG; - - N = M*st->mode->shortMdctSize; - - effEnd = st->end; - if (effEnd > st->mode->effEBands) - effEnd = st->mode->effEBands; - - if (data == NULL || len<=1) - { - celt_decode_lost(st, pcm, N, LM); - RESTORE_STACK; - return frame_size/st->downsample; - } - - ALLOC(freq, IMAX(CC,C)*N, celt_sig); /**< Interleaved signal MDCTs */ - ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */ - ALLOC(bandE, st->mode->nbEBands*C, celt_ener); - c=0; do - for (i=0;imode->eBands[st->start];i++) - X[c*N+i] = 0; - while (++cmode->eBands[effEnd];imode->nbEBands;i++) - oldBandE[i]=MAX16(oldBandE[i],oldBandE[st->mode->nbEBands+i]); - } - - total_bits = len*8; - tell = ec_tell(dec); - - if (tell >= total_bits) - silence = 1; - else if (tell==1) - silence = ec_dec_bit_logp(dec, 15); - else - silence = 0; - if (silence) - { - /* Pretend we've read all the remaining bits */ - tell = len*8; - dec->nbits_total+=tell-ec_tell(dec); - } - - postfilter_gain = 0; - postfilter_pitch = 0; - postfilter_tapset = 0; - if (st->start==0 && tell+16 <= total_bits) - { - if(ec_dec_bit_logp(dec, 1)) - { - int qg, octave; - octave = ec_dec_uint(dec, 6); - postfilter_pitch = (16< 0 && tell+3 <= total_bits) - { - isTransient = ec_dec_bit_logp(dec, 3); - tell = ec_tell(dec); - } - else - isTransient = 0; - - if (isTransient) - shortBlocks = M; - else - shortBlocks = 0; - - /* Decode the global flags (first symbols in the stream) */ - intra_ener = tell+3<=total_bits ? ec_dec_bit_logp(dec, 3) : 0; - /* Get band energies */ - unquant_coarse_energy(st->mode, st->start, st->end, oldBandE, - intra_ener, dec, C, LM); - - ALLOC(tf_res, st->mode->nbEBands, int); - tf_decode(st->start, st->end, isTransient, tf_res, LM, dec); - - tell = ec_tell(dec); - spread_decision = SPREAD_NORMAL; - if (tell+4 <= total_bits) - spread_decision = ec_dec_icdf(dec, spread_icdf, 5); - - ALLOC(pulses, st->mode->nbEBands, int); - ALLOC(cap, st->mode->nbEBands, int); - ALLOC(offsets, st->mode->nbEBands, int); - ALLOC(fine_priority, st->mode->nbEBands, int); - - init_caps(st->mode,cap,LM,C); - - dynalloc_logp = 6; - total_bits<<=BITRES; - tell = ec_tell_frac(dec); - for (i=st->start;iend;i++) - { - int width, quanta; - int dynalloc_loop_logp; - int boost; - width = C*(st->mode->eBands[i+1]-st->mode->eBands[i])<0) - dynalloc_logp = IMAX(2, dynalloc_logp-1); - } - - ALLOC(fine_quant, st->mode->nbEBands, int); - alloc_trim = tell+(6<=2&&bits>=((LM+2)<mode, st->start, st->end, offsets, cap, - alloc_trim, &intensity, &dual_stereo, bits, &balance, pulses, - fine_quant, fine_priority, C, LM, dec, 0, 0); - - unquant_fine_energy(st->mode, st->start, st->end, oldBandE, fine_quant, dec, C); - - /* Decode fixed codebook */ - ALLOC(collapse_masks, C*st->mode->nbEBands, unsigned char); - quant_all_bands(0, st->mode, st->start, st->end, X, C==2 ? X+N : NULL, collapse_masks, - NULL, pulses, shortBlocks, spread_decision, dual_stereo, intensity, tf_res, - len*(8<rng); - - if (anti_collapse_rsv > 0) - { - anti_collapse_on = ec_dec_bits(dec, 1); - } - - unquant_energy_finalise(st->mode, st->start, st->end, oldBandE, - fine_quant, fine_priority, len*8-ec_tell(dec), dec, C); - - if (anti_collapse_on) - anti_collapse(st->mode, X, collapse_masks, LM, C, N, - st->start, st->end, oldBandE, oldLogE, oldLogE2, pulses, st->rng); - - log2Amp(st->mode, st->start, st->end, bandE, oldBandE, C); - - if (silence) - { - for (i=0;imode->nbEBands;i++) - { - bandE[i] = 0; - oldBandE[i] = -QCONST16(28.f,DB_SHIFT); - } - } - /* Synthesis */ - denormalise_bands(st->mode, X, freq, bandE, effEnd, C, M); - - OPUS_MOVE(decode_mem[0], decode_mem[0]+N, DECODE_BUFFER_SIZE-N); - if (CC==2) - OPUS_MOVE(decode_mem[1], decode_mem[1]+N, DECODE_BUFFER_SIZE-N); - - c=0; do - for (i=0;imode->eBands[st->start];i++) - freq[c*N+i] = 0; - while (++cmode->eBands[effEnd]; - if (st->downsample!=1) - bound = IMIN(bound, N/st->downsample); - for (i=bound;imode, shortBlocks, freq, out_syn, overlap_mem, CC, LM); - - c=0; do { - st->postfilter_period=IMAX(st->postfilter_period, COMBFILTER_MINPERIOD); - st->postfilter_period_old=IMAX(st->postfilter_period_old, COMBFILTER_MINPERIOD); - comb_filter(out_syn[c], out_syn[c], st->postfilter_period_old, st->postfilter_period, st->mode->shortMdctSize, - st->postfilter_gain_old, st->postfilter_gain, st->postfilter_tapset_old, st->postfilter_tapset, - st->mode->window, st->overlap); - if (LM!=0) - comb_filter(out_syn[c]+st->mode->shortMdctSize, out_syn[c]+st->mode->shortMdctSize, st->postfilter_period, postfilter_pitch, N-st->mode->shortMdctSize, - st->postfilter_gain, postfilter_gain, st->postfilter_tapset, postfilter_tapset, - st->mode->window, st->mode->overlap); - - } while (++cpostfilter_period_old = st->postfilter_period; - st->postfilter_gain_old = st->postfilter_gain; - st->postfilter_tapset_old = st->postfilter_tapset; - st->postfilter_period = postfilter_pitch; - st->postfilter_gain = postfilter_gain; - st->postfilter_tapset = postfilter_tapset; - if (LM!=0) - { - st->postfilter_period_old = st->postfilter_period; - st->postfilter_gain_old = st->postfilter_gain; - st->postfilter_tapset_old = st->postfilter_tapset; - } - - if (C==1) { - for (i=0;imode->nbEBands;i++) - oldBandE[st->mode->nbEBands+i]=oldBandE[i]; - } - - /* In case start or end were to change */ - if (!isTransient) - { - for (i=0;i<2*st->mode->nbEBands;i++) - oldLogE2[i] = oldLogE[i]; - for (i=0;i<2*st->mode->nbEBands;i++) - oldLogE[i] = oldBandE[i]; - for (i=0;i<2*st->mode->nbEBands;i++) - backgroundLogE[i] = MIN16(backgroundLogE[i] + M*QCONST16(0.001f,DB_SHIFT), oldBandE[i]); - } else { - for (i=0;i<2*st->mode->nbEBands;i++) - oldLogE[i] = MIN16(oldLogE[i], oldBandE[i]); - } - c=0; do - { - for (i=0;istart;i++) - { - oldBandE[c*st->mode->nbEBands+i]=0; - oldLogE[c*st->mode->nbEBands+i]=oldLogE2[c*st->mode->nbEBands+i]=-QCONST16(28.f,DB_SHIFT); - } - for (i=st->end;imode->nbEBands;i++) - { - oldBandE[c*st->mode->nbEBands+i]=0; - oldLogE[c*st->mode->nbEBands+i]=oldLogE2[c*st->mode->nbEBands+i]=-QCONST16(28.f,DB_SHIFT); - } - } while (++c<2); - st->rng = dec->rng; - - deemphasis(out_syn, pcm, N, CC, st->downsample, st->mode->preemph, st->preemph_memD); - st->loss_count = 0; - RESTORE_STACK; - if (ec_tell(dec) > 8*len) - return OPUS_INTERNAL_ERROR; - if(ec_get_error(dec)) - st->error = 1; - return frame_size/st->downsample; -} - - -#ifdef CUSTOM_MODES - -#ifdef FIXED_POINT -int opus_custom_decode(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, opus_int16 * OPUS_RESTRICT pcm, int frame_size) -{ - return celt_decode_with_ec(st, data, len, pcm, frame_size, NULL); -} - -#ifndef DISABLE_FLOAT_API -int opus_custom_decode_float(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, float * OPUS_RESTRICT pcm, int frame_size) -{ - int j, ret, C, N; - VARDECL(opus_int16, out); - ALLOC_STACK; - - if (pcm==NULL) - return OPUS_BAD_ARG; - - C = st->channels; - N = frame_size; - - ALLOC(out, C*N, opus_int16); - ret=celt_decode_with_ec(st, data, len, out, frame_size, NULL); - if (ret>0) - for (j=0;jchannels; - N = frame_size; - ALLOC(out, C*N, celt_sig); - - ret=celt_decode_with_ec(st, data, len, out, frame_size, NULL); - - if (ret>0) - for (j=0;j=st->mode->nbEBands) - goto bad_arg; - st->start = value; - } - break; - case CELT_SET_END_BAND_REQUEST: - { - opus_int32 value = va_arg(ap, opus_int32); - if (value<1 || value>st->mode->nbEBands) - goto bad_arg; - st->end = value; - } - break; - case CELT_SET_CHANNELS_REQUEST: - { - opus_int32 value = va_arg(ap, opus_int32); - if (value<1 || value>2) - goto bad_arg; - st->stream_channels = value; - } - break; - case CELT_GET_AND_CLEAR_ERROR_REQUEST: - { - opus_int32 *value = va_arg(ap, opus_int32*); - if (value==NULL) - goto bad_arg; - *value=st->error; - st->error = 0; - } - break; - case OPUS_GET_LOOKAHEAD_REQUEST: - { - opus_int32 *value = va_arg(ap, opus_int32*); - if (value==NULL) - goto bad_arg; - *value = st->overlap/st->downsample; - } - break; - case OPUS_RESET_STATE: - { - int i; - opus_val16 *lpc, *oldBandE, *oldLogE, *oldLogE2; - lpc = (opus_val16*)(st->_decode_mem+(DECODE_BUFFER_SIZE+st->overlap)*st->channels); - oldBandE = lpc+st->channels*LPC_ORDER; - oldLogE = oldBandE + 2*st->mode->nbEBands; - oldLogE2 = oldLogE + 2*st->mode->nbEBands; - OPUS_CLEAR((char*)&st->DECODER_RESET_START, - opus_custom_decoder_get_size(st->mode, st->channels)- - ((char*)&st->DECODER_RESET_START - (char*)st)); - for (i=0;i<2*st->mode->nbEBands;i++) - oldLogE[i]=oldLogE2[i]=-QCONST16(28.f,DB_SHIFT); - } - break; - case OPUS_GET_PITCH_REQUEST: - { - opus_int32 *value = va_arg(ap, opus_int32*); - if (value==NULL) - goto bad_arg; - *value = st->postfilter_period; - } - break; - case CELT_GET_MODE_REQUEST: - { - const CELTMode ** value = va_arg(ap, const CELTMode**); - if (value==0) - goto bad_arg; - *value=st->mode; - } - break; - case CELT_SET_SIGNALLING_REQUEST: - { - opus_int32 value = va_arg(ap, opus_int32); - st->signalling = value; - } - break; - case OPUS_GET_FINAL_RANGE_REQUEST: - { - opus_uint32 * value = va_arg(ap, opus_uint32 *); - if (value==0) - goto bad_arg; - *value=st->rng; - } - break; - default: - goto bad_request; - } - va_end(ap); - return OPUS_OK; -bad_arg: - va_end(ap); - return OPUS_BAD_ARG; -bad_request: - va_end(ap); - return OPUS_UNIMPLEMENTED; -} - - - -const char *opus_strerror(int error) -{ - static const char * const error_strings[8] = { - "success", - "invalid argument", - "buffer too small", - "internal error", - "corrupted stream", - "request not implemented", - "invalid state", - "memory allocation failed" - }; - if (error > 0 || error < -7) - return "unknown error"; - else - return error_strings[-error]; -} - -const char *opus_get_version_string(void) -{ - return "libopus " OPUS_VERSION -#ifdef FIXED_POINT - "-fixed" -#endif -#ifdef FUZZING - "-fuzzing" -#endif - ; -} diff --git a/code/opus-1.0.2/celt/celt_lpc.c b/code/opus-1.0.2/celt/celt_lpc.c deleted file mode 100644 index d2addbf2..00000000 --- a/code/opus-1.0.2/celt/celt_lpc.c +++ /dev/null @@ -1,188 +0,0 @@ -/* Copyright (c) 2009-2010 Xiph.Org Foundation - Written 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. -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "celt_lpc.h" -#include "stack_alloc.h" -#include "mathops.h" - -void _celt_lpc( - opus_val16 *_lpc, /* out: [0...p-1] LPC coefficients */ -const opus_val32 *ac, /* in: [0...p] autocorrelation values */ -int p -) -{ - int i, j; - opus_val32 r; - opus_val32 error = ac[0]; -#ifdef FIXED_POINT - opus_val32 lpc[LPC_ORDER]; -#else - float *lpc = _lpc; -#endif - - for (i = 0; i < p; i++) - lpc[i] = 0; - if (ac[0] != 0) - { - for (i = 0; i < p; i++) { - /* Sum up this iteration's reflection coefficient */ - opus_val32 rr = 0; - for (j = 0; j < i; j++) - rr += MULT32_32_Q31(lpc[j],ac[i - j]); - rr += SHR32(ac[i + 1],3); - r = -frac_div32(SHL32(rr,3), error); - /* Update LPC coefficients and total error */ - lpc[i] = SHR32(r,3); - for (j = 0; j < (i+1)>>1; j++) - { - opus_val32 tmp1, tmp2; - tmp1 = lpc[j]; - tmp2 = lpc[i-1-j]; - lpc[j] = tmp1 + MULT32_32_Q31(r,tmp2); - lpc[i-1-j] = tmp2 + MULT32_32_Q31(r,tmp1); - } - - error = error - MULT32_32_Q31(MULT32_32_Q31(r,r),error); - /* Bail out once we get 30 dB gain */ -#ifdef FIXED_POINT - if (error=1;j--) - { - mem[j]=mem[j-1]; - } - mem[0] = x[i]; - y[i] = ROUND16(sum, SIG_SHIFT); - } -} - -void celt_iir(const opus_val32 *x, - const opus_val16 *den, - opus_val32 *y, - int N, - int ord, - opus_val16 *mem) -{ - int i,j; - for (i=0;i=1;j--) - { - mem[j]=mem[j-1]; - } - mem[0] = ROUND16(sum,SIG_SHIFT); - y[i] = sum; - } -} - -void _celt_autocorr( - const opus_val16 *x, /* in: [0...n-1] samples x */ - opus_val32 *ac, /* out: [0...lag-1] ac values */ - const opus_val16 *window, - int overlap, - int lag, - int n - ) -{ - opus_val32 d; - int i; - VARDECL(opus_val16, xx); - SAVE_STACK; - ALLOC(xx, n, opus_val16); - celt_assert(n>0); - celt_assert(overlap>=0); - for (i=0;i=0) - { - for (i = lag, d = 0; i < n; i++) - d += xx[i] * xx[i-lag]; - ac[lag] = d; - /*printf ("%f ", ac[lag]);*/ - lag--; - } - /*printf ("\n");*/ - ac[0] += 10; - - RESTORE_STACK; -} diff --git a/code/opus-1.0.2/celt/cwrs.c b/code/opus-1.0.2/celt/cwrs.c deleted file mode 100644 index 8edc919d..00000000 --- a/code/opus-1.0.2/celt/cwrs.c +++ /dev/null @@ -1,645 +0,0 @@ -/* Copyright (c) 2007-2008 CSIRO - Copyright (c) 2007-2009 Xiph.Org Foundation - Copyright (c) 2007-2009 Timothy B. Terriberry - Written by Timothy B. Terriberry and 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. -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "os_support.h" -#include "cwrs.h" -#include "mathops.h" -#include "arch.h" - -#ifdef CUSTOM_MODES - -/*Guaranteed to return a conservatively large estimate of the binary logarithm - with frac bits of fractional precision. - Tested for all possible 32-bit inputs with frac=4, where the maximum - overestimation is 0.06254243 bits.*/ -int log2_frac(opus_uint32 val, int frac) -{ - int l; - l=EC_ILOG(val); - if(val&(val-1)){ - /*This is (val>>l-16), but guaranteed to round up, even if adding a bias - before the shift would cause overflow (e.g., for 0xFFFFxxxx). - Doesn't work for val=0, but that case fails the test above.*/ - if(l>16)val=((val-1)>>(l-16))+1; - else val<<=16-l; - l=(l-1)<>16); - l+=b<>b; - val=(val*val+0x7FFF)>>15; - } - while(frac-->0); - /*If val is not exactly 0x8000, then we have to round up the remainder.*/ - return l+(val>0x8000); - } - /*Exact powers of two require no rounding.*/ - else return (l-1)<0); - celt_assert(_d<=54); - shift=EC_ILOG(_d^(_d-1)); - inv=INV_TABLE[(_d-1)>>shift]; - shift--; - one=1<>shift)-(_c>>shift)+ - ((_a*(_b&mask)+one-(_c&mask))>>shift)-1)*inv&MASK32; -} - -#endif /* SMALL_FOOTPRINT */ - -/*Although derived separately, the pulse vector coding scheme is equivalent to - a Pyramid Vector Quantizer \cite{Fis86}. - Some additional notes about an early version appear at - http://people.xiph.org/~tterribe/notes/cwrs.html, but the codebook ordering - and the definitions of some terms have evolved since that was written. - - The conversion from a pulse vector to an integer index (encoding) and back - (decoding) is governed by two related functions, V(N,K) and U(N,K). - - V(N,K) = the number of combinations, with replacement, of N items, taken K - at a time, when a sign bit is added to each item taken at least once (i.e., - the number of N-dimensional unit pulse vectors with K pulses). - One way to compute this is via - V(N,K) = K>0 ? sum(k=1...K,2**k*choose(N,k)*choose(K-1,k-1)) : 1, - where choose() is the binomial function. - A table of values for N<10 and K<10 looks like: - V[10][10] = { - {1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {1, 2, 2, 2, 2, 2, 2, 2, 2, 2}, - {1, 4, 8, 12, 16, 20, 24, 28, 32, 36}, - {1, 6, 18, 38, 66, 102, 146, 198, 258, 326}, - {1, 8, 32, 88, 192, 360, 608, 952, 1408, 1992}, - {1, 10, 50, 170, 450, 1002, 1970, 3530, 5890, 9290}, - {1, 12, 72, 292, 912, 2364, 5336, 10836, 20256, 35436}, - {1, 14, 98, 462, 1666, 4942, 12642, 28814, 59906, 115598}, - {1, 16, 128, 688, 2816, 9424, 27008, 68464, 157184, 332688}, - {1, 18, 162, 978, 4482, 16722, 53154, 148626, 374274, 864146} - }; - - U(N,K) = the number of such combinations wherein N-1 objects are taken at - most K-1 at a time. - This is given by - U(N,K) = sum(k=0...K-1,V(N-1,k)) - = K>0 ? (V(N-1,K-1) + V(N,K-1))/2 : 0. - The latter expression also makes clear that U(N,K) is half the number of such - combinations wherein the first object is taken at least once. - Although it may not be clear from either of these definitions, U(N,K) is the - natural function to work with when enumerating the pulse vector codebooks, - not V(N,K). - U(N,K) is not well-defined for N=0, but with the extension - U(0,K) = K>0 ? 0 : 1, - the function becomes symmetric: U(N,K) = U(K,N), with a similar table: - U[10][10] = { - {1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 1, 1, 1, 1, 1, 1, 1, 1, 1}, - {0, 1, 3, 5, 7, 9, 11, 13, 15, 17}, - {0, 1, 5, 13, 25, 41, 61, 85, 113, 145}, - {0, 1, 7, 25, 63, 129, 231, 377, 575, 833}, - {0, 1, 9, 41, 129, 321, 681, 1289, 2241, 3649}, - {0, 1, 11, 61, 231, 681, 1683, 3653, 7183, 13073}, - {0, 1, 13, 85, 377, 1289, 3653, 8989, 19825, 40081}, - {0, 1, 15, 113, 575, 2241, 7183, 19825, 48639, 108545}, - {0, 1, 17, 145, 833, 3649, 13073, 40081, 108545, 265729} - }; - - With this extension, V(N,K) may be written in terms of U(N,K): - V(N,K) = U(N,K) + U(N,K+1) - for all N>=0, K>=0. - Thus U(N,K+1) represents the number of combinations where the first element - is positive or zero, and U(N,K) represents the number of combinations where - it is negative. - With a large enough table of U(N,K) values, we could write O(N) encoding - and O(min(N*log(K),N+K)) decoding routines, but such a table would be - prohibitively large for small embedded devices (K may be as large as 32767 - for small N, and N may be as large as 200). - - Both functions obey the same recurrence relation: - V(N,K) = V(N-1,K) + V(N,K-1) + V(N-1,K-1), - U(N,K) = U(N-1,K) + U(N,K-1) + U(N-1,K-1), - for all N>0, K>0, with different initial conditions at N=0 or K=0. - This allows us to construct a row of one of the tables above given the - previous row or the next row. - Thus we can derive O(NK) encoding and decoding routines with O(K) memory - using only addition and subtraction. - - When encoding, we build up from the U(2,K) row and work our way forwards. - When decoding, we need to start at the U(N,K) row and work our way backwards, - which requires a means of computing U(N,K). - U(N,K) may be computed from two previous values with the same N: - U(N,K) = ((2*N-1)*U(N,K-1) - U(N,K-2))/(K-1) + U(N,K-2) - for all N>1, and since U(N,K) is symmetric, a similar relation holds for two - previous values with the same K: - U(N,K>1) = ((2*K-1)*U(N-1,K) - U(N-2,K))/(N-1) + U(N-2,K) - for all K>1. - This allows us to construct an arbitrary row of the U(N,K) table by starting - with the first two values, which are constants. - This saves roughly 2/3 the work in our O(NK) decoding routine, but costs O(K) - multiplications. - Similar relations can be derived for V(N,K), but are not used here. - - For N>0 and K>0, U(N,K) and V(N,K) take on the form of an (N-1)-degree - polynomial for fixed N. - The first few are - U(1,K) = 1, - U(2,K) = 2*K-1, - U(3,K) = (2*K-2)*K+1, - U(4,K) = (((4*K-6)*K+8)*K-3)/3, - U(5,K) = ((((2*K-4)*K+10)*K-8)*K+3)/3, - and - V(1,K) = 2, - V(2,K) = 4*K, - V(3,K) = 4*K*K+2, - V(4,K) = 8*(K*K+2)*K/3, - V(5,K) = ((4*K*K+20)*K*K+6)/3, - for all K>0. - This allows us to derive O(N) encoding and O(N*log(K)) decoding routines for - small N (and indeed decoding is also O(N) for N<3). - - @ARTICLE{Fis86, - author="Thomas R. Fischer", - title="A Pyramid Vector Quantizer", - journal="IEEE Transactions on Information Theory", - volume="IT-32", - number=4, - pages="568--583", - month=Jul, - year=1986 - }*/ - -#ifndef SMALL_FOOTPRINT -/*Compute U(2,_k). - Note that this may be called with _k=32768 (maxK[2]+1).*/ -static inline unsigned ucwrs2(unsigned _k){ - celt_assert(_k>0); - return _k+(_k-1); -} - -/*Compute V(2,_k).*/ -static inline opus_uint32 ncwrs2(int _k){ - celt_assert(_k>0); - return 4*(opus_uint32)_k; -} - -/*Compute U(3,_k). - Note that this may be called with _k=32768 (maxK[3]+1).*/ -static inline opus_uint32 ucwrs3(unsigned _k){ - celt_assert(_k>0); - return (2*(opus_uint32)_k-2)*_k+1; -} - -/*Compute V(3,_k).*/ -static inline opus_uint32 ncwrs3(int _k){ - celt_assert(_k>0); - return 2*(2*(unsigned)_k*(opus_uint32)_k+1); -} - -/*Compute U(4,_k).*/ -static inline opus_uint32 ucwrs4(int _k){ - celt_assert(_k>0); - return imusdiv32odd(2*_k,(2*_k-3)*(opus_uint32)_k+4,3,1); -} - -/*Compute V(4,_k).*/ -static inline opus_uint32 ncwrs4(int _k){ - celt_assert(_k>0); - return ((_k*(opus_uint32)_k+2)*_k)/3<<3; -} - -#endif /* SMALL_FOOTPRINT */ - -/*Computes the next row/column of any recurrence that obeys the relation - u[i][j]=u[i-1][j]+u[i][j-1]+u[i-1][j-1]. - _ui0 is the base case for the new row/column.*/ -static inline void unext(opus_uint32 *_ui,unsigned _len,opus_uint32 _ui0){ - opus_uint32 ui1; - unsigned j; - /*This do-while will overrun the array if we don't have storage for at least - 2 values.*/ - j=1; do { - ui1=UADD32(UADD32(_ui[j],_ui[j-1]),_ui0); - _ui[j-1]=_ui0; - _ui0=ui1; - } while (++j<_len); - _ui[j-1]=_ui0; -} - -/*Computes the previous row/column of any recurrence that obeys the relation - u[i-1][j]=u[i][j]-u[i][j-1]-u[i-1][j-1]. - _ui0 is the base case for the new row/column.*/ -static inline void uprev(opus_uint32 *_ui,unsigned _n,opus_uint32 _ui0){ - opus_uint32 ui1; - unsigned j; - /*This do-while will overrun the array if we don't have storage for at least - 2 values.*/ - j=1; do { - ui1=USUB32(USUB32(_ui[j],_ui[j-1]),_ui0); - _ui[j-1]=_ui0; - _ui0=ui1; - } while (++j<_n); - _ui[j-1]=_ui0; -} - -/*Compute V(_n,_k), as well as U(_n,0..._k+1). - _u: On exit, _u[i] contains U(_n,i) for i in [0..._k+1].*/ -static opus_uint32 ncwrs_urow(unsigned _n,unsigned _k,opus_uint32 *_u){ - opus_uint32 um2; - unsigned len; - unsigned k; - len=_k+2; - /*We require storage at least 3 values (e.g., _k>0).*/ - celt_assert(len>=3); - _u[0]=0; - _u[1]=um2=1; -#ifndef SMALL_FOOTPRINT - /*_k>52 doesn't work in the false branch due to the limits of INV_TABLE, - but _k isn't tested here because k<=52 for n=7*/ - if(_n<=6) -#endif - { - /*If _n==0, _u[0] should be 1 and the rest should be 0.*/ - /*If _n==1, _u[i] should be 1 for i>1.*/ - celt_assert(_n>=2); - /*If _k==0, the following do-while loop will overflow the buffer.*/ - celt_assert(_k>0); - k=2; - do _u[k]=(k<<1)-1; - while(++k=len)break; - _u[k]=um1=imusdiv32odd(n2m1,um2,um1,(k-1)>>1)+um1; - } - } -#endif /* SMALL_FOOTPRINT */ - return _u[_k]+_u[_k+1]; -} - -#ifndef SMALL_FOOTPRINT - -/*Returns the _i'th combination of _k elements (at most 32767) chosen from a - set of size 1 with associated sign bits. - _y: Returns the vector of pulses.*/ -static inline void cwrsi1(int _k,opus_uint32 _i,int *_y){ - int s; - s=-(int)_i; - _y[0]=(_k+s)^s; -} - -/*Returns the _i'th combination of _k elements (at most 32767) chosen from a - set of size 2 with associated sign bits. - _y: Returns the vector of pulses.*/ -static inline void cwrsi2(int _k,opus_uint32 _i,int *_y){ - opus_uint32 p; - int s; - int yj; - p=ucwrs2(_k+1U); - s=-(_i>=p); - _i-=p&s; - yj=_k; - _k=(_i+1)>>1; - p=_k?ucwrs2(_k):0; - _i-=p; - yj-=_k; - _y[0]=(yj+s)^s; - cwrsi1(_k,_i,_y+1); -} - -/*Returns the _i'th combination of _k elements (at most 32767) chosen from a - set of size 3 with associated sign bits. - _y: Returns the vector of pulses.*/ -static void cwrsi3(int _k,opus_uint32 _i,int *_y){ - opus_uint32 p; - int s; - int yj; - p=ucwrs3(_k+1U); - s=-(_i>=p); - _i-=p&s; - yj=_k; - /*Finds the maximum _k such that ucwrs3(_k)<=_i (tested for all - _i<2147418113=U(3,32768)).*/ - _k=_i>0?(isqrt32(2*_i-1)+1)>>1:0; - p=_k?ucwrs3(_k):0; - _i-=p; - yj-=_k; - _y[0]=(yj+s)^s; - cwrsi2(_k,_i,_y+1); -} - -/*Returns the _i'th combination of _k elements (at most 1172) chosen from a set - of size 4 with associated sign bits. - _y: Returns the vector of pulses.*/ -static void cwrsi4(int _k,opus_uint32 _i,int *_y){ - opus_uint32 p; - int s; - int yj; - int kl; - int kr; - p=ucwrs4(_k+1); - s=-(_i>=p); - _i-=p&s; - yj=_k; - /*We could solve a cubic for k here, but the form of the direct solution does - not lend itself well to exact integer arithmetic. - Instead we do a binary search on U(4,K).*/ - kl=0; - kr=_k; - for(;;){ - _k=(kl+kr)>>1; - p=_k?ucwrs4(_k):0; - if(p<_i){ - if(_k>=kr)break; - kl=_k+1; - } - else if(p>_i)kr=_k-1; - else break; - } - _i-=p; - yj-=_k; - _y[0]=(yj+s)^s; - cwrsi3(_k,_i,_y+1); -} - -#endif /* SMALL_FOOTPRINT */ - -/*Returns the _i'th combination of _k elements chosen from a set of size _n - with associated sign bits. - _y: Returns the vector of pulses. - _u: Must contain entries [0..._k+1] of row _n of U() on input. - Its contents will be destructively modified.*/ -static void cwrsi(int _n,int _k,opus_uint32 _i,int *_y,opus_uint32 *_u){ - int j; - celt_assert(_n>0); - j=0; - do{ - opus_uint32 p; - int s; - int yj; - p=_u[_k+1]; - s=-(_i>=p); - _i-=p&s; - yj=_k; - p=_u[_k]; - while(p>_i)p=_u[--_k]; - _i-=p; - yj-=_k; - _y[j]=(yj+s)^s; - uprev(_u,_k+2,0); - } - while(++j<_n); -} - -/*Returns the index of the given combination of K elements chosen from a set - of size 1 with associated sign bits. - _y: The vector of pulses, whose sum of absolute values is K. - _k: Returns K.*/ -static inline opus_uint32 icwrs1(const int *_y,int *_k){ - *_k=abs(_y[0]); - return _y[0]<0; -} - -#ifndef SMALL_FOOTPRINT - -/*Returns the index of the given combination of K elements chosen from a set - of size 2 with associated sign bits. - _y: The vector of pulses, whose sum of absolute values is K. - _k: Returns K.*/ -static inline opus_uint32 icwrs2(const int *_y,int *_k){ - opus_uint32 i; - int k; - i=icwrs1(_y+1,&k); - i+=k?ucwrs2(k):0; - k+=abs(_y[0]); - if(_y[0]<0)i+=ucwrs2(k+1U); - *_k=k; - return i; -} - -/*Returns the index of the given combination of K elements chosen from a set - of size 3 with associated sign bits. - _y: The vector of pulses, whose sum of absolute values is K. - _k: Returns K.*/ -static inline opus_uint32 icwrs3(const int *_y,int *_k){ - opus_uint32 i; - int k; - i=icwrs2(_y+1,&k); - i+=k?ucwrs3(k):0; - k+=abs(_y[0]); - if(_y[0]<0)i+=ucwrs3(k+1U); - *_k=k; - return i; -} - -/*Returns the index of the given combination of K elements chosen from a set - of size 4 with associated sign bits. - _y: The vector of pulses, whose sum of absolute values is K. - _k: Returns K.*/ -static inline opus_uint32 icwrs4(const int *_y,int *_k){ - opus_uint32 i; - int k; - i=icwrs3(_y+1,&k); - i+=k?ucwrs4(k):0; - k+=abs(_y[0]); - if(_y[0]<0)i+=ucwrs4(k+1); - *_k=k; - return i; -} - -#endif /* SMALL_FOOTPRINT */ - -/*Returns the index of the given combination of K elements chosen from a set - of size _n with associated sign bits. - _y: The vector of pulses, whose sum of absolute values must be _k. - _nc: Returns V(_n,_k).*/ -static inline opus_uint32 icwrs(int _n,int _k,opus_uint32 *_nc,const int *_y, - opus_uint32 *_u){ - opus_uint32 i; - int j; - int k; - /*We can't unroll the first two iterations of the loop unless _n>=2.*/ - celt_assert(_n>=2); - _u[0]=0; - for(k=1;k<=_k+1;k++)_u[k]=(k<<1)-1; - i=icwrs1(_y+_n-1,&k); - j=_n-2; - i+=_u[k]; - k+=abs(_y[j]); - if(_y[j]<0)i+=_u[k+1]; - while(j-->0){ - unext(_u,_k+2,0); - i+=_u[k]; - k+=abs(_y[j]); - if(_y[j]<0)i+=_u[k+1]; - } - *_nc=_u[k]+_u[k+1]; - return i; -} - -#ifdef CUSTOM_MODES -void get_required_bits(opus_int16 *_bits,int _n,int _maxk,int _frac){ - int k; - /*_maxk==0 => there's nothing to do.*/ - celt_assert(_maxk>0); - _bits[0]=0; - if (_n==1) - { - for (k=1;k<=_maxk;k++) - _bits[k] = 1<<_frac; - } - else { - VARDECL(opus_uint32,u); - SAVE_STACK; - ALLOC(u,_maxk+2U,opus_uint32); - ncwrs_urow(_n,_maxk,u); - for(k=1;k<=_maxk;k++) - _bits[k]=log2_frac(u[k]+u[k+1],_frac); - RESTORE_STACK; - } -} -#endif /* CUSTOM_MODES */ - -void encode_pulses(const int *_y,int _n,int _k,ec_enc *_enc){ - opus_uint32 i; - celt_assert(_k>0); -#ifndef SMALL_FOOTPRINT - switch(_n){ - case 2:{ - i=icwrs2(_y,&_k); - ec_enc_uint(_enc,i,ncwrs2(_k)); - }break; - case 3:{ - i=icwrs3(_y,&_k); - ec_enc_uint(_enc,i,ncwrs3(_k)); - }break; - case 4:{ - i=icwrs4(_y,&_k); - ec_enc_uint(_enc,i,ncwrs4(_k)); - }break; - default: - { -#endif - VARDECL(opus_uint32,u); - opus_uint32 nc; - SAVE_STACK; - ALLOC(u,_k+2U,opus_uint32); - i=icwrs(_n,_k,&nc,_y,u); - ec_enc_uint(_enc,i,nc); - RESTORE_STACK; -#ifndef SMALL_FOOTPRINT - } - break; - } -#endif -} - -void decode_pulses(int *_y,int _n,int _k,ec_dec *_dec) -{ - celt_assert(_k>0); -#ifndef SMALL_FOOTPRINT - switch(_n){ - case 2:cwrsi2(_k,ec_dec_uint(_dec,ncwrs2(_k)),_y);break; - case 3:cwrsi3(_k,ec_dec_uint(_dec,ncwrs3(_k)),_y);break; - case 4:cwrsi4(_k,ec_dec_uint(_dec,ncwrs4(_k)),_y);break; - default: - { -#endif - VARDECL(opus_uint32,u); - SAVE_STACK; - ALLOC(u,_k+2U,opus_uint32); - cwrsi(_n,_k,ec_dec_uint(_dec,ncwrs_urow(_n,_k,u)),_y,u); - RESTORE_STACK; -#ifndef SMALL_FOOTPRINT - } - break; - } -#endif -} diff --git a/code/opus-1.0.2/src/opus_multistream.c b/code/opus-1.0.2/src/opus_multistream.c deleted file mode 100644 index a7f25a52..00000000 --- a/code/opus-1.0.2/src/opus_multistream.c +++ /dev/null @@ -1,1027 +0,0 @@ -/* Copyright (c) 2011 Xiph.Org Foundation - Written 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. -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "opus_multistream.h" -#include "opus.h" -#include "opus_private.h" -#include "stack_alloc.h" -#include -#include "float_cast.h" -#include "os_support.h" - -typedef struct ChannelLayout { - int nb_channels; - int nb_streams; - int nb_coupled_streams; - unsigned char mapping[256]; -} ChannelLayout; - -struct OpusMSEncoder { - ChannelLayout layout; - int bitrate; - /* Encoder states go here */ -}; - -struct OpusMSDecoder { - ChannelLayout layout; - /* Decoder states go here */ -}; - -#ifdef FIXED_POINT -#define opus_encode_native opus_encode -#else -#define opus_encode_native opus_encode_float -#endif - -static int validate_layout(const ChannelLayout *layout) -{ - int i, max_channel; - - max_channel = layout->nb_streams+layout->nb_coupled_streams; - if (max_channel>255) - return 0; - for (i=0;inb_channels;i++) - { - if (layout->mapping[i] >= max_channel && layout->mapping[i] != 255) - return 0; - } - return 1; -} - - -static int get_left_channel(const ChannelLayout *layout, int stream_id, int prev) -{ - int i; - i = (prev<0) ? 0 : prev+1; - for (;inb_channels;i++) - { - if (layout->mapping[i]==stream_id*2) - return i; - } - return -1; -} - -static int get_right_channel(const ChannelLayout *layout, int stream_id, int prev) -{ - int i; - i = (prev<0) ? 0 : prev+1; - for (;inb_channels;i++) - { - if (layout->mapping[i]==stream_id*2+1) - return i; - } - return -1; -} - -static int get_mono_channel(const ChannelLayout *layout, int stream_id, int prev) -{ - int i; - i = (prev<0) ? 0 : prev+1; - for (;inb_channels;i++) - { - if (layout->mapping[i]==stream_id+layout->nb_coupled_streams) - return i; - } - return -1; -} - -static int validate_encoder_layout(const ChannelLayout *layout) -{ - int s; - for (s=0;snb_streams;s++) - { - if (s < layout->nb_coupled_streams) - { - if (get_left_channel(layout, s, -1)==-1) - return 0; - if (get_right_channel(layout, s, -1)==-1) - return 0; - } else { - if (get_mono_channel(layout, s, -1)==-1) - return 0; - } - } - return 1; -} - -opus_int32 opus_multistream_encoder_get_size(int nb_streams, int nb_coupled_streams) -{ - int coupled_size; - int mono_size; - - if(nb_streams<1||nb_coupled_streams>nb_streams||nb_coupled_streams<0)return 0; - coupled_size = opus_encoder_get_size(2); - mono_size = opus_encoder_get_size(1); - return align(sizeof(OpusMSEncoder)) - + nb_coupled_streams * align(coupled_size) - + (nb_streams-nb_coupled_streams) * align(mono_size); -} - - - -int opus_multistream_encoder_init( - OpusMSEncoder *st, - opus_int32 Fs, - int channels, - int streams, - int coupled_streams, - const unsigned char *mapping, - int application -) -{ - int coupled_size; - int mono_size; - int i, ret; - char *ptr; - - if ((channels>255) || (channels<1) || (coupled_streams>streams) || - (coupled_streams+streams>255) || (streams<1) || (coupled_streams<0)) - return OPUS_BAD_ARG; - - st->layout.nb_channels = channels; - st->layout.nb_streams = streams; - st->layout.nb_coupled_streams = coupled_streams; - - for (i=0;ilayout.nb_channels;i++) - st->layout.mapping[i] = mapping[i]; - if (!validate_layout(&st->layout) || !validate_encoder_layout(&st->layout)) - return OPUS_BAD_ARG; - ptr = (char*)st + align(sizeof(OpusMSEncoder)); - coupled_size = opus_encoder_get_size(2); - mono_size = opus_encoder_get_size(1); - - for (i=0;ilayout.nb_coupled_streams;i++) - { - ret = opus_encoder_init((OpusEncoder*)ptr, Fs, 2, application); - if(ret!=OPUS_OK)return ret; - ptr += align(coupled_size); - } - for (;ilayout.nb_streams;i++) - { - ret = opus_encoder_init((OpusEncoder*)ptr, Fs, 1, application); - if(ret!=OPUS_OK)return ret; - ptr += align(mono_size); - } - return OPUS_OK; -} - -OpusMSEncoder *opus_multistream_encoder_create( - opus_int32 Fs, - int channels, - int streams, - int coupled_streams, - const unsigned char *mapping, - int application, - int *error -) -{ - int ret; - OpusMSEncoder *st; - if ((channels>255) || (channels<1) || (coupled_streams>streams) || - (coupled_streams+streams>255) || (streams<1) || (coupled_streams<0)) - { - if (error) - *error = OPUS_BAD_ARG; - return NULL; - } - st = (OpusMSEncoder *)opus_alloc(opus_multistream_encoder_get_size(streams, coupled_streams)); - if (st==NULL) - { - if (error) - *error = OPUS_ALLOC_FAIL; - return NULL; - } - ret = opus_multistream_encoder_init(st, Fs, channels, streams, coupled_streams, mapping, application); - if (ret != OPUS_OK) - { - opus_free(st); - st = NULL; - } - if (error) - *error = ret; - return st; -} - -typedef void (*opus_copy_channel_in_func)( - opus_val16 *dst, - int dst_stride, - const void *src, - int src_stride, - int src_channel, - int frame_size -); - -/* Max size in case the encoder decides to return three frames */ -#define MS_FRAME_TMP (3*1275+7) -static int opus_multistream_encode_native -( - OpusMSEncoder *st, - opus_copy_channel_in_func copy_channel_in, - const void *pcm, - int frame_size, - unsigned char *data, - opus_int32 max_data_bytes -) -{ - opus_int32 Fs; - int coupled_size; - int mono_size; - int s; - char *ptr; - int tot_size; - VARDECL(opus_val16, buf); - unsigned char tmp_data[MS_FRAME_TMP]; - OpusRepacketizer rp; - ALLOC_STACK; - - ptr = (char*)st + align(sizeof(OpusMSEncoder)); - opus_encoder_ctl((OpusEncoder*)ptr, OPUS_GET_SAMPLE_RATE(&Fs)); - /* Validate frame_size before using it to allocate stack space. - This mirrors the checks in opus_encode[_float](). */ - if (400*frame_size != Fs && 200*frame_size != Fs && - 100*frame_size != Fs && 50*frame_size != Fs && - 25*frame_size != Fs && 50*frame_size != 3*Fs) - { - RESTORE_STACK; - return OPUS_BAD_ARG; - } - ALLOC(buf, 2*frame_size, opus_val16); - coupled_size = opus_encoder_get_size(2); - mono_size = opus_encoder_get_size(1); - - if (max_data_bytes < 4*st->layout.nb_streams-1) - { - RESTORE_STACK; - return OPUS_BUFFER_TOO_SMALL; - } - /* Counting ToC */ - tot_size = 0; - for (s=0;slayout.nb_streams;s++) - { - OpusEncoder *enc; - int len; - int curr_max; - - opus_repacketizer_init(&rp); - enc = (OpusEncoder*)ptr; - if (s < st->layout.nb_coupled_streams) - { - int left, right; - left = get_left_channel(&st->layout, s, -1); - right = get_right_channel(&st->layout, s, -1); - (*copy_channel_in)(buf, 2, - pcm, st->layout.nb_channels, left, frame_size); - (*copy_channel_in)(buf+1, 2, - pcm, st->layout.nb_channels, right, frame_size); - ptr += align(coupled_size); - } else { - int chan = get_mono_channel(&st->layout, s, -1); - (*copy_channel_in)(buf, 1, - pcm, st->layout.nb_channels, chan, frame_size); - ptr += align(mono_size); - } - /* number of bytes left (+Toc) */ - curr_max = max_data_bytes - tot_size; - /* Reserve three bytes for the last stream and four for the others */ - curr_max -= IMAX(0,4*(st->layout.nb_streams-s-1)-1); - curr_max = IMIN(curr_max,MS_FRAME_TMP); - len = opus_encode_native(enc, buf, frame_size, tmp_data, curr_max); - if (len<0) - { - RESTORE_STACK; - return len; - } - /* We need to use the repacketizer to add the self-delimiting lengths - while taking into account the fact that the encoder can now return - more than one frame at a time (e.g. 60 ms CELT-only) */ - opus_repacketizer_cat(&rp, tmp_data, len); - len = opus_repacketizer_out_range_impl(&rp, 0, opus_repacketizer_get_nb_frames(&rp), data, max_data_bytes-tot_size, s != st->layout.nb_streams-1); - data += len; - tot_size += len; - } - RESTORE_STACK; - return tot_size; - -} - -#if !defined(DISABLE_FLOAT_API) -static void opus_copy_channel_in_float( - opus_val16 *dst, - int dst_stride, - const void *src, - int src_stride, - int src_channel, - int frame_size -) -{ - const float *float_src; - int i; - float_src = (const float *)src; - for (i=0;ilayout.nb_streams + st->layout.nb_coupled_streams; - value /= chan; - for (s=0;slayout.nb_streams;s++) - { - OpusEncoder *enc; - enc = (OpusEncoder*)ptr; - if (s < st->layout.nb_coupled_streams) - ptr += align(coupled_size); - else - ptr += align(mono_size); - opus_encoder_ctl(enc, request, value * (s < st->layout.nb_coupled_streams ? 2 : 1)); - } - } - break; - case OPUS_GET_BITRATE_REQUEST: - { - int s; - opus_int32 *value = va_arg(ap, opus_int32*); - *value = 0; - for (s=0;slayout.nb_streams;s++) - { - opus_int32 rate; - OpusEncoder *enc; - enc = (OpusEncoder*)ptr; - if (s < st->layout.nb_coupled_streams) - ptr += align(coupled_size); - else - ptr += align(mono_size); - opus_encoder_ctl(enc, request, &rate); - *value += rate; - } - } - break; - case OPUS_GET_LSB_DEPTH_REQUEST: - case OPUS_GET_VBR_REQUEST: - case OPUS_GET_APPLICATION_REQUEST: - case OPUS_GET_BANDWIDTH_REQUEST: - case OPUS_GET_COMPLEXITY_REQUEST: - case OPUS_GET_PACKET_LOSS_PERC_REQUEST: - case OPUS_GET_DTX_REQUEST: - case OPUS_GET_VOICE_RATIO_REQUEST: - case OPUS_GET_VBR_CONSTRAINT_REQUEST: - case OPUS_GET_SIGNAL_REQUEST: - case OPUS_GET_LOOKAHEAD_REQUEST: - case OPUS_GET_SAMPLE_RATE_REQUEST: - case OPUS_GET_INBAND_FEC_REQUEST: - { - OpusEncoder *enc; - /* For int32* GET params, just query the first stream */ - opus_int32 *value = va_arg(ap, opus_int32*); - enc = (OpusEncoder*)ptr; - ret = opus_encoder_ctl(enc, request, value); - } - break; - case OPUS_GET_FINAL_RANGE_REQUEST: - { - int s; - opus_uint32 *value = va_arg(ap, opus_uint32*); - opus_uint32 tmp; - *value=0; - for (s=0;slayout.nb_streams;s++) - { - OpusEncoder *enc; - enc = (OpusEncoder*)ptr; - if (s < st->layout.nb_coupled_streams) - ptr += align(coupled_size); - else - ptr += align(mono_size); - ret = opus_encoder_ctl(enc, request, &tmp); - if (ret != OPUS_OK) break; - *value ^= tmp; - } - } - break; - case OPUS_SET_LSB_DEPTH_REQUEST: - case OPUS_SET_COMPLEXITY_REQUEST: - case OPUS_SET_VBR_REQUEST: - case OPUS_SET_VBR_CONSTRAINT_REQUEST: - case OPUS_SET_BANDWIDTH_REQUEST: - case OPUS_SET_SIGNAL_REQUEST: - case OPUS_SET_APPLICATION_REQUEST: - case OPUS_SET_INBAND_FEC_REQUEST: - case OPUS_SET_PACKET_LOSS_PERC_REQUEST: - case OPUS_SET_DTX_REQUEST: - case OPUS_SET_FORCE_MODE_REQUEST: - { - int s; - /* This works for int32 params */ - opus_int32 value = va_arg(ap, opus_int32); - for (s=0;slayout.nb_streams;s++) - { - OpusEncoder *enc; - - enc = (OpusEncoder*)ptr; - if (s < st->layout.nb_coupled_streams) - ptr += align(coupled_size); - else - ptr += align(mono_size); - ret = opus_encoder_ctl(enc, request, value); - if (ret != OPUS_OK) - break; - } - } - break; - case OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST: - { - int s; - opus_int32 stream_id; - OpusEncoder **value; - stream_id = va_arg(ap, opus_int32); - if (stream_id<0 || stream_id >= st->layout.nb_streams) - ret = OPUS_BAD_ARG; - value = va_arg(ap, OpusEncoder**); - for (s=0;slayout.nb_coupled_streams) - ptr += align(coupled_size); - else - ptr += align(mono_size); - } - *value = (OpusEncoder*)ptr; - } - break; - default: - ret = OPUS_UNIMPLEMENTED; - break; - } - - va_end(ap); - return ret; -} - -void opus_multistream_encoder_destroy(OpusMSEncoder *st) -{ - opus_free(st); -} - - -/* DECODER */ - -opus_int32 opus_multistream_decoder_get_size(int nb_streams, int nb_coupled_streams) -{ - int coupled_size; - int mono_size; - - if(nb_streams<1||nb_coupled_streams>nb_streams||nb_coupled_streams<0)return 0; - coupled_size = opus_decoder_get_size(2); - mono_size = opus_decoder_get_size(1); - return align(sizeof(OpusMSDecoder)) - + nb_coupled_streams * align(coupled_size) - + (nb_streams-nb_coupled_streams) * align(mono_size); -} - -int opus_multistream_decoder_init( - OpusMSDecoder *st, - opus_int32 Fs, - int channels, - int streams, - int coupled_streams, - const unsigned char *mapping -) -{ - int coupled_size; - int mono_size; - int i, ret; - char *ptr; - - if ((channels>255) || (channels<1) || (coupled_streams>streams) || - (coupled_streams+streams>255) || (streams<1) || (coupled_streams<0)) - return OPUS_BAD_ARG; - - st->layout.nb_channels = channels; - st->layout.nb_streams = streams; - st->layout.nb_coupled_streams = coupled_streams; - - for (i=0;ilayout.nb_channels;i++) - st->layout.mapping[i] = mapping[i]; - if (!validate_layout(&st->layout)) - return OPUS_BAD_ARG; - - ptr = (char*)st + align(sizeof(OpusMSDecoder)); - coupled_size = opus_decoder_get_size(2); - mono_size = opus_decoder_get_size(1); - - for (i=0;ilayout.nb_coupled_streams;i++) - { - ret=opus_decoder_init((OpusDecoder*)ptr, Fs, 2); - if(ret!=OPUS_OK)return ret; - ptr += align(coupled_size); - } - for (;ilayout.nb_streams;i++) - { - ret=opus_decoder_init((OpusDecoder*)ptr, Fs, 1); - if(ret!=OPUS_OK)return ret; - ptr += align(mono_size); - } - return OPUS_OK; -} - - -OpusMSDecoder *opus_multistream_decoder_create( - opus_int32 Fs, - int channels, - int streams, - int coupled_streams, - const unsigned char *mapping, - int *error -) -{ - int ret; - OpusMSDecoder *st; - if ((channels>255) || (channels<1) || (coupled_streams>streams) || - (coupled_streams+streams>255) || (streams<1) || (coupled_streams<0)) - { - if (error) - *error = OPUS_BAD_ARG; - return NULL; - } - st = (OpusMSDecoder *)opus_alloc(opus_multistream_decoder_get_size(streams, coupled_streams)); - if (st==NULL) - { - if (error) - *error = OPUS_ALLOC_FAIL; - return NULL; - } - ret = opus_multistream_decoder_init(st, Fs, channels, streams, coupled_streams, mapping); - if (error) - *error = ret; - if (ret != OPUS_OK) - { - opus_free(st); - st = NULL; - } - return st; -} - -typedef void (*opus_copy_channel_out_func)( - void *dst, - int dst_stride, - int dst_channel, - const opus_val16 *src, - int src_stride, - int frame_size -); - -static int opus_multistream_decode_native( - OpusMSDecoder *st, - const unsigned char *data, - opus_int32 len, - void *pcm, - opus_copy_channel_out_func copy_channel_out, - int frame_size, - int decode_fec -) -{ - opus_int32 Fs; - int coupled_size; - int mono_size; - int s, c; - char *ptr; - int do_plc=0; - VARDECL(opus_val16, buf); - ALLOC_STACK; - - /* Limit frame_size to avoid excessive stack allocations. */ - opus_multistream_decoder_ctl(st, OPUS_GET_SAMPLE_RATE(&Fs)); - frame_size = IMIN(frame_size, Fs/25*3); - ALLOC(buf, 2*frame_size, opus_val16); - ptr = (char*)st + align(sizeof(OpusMSDecoder)); - coupled_size = opus_decoder_get_size(2); - mono_size = opus_decoder_get_size(1); - - if (len==0) - do_plc = 1; - if (len < 0) - return OPUS_BAD_ARG; - if (!do_plc && len < 2*st->layout.nb_streams-1) - return OPUS_INVALID_PACKET; - for (s=0;slayout.nb_streams;s++) - { - OpusDecoder *dec; - int packet_offset, ret; - - dec = (OpusDecoder*)ptr; - ptr += (s < st->layout.nb_coupled_streams) ? align(coupled_size) : align(mono_size); - - if (!do_plc && len<=0) - { - RESTORE_STACK; - return OPUS_INVALID_PACKET; - } - packet_offset = 0; - ret = opus_decode_native(dec, data, len, buf, frame_size, decode_fec, s!=st->layout.nb_streams-1, &packet_offset); - data += packet_offset; - len -= packet_offset; - if (ret > frame_size) - { - RESTORE_STACK; - return OPUS_BUFFER_TOO_SMALL; - } - if (s>0 && ret != frame_size) - { - RESTORE_STACK; - return OPUS_INVALID_PACKET; - } - if (ret <= 0) - { - RESTORE_STACK; - return ret; - } - frame_size = ret; - if (s < st->layout.nb_coupled_streams) - { - int chan, prev; - prev = -1; - /* Copy "left" audio to the channel(s) where it belongs */ - while ( (chan = get_left_channel(&st->layout, s, prev)) != -1) - { - (*copy_channel_out)(pcm, st->layout.nb_channels, chan, - buf, 2, frame_size); - prev = chan; - } - prev = -1; - /* Copy "right" audio to the channel(s) where it belongs */ - while ( (chan = get_right_channel(&st->layout, s, prev)) != -1) - { - (*copy_channel_out)(pcm, st->layout.nb_channels, chan, - buf+1, 2, frame_size); - prev = chan; - } - } else { - int chan, prev; - prev = -1; - /* Copy audio to the channel(s) where it belongs */ - while ( (chan = get_mono_channel(&st->layout, s, prev)) != -1) - { - (*copy_channel_out)(pcm, st->layout.nb_channels, chan, - buf, 1, frame_size); - prev = chan; - } - } - } - /* Handle muted channels */ - for (c=0;clayout.nb_channels;c++) - { - if (st->layout.mapping[c] == 255) - { - (*copy_channel_out)(pcm, st->layout.nb_channels, c, - NULL, 0, frame_size); - } - } - RESTORE_STACK; - return frame_size; -} - -#if !defined(DISABLE_FLOAT_API) -static void opus_copy_channel_out_float( - void *dst, - int dst_stride, - int dst_channel, - const opus_val16 *src, - int src_stride, - int frame_size -) -{ - float *float_dst; - int i; - float_dst = (float*)dst; - if (src != NULL) - { - for (i=0;ilayout.nb_streams;s++) - { - OpusDecoder *dec; - dec = (OpusDecoder*)ptr; - if (s < st->layout.nb_coupled_streams) - ptr += align(coupled_size); - else - ptr += align(mono_size); - ret = opus_decoder_ctl(dec, request, &tmp); - if (ret != OPUS_OK) break; - *value ^= tmp; - } - } - break; - case OPUS_RESET_STATE: - { - int s; - for (s=0;slayout.nb_streams;s++) - { - OpusDecoder *dec; - - dec = (OpusDecoder*)ptr; - if (s < st->layout.nb_coupled_streams) - ptr += align(coupled_size); - else - ptr += align(mono_size); - ret = opus_decoder_ctl(dec, OPUS_RESET_STATE); - if (ret != OPUS_OK) - break; - } - } - break; - case OPUS_MULTISTREAM_GET_DECODER_STATE_REQUEST: - { - int s; - opus_int32 stream_id; - OpusDecoder **value; - stream_id = va_arg(ap, opus_int32); - if (stream_id<0 || stream_id >= st->layout.nb_streams) - ret = OPUS_BAD_ARG; - value = va_arg(ap, OpusDecoder**); - for (s=0;slayout.nb_coupled_streams) - ptr += align(coupled_size); - else - ptr += align(mono_size); - } - *value = (OpusDecoder*)ptr; - } - break; - case OPUS_SET_GAIN_REQUEST: - { - int s; - /* This works for int32 params */ - opus_int32 value = va_arg(ap, opus_int32); - for (s=0;slayout.nb_streams;s++) - { - OpusDecoder *dec; - - dec = (OpusDecoder*)ptr; - if (s < st->layout.nb_coupled_streams) - ptr += align(coupled_size); - else - ptr += align(mono_size); - ret = opus_decoder_ctl(dec, request, value); - if (ret != OPUS_OK) - break; - } - } - break; - default: - ret = OPUS_UNIMPLEMENTED; - break; - } - - va_end(ap); - return ret; -} - - -void opus_multistream_decoder_destroy(OpusMSDecoder *st) -{ - opus_free(st); -} diff --git a/code/opus-1.0.2/celt/_kiss_fft_guts.h b/code/opus-1.1/celt/_kiss_fft_guts.h similarity index 97% rename from code/opus-1.0.2/celt/_kiss_fft_guts.h rename to code/opus-1.1/celt/_kiss_fft_guts.h index 33e62c6b..aefe490e 100644 --- a/code/opus-1.0.2/celt/_kiss_fft_guts.h +++ b/code/opus-1.1/celt/_kiss_fft_guts.h @@ -94,6 +94,14 @@ do {(res).r = ADD32((res).r,(a).r); (res).i = SUB32((res).i,(a).i); \ }while(0) +#if defined(OPUS_ARM_INLINE_ASM) +#include "arm/kiss_fft_armv4.h" +#endif + +#if defined(OPUS_ARM_INLINE_EDSP) +#include "arm/kiss_fft_armv5e.h" +#endif + #else /* not FIXED_POINT*/ # define S_MUL(a,b) ( (a)*(b) ) diff --git a/code/opus-1.0.2/celt/arch.h b/code/opus-1.1/celt/arch.h similarity index 94% rename from code/opus-1.0.2/celt/arch.h rename to code/opus-1.1/celt/arch.h index 03cda40f..3bbcd366 100644 --- a/code/opus-1.0.2/celt/arch.h +++ b/code/opus-1.1/celt/arch.h @@ -35,6 +35,7 @@ #define ARCH_H #include "opus_types.h" +#include "opus_defines.h" # if !defined(__GNUC_PREREQ) # if defined(__GNUC__)&&defined(__GNUC_MINOR__) @@ -54,7 +55,7 @@ #ifdef __GNUC__ __attribute__((noreturn)) #endif -static inline void _celt_fatal(const char *str, const char *file, int line) +static OPUS_INLINE void _celt_fatal(const char *str, const char *file, int line) { fprintf (stderr, "Fatal (internal) error in %s, line %d: %s\n", file, line, str); abort(); @@ -100,6 +101,7 @@ typedef opus_val32 celt_ener; #define DB_SHIFT 10 #define EPSILON 1 +#define VERY_SMALL 0 #define VERY_LARGE16 ((opus_val16)32767) #define Q15_ONE ((opus_val16)32767) @@ -112,10 +114,10 @@ typedef opus_val32 celt_ener; #include "fixed_generic.h" -#ifdef ARM5E_ASM -#include "fixed_arm5e.h" -#elif defined (ARM4_ASM) -#include "fixed_arm4.h" +#ifdef OPUS_ARM_INLINE_EDSP +#include "arm/fixed_armv5e.h" +#elif defined (OPUS_ARM_INLINE_ASM) +#include "arm/fixed_armv4.h" #elif defined (BFIN_ASM) #include "fixed_bfin.h" #elif defined (TI_C5X_ASM) @@ -140,6 +142,7 @@ typedef float celt_ener; #define NORM_SCALING 1.f #define EPSILON 1e-15f +#define VERY_SMALL 1e-30f #define VERY_LARGE16 1e15f #define Q15_ONE ((opus_val16)1.f) @@ -161,6 +164,7 @@ typedef float celt_ener; #define SHR(a,shift) (a) #define SHL(a,shift) (a) #define SATURATE(x,a) (x) +#define SATURATE16(x) (x) #define ROUND16(a,shift) (a) #define HALF16(x) (.5f*(x)) @@ -182,6 +186,7 @@ typedef float celt_ener; #define MAC16_32_Q15(c,a,b) ((c)+(a)*(b)) #define MULT16_16_Q11_32(a,b) ((a)*(b)) +#define MULT16_16_Q11(a,b) ((a)*(b)) #define MULT16_16_Q13(a,b) ((a)*(b)) #define MULT16_16_Q14(a,b) ((a)*(b)) #define MULT16_16_Q15(a,b) ((a)*(b)) diff --git a/code/opus-1.1/celt/arm/arm2gnu.pl b/code/opus-1.1/celt/arm/arm2gnu.pl new file mode 100644 index 00000000..eab42efa --- /dev/null +++ b/code/opus-1.1/celt/arm/arm2gnu.pl @@ -0,0 +1,316 @@ +#!/usr/bin/perl + +my $bigend; # little/big endian +my $nxstack; + +$nxstack = 0; + +eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}' + if $running_under_some_shell; + +while ($ARGV[0] =~ /^-/) { + $_ = shift; + last if /^--/; + if (/^-n/) { + $nflag++; + next; + } + die "I don't recognize this switch: $_\\n"; +} +$printit++ unless $nflag; + +$\ = "\n"; # automatically add newline on print +$n=0; + +$thumb = 0; # ARM mode by default, not Thumb. +@proc_stack = (); + +LINE: +while (<>) { + + # For ADRLs we need to add a new line after the substituted one. + $addPadding = 0; + + # First, we do not dare to touch *anything* inside double quotes, do we? + # Second, if you want a dollar character in the string, + # insert two of them -- that's how ARM C and assembler treat strings. + s/^([A-Za-z_]\w*)[ \t]+DCB[ \t]*\"/$1: .ascii \"/ && do { s/\$\$/\$/g; next }; + s/\bDCB\b[ \t]*\"/.ascii \"/ && do { s/\$\$/\$/g; next }; + s/^(\S+)\s+RN\s+(\S+)/$1 .req r$2/ && do { s/\$\$/\$/g; next }; + # If there's nothing on a line but a comment, don't try to apply any further + # substitutions (this is a cheap hack to avoid mucking up the license header) + s/^([ \t]*);/$1@/ && do { s/\$\$/\$/g; next }; + # If substituted -- leave immediately ! + + s/@/,:/; + s/;/@/; + while ( /@.*'/ ) { + s/(@.*)'/$1/g; + } + s/\{FALSE\}/0/g; + s/\{TRUE\}/1/g; + s/\{(\w\w\w\w+)\}/$1/g; + s/\bINCLUDE[ \t]*([^ \t\n]+)/.include \"$1\"/; + s/\bGET[ \t]*([^ \t\n]+)/.include \"${ my $x=$1; $x =~ s|\.s|-gnu.S|; \$x }\"/; + s/\bIMPORT\b/.extern/; + s/\bEXPORT\b/.global/; + s/^(\s+)\[/$1IF/; + s/^(\s+)\|/$1ELSE/; + s/^(\s+)\]/$1ENDIF/; + s/IF *:DEF:/ .ifdef/; + s/IF *:LNOT: *:DEF:/ .ifndef/; + s/ELSE/ .else/; + s/ENDIF/ .endif/; + + if( /\bIF\b/ ) { + s/\bIF\b/ .if/; + s/=/==/; + } + if ( $n == 2) { + s/\$/\\/g; + } + if ($n == 1) { + s/\$//g; + s/label//g; + $n = 2; + } + if ( /MACRO/ ) { + s/MACRO *\n/.macro/; + $n=1; + } + if ( /\bMEND\b/ ) { + s/\bMEND\b/.endm/; + $n=0; + } + + # ".rdata" doesn't work in 'as' version 2.13.2, as it is ".rodata" there. + # + if ( /\bAREA\b/ ) { + my $align; + $align = "2"; + if ( /ALIGN=(\d+)/ ) { + $align = $1; + } + if ( /CODE/ ) { + $nxstack = 1; + } + s/^(.+)CODE(.+)READONLY(.*)/ .text/; + s/^(.+)DATA(.+)READONLY(.*)/ .section .rdata/; + s/^(.+)\|\|\.data\|\|(.+)/ .data/; + s/^(.+)\|\|\.bss\|\|(.+)/ .bss/; + s/$/; .p2align $align/; + # Enable NEON instructions but don't produce a binary that requires + # ARMv7. RVCT does not have equivalent directives, so we just do this + # for all CODE areas. + if ( /.text/ ) { + # Separating .arch, .fpu, etc., by semicolons does not work (gas + # thinks the semicolon is part of the arch name, even when there's + # whitespace separating them). Sadly this means our line numbers + # won't match the original source file (we could use the .line + # directive, which is documented to be obsolete, but then gdb will + # show the wrong line in the translated source file). + s/$/; .arch armv7-a\n .fpu neon\n .object_arch armv4t/; + } + } + + s/\|\|\.constdata\$(\d+)\|\|/.L_CONST$1/; # ||.constdata$3|| + s/\|\|\.bss\$(\d+)\|\|/.L_BSS$1/; # ||.bss$2|| + s/\|\|\.data\$(\d+)\|\|/.L_DATA$1/; # ||.data$2|| + s/\|\|([a-zA-Z0-9_]+)\@([a-zA-Z0-9_]+)\|\|/@ $&/; + s/^(\s+)\%(\s)/ .space $1/; + + s/\|(.+)\.(\d+)\|/\.$1_$2/; # |L80.123| -> .L80_123 + s/\bCODE32\b/.code 32/ && do {$thumb = 0}; + s/\bCODE16\b/.code 16/ && do {$thumb = 1}; + if (/\bPROC\b/) + { + my $prefix; + my $proc; + /^([A-Za-z_\.]\w+)\b/; + $proc = $1; + $prefix = ""; + if ($proc) + { + $prefix = $prefix.sprintf("\t.type\t%s, %%function; ",$proc); + push(@proc_stack, $proc); + s/^[A-Za-z_\.]\w+/$&:/; + } + $prefix = $prefix."\t.thumb_func; " if ($thumb); + s/\bPROC\b/@ $&/; + $_ = $prefix.$_; + } + s/^(\s*)(S|Q|SH|U|UQ|UH)ASX\b/$1$2ADDSUBX/; + s/^(\s*)(S|Q|SH|U|UQ|UH)SAX\b/$1$2SUBADDX/; + if (/\bENDP\b/) + { + my $proc; + s/\bENDP\b/@ $&/; + $proc = pop(@proc_stack); + $_ = "\t.size $proc, .-$proc".$_ if ($proc); + } + s/\bSUBT\b/@ $&/; + s/\bDATA\b/@ $&/; # DATA directive is deprecated -- Asm guide, p.7-25 + s/\bKEEP\b/@ $&/; + s/\bEXPORTAS\b/@ $&/; + s/\|\|(.)+\bEQU\b/@ $&/; + s/\|\|([\w\$]+)\|\|/$1/; + s/\bENTRY\b/@ $&/; + s/\bASSERT\b/@ $&/; + s/\bGBLL\b/@ $&/; + s/\bGBLA\b/@ $&/; + s/^\W+OPT\b/@ $&/; + s/:OR:/|/g; + s/:SHL:/<>/g; + s/:AND:/&/g; + s/:LAND:/&&/g; + s/CPSR/cpsr/; + s/SPSR/spsr/; + s/ALIGN$/.balign 4/; + s/ALIGN\s+([0-9x]+)$/.balign $1/; + s/psr_cxsf/psr_all/; + s/LTORG/.ltorg/; + s/^([A-Za-z_]\w*)[ \t]+EQU/ .set $1,/; + s/^([A-Za-z_]\w*)[ \t]+SETL/ .set $1,/; + s/^([A-Za-z_]\w*)[ \t]+SETA/ .set $1,/; + s/^([A-Za-z_]\w*)[ \t]+\*/ .set $1,/; + + # {PC} + 0xdeadfeed --> . + 0xdeadfeed + s/\{PC\} \+/ \. +/; + + # Single hex constant on the line ! + # + # >>> NOTE <<< + # Double-precision floats in gcc are always mixed-endian, which means + # bytes in two words are little-endian, but words are big-endian. + # So, 0x0000deadfeed0000 would be stored as 0x0000dead at low address + # and 0xfeed0000 at high address. + # + s/\bDCFD\b[ \t]+0x([a-fA-F0-9]{8})([a-fA-F0-9]{8})/.long 0x$1, 0x$2/; + # Only decimal constants on the line, no hex ! + s/\bDCFD\b[ \t]+([0-9\.\-]+)/.double $1/; + + # Single hex constant on the line ! +# s/\bDCFS\b[ \t]+0x([a-f0-9]{8})([a-f0-9]{8})/.long 0x$1, 0x$2/; + # Only decimal constants on the line, no hex ! +# s/\bDCFS\b[ \t]+([0-9\.\-]+)/.double $1/; + s/\bDCFS[ \t]+0x/.word 0x/; + s/\bDCFS\b/.float/; + + s/^([A-Za-z_]\w*)[ \t]+DCD/$1 .word/; + s/\bDCD\b/.word/; + s/^([A-Za-z_]\w*)[ \t]+DCW/$1 .short/; + s/\bDCW\b/.short/; + s/^([A-Za-z_]\w*)[ \t]+DCB/$1 .byte/; + s/\bDCB\b/.byte/; + s/^([A-Za-z_]\w*)[ \t]+\%/.comm $1,/; + s/^[A-Za-z_\.]\w+/$&:/; + s/^(\d+)/$1:/; + s/\%(\d+)/$1b_or_f/; + s/\%[Bb](\d+)/$1b/; + s/\%[Ff](\d+)/$1f/; + s/\%[Ff][Tt](\d+)/$1f/; + s/&([\dA-Fa-f]+)/0x$1/; + if ( /\b2_[01]+\b/ ) { + s/\b2_([01]+)\b/conv$1&&&&/g; + while ( /[01][01][01][01]&&&&/ ) { + s/0000&&&&/&&&&0/g; + s/0001&&&&/&&&&1/g; + s/0010&&&&/&&&&2/g; + s/0011&&&&/&&&&3/g; + s/0100&&&&/&&&&4/g; + s/0101&&&&/&&&&5/g; + s/0110&&&&/&&&&6/g; + s/0111&&&&/&&&&7/g; + s/1000&&&&/&&&&8/g; + s/1001&&&&/&&&&9/g; + s/1010&&&&/&&&&A/g; + s/1011&&&&/&&&&B/g; + s/1100&&&&/&&&&C/g; + s/1101&&&&/&&&&D/g; + s/1110&&&&/&&&&E/g; + s/1111&&&&/&&&&F/g; + } + s/000&&&&/&&&&0/g; + s/001&&&&/&&&&1/g; + s/010&&&&/&&&&2/g; + s/011&&&&/&&&&3/g; + s/100&&&&/&&&&4/g; + s/101&&&&/&&&&5/g; + s/110&&&&/&&&&6/g; + s/111&&&&/&&&&7/g; + s/00&&&&/&&&&0/g; + s/01&&&&/&&&&1/g; + s/10&&&&/&&&&2/g; + s/11&&&&/&&&&3/g; + s/0&&&&/&&&&0/g; + s/1&&&&/&&&&1/g; + s/conv&&&&/0x/g; + } + + if ( /commandline/) + { + if( /-bigend/) + { + $bigend=1; + } + } + + if ( /\bDCDU\b/ ) + { + my $cmd=$_; + my $value; + my $prefix; + my $w1; + my $w2; + my $w3; + my $w4; + + s/\s+DCDU\b/@ $&/; + + $cmd =~ /\bDCDU\b\s+0x(\d+)/; + $value = $1; + $value =~ /(\w\w)(\w\w)(\w\w)(\w\w)/; + $w1 = $1; + $w2 = $2; + $w3 = $3; + $w4 = $4; + + if( $bigend ne "") + { + # big endian + $prefix = "\t.byte\t0x".$w1.";". + "\t.byte\t0x".$w2.";". + "\t.byte\t0x".$w3.";". + "\t.byte\t0x".$w4."; "; + } + else + { + # little endian + $prefix = "\t.byte\t0x".$w4.";". + "\t.byte\t0x".$w3.";". + "\t.byte\t0x".$w2.";". + "\t.byte\t0x".$w1."; "; + } + $_=$prefix.$_; + } + + if ( /\badrl\b/i ) + { + s/\badrl\s+(\w+)\s*,\s*(\w+)/ldr $1,=$2/i; + $addPadding = 1; + } + s/\bEND\b/@ END/; +} continue { + printf ("%s", $_) if $printit; + if ($addPadding != 0) + { + printf (" mov r0,r0\n"); + $addPadding = 0; + } +} +#If we had a code section, mark that this object doesn't need an executable +# stack. +if ($nxstack) { + printf (" .section\t.note.GNU-stack,\"\",\%\%progbits\n"); +} diff --git a/code/opus-1.1/celt/arm/arm_celt_map.c b/code/opus-1.1/celt/arm/arm_celt_map.c new file mode 100644 index 00000000..547a84d1 --- /dev/null +++ b/code/opus-1.1/celt/arm/arm_celt_map.c @@ -0,0 +1,49 @@ +/* Copyright (c) 2010 Xiph.Org Foundation + * Copyright (c) 2013 Parrot */ +/* + 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. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "pitch.h" + +#if defined(OPUS_HAVE_RTCD) + +# if defined(FIXED_POINT) +opus_val32 (*const CELT_PITCH_XCORR_IMPL[OPUS_ARCHMASK+1])(const opus_val16 *, + const opus_val16 *, opus_val32 *, int , int) = { + celt_pitch_xcorr_c, /* ARMv4 */ + MAY_HAVE_EDSP(celt_pitch_xcorr), /* EDSP */ + MAY_HAVE_MEDIA(celt_pitch_xcorr), /* Media */ + MAY_HAVE_NEON(celt_pitch_xcorr) /* NEON */ +}; +# else +# error "Floating-point implementation is not supported by ARM asm yet." \ + "Reconfigure with --disable-rtcd or send patches." +# endif + +#endif diff --git a/code/opus-1.1/celt/arm/armcpu.c b/code/opus-1.1/celt/arm/armcpu.c new file mode 100644 index 00000000..17685258 --- /dev/null +++ b/code/opus-1.1/celt/arm/armcpu.c @@ -0,0 +1,174 @@ +/* Copyright (c) 2010 Xiph.Org Foundation + * Copyright (c) 2013 Parrot */ +/* + 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. +*/ + +/* Original code from libtheora modified to suit to Opus */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef OPUS_HAVE_RTCD + +#include "armcpu.h" +#include "cpu_support.h" +#include "os_support.h" +#include "opus_types.h" + +#define OPUS_CPU_ARM_V4 (1) +#define OPUS_CPU_ARM_EDSP (1<<1) +#define OPUS_CPU_ARM_MEDIA (1<<2) +#define OPUS_CPU_ARM_NEON (1<<3) + +#if defined(_MSC_VER) +/*For GetExceptionCode() and EXCEPTION_ILLEGAL_INSTRUCTION.*/ +# define WIN32_LEAN_AND_MEAN +# define WIN32_EXTRA_LEAN +# include + +static OPUS_INLINE opus_uint32 opus_cpu_capabilities(void){ + opus_uint32 flags; + flags=0; + /* MSVC has no OPUS_INLINE __asm support for ARM, but it does let you __emit + * instructions via their assembled hex code. + * All of these instructions should be essentially nops. */ +# if defined(OPUS_ARM_MAY_HAVE_EDSP) + __try{ + /*PLD [r13]*/ + __emit(0xF5DDF000); + flags|=OPUS_CPU_ARM_EDSP; + } + __except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION){ + /*Ignore exception.*/ + } +# if defined(OPUS_ARM_MAY_HAVE_MEDIA) + __try{ + /*SHADD8 r3,r3,r3*/ + __emit(0xE6333F93); + flags|=OPUS_CPU_ARM_MEDIA; + } + __except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION){ + /*Ignore exception.*/ + } +# if defined(OPUS_ARM_MAY_HAVE_NEON) + __try{ + /*VORR q0,q0,q0*/ + __emit(0xF2200150); + flags|=OPUS_CPU_ARM_NEON; + } + __except(GetExceptionCode()==EXCEPTION_ILLEGAL_INSTRUCTION){ + /*Ignore exception.*/ + } +# endif +# endif +# endif + return flags; +} + +#elif defined(__linux__) +/* Linux based */ +opus_uint32 opus_cpu_capabilities(void) +{ + opus_uint32 flags = 0; + FILE *cpuinfo; + + /* Reading /proc/self/auxv would be easier, but that doesn't work reliably on + * Android */ + cpuinfo = fopen("/proc/cpuinfo", "r"); + + if(cpuinfo != NULL) + { + /* 512 should be enough for anybody (it's even enough for all the flags that + * x86 has accumulated... so far). */ + char buf[512]; + + while(fgets(buf, 512, cpuinfo) != NULL) + { +# if defined(OPUS_ARM_MAY_HAVE_EDSP) || defined(OPUS_ARM_MAY_HAVE_NEON) + /* Search for edsp and neon flag */ + if(memcmp(buf, "Features", 8) == 0) + { + char *p; +# if defined(OPUS_ARM_MAY_HAVE_EDSP) + p = strstr(buf, " edsp"); + if(p != NULL && (p[5] == ' ' || p[5] == '\n')) + flags |= OPUS_CPU_ARM_EDSP; +# endif + +# if defined(OPUS_ARM_MAY_HAVE_NEON) + p = strstr(buf, " neon"); + if(p != NULL && (p[5] == ' ' || p[5] == '\n')) + flags |= OPUS_CPU_ARM_NEON; +# endif + } +# endif + +# if defined(OPUS_ARM_MAY_HAVE_MEDIA) + /* Search for media capabilities (>= ARMv6) */ + if(memcmp(buf, "CPU architecture:", 17) == 0) + { + int version; + version = atoi(buf+17); + + if(version >= 6) + flags |= OPUS_CPU_ARM_MEDIA; + } +# endif + } + + fclose(cpuinfo); + } + return flags; +} +#else +/* The feature registers which can tell us what the processor supports are + * accessible in priveleged modes only, so we can't have a general user-space + * detection method like on x86.*/ +# error "Configured to use ARM asm but no CPU detection method available for " \ + "your platform. Reconfigure with --disable-rtcd (or send patches)." +#endif + +int opus_select_arch(void) +{ + opus_uint32 flags = opus_cpu_capabilities(); + int arch = 0; + + if(!(flags & OPUS_CPU_ARM_EDSP)) + return arch; + arch++; + + if(!(flags & OPUS_CPU_ARM_MEDIA)) + return arch; + arch++; + + if(!(flags & OPUS_CPU_ARM_NEON)) + return arch; + arch++; + + return arch; +} + +#endif diff --git a/code/opus-1.1/celt/arm/armcpu.h b/code/opus-1.1/celt/arm/armcpu.h new file mode 100644 index 00000000..ac574460 --- /dev/null +++ b/code/opus-1.1/celt/arm/armcpu.h @@ -0,0 +1,71 @@ +/* Copyright (c) 2010 Xiph.Org Foundation + * Copyright (c) 2013 Parrot */ +/* + 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. +*/ + +#if !defined(ARMCPU_H) +# define ARMCPU_H + +# if defined(OPUS_ARM_MAY_HAVE_EDSP) +# define MAY_HAVE_EDSP(name) name ## _edsp +# else +# define MAY_HAVE_EDSP(name) name ## _c +# endif + +# if defined(OPUS_ARM_MAY_HAVE_MEDIA) +# define MAY_HAVE_MEDIA(name) name ## _media +# else +# define MAY_HAVE_MEDIA(name) MAY_HAVE_EDSP(name) +# endif + +# if defined(OPUS_ARM_MAY_HAVE_NEON) +# define MAY_HAVE_NEON(name) name ## _neon +# else +# define MAY_HAVE_NEON(name) MAY_HAVE_MEDIA(name) +# endif + +# if defined(OPUS_ARM_PRESUME_EDSP) +# define PRESUME_EDSP(name) name ## _edsp +# else +# define PRESUME_EDSP(name) name ## _c +# endif + +# if defined(OPUS_ARM_PRESUME_MEDIA) +# define PRESUME_MEDIA(name) name ## _media +# else +# define PRESUME_MEDIA(name) PRESUME_EDSP(name) +# endif + +# if defined(OPUS_ARM_PRESUME_NEON) +# define PRESUME_NEON(name) name ## _neon +# else +# define PRESUME_NEON(name) PRESUME_MEDIA(name) +# endif + +# if defined(OPUS_HAVE_RTCD) +int opus_select_arch(void); +# endif + +#endif diff --git a/code/opus-1.0.2/src/opus.c b/code/opus-1.1/celt/arm/armopts.s.in similarity index 75% rename from code/opus-1.0.2/src/opus.c rename to code/opus-1.1/celt/arm/armopts.s.in index d6ae7bab..3d8aaf27 100644 --- a/code/opus-1.0.2/src/opus.c +++ b/code/opus-1.1/celt/arm/armopts.s.in @@ -1,5 +1,4 @@ -/* Copyright (c) 2011 Xiph.Org Foundation, Skype Limited - Written by Jean-Marc Valin and Koen Vos */ +/* Copyright (C) 2013 Mozilla Corporation */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -25,23 +24,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +; Set the following to 1 if we have EDSP instructions +; (LDRD/STRD, etc., ARMv5E and later). +OPUS_ARM_MAY_HAVE_EDSP * @OPUS_ARM_MAY_HAVE_EDSP@ -#include "opus.h" -#include "opus_private.h" +; Set the following to 1 if we have ARMv6 media instructions. +OPUS_ARM_MAY_HAVE_MEDIA * @OPUS_ARM_MAY_HAVE_MEDIA@ -int encode_size(int size, unsigned char *data) -{ - if (size < 252) - { - data[0] = size; - return 1; - } else { - data[0] = 252+(size&0x3); - data[1] = (size-(int)data[0])>>2; - return 2; - } -} +; Set the following to 1 if we have NEON (some ARMv7) +OPUS_ARM_MAY_HAVE_NEON * @OPUS_ARM_MAY_HAVE_NEON@ +END diff --git a/code/opus-1.1/celt/arm/celt_pitch_xcorr_arm.s b/code/opus-1.1/celt/arm/celt_pitch_xcorr_arm.s new file mode 100644 index 00000000..09917b16 --- /dev/null +++ b/code/opus-1.1/celt/arm/celt_pitch_xcorr_arm.s @@ -0,0 +1,545 @@ +; Copyright (c) 2007-2008 CSIRO +; Copyright (c) 2007-2009 Xiph.Org Foundation +; Copyright (c) 2013 Parrot +; Written by Aurélien Zanelli +; +; 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. + + AREA |.text|, CODE, READONLY + + GET celt/arm/armopts.s + +IF OPUS_ARM_MAY_HAVE_EDSP + EXPORT celt_pitch_xcorr_edsp +ENDIF + +IF OPUS_ARM_MAY_HAVE_NEON + EXPORT celt_pitch_xcorr_neon +ENDIF + +IF OPUS_ARM_MAY_HAVE_NEON + +; Compute sum[k]=sum(x[j]*y[j+k],j=0...len-1), k=0...3 +xcorr_kernel_neon PROC + ; input: + ; r3 = int len + ; r4 = opus_val16 *x + ; r5 = opus_val16 *y + ; q0 = opus_val32 sum[4] + ; output: + ; q0 = opus_val32 sum[4] + ; preserved: r0-r3, r6-r11, d2, q4-q7, q9-q15 + ; internal usage: + ; r12 = int j + ; d3 = y_3|y_2|y_1|y_0 + ; q2 = y_B|y_A|y_9|y_8|y_7|y_6|y_5|y_4 + ; q3 = x_7|x_6|x_5|x_4|x_3|x_2|x_1|x_0 + ; q8 = scratch + ; + ; Load y[0...3] + ; This requires len>0 to always be valid (which we assert in the C code). + VLD1.16 {d5}, [r5]! + SUBS r12, r3, #8 + BLE xcorr_kernel_neon_process4 +; Process 8 samples at a time. +; This loop loads one y value more than we actually need. Therefore we have to +; stop as soon as there are 8 or fewer samples left (instead of 7), to avoid +; reading past the end of the array. +xcorr_kernel_neon_process8 + ; This loop has 19 total instructions (10 cycles to issue, minimum), with + ; - 2 cycles of ARM insrtuctions, + ; - 10 cycles of load/store/byte permute instructions, and + ; - 9 cycles of data processing instructions. + ; On a Cortex A8, we dual-issue the maximum amount (9 cycles) between the + ; latter two categories, meaning the whole loop should run in 10 cycles per + ; iteration, barring cache misses. + ; + ; Load x[0...7] + VLD1.16 {d6, d7}, [r4]! + ; Unlike VMOV, VAND is a data processsing instruction (and doesn't get + ; assembled to VMOV, like VORR would), so it dual-issues with the prior VLD1. + VAND d3, d5, d5 + SUBS r12, r12, #8 + ; Load y[4...11] + VLD1.16 {d4, d5}, [r5]! + VMLAL.S16 q0, d3, d6[0] + VEXT.16 d16, d3, d4, #1 + VMLAL.S16 q0, d4, d7[0] + VEXT.16 d17, d4, d5, #1 + VMLAL.S16 q0, d16, d6[1] + VEXT.16 d16, d3, d4, #2 + VMLAL.S16 q0, d17, d7[1] + VEXT.16 d17, d4, d5, #2 + VMLAL.S16 q0, d16, d6[2] + VEXT.16 d16, d3, d4, #3 + VMLAL.S16 q0, d17, d7[2] + VEXT.16 d17, d4, d5, #3 + VMLAL.S16 q0, d16, d6[3] + VMLAL.S16 q0, d17, d7[3] + BGT xcorr_kernel_neon_process8 +; Process 4 samples here if we have > 4 left (still reading one extra y value). +xcorr_kernel_neon_process4 + ADDS r12, r12, #4 + BLE xcorr_kernel_neon_process2 + ; Load x[0...3] + VLD1.16 d6, [r4]! + ; Use VAND since it's a data processing instruction again. + VAND d4, d5, d5 + SUB r12, r12, #4 + ; Load y[4...7] + VLD1.16 d5, [r5]! + VMLAL.S16 q0, d4, d6[0] + VEXT.16 d16, d4, d5, #1 + VMLAL.S16 q0, d16, d6[1] + VEXT.16 d16, d4, d5, #2 + VMLAL.S16 q0, d16, d6[2] + VEXT.16 d16, d4, d5, #3 + VMLAL.S16 q0, d16, d6[3] +; Process 2 samples here if we have > 2 left (still reading one extra y value). +xcorr_kernel_neon_process2 + ADDS r12, r12, #2 + BLE xcorr_kernel_neon_process1 + ; Load x[0...1] + VLD2.16 {d6[],d7[]}, [r4]! + ; Use VAND since it's a data processing instruction again. + VAND d4, d5, d5 + SUB r12, r12, #2 + ; Load y[4...5] + VLD1.32 {d5[]}, [r5]! + VMLAL.S16 q0, d4, d6 + VEXT.16 d16, d4, d5, #1 + ; Replace bottom copy of {y5,y4} in d5 with {y3,y2} from d4, using VSRI + ; instead of VEXT, since it's a data-processing instruction. + VSRI.64 d5, d4, #32 + VMLAL.S16 q0, d16, d7 +; Process 1 sample using the extra y value we loaded above. +xcorr_kernel_neon_process1 + ; Load next *x + VLD1.16 {d6[]}, [r4]! + ADDS r12, r12, #1 + ; y[0...3] are left in d5 from prior iteration(s) (if any) + VMLAL.S16 q0, d5, d6 + MOVLE pc, lr +; Now process 1 last sample, not reading ahead. + ; Load last *y + VLD1.16 {d4[]}, [r5]! + VSRI.64 d4, d5, #16 + ; Load last *x + VLD1.16 {d6[]}, [r4]! + VMLAL.S16 q0, d4, d6 + MOV pc, lr + ENDP + +; opus_val32 celt_pitch_xcorr_neon(opus_val16 *_x, opus_val16 *_y, +; opus_val32 *xcorr, int len, int max_pitch) +celt_pitch_xcorr_neon PROC + ; input: + ; r0 = opus_val16 *_x + ; r1 = opus_val16 *_y + ; r2 = opus_val32 *xcorr + ; r3 = int len + ; output: + ; r0 = int maxcorr + ; internal usage: + ; r4 = opus_val16 *x (for xcorr_kernel_neon()) + ; r5 = opus_val16 *y (for xcorr_kernel_neon()) + ; r6 = int max_pitch + ; r12 = int j + ; q15 = int maxcorr[4] (q15 is not used by xcorr_kernel_neon()) + STMFD sp!, {r4-r6, lr} + LDR r6, [sp, #16] + VMOV.S32 q15, #1 + ; if (max_pitch < 4) goto celt_pitch_xcorr_neon_process4_done + SUBS r6, r6, #4 + BLT celt_pitch_xcorr_neon_process4_done +celt_pitch_xcorr_neon_process4 + ; xcorr_kernel_neon parameters: + ; r3 = len, r4 = _x, r5 = _y, q0 = {0, 0, 0, 0} + MOV r4, r0 + MOV r5, r1 + VEOR q0, q0, q0 + ; xcorr_kernel_neon only modifies r4, r5, r12, and q0...q3. + ; So we don't save/restore any other registers. + BL xcorr_kernel_neon + SUBS r6, r6, #4 + VST1.32 {q0}, [r2]! + ; _y += 4 + ADD r1, r1, #8 + VMAX.S32 q15, q15, q0 + ; if (max_pitch < 4) goto celt_pitch_xcorr_neon_process4_done + BGE celt_pitch_xcorr_neon_process4 +; We have less than 4 sums left to compute. +celt_pitch_xcorr_neon_process4_done + ADDS r6, r6, #4 + ; Reduce maxcorr to a single value + VMAX.S32 d30, d30, d31 + VPMAX.S32 d30, d30, d30 + ; if (max_pitch <= 0) goto celt_pitch_xcorr_neon_done + BLE celt_pitch_xcorr_neon_done +; Now compute each remaining sum one at a time. +celt_pitch_xcorr_neon_process_remaining + MOV r4, r0 + MOV r5, r1 + VMOV.I32 q0, #0 + SUBS r12, r3, #8 + BLT celt_pitch_xcorr_neon_process_remaining4 +; Sum terms 8 at a time. +celt_pitch_xcorr_neon_process_remaining_loop8 + ; Load x[0...7] + VLD1.16 {q1}, [r4]! + ; Load y[0...7] + VLD1.16 {q2}, [r5]! + SUBS r12, r12, #8 + VMLAL.S16 q0, d4, d2 + VMLAL.S16 q0, d5, d3 + BGE celt_pitch_xcorr_neon_process_remaining_loop8 +; Sum terms 4 at a time. +celt_pitch_xcorr_neon_process_remaining4 + ADDS r12, r12, #4 + BLT celt_pitch_xcorr_neon_process_remaining4_done + ; Load x[0...3] + VLD1.16 {d2}, [r4]! + ; Load y[0...3] + VLD1.16 {d3}, [r5]! + SUB r12, r12, #4 + VMLAL.S16 q0, d3, d2 +celt_pitch_xcorr_neon_process_remaining4_done + ; Reduce the sum to a single value. + VADD.S32 d0, d0, d1 + VPADDL.S32 d0, d0 + ADDS r12, r12, #4 + BLE celt_pitch_xcorr_neon_process_remaining_loop_done +; Sum terms 1 at a time. +celt_pitch_xcorr_neon_process_remaining_loop1 + VLD1.16 {d2[]}, [r4]! + VLD1.16 {d3[]}, [r5]! + SUBS r12, r12, #1 + VMLAL.S16 q0, d2, d3 + BGT celt_pitch_xcorr_neon_process_remaining_loop1 +celt_pitch_xcorr_neon_process_remaining_loop_done + VST1.32 {d0[0]}, [r2]! + VMAX.S32 d30, d30, d0 + SUBS r6, r6, #1 + ; _y++ + ADD r1, r1, #2 + ; if (--max_pitch > 0) goto celt_pitch_xcorr_neon_process_remaining + BGT celt_pitch_xcorr_neon_process_remaining +celt_pitch_xcorr_neon_done + VMOV.32 r0, d30[0] + LDMFD sp!, {r4-r6, pc} + ENDP + +ENDIF + +IF OPUS_ARM_MAY_HAVE_EDSP + +; This will get used on ARMv7 devices without NEON, so it has been optimized +; to take advantage of dual-issuing where possible. +xcorr_kernel_edsp PROC + ; input: + ; r3 = int len + ; r4 = opus_val16 *_x (must be 32-bit aligned) + ; r5 = opus_val16 *_y (must be 32-bit aligned) + ; r6...r9 = opus_val32 sum[4] + ; output: + ; r6...r9 = opus_val32 sum[4] + ; preserved: r0-r5 + ; internal usage + ; r2 = int j + ; r12,r14 = opus_val16 x[4] + ; r10,r11 = opus_val16 y[4] + STMFD sp!, {r2,r4,r5,lr} + LDR r10, [r5], #4 ; Load y[0...1] + SUBS r2, r3, #4 ; j = len-4 + LDR r11, [r5], #4 ; Load y[2...3] + BLE xcorr_kernel_edsp_process4_done + LDR r12, [r4], #4 ; Load x[0...1] + ; Stall +xcorr_kernel_edsp_process4 + ; The multiplies must issue from pipeline 0, and can't dual-issue with each + ; other. Every other instruction here dual-issues with a multiply, and is + ; thus "free". There should be no stalls in the body of the loop. + SMLABB r6, r12, r10, r6 ; sum[0] = MAC16_16(sum[0],x_0,y_0) + LDR r14, [r4], #4 ; Load x[2...3] + SMLABT r7, r12, r10, r7 ; sum[1] = MAC16_16(sum[1],x_0,y_1) + SUBS r2, r2, #4 ; j-=4 + SMLABB r8, r12, r11, r8 ; sum[2] = MAC16_16(sum[2],x_0,y_2) + SMLABT r9, r12, r11, r9 ; sum[3] = MAC16_16(sum[3],x_0,y_3) + SMLATT r6, r12, r10, r6 ; sum[0] = MAC16_16(sum[0],x_1,y_1) + LDR r10, [r5], #4 ; Load y[4...5] + SMLATB r7, r12, r11, r7 ; sum[1] = MAC16_16(sum[1],x_1,y_2) + SMLATT r8, r12, r11, r8 ; sum[2] = MAC16_16(sum[2],x_1,y_3) + SMLATB r9, r12, r10, r9 ; sum[3] = MAC16_16(sum[3],x_1,y_4) + LDRGT r12, [r4], #4 ; Load x[0...1] + SMLABB r6, r14, r11, r6 ; sum[0] = MAC16_16(sum[0],x_2,y_2) + SMLABT r7, r14, r11, r7 ; sum[1] = MAC16_16(sum[1],x_2,y_3) + SMLABB r8, r14, r10, r8 ; sum[2] = MAC16_16(sum[2],x_2,y_4) + SMLABT r9, r14, r10, r9 ; sum[3] = MAC16_16(sum[3],x_2,y_5) + SMLATT r6, r14, r11, r6 ; sum[0] = MAC16_16(sum[0],x_3,y_3) + LDR r11, [r5], #4 ; Load y[6...7] + SMLATB r7, r14, r10, r7 ; sum[1] = MAC16_16(sum[1],x_3,y_4) + SMLATT r8, r14, r10, r8 ; sum[2] = MAC16_16(sum[2],x_3,y_5) + SMLATB r9, r14, r11, r9 ; sum[3] = MAC16_16(sum[3],x_3,y_6) + BGT xcorr_kernel_edsp_process4 +xcorr_kernel_edsp_process4_done + ADDS r2, r2, #4 + BLE xcorr_kernel_edsp_done + LDRH r12, [r4], #2 ; r12 = *x++ + SUBS r2, r2, #1 ; j-- + ; Stall + SMLABB r6, r12, r10, r6 ; sum[0] = MAC16_16(sum[0],x,y_0) + LDRGTH r14, [r4], #2 ; r14 = *x++ + SMLABT r7, r12, r10, r7 ; sum[1] = MAC16_16(sum[1],x,y_1) + SMLABB r8, r12, r11, r8 ; sum[2] = MAC16_16(sum[2],x,y_2) + SMLABT r9, r12, r11, r9 ; sum[3] = MAC16_16(sum[3],x,y_3) + BLE xcorr_kernel_edsp_done + SMLABT r6, r14, r10, r6 ; sum[0] = MAC16_16(sum[0],x,y_1) + SUBS r2, r2, #1 ; j-- + SMLABB r7, r14, r11, r7 ; sum[1] = MAC16_16(sum[1],x,y_2) + LDRH r10, [r5], #2 ; r10 = y_4 = *y++ + SMLABT r8, r14, r11, r8 ; sum[2] = MAC16_16(sum[2],x,y_3) + LDRGTH r12, [r4], #2 ; r12 = *x++ + SMLABB r9, r14, r10, r9 ; sum[3] = MAC16_16(sum[3],x,y_4) + BLE xcorr_kernel_edsp_done + SMLABB r6, r12, r11, r6 ; sum[0] = MAC16_16(sum[0],tmp,y_2) + CMP r2, #1 ; j-- + SMLABT r7, r12, r11, r7 ; sum[1] = MAC16_16(sum[1],tmp,y_3) + LDRH r2, [r5], #2 ; r2 = y_5 = *y++ + SMLABB r8, r12, r10, r8 ; sum[2] = MAC16_16(sum[2],tmp,y_4) + LDRGTH r14, [r4] ; r14 = *x + SMLABB r9, r12, r2, r9 ; sum[3] = MAC16_16(sum[3],tmp,y_5) + BLE xcorr_kernel_edsp_done + SMLABT r6, r14, r11, r6 ; sum[0] = MAC16_16(sum[0],tmp,y_3) + LDRH r11, [r5] ; r11 = y_6 = *y + SMLABB r7, r14, r10, r7 ; sum[1] = MAC16_16(sum[1],tmp,y_4) + SMLABB r8, r14, r2, r8 ; sum[2] = MAC16_16(sum[2],tmp,y_5) + SMLABB r9, r14, r11, r9 ; sum[3] = MAC16_16(sum[3],tmp,y_6) +xcorr_kernel_edsp_done + LDMFD sp!, {r2,r4,r5,pc} + ENDP + +celt_pitch_xcorr_edsp PROC + ; input: + ; r0 = opus_val16 *_x (must be 32-bit aligned) + ; r1 = opus_val16 *_y (only needs to be 16-bit aligned) + ; r2 = opus_val32 *xcorr + ; r3 = int len + ; output: + ; r0 = maxcorr + ; internal usage + ; r4 = opus_val16 *x + ; r5 = opus_val16 *y + ; r6 = opus_val32 sum0 + ; r7 = opus_val32 sum1 + ; r8 = opus_val32 sum2 + ; r9 = opus_val32 sum3 + ; r1 = int max_pitch + ; r12 = int j + STMFD sp!, {r4-r11, lr} + MOV r5, r1 + LDR r1, [sp, #36] + MOV r4, r0 + TST r5, #3 + ; maxcorr = 1 + MOV r0, #1 + BEQ celt_pitch_xcorr_edsp_process1u_done +; Compute one sum at the start to make y 32-bit aligned. + SUBS r12, r3, #4 + ; r14 = sum = 0 + MOV r14, #0 + LDRH r8, [r5], #2 + BLE celt_pitch_xcorr_edsp_process1u_loop4_done + LDR r6, [r4], #4 + MOV r8, r8, LSL #16 +celt_pitch_xcorr_edsp_process1u_loop4 + LDR r9, [r5], #4 + SMLABT r14, r6, r8, r14 ; sum = MAC16_16(sum, x_0, y_0) + LDR r7, [r4], #4 + SMLATB r14, r6, r9, r14 ; sum = MAC16_16(sum, x_1, y_1) + LDR r8, [r5], #4 + SMLABT r14, r7, r9, r14 ; sum = MAC16_16(sum, x_2, y_2) + SUBS r12, r12, #4 ; j-=4 + SMLATB r14, r7, r8, r14 ; sum = MAC16_16(sum, x_3, y_3) + LDRGT r6, [r4], #4 + BGT celt_pitch_xcorr_edsp_process1u_loop4 + MOV r8, r8, LSR #16 +celt_pitch_xcorr_edsp_process1u_loop4_done + ADDS r12, r12, #4 +celt_pitch_xcorr_edsp_process1u_loop1 + LDRGEH r6, [r4], #2 + ; Stall + SMLABBGE r14, r6, r8, r14 ; sum = MAC16_16(sum, *x, *y) + SUBGES r12, r12, #1 + LDRGTH r8, [r5], #2 + BGT celt_pitch_xcorr_edsp_process1u_loop1 + ; Restore _x + SUB r4, r4, r3, LSL #1 + ; Restore and advance _y + SUB r5, r5, r3, LSL #1 + ; maxcorr = max(maxcorr, sum) + CMP r0, r14 + ADD r5, r5, #2 + MOVLT r0, r14 + SUBS r1, r1, #1 + ; xcorr[i] = sum + STR r14, [r2], #4 + BLE celt_pitch_xcorr_edsp_done +celt_pitch_xcorr_edsp_process1u_done + ; if (max_pitch < 4) goto celt_pitch_xcorr_edsp_process2 + SUBS r1, r1, #4 + BLT celt_pitch_xcorr_edsp_process2 +celt_pitch_xcorr_edsp_process4 + ; xcorr_kernel_edsp parameters: + ; r3 = len, r4 = _x, r5 = _y, r6...r9 = sum[4] = {0, 0, 0, 0} + MOV r6, #0 + MOV r7, #0 + MOV r8, #0 + MOV r9, #0 + BL xcorr_kernel_edsp ; xcorr_kernel_edsp(_x, _y+i, xcorr+i, len) + ; maxcorr = max(maxcorr, sum0, sum1, sum2, sum3) + CMP r0, r6 + ; _y+=4 + ADD r5, r5, #8 + MOVLT r0, r6 + CMP r0, r7 + MOVLT r0, r7 + CMP r0, r8 + MOVLT r0, r8 + CMP r0, r9 + MOVLT r0, r9 + STMIA r2!, {r6-r9} + SUBS r1, r1, #4 + BGE celt_pitch_xcorr_edsp_process4 +celt_pitch_xcorr_edsp_process2 + ADDS r1, r1, #2 + BLT celt_pitch_xcorr_edsp_process1a + SUBS r12, r3, #4 + ; {r10, r11} = {sum0, sum1} = {0, 0} + MOV r10, #0 + MOV r11, #0 + LDR r8, [r5], #4 + BLE celt_pitch_xcorr_edsp_process2_loop_done + LDR r6, [r4], #4 + LDR r9, [r5], #4 +celt_pitch_xcorr_edsp_process2_loop4 + SMLABB r10, r6, r8, r10 ; sum0 = MAC16_16(sum0, x_0, y_0) + LDR r7, [r4], #4 + SMLABT r11, r6, r8, r11 ; sum1 = MAC16_16(sum1, x_0, y_1) + SUBS r12, r12, #4 ; j-=4 + SMLATT r10, r6, r8, r10 ; sum0 = MAC16_16(sum0, x_1, y_1) + LDR r8, [r5], #4 + SMLATB r11, r6, r9, r11 ; sum1 = MAC16_16(sum1, x_1, y_2) + LDRGT r6, [r4], #4 + SMLABB r10, r7, r9, r10 ; sum0 = MAC16_16(sum0, x_2, y_2) + SMLABT r11, r7, r9, r11 ; sum1 = MAC16_16(sum1, x_2, y_3) + SMLATT r10, r7, r9, r10 ; sum0 = MAC16_16(sum0, x_3, y_3) + LDRGT r9, [r5], #4 + SMLATB r11, r7, r8, r11 ; sum1 = MAC16_16(sum1, x_3, y_4) + BGT celt_pitch_xcorr_edsp_process2_loop4 +celt_pitch_xcorr_edsp_process2_loop_done + ADDS r12, r12, #2 + BLE celt_pitch_xcorr_edsp_process2_1 + LDR r6, [r4], #4 + ; Stall + SMLABB r10, r6, r8, r10 ; sum0 = MAC16_16(sum0, x_0, y_0) + LDR r9, [r5], #4 + SMLABT r11, r6, r8, r11 ; sum1 = MAC16_16(sum1, x_0, y_1) + SUB r12, r12, #2 + SMLATT r10, r6, r8, r10 ; sum0 = MAC16_16(sum0, x_1, y_1) + MOV r8, r9 + SMLATB r11, r6, r9, r11 ; sum1 = MAC16_16(sum1, x_1, y_2) +celt_pitch_xcorr_edsp_process2_1 + LDRH r6, [r4], #2 + ADDS r12, r12, #1 + ; Stall + SMLABB r10, r6, r8, r10 ; sum0 = MAC16_16(sum0, x_0, y_0) + LDRGTH r7, [r4], #2 + SMLABT r11, r6, r8, r11 ; sum1 = MAC16_16(sum1, x_0, y_1) + BLE celt_pitch_xcorr_edsp_process2_done + LDRH r9, [r5], #2 + SMLABT r10, r7, r8, r10 ; sum0 = MAC16_16(sum0, x_0, y_1) + SMLABB r11, r7, r9, r11 ; sum1 = MAC16_16(sum1, x_0, y_2) +celt_pitch_xcorr_edsp_process2_done + ; Restore _x + SUB r4, r4, r3, LSL #1 + ; Restore and advance _y + SUB r5, r5, r3, LSL #1 + ; maxcorr = max(maxcorr, sum0) + CMP r0, r10 + ADD r5, r5, #2 + MOVLT r0, r10 + SUB r1, r1, #2 + ; maxcorr = max(maxcorr, sum1) + CMP r0, r11 + ; xcorr[i] = sum + STR r10, [r2], #4 + MOVLT r0, r11 + STR r11, [r2], #4 +celt_pitch_xcorr_edsp_process1a + ADDS r1, r1, #1 + BLT celt_pitch_xcorr_edsp_done + SUBS r12, r3, #4 + ; r14 = sum = 0 + MOV r14, #0 + BLT celt_pitch_xcorr_edsp_process1a_loop_done + LDR r6, [r4], #4 + LDR r8, [r5], #4 + LDR r7, [r4], #4 + LDR r9, [r5], #4 +celt_pitch_xcorr_edsp_process1a_loop4 + SMLABB r14, r6, r8, r14 ; sum = MAC16_16(sum, x_0, y_0) + SUBS r12, r12, #4 ; j-=4 + SMLATT r14, r6, r8, r14 ; sum = MAC16_16(sum, x_1, y_1) + LDRGE r6, [r4], #4 + SMLABB r14, r7, r9, r14 ; sum = MAC16_16(sum, x_2, y_2) + LDRGE r8, [r5], #4 + SMLATT r14, r7, r9, r14 ; sum = MAC16_16(sum, x_3, y_3) + LDRGE r7, [r4], #4 + LDRGE r9, [r5], #4 + BGE celt_pitch_xcorr_edsp_process1a_loop4 +celt_pitch_xcorr_edsp_process1a_loop_done + ADDS r12, r12, #2 + LDRGE r6, [r4], #4 + LDRGE r8, [r5], #4 + ; Stall + SMLABBGE r14, r6, r8, r14 ; sum = MAC16_16(sum, x_0, y_0) + SUBGE r12, r12, #2 + SMLATTGE r14, r6, r8, r14 ; sum = MAC16_16(sum, x_1, y_1) + ADDS r12, r12, #1 + LDRGEH r6, [r4], #2 + LDRGEH r8, [r5], #2 + ; Stall + SMLABBGE r14, r6, r8, r14 ; sum = MAC16_16(sum, *x, *y) + ; maxcorr = max(maxcorr, sum) + CMP r0, r14 + ; xcorr[i] = sum + STR r14, [r2], #4 + MOVLT r0, r14 +celt_pitch_xcorr_edsp_done + LDMFD sp!, {r4-r11, pc} + ENDP + +ENDIF + +END diff --git a/code/opus-1.1/celt/arm/fixed_armv4.h b/code/opus-1.1/celt/arm/fixed_armv4.h new file mode 100644 index 00000000..b690bc8c --- /dev/null +++ b/code/opus-1.1/celt/arm/fixed_armv4.h @@ -0,0 +1,76 @@ +/* Copyright (C) 2013 Xiph.Org Foundation and contributors */ +/* + 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. +*/ + +#ifndef FIXED_ARMv4_H +#define FIXED_ARMv4_H + +/** 16x32 multiplication, followed by a 16-bit shift right. Results fits in 32 bits */ +#undef MULT16_32_Q16 +static OPUS_INLINE opus_val32 MULT16_32_Q16_armv4(opus_val16 a, opus_val32 b) +{ + unsigned rd_lo; + int rd_hi; + __asm__( + "#MULT16_32_Q16\n\t" + "smull %0, %1, %2, %3\n\t" + : "=&r"(rd_lo), "=&r"(rd_hi) + : "%r"(b),"r"(a<<16) + ); + return rd_hi; +} +#define MULT16_32_Q16(a, b) (MULT16_32_Q16_armv4(a, b)) + + +/** 16x32 multiplication, followed by a 15-bit shift right. Results fits in 32 bits */ +#undef MULT16_32_Q15 +static OPUS_INLINE opus_val32 MULT16_32_Q15_armv4(opus_val16 a, opus_val32 b) +{ + unsigned rd_lo; + int rd_hi; + __asm__( + "#MULT16_32_Q15\n\t" + "smull %0, %1, %2, %3\n\t" + : "=&r"(rd_lo), "=&r"(rd_hi) + : "%r"(b), "r"(a<<16) + ); + /*We intentionally don't OR in the high bit of rd_lo for speed.*/ + return rd_hi<<1; +} +#define MULT16_32_Q15(a, b) (MULT16_32_Q15_armv4(a, b)) + + +/** 16x32 multiply, followed by a 15-bit shift right and 32-bit add. + b must fit in 31 bits. + Result fits in 32 bits. */ +#undef MAC16_32_Q15 +#define MAC16_32_Q15(c, a, b) ADD32(c, MULT16_32_Q15(a, b)) + + +/** 32x32 multiplication, followed by a 31-bit shift right. Results fits in 32 bits */ +#undef MULT32_32_Q31 +#define MULT32_32_Q31(a,b) (opus_val32)((((opus_int64)(a)) * ((opus_int64)(b)))>>31) + +#endif diff --git a/code/opus-1.1/celt/arm/fixed_armv5e.h b/code/opus-1.1/celt/arm/fixed_armv5e.h new file mode 100644 index 00000000..1194a7d3 --- /dev/null +++ b/code/opus-1.1/celt/arm/fixed_armv5e.h @@ -0,0 +1,116 @@ +/* Copyright (C) 2007-2009 Xiph.Org Foundation + Copyright (C) 2003-2008 Jean-Marc Valin + Copyright (C) 2007-2008 CSIRO + Copyright (C) 2013 Parrot */ +/* + 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. +*/ + +#ifndef FIXED_ARMv5E_H +#define FIXED_ARMv5E_H + +#include "fixed_armv4.h" + +/** 16x32 multiplication, followed by a 16-bit shift right. Results fits in 32 bits */ +#undef MULT16_32_Q16 +static OPUS_INLINE opus_val32 MULT16_32_Q16_armv5e(opus_val16 a, opus_val32 b) +{ + int res; + __asm__( + "#MULT16_32_Q16\n\t" + "smulwb %0, %1, %2\n\t" + : "=r"(res) + : "r"(b),"r"(a) + ); + return res; +} +#define MULT16_32_Q16(a, b) (MULT16_32_Q16_armv5e(a, b)) + + +/** 16x32 multiplication, followed by a 15-bit shift right. Results fits in 32 bits */ +#undef MULT16_32_Q15 +static OPUS_INLINE opus_val32 MULT16_32_Q15_armv5e(opus_val16 a, opus_val32 b) +{ + int res; + __asm__( + "#MULT16_32_Q15\n\t" + "smulwb %0, %1, %2\n\t" + : "=r"(res) + : "r"(b), "r"(a) + ); + return res<<1; +} +#define MULT16_32_Q15(a, b) (MULT16_32_Q15_armv5e(a, b)) + + +/** 16x32 multiply, followed by a 15-bit shift right and 32-bit add. + b must fit in 31 bits. + Result fits in 32 bits. */ +#undef MAC16_32_Q15 +static OPUS_INLINE opus_val32 MAC16_32_Q15_armv5e(opus_val32 c, opus_val16 a, + opus_val32 b) +{ + int res; + __asm__( + "#MAC16_32_Q15\n\t" + "smlawb %0, %1, %2, %3;\n" + : "=r"(res) + : "r"(b<<1), "r"(a), "r"(c) + ); + return res; +} +#define MAC16_32_Q15(c, a, b) (MAC16_32_Q15_armv5e(c, a, b)) + +/** 16x16 multiply-add where the result fits in 32 bits */ +#undef MAC16_16 +static OPUS_INLINE opus_val32 MAC16_16_armv5e(opus_val32 c, opus_val16 a, + opus_val16 b) +{ + int res; + __asm__( + "#MAC16_16\n\t" + "smlabb %0, %1, %2, %3;\n" + : "=r"(res) + : "r"(a), "r"(b), "r"(c) + ); + return res; +} +#define MAC16_16(c, a, b) (MAC16_16_armv5e(c, a, b)) + +/** 16x16 multiplication where the result fits in 32 bits */ +#undef MULT16_16 +static OPUS_INLINE opus_val32 MULT16_16_armv5e(opus_val16 a, opus_val16 b) +{ + int res; + __asm__( + "#MULT16_16\n\t" + "smulbb %0, %1, %2;\n" + : "=r"(res) + : "r"(a), "r"(b) + ); + return res; +} +#define MULT16_16(a, b) (MULT16_16_armv5e(a, b)) + +#endif diff --git a/code/opus-1.1/celt/arm/kiss_fft_armv4.h b/code/opus-1.1/celt/arm/kiss_fft_armv4.h new file mode 100644 index 00000000..e4faad6f --- /dev/null +++ b/code/opus-1.1/celt/arm/kiss_fft_armv4.h @@ -0,0 +1,121 @@ +/*Copyright (c) 2013, Xiph.Org Foundation and contributors. + + All rights reserved. + + 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.*/ + +#ifndef KISS_FFT_ARMv4_H +#define KISS_FFT_ARMv4_H + +#if !defined(KISS_FFT_GUTS_H) +#error "This file should only be included from _kiss_fft_guts.h" +#endif + +#ifdef FIXED_POINT + +#undef C_MUL +#define C_MUL(m,a,b) \ + do{ \ + int br__; \ + int bi__; \ + int tt__; \ + __asm__ __volatile__( \ + "#C_MUL\n\t" \ + "ldrsh %[br], [%[bp], #0]\n\t" \ + "ldm %[ap], {r0,r1}\n\t" \ + "ldrsh %[bi], [%[bp], #2]\n\t" \ + "smull %[tt], %[mi], r1, %[br]\n\t" \ + "smlal %[tt], %[mi], r0, %[bi]\n\t" \ + "rsb %[bi], %[bi], #0\n\t" \ + "smull %[br], %[mr], r0, %[br]\n\t" \ + "mov %[tt], %[tt], lsr #15\n\t" \ + "smlal %[br], %[mr], r1, %[bi]\n\t" \ + "orr %[mi], %[tt], %[mi], lsl #17\n\t" \ + "mov %[br], %[br], lsr #15\n\t" \ + "orr %[mr], %[br], %[mr], lsl #17\n\t" \ + : [mr]"=r"((m).r), [mi]"=r"((m).i), \ + [br]"=&r"(br__), [bi]"=r"(bi__), [tt]"=r"(tt__) \ + : [ap]"r"(&(a)), [bp]"r"(&(b)) \ + : "r0", "r1" \ + ); \ + } \ + while(0) + +#undef C_MUL4 +#define C_MUL4(m,a,b) \ + do{ \ + int br__; \ + int bi__; \ + int tt__; \ + __asm__ __volatile__( \ + "#C_MUL4\n\t" \ + "ldrsh %[br], [%[bp], #0]\n\t" \ + "ldm %[ap], {r0,r1}\n\t" \ + "ldrsh %[bi], [%[bp], #2]\n\t" \ + "smull %[tt], %[mi], r1, %[br]\n\t" \ + "smlal %[tt], %[mi], r0, %[bi]\n\t" \ + "rsb %[bi], %[bi], #0\n\t" \ + "smull %[br], %[mr], r0, %[br]\n\t" \ + "mov %[tt], %[tt], lsr #17\n\t" \ + "smlal %[br], %[mr], r1, %[bi]\n\t" \ + "orr %[mi], %[tt], %[mi], lsl #15\n\t" \ + "mov %[br], %[br], lsr #17\n\t" \ + "orr %[mr], %[br], %[mr], lsl #15\n\t" \ + : [mr]"=r"((m).r), [mi]"=r"((m).i), \ + [br]"=&r"(br__), [bi]"=r"(bi__), [tt]"=r"(tt__) \ + : [ap]"r"(&(a)), [bp]"r"(&(b)) \ + : "r0", "r1" \ + ); \ + } \ + while(0) + +#undef C_MULC +#define C_MULC(m,a,b) \ + do{ \ + int br__; \ + int bi__; \ + int tt__; \ + __asm__ __volatile__( \ + "#C_MULC\n\t" \ + "ldrsh %[br], [%[bp], #0]\n\t" \ + "ldm %[ap], {r0,r1}\n\t" \ + "ldrsh %[bi], [%[bp], #2]\n\t" \ + "smull %[tt], %[mr], r0, %[br]\n\t" \ + "smlal %[tt], %[mr], r1, %[bi]\n\t" \ + "rsb %[bi], %[bi], #0\n\t" \ + "smull %[br], %[mi], r1, %[br]\n\t" \ + "mov %[tt], %[tt], lsr #15\n\t" \ + "smlal %[br], %[mi], r0, %[bi]\n\t" \ + "orr %[mr], %[tt], %[mr], lsl #17\n\t" \ + "mov %[br], %[br], lsr #15\n\t" \ + "orr %[mi], %[br], %[mi], lsl #17\n\t" \ + : [mr]"=r"((m).r), [mi]"=r"((m).i), \ + [br]"=&r"(br__), [bi]"=r"(bi__), [tt]"=r"(tt__) \ + : [ap]"r"(&(a)), [bp]"r"(&(b)) \ + : "r0", "r1" \ + ); \ + } \ + while(0) + +#endif /* FIXED_POINT */ + +#endif /* KISS_FFT_ARMv4_H */ diff --git a/code/opus-1.1/celt/arm/kiss_fft_armv5e.h b/code/opus-1.1/celt/arm/kiss_fft_armv5e.h new file mode 100644 index 00000000..9eca183d --- /dev/null +++ b/code/opus-1.1/celt/arm/kiss_fft_armv5e.h @@ -0,0 +1,118 @@ +/*Copyright (c) 2013, Xiph.Org Foundation and contributors. + + All rights reserved. + + 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.*/ + +#ifndef KISS_FFT_ARMv5E_H +#define KISS_FFT_ARMv5E_H + +#if !defined(KISS_FFT_GUTS_H) +#error "This file should only be included from _kiss_fft_guts.h" +#endif + +#ifdef FIXED_POINT + +#if defined(__thumb__)||defined(__thumb2__) +#define LDRD_CONS "Q" +#else +#define LDRD_CONS "Uq" +#endif + +#undef C_MUL +#define C_MUL(m,a,b) \ + do{ \ + int mr1__; \ + int mr2__; \ + int mi__; \ + long long aval__; \ + int bval__; \ + __asm__( \ + "#C_MUL\n\t" \ + "ldrd %[aval], %H[aval], %[ap]\n\t" \ + "ldr %[bval], %[bp]\n\t" \ + "smulwb %[mi], %H[aval], %[bval]\n\t" \ + "smulwb %[mr1], %[aval], %[bval]\n\t" \ + "smulwt %[mr2], %H[aval], %[bval]\n\t" \ + "smlawt %[mi], %[aval], %[bval], %[mi]\n\t" \ + : [mr1]"=r"(mr1__), [mr2]"=r"(mr2__), [mi]"=r"(mi__), \ + [aval]"=&r"(aval__), [bval]"=r"(bval__) \ + : [ap]LDRD_CONS(a), [bp]"m"(b) \ + ); \ + (m).r = SHL32(SUB32(mr1__, mr2__), 1); \ + (m).i = SHL32(mi__, 1); \ + } \ + while(0) + +#undef C_MUL4 +#define C_MUL4(m,a,b) \ + do{ \ + int mr1__; \ + int mr2__; \ + int mi__; \ + long long aval__; \ + int bval__; \ + __asm__( \ + "#C_MUL4\n\t" \ + "ldrd %[aval], %H[aval], %[ap]\n\t" \ + "ldr %[bval], %[bp]\n\t" \ + "smulwb %[mi], %H[aval], %[bval]\n\t" \ + "smulwb %[mr1], %[aval], %[bval]\n\t" \ + "smulwt %[mr2], %H[aval], %[bval]\n\t" \ + "smlawt %[mi], %[aval], %[bval], %[mi]\n\t" \ + : [mr1]"=r"(mr1__), [mr2]"=r"(mr2__), [mi]"=r"(mi__), \ + [aval]"=&r"(aval__), [bval]"=r"(bval__) \ + : [ap]LDRD_CONS(a), [bp]"m"(b) \ + ); \ + (m).r = SHR32(SUB32(mr1__, mr2__), 1); \ + (m).i = SHR32(mi__, 1); \ + } \ + while(0) + +#undef C_MULC +#define C_MULC(m,a,b) \ + do{ \ + int mr__; \ + int mi1__; \ + int mi2__; \ + long long aval__; \ + int bval__; \ + __asm__( \ + "#C_MULC\n\t" \ + "ldrd %[aval], %H[aval], %[ap]\n\t" \ + "ldr %[bval], %[bp]\n\t" \ + "smulwb %[mr], %[aval], %[bval]\n\t" \ + "smulwb %[mi1], %H[aval], %[bval]\n\t" \ + "smulwt %[mi2], %[aval], %[bval]\n\t" \ + "smlawt %[mr], %H[aval], %[bval], %[mr]\n\t" \ + : [mr]"=r"(mr__), [mi1]"=r"(mi1__), [mi2]"=r"(mi2__), \ + [aval]"=&r"(aval__), [bval]"=r"(bval__) \ + : [ap]LDRD_CONS(a), [bp]"m"(b) \ + ); \ + (m).r = SHL32(mr__, 1); \ + (m).i = SHL32(SUB32(mi1__, mi2__), 1); \ + } \ + while(0) + +#endif /* FIXED_POINT */ + +#endif /* KISS_FFT_GUTS_H */ diff --git a/code/opus-1.1/celt/arm/pitch_arm.h b/code/opus-1.1/celt/arm/pitch_arm.h new file mode 100644 index 00000000..a07f8ac2 --- /dev/null +++ b/code/opus-1.1/celt/arm/pitch_arm.h @@ -0,0 +1,57 @@ +/* Copyright (c) 2010 Xiph.Org Foundation + * Copyright (c) 2013 Parrot */ +/* + 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. +*/ + +#if !defined(PITCH_ARM_H) +# define PITCH_ARM_H + +# include "armcpu.h" + +# if defined(FIXED_POINT) + +# if defined(OPUS_ARM_MAY_HAVE_NEON) +opus_val32 celt_pitch_xcorr_neon(const opus_val16 *_x, const opus_val16 *_y, + opus_val32 *xcorr, int len, int max_pitch); +# endif + +# if defined(OPUS_ARM_MAY_HAVE_MEDIA) +# define celt_pitch_xcorr_media MAY_HAVE_EDSP(celt_pitch_xcorr) +# endif + +# if defined(OPUS_ARM_MAY_HAVE_EDSP) +opus_val32 celt_pitch_xcorr_edsp(const opus_val16 *_x, const opus_val16 *_y, + opus_val32 *xcorr, int len, int max_pitch); +# endif + +# if !defined(OPUS_HAVE_RTCD) +# define OVERRIDE_PITCH_XCORR (1) +# define celt_pitch_xcorr(_x, _y, xcorr, len, max_pitch, arch) \ + ((void)(arch),PRESUME_NEON(celt_pitch_xcorr)(_x, _y, xcorr, len, max_pitch)) +# endif + +# endif + +#endif diff --git a/code/opus-1.0.2/celt/bands.c b/code/opus-1.1/celt/bands.c similarity index 54% rename from code/opus-1.0.2/celt/bands.c rename to code/opus-1.1/celt/bands.c index 3be543c3..cce56e2f 100644 --- a/code/opus-1.0.2/celt/bands.c +++ b/code/opus-1.1/celt/bands.c @@ -40,6 +40,23 @@ #include "os_support.h" #include "mathops.h" #include "rate.h" +#include "quant_bands.h" +#include "pitch.h" + +int hysteresis_decision(opus_val16 val, const opus_val16 *thresholds, const opus_val16 *hysteresis, int N, int prev) +{ + int i; + for (i=0;iprev && val < thresholds[prev]+hysteresis[prev]) + i=prev; + if (i thresholds[prev-1]-hysteresis[prev-1]) + i=prev; + return i; +} opus_uint32 celt_lcg_rand(opus_uint32 seed) { @@ -172,7 +189,8 @@ void normalise_bands(const CELTMode *m, const celt_sig * OPUS_RESTRICT freq, cel #endif /* FIXED_POINT */ /* De-normalise the energy to produce the synthesis from the unit-energy bands */ -void denormalise_bands(const CELTMode *m, const celt_norm * OPUS_RESTRICT X, celt_sig * OPUS_RESTRICT freq, const celt_ener *bandE, int end, int C, int M) +void denormalise_bands(const CELTMode *m, const celt_norm * OPUS_RESTRICT X, + celt_sig * OPUS_RESTRICT freq, const opus_val16 *bandLogE, int start, int end, int C, int M) { int i, c, N; const opus_int16 *eBands = m->eBands; @@ -182,18 +200,55 @@ void denormalise_bands(const CELTMode *m, const celt_norm * OPUS_RESTRICT X, cel celt_sig * OPUS_RESTRICT f; const celt_norm * OPUS_RESTRICT x; f = freq+c*N; - x = X+c*N; - for (i=0;inbEBands],1); + opus_val16 g; + opus_val16 lg; +#ifdef FIXED_POINT + int shift; +#endif j=M*eBands[i]; band_end = M*eBands[i+1]; + lg = ADD16(bandLogE[i+c*m->nbEBands], SHL16((opus_val16)eMeans[i],6)); +#ifndef FIXED_POINT + g = celt_exp2(lg); +#else + /* Handle the integer part of the log energy */ + shift = 16-(lg>>DB_SHIFT); + if (shift>31) + { + shift=0; + g=0; + } else { + /* Handle the fractional part. */ + g = celt_exp2_frac(lg&((1<0); /*M*(eBands[end]-eBands[end-1]) <= 8 assures this*/ + celt_assert(nbBands>0); /* end has to be non-zero */ sum /= nbBands; /* Recursive averaging */ sum = (sum+*average)>>1; @@ -483,50 +534,6 @@ int spreading_decision(const CELTMode *m, celt_norm *X, int *average, return decision; } -#ifdef MEASURE_NORM_MSE - -float MSE[30] = {0}; -int nbMSEBands = 0; -int MSECount[30] = {0}; - -void dump_norm_mse(void) -{ - int i; - for (i=0;inbEBands;i++) - { - int j; - int c; - float g; - if (bandE0[i]<10 || (C==2 && bandE0[i+m->nbEBands]<1)) - continue; - c=0; do { - g = bandE[i+c*m->nbEBands]/(1e-15+bandE0[i+c*m->nbEBands]); - for (j=M*m->eBands[i];jeBands[i+1];j++) - MSE[i] += (g*X[j+c*N]-X0[j+c*N])*(g*X[j+c*N]-X0[j+c*N]); - } while (++cnbEBands; -} - -#endif - /* Indexing table for converting from natural Hadamard to ordery Hadamard This is essentially a bit-reversed Gray, on top of which we've added an inversion of the order because we want the DC at the end rather than @@ -629,289 +636,301 @@ static int compute_qn(int N, int b, int offset, int pulse_cap, int stereo) return qn; } -/* This function is responsible for encoding and decoding a band for both - the mono and stereo case. Even in the mono case, it can split the band - in two and transmit the energy difference with the two half-bands. It - can be called recursively so bands can end up being split in 8 parts. */ -static unsigned quant_band(int encode, const CELTMode *m, int i, celt_norm *X, celt_norm *Y, - int N, int b, int spread, int B, int intensity, int tf_change, celt_norm *lowband, ec_ctx *ec, - opus_int32 *remaining_bits, int LM, celt_norm *lowband_out, const celt_ener *bandE, int level, - opus_uint32 *seed, opus_val16 gain, celt_norm *lowband_scratch, int fill) +struct band_ctx { + int encode; + const CELTMode *m; + int i; + int intensity; + int spread; + int tf_change; + ec_ctx *ec; + opus_int32 remaining_bits; + const celt_ener *bandE; + opus_uint32 seed; +}; + +struct split_ctx { + int inv; + int imid; + int iside; + int delta; + int itheta; + int qalloc; +}; + +static void compute_theta(struct band_ctx *ctx, struct split_ctx *sctx, + celt_norm *X, celt_norm *Y, int N, int *b, int B, int B0, + int LM, + int stereo, int *fill) +{ + int qn; + int itheta=0; + int delta; + int imid, iside; + int qalloc; + int pulse_cap; + int offset; + opus_int32 tell; + int inv=0; + int encode; + const CELTMode *m; + int i; + int intensity; + ec_ctx *ec; + const celt_ener *bandE; + + encode = ctx->encode; + m = ctx->m; + i = ctx->i; + intensity = ctx->intensity; + ec = ctx->ec; + bandE = ctx->bandE; + + /* Decide on the resolution to give to the split parameter theta */ + pulse_cap = m->logN[i]+LM*(1<>1) - (stereo&&N==2 ? QTHETA_OFFSET_TWOPHASE : QTHETA_OFFSET); + qn = compute_qn(N, *b, offset, pulse_cap, stereo); + if (stereo && i>=intensity) + qn = 1; + if (encode) + { + /* theta is the atan() of the ratio between the (normalized) + side and mid. With just that parameter, we can re-scale both + mid and side because we know that 1) they have unit norm and + 2) they are orthogonal. */ + itheta = stereo_itheta(X, Y, stereo, N); + } + tell = ec_tell_frac(ec); + if (qn!=1) + { + if (encode) + itheta = (itheta*qn+8192)>>14; + + /* Entropy coding of the angle. We use a uniform pdf for the + time split, a step for stereo, and a triangular one for the rest. */ + if (stereo && N>2) + { + int p0 = 3; + int x = itheta; + int x0 = qn/2; + int ft = p0*(x0+1) + x0; + /* Use a probability of p0 up to itheta=8192 and then use 1 after */ + if (encode) + { + ec_encode(ec,x<=x0?p0*x:(x-1-x0)+(x0+1)*p0,x<=x0?p0*(x+1):(x-x0)+(x0+1)*p0,ft); + } else { + int fs; + fs=ec_decode(ec,ft); + if (fs<(x0+1)*p0) + x=fs/p0; + else + x=x0+1+(fs-(x0+1)*p0); + ec_dec_update(ec,x<=x0?p0*x:(x-1-x0)+(x0+1)*p0,x<=x0?p0*(x+1):(x-x0)+(x0+1)*p0,ft); + itheta = x; + } + } else if (B0>1 || stereo) { + /* Uniform pdf */ + if (encode) + ec_enc_uint(ec, itheta, qn+1); + else + itheta = ec_dec_uint(ec, qn+1); + } else { + int fs=1, ft; + ft = ((qn>>1)+1)*((qn>>1)+1); + if (encode) + { + int fl; + + fs = itheta <= (qn>>1) ? itheta + 1 : qn + 1 - itheta; + fl = itheta <= (qn>>1) ? itheta*(itheta + 1)>>1 : + ft - ((qn + 1 - itheta)*(qn + 2 - itheta)>>1); + + ec_encode(ec, fl, fl+fs, ft); + } else { + /* Triangular pdf */ + int fl=0; + int fm; + fm = ec_decode(ec, ft); + + if (fm < ((qn>>1)*((qn>>1) + 1)>>1)) + { + itheta = (isqrt32(8*(opus_uint32)fm + 1) - 1)>>1; + fs = itheta + 1; + fl = itheta*(itheta + 1)>>1; + } + else + { + itheta = (2*(qn + 1) + - isqrt32(8*(opus_uint32)(ft - fm - 1) + 1))>>1; + fs = qn + 1 - itheta; + fl = ft - ((qn + 1 - itheta)*(qn + 2 - itheta)>>1); + } + + ec_dec_update(ec, fl, fl+fs, ft); + } + } + itheta = (opus_int32)itheta*16384/qn; + if (encode && stereo) + { + if (itheta==0) + intensity_stereo(m, X, Y, bandE, i, N); + else + stereo_split(X, Y, N); + } + /* NOTE: Renormalising X and Y *may* help fixed-point a bit at very high rate. + Let's do that at higher complexity */ + } else if (stereo) { + if (encode) + { + inv = itheta > 8192; + if (inv) + { + int j; + for (j=0;j2<remaining_bits > 2<inv = inv; + sctx->imid = imid; + sctx->iside = iside; + sctx->delta = delta; + sctx->itheta = itheta; + sctx->qalloc = qalloc; +} +static unsigned quant_band_n1(struct band_ctx *ctx, celt_norm *X, celt_norm *Y, int b, + celt_norm *lowband_out) +{ +#ifdef RESYNTH + int resynth = 1; +#else + int resynth = !ctx->encode; +#endif + int c; + int stereo; + celt_norm *x = X; + int encode; + ec_ctx *ec; + + encode = ctx->encode; + ec = ctx->ec; + + stereo = Y != NULL; + c=0; do { + int sign=0; + if (ctx->remaining_bits>=1<remaining_bits -= 1<encode; #endif + celt_norm *Y=NULL; + int encode; + const CELTMode *m; + int i; + int spread; + ec_ctx *ec; - longBlocks = B0==1; - - N_B /= B; - N_B0 = N_B; - - split = stereo = Y != NULL; - - /* Special case for one sample */ - if (N==1) - { - int c; - celt_norm *x = X; - c=0; do { - int sign=0; - if (*remaining_bits>=1<0) - recombine = tf_change; - /* Band recombining to increase frequency resolution */ - - if (lowband && (recombine || ((N_B&1) == 0 && tf_change<0) || B0>1)) - { - int j; - for (j=0;j>k, 1<>k, 1<>4]<<2; - } - B>>=recombine; - N_B<<=recombine; - - /* Increasing the time resolution */ - while ((N_B&1) == 0 && tf_change<0) - { - if (encode) - haar1(X, N_B, B); - if (lowband) - haar1(lowband, N_B, B); - fill |= fill<>= 1; - time_divide++; - tf_change++; - } - B0=B; - N_B0 = N_B; - - /* Reorganize the samples in time order instead of frequency order */ - if (B0>1) - { - if (encode) - deinterleave_hadamard(X, N_B>>recombine, B0<>recombine, B0<encode; + m = ctx->m; + i = ctx->i; + spread = ctx->spread; + ec = ctx->ec; /* If we need 1.5 more bit than we can produce, split the band in two. */ cache = m->cache.bits + m->cache.index[(LM+1)*m->nbEBands+i]; - if (!stereo && LM != -1 && b > cache[cache[0]]+12 && N>2) + if (LM != -1 && b > cache[cache[0]]+12 && N>2) { + int mbits, sbits, delta; + int itheta; + int qalloc; + struct split_ctx sctx; + celt_norm *next_lowband2=NULL; + opus_int32 rebalance; + N >>= 1; Y = X+N; - split = 1; LM -= 1; if (B==1) fill = (fill&1)|(fill<<1); B = (B+1)>>1; - } - - if (split) - { - int qn; - int itheta=0; - int mbits, sbits, delta; - int qalloc; - int pulse_cap; - int offset; - int orig_fill; - opus_int32 tell; - - /* Decide on the resolution to give to the split parameter theta */ - pulse_cap = m->logN[i]+LM*(1<>1) - (stereo&&N==2 ? QTHETA_OFFSET_TWOPHASE : QTHETA_OFFSET); - qn = compute_qn(N, b, offset, pulse_cap, stereo); - if (stereo && i>=intensity) - qn = 1; - if (encode) - { - /* theta is the atan() of the ratio between the (normalized) - side and mid. With just that parameter, we can re-scale both - mid and side because we know that 1) they have unit norm and - 2) they are orthogonal. */ - itheta = stereo_itheta(X, Y, stereo, N); - } - tell = ec_tell_frac(ec); - if (qn!=1) - { - if (encode) - itheta = (itheta*qn+8192)>>14; - - /* Entropy coding of the angle. We use a uniform pdf for the - time split, a step for stereo, and a triangular one for the rest. */ - if (stereo && N>2) - { - int p0 = 3; - int x = itheta; - int x0 = qn/2; - int ft = p0*(x0+1) + x0; - /* Use a probability of p0 up to itheta=8192 and then use 1 after */ - if (encode) - { - ec_encode(ec,x<=x0?p0*x:(x-1-x0)+(x0+1)*p0,x<=x0?p0*(x+1):(x-x0)+(x0+1)*p0,ft); - } else { - int fs; - fs=ec_decode(ec,ft); - if (fs<(x0+1)*p0) - x=fs/p0; - else - x=x0+1+(fs-(x0+1)*p0); - ec_dec_update(ec,x<=x0?p0*x:(x-1-x0)+(x0+1)*p0,x<=x0?p0*(x+1):(x-x0)+(x0+1)*p0,ft); - itheta = x; - } - } else if (B0>1 || stereo) { - /* Uniform pdf */ - if (encode) - ec_enc_uint(ec, itheta, qn+1); - else - itheta = ec_dec_uint(ec, qn+1); - } else { - int fs=1, ft; - ft = ((qn>>1)+1)*((qn>>1)+1); - if (encode) - { - int fl; - - fs = itheta <= (qn>>1) ? itheta + 1 : qn + 1 - itheta; - fl = itheta <= (qn>>1) ? itheta*(itheta + 1)>>1 : - ft - ((qn + 1 - itheta)*(qn + 2 - itheta)>>1); - - ec_encode(ec, fl, fl+fs, ft); - } else { - /* Triangular pdf */ - int fl=0; - int fm; - fm = ec_decode(ec, ft); - - if (fm < ((qn>>1)*((qn>>1) + 1)>>1)) - { - itheta = (isqrt32(8*(opus_uint32)fm + 1) - 1)>>1; - fs = itheta + 1; - fl = itheta*(itheta + 1)>>1; - } - else - { - itheta = (2*(qn + 1) - - isqrt32(8*(opus_uint32)(ft - fm - 1) + 1))>>1; - fs = qn + 1 - itheta; - fl = ft - ((qn + 1 - itheta)*(qn + 2 - itheta)>>1); - } - - ec_dec_update(ec, fl, fl+fs, ft); - } - } - itheta = (opus_int32)itheta*16384/qn; - if (encode && stereo) - { - if (itheta==0) - intensity_stereo(m, X, Y, bandE, i, N); - else - stereo_split(X, Y, N); - } - /* NOTE: Renormalising X and Y *may* help fixed-point a bit at very high rate. - Let's do that at higher complexity */ - } else if (stereo) { - if (encode) - { - inv = itheta > 8192; - if (inv) - { - int j; - for (j=0;j2< 2<1 && (itheta&0x3fff)) { - int c; - int sign=0; - celt_norm *x2, *y2; - mbits = b; - sbits = 0; - /* Only need one bit for the side */ - if (itheta != 0 && itheta != 16384) - sbits = 1< 8192; - *remaining_bits -= qalloc+sbits; - - x2 = c ? Y : X; - y2 = c ? X : Y; - if (sbits) - { - if (encode) - { - /* Here we only need to encode a sign for the side */ - sign = x2[0]*y2[1] - x2[1]*y2[0] < 0; - ec_enc_bits(ec, sign, 1); - } else { - sign = ec_dec_bits(ec, 1); - } - } - sign = 1-2*sign; - /* We use orig_fill here because we want to fold the side, but if - itheta==16384, we'll have cleared the low bits of fill. */ - cm = quant_band(encode, m, i, x2, NULL, N, mbits, spread, B, intensity, tf_change, lowband, ec, remaining_bits, LM, lowband_out, NULL, level, seed, gain, lowband_scratch, orig_fill); - /* We don't split N=2 bands, so cm is either 1 or 0 (for a fold-collapse), - and there's no need to worry about mixing with the other channel. */ - y2[0] = -sign*x2[1]; - y2[1] = sign*x2[0]; - if (resynth) - { - celt_norm tmp; - X[0] = MULT16_16_Q15(mid, X[0]); - X[1] = MULT16_16_Q15(mid, X[1]); - Y[0] = MULT16_16_Q15(side, Y[0]); - Y[1] = MULT16_16_Q15(side, Y[1]); - tmp = X[0]; - X[0] = SUB16(tmp,Y[0]); - Y[0] = ADD16(tmp,Y[0]); - tmp = X[1]; - X[1] = SUB16(tmp,Y[1]); - Y[1] = ADD16(tmp,Y[1]); - } - } else { - /* "Normal" split code */ - celt_norm *next_lowband2=NULL; - celt_norm *next_lowband_out1=NULL; - int next_level=0; - opus_int32 rebalance; - - /* Give more bits to low-energy MDCTs than they would otherwise deserve */ - if (B0>1 && !stereo && (itheta&0x3fff)) - { - if (itheta > 8192) - /* Rough approximation for pre-echo masking */ - delta -= delta>>(4-LM); - else - /* Corresponds to a forward-masking slope of 1.5 dB per 10 ms */ - delta = IMIN(0, delta + (N<>(5-LM))); - } - mbits = IMAX(0, IMIN(b, (b-delta)/2)); - sbits = b-mbits; - *remaining_bits -= qalloc; - - if (lowband && !stereo) - next_lowband2 = lowband+N; /* >32-bit split case */ - - /* Only stereo needs to pass on lowband_out. Otherwise, it's - handled at the end */ - if (stereo) - next_lowband_out1 = lowband_out; + if (itheta > 8192) + /* Rough approximation for pre-echo masking */ + delta -= delta>>(4-LM); else - next_level = level+1; - - rebalance = *remaining_bits; - if (mbits >= sbits) - { - /* In stereo mode, we do not apply a scaling to the mid because we need the normalized - mid for folding later */ - cm = quant_band(encode, m, i, X, NULL, N, mbits, spread, B, intensity, tf_change, - lowband, ec, remaining_bits, LM, next_lowband_out1, - NULL, next_level, seed, stereo ? Q15ONE : MULT16_16_P15(gain,mid), lowband_scratch, fill); - rebalance = mbits - (rebalance-*remaining_bits); - if (rebalance > 3<>B)<<((B0>>1)&(stereo-1)); - } else { - /* For a stereo split, the high bits of fill are always zero, so no - folding will be done to the side. */ - cm = quant_band(encode, m, i, Y, NULL, N, sbits, spread, B, intensity, tf_change, - next_lowband2, ec, remaining_bits, LM, NULL, - NULL, next_level, seed, MULT16_16_P15(gain,side), NULL, fill>>B)<<((B0>>1)&(stereo-1)); - rebalance = sbits - (rebalance-*remaining_bits); - if (rebalance > 3<>(5-LM))); } + mbits = IMAX(0, IMIN(b, (b-delta)/2)); + sbits = b-mbits; + ctx->remaining_bits -= qalloc; + if (lowband) + next_lowband2 = lowband+N; /* >32-bit split case */ + + rebalance = ctx->remaining_bits; + if (mbits >= sbits) + { + cm = quant_partition(ctx, X, N, mbits, B, + lowband, LM, + MULT16_16_P15(gain,mid), fill); + rebalance = mbits - (rebalance-ctx->remaining_bits); + if (rebalance > 3<>B)<<(B0>>1); + } else { + cm = quant_partition(ctx, Y, N, sbits, B, + next_lowband2, LM, + MULT16_16_P15(gain,side), fill>>B)<<(B0>>1); + rebalance = sbits - (rebalance-ctx->remaining_bits); + if (rebalance > 3<remaining_bits -= curr_bits; /* Ensures we can never bust the budget */ - while (*remaining_bits < 0 && q > 0) + while (ctx->remaining_bits < 0 && q > 0) { - *remaining_bits += curr_bits; + ctx->remaining_bits += curr_bits; q--; curr_bits = pulses2bits(m, i, LM, q); - *remaining_bits -= curr_bits; + ctx->remaining_bits -= curr_bits; } if (q!=0) @@ -1073,7 +1015,7 @@ static unsigned quant_band(int encode, const CELTMode *m, int i, celt_norm *X, c if (resynth) { unsigned cm_mask; - /*B can be as large as 16, so this shift might overflow an int on a + /* B can be as large as 16, so this shift might overflow an int on a 16-bit platform; use a long to get defined behavior.*/ cm_mask = (unsigned)(1UL<>20); + ctx->seed = celt_lcg_rand(ctx->seed); + X[j] = (celt_norm)((opus_int32)ctx->seed>>20); } cm = cm_mask; } else { @@ -1096,10 +1038,10 @@ static unsigned quant_band(int encode, const CELTMode *m, int i, celt_norm *X, c for (j=0;jseed = celt_lcg_rand(ctx->seed); /* About 48 dB below the "normal" folding level */ tmp = QCONST16(1.0f/256, 10); - tmp = (*seed)&0x8000 ? tmp : -tmp; + tmp = (ctx->seed)&0x8000 ? tmp : -tmp; X[j] = lowband[j]+tmp; } cm = fill; @@ -1110,64 +1052,306 @@ static unsigned quant_band(int encode, const CELTMode *m, int i, celt_norm *X, c } } + return cm; +} + + +/* This function is responsible for encoding and decoding a band for the mono case. */ +static unsigned quant_band(struct band_ctx *ctx, celt_norm *X, + int N, int b, int B, celt_norm *lowband, + int LM, celt_norm *lowband_out, + opus_val16 gain, celt_norm *lowband_scratch, int fill) +{ + int N0=N; + int N_B=N; + int N_B0; + int B0=B; + int time_divide=0; + int recombine=0; + int longBlocks; + unsigned cm=0; +#ifdef RESYNTH + int resynth = 1; +#else + int resynth = !ctx->encode; +#endif + int k; + int encode; + int tf_change; + + encode = ctx->encode; + tf_change = ctx->tf_change; + + longBlocks = B0==1; + + N_B /= B; + + /* Special case for one sample */ + if (N==1) + { + return quant_band_n1(ctx, X, NULL, b, lowband_out); + } + + if (tf_change>0) + recombine = tf_change; + /* Band recombining to increase frequency resolution */ + + if (lowband_scratch && lowband && (recombine || ((N_B&1) == 0 && tf_change<0) || B0>1)) + { + int j; + for (j=0;j>k, 1<>k, 1<>4]<<2; + } + B>>=recombine; + N_B<<=recombine; + + /* Increasing the time resolution */ + while ((N_B&1) == 0 && tf_change<0) + { + if (encode) + haar1(X, N_B, B); + if (lowband) + haar1(lowband, N_B, B); + fill |= fill<>= 1; + time_divide++; + tf_change++; + } + B0=B; + N_B0 = N_B; + + /* Reorganize the samples in time order instead of frequency order */ + if (B0>1) + { + if (encode) + deinterleave_hadamard(X, N_B>>recombine, B0<>recombine, B0<1) + interleave_hadamard(X, N_B>>recombine, B0<>= 1; + N_B <<= 1; + cm |= cm>>B; + haar1(X, N_B, B); + } + + for (k=0;k>k, 1<1) - interleave_hadamard(X, N_B>>recombine, B0<encode; +#endif + int mbits, sbits, delta; + int itheta; + int qalloc; + struct split_ctx sctx; + int orig_fill; + int encode; + ec_ctx *ec; + + encode = ctx->encode; + ec = ctx->ec; + + /* Special case for one sample */ + if (N==1) + { + return quant_band_n1(ctx, X, Y, b, lowband_out); + } + + orig_fill = fill; + + compute_theta(ctx, &sctx, X, Y, N, &b, B, B, + LM, 1, &fill); + inv = sctx.inv; + imid = sctx.imid; + iside = sctx.iside; + delta = sctx.delta; + itheta = sctx.itheta; + qalloc = sctx.qalloc; +#ifdef FIXED_POINT + mid = imid; + side = iside; +#else + mid = (1.f/32768)*imid; + side = (1.f/32768)*iside; +#endif + + /* This is a special case for N=2 that only works for stereo and takes + advantage of the fact that mid and side are orthogonal to encode + the side with just one bit. */ + if (N==2) + { + int c; + int sign=0; + celt_norm *x2, *y2; + mbits = b; + sbits = 0; + /* Only need one bit for the side. */ + if (itheta != 0 && itheta != 16384) + sbits = 1< 8192; + ctx->remaining_bits -= qalloc+sbits; + + x2 = c ? Y : X; + y2 = c ? X : Y; + if (sbits) + { + if (encode) { - B >>= 1; - N_B <<= 1; - cm |= cm>>B; - haar1(X, N_B, B); + /* Here we only need to encode a sign for the side. */ + sign = x2[0]*y2[1] - x2[1]*y2[0] < 0; + ec_enc_bits(ec, sign, 1); + } else { + sign = ec_dec_bits(ec, 1); } + } + sign = 1-2*sign; + /* We use orig_fill here because we want to fold the side, but if + itheta==16384, we'll have cleared the low bits of fill. */ + cm = quant_band(ctx, x2, N, mbits, B, lowband, + LM, lowband_out, Q15ONE, lowband_scratch, orig_fill); + /* We don't split N=2 bands, so cm is either 1 or 0 (for a fold-collapse), + and there's no need to worry about mixing with the other channel. */ + y2[0] = -sign*x2[1]; + y2[1] = sign*x2[0]; + if (resynth) + { + celt_norm tmp; + X[0] = MULT16_16_Q15(mid, X[0]); + X[1] = MULT16_16_Q15(mid, X[1]); + Y[0] = MULT16_16_Q15(side, Y[0]); + Y[1] = MULT16_16_Q15(side, Y[1]); + tmp = X[0]; + X[0] = SUB16(tmp,Y[0]); + Y[0] = ADD16(tmp,Y[0]); + tmp = X[1]; + X[1] = SUB16(tmp,Y[1]); + Y[1] = ADD16(tmp,Y[1]); + } + } else { + /* "Normal" split code */ + opus_int32 rebalance; - for (k=0;k>k, 1<remaining_bits -= qalloc; - /* Scale output for later folding */ - if (lowband_out) - { - int j; - opus_val16 n; - n = celt_sqrt(SHL32(EXTEND32(N0),22)); - for (j=0;jremaining_bits; + if (mbits >= sbits) + { + /* In stereo mode, we do not apply a scaling to the mid because we need the normalized + mid for folding later. */ + cm = quant_band(ctx, X, N, mbits, B, + lowband, LM, lowband_out, + Q15ONE, lowband_scratch, fill); + rebalance = mbits - (rebalance-ctx->remaining_bits); + if (rebalance > 3<>B); + } else { + /* For a stereo split, the high bits of fill are always zero, so no + folding will be done to the side. */ + cm = quant_band(ctx, Y, N, sbits, B, + NULL, LM, NULL, + side, NULL, fill>>B); + rebalance = sbits - (rebalance-ctx->remaining_bits); + if (rebalance > 3<eBands; celt_norm * OPUS_RESTRICT norm, * OPUS_RESTRICT norm2; VARDECL(celt_norm, _norm); - VARDECL(celt_norm, lowband_scratch); + celt_norm *lowband_scratch; int B; int M; int lowband_offset; int update_lowband = 1; int C = Y_ != NULL ? 2 : 1; + int norm_offset; #ifdef RESYNTH int resynth = 1; #else int resynth = !encode; #endif + struct band_ctx ctx; SAVE_STACK; M = 1<nbEBands], celt_norm); - ALLOC(lowband_scratch, M*(eBands[m->nbEBands]-eBands[m->nbEBands-1]), celt_norm); + norm_offset = M*eBands[start]; + /* No need to allocate norm for the last band because we don't need an + output in that band. */ + ALLOC(_norm, C*(M*eBands[m->nbEBands-1]-norm_offset), celt_norm); norm = _norm; - norm2 = norm + M*eBands[m->nbEBands]; + norm2 = norm + M*eBands[m->nbEBands-1]-norm_offset; + /* We can use the last band as scratch space because we don't need that + scratch space for the last band. */ + lowband_scratch = X_+M*eBands[m->nbEBands-1]; lowband_offset = 0; + ctx.bandE = bandE; + ctx.ec = ec; + ctx.encode = encode; + ctx.intensity = intensity; + ctx.m = m; + ctx.seed = *seed; + ctx.spread = spread; for (i=start;i=m->effEBands) { X=norm; if (Y_!=NULL) Y = norm; + lowband_scratch = NULL; } + if (i==end-1) + lowband_scratch = NULL; /* Get a conservative estimate of the collapse_mask's for the bands we're - going to be folding from. */ + going to be folding from. */ if (lowband_offset != 0 && (spread!=SPREAD_AGGRESSIVE || B>1 || tf_change<0)) { int fold_start; int fold_end; int fold_i; /* This ensures we never repeat spectral content within one band */ - effective_lowband = IMAX(M*eBands[start], M*eBands[lowband_offset]-N); + effective_lowband = IMAX(0, M*eBands[lowband_offset]-norm_offset-N); fold_start = lowband_offset; - while(M*eBands[--fold_start] > effective_lowband); + while(M*eBands[--fold_start] > effective_lowband+norm_offset); fold_end = lowband_offset-1; - while(M*eBands[++fold_end] < effective_lowband+N); + while(M*eBands[++fold_end] < effective_lowband+norm_offset+N); x_cm = y_cm = 0; fold_i = fold_start; do { x_cm |= collapse_masks[fold_i*C+0]; @@ -1262,7 +1469,7 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end, } while (++fold_i(N< +#include "celt.h" +#include "pitch.h" +#include "bands.h" +#include "modes.h" +#include "entcode.h" +#include "quant_bands.h" +#include "rate.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "float_cast.h" +#include +#include "celt_lpc.h" +#include "vq.h" + +#ifndef PACKAGE_VERSION +#define PACKAGE_VERSION "unknown" +#endif + + +int resampling_factor(opus_int32 rate) +{ + int ret; + switch (rate) + { + case 48000: + ret = 1; + break; + case 24000: + ret = 2; + break; + case 16000: + ret = 3; + break; + case 12000: + ret = 4; + break; + case 8000: + ret = 6; + break; + default: +#ifndef CUSTOM_MODES + celt_assert(0); +#endif + ret = 0; + break; + } + return ret; +} + +#ifndef OVERRIDE_COMB_FILTER_CONST +static void comb_filter_const(opus_val32 *y, opus_val32 *x, int T, int N, + opus_val16 g10, opus_val16 g11, opus_val16 g12) +{ + opus_val32 x0, x1, x2, x3, x4; + int i; + x4 = x[-T-2]; + x3 = x[-T-1]; + x2 = x[-T]; + x1 = x[-T+1]; + for (i=0;inbEBands;i++) + { + int N; + N=(m->eBands[i+1]-m->eBands[i])<cache.caps[m->nbEBands*(2*LM+C-1)+i]+64)*C*N>>2; + } +} + + + +const char *opus_strerror(int error) +{ + static const char * const error_strings[8] = { + "success", + "invalid argument", + "buffer too small", + "internal error", + "corrupted stream", + "request not implemented", + "invalid state", + "memory allocation failed" + }; + if (error > 0 || error < -7) + return "unknown error"; + else + return error_strings[-error]; +} + +const char *opus_get_version_string(void) +{ + return "libopus " PACKAGE_VERSION +#ifdef FIXED_POINT + "-fixed" +#endif +#ifdef FUZZING + "-fuzzing" +#endif + ; +} diff --git a/code/opus-1.0.2/celt/celt.h b/code/opus-1.1/celt/celt.h similarity index 53% rename from code/opus-1.0.2/celt/celt.h rename to code/opus-1.1/celt/celt.h index 218cd883..5deea1f0 100644 --- a/code/opus-1.0.2/celt/celt.h +++ b/code/opus-1.1/celt/celt.h @@ -50,10 +50,26 @@ extern "C" { #define CELTDecoder OpusCustomDecoder #define CELTMode OpusCustomMode -#define _celt_check_mode_ptr_ptr(ptr) ((ptr) + ((ptr) - (const CELTMode**)(ptr))) +typedef struct { + int valid; + float tonality; + float tonality_slope; + float noisiness; + float activity; + float music_prob; + int bandwidth; +}AnalysisInfo; + +#define __celt_check_mode_ptr_ptr(ptr) ((ptr) + ((ptr) - (const CELTMode**)(ptr))) + +#define __celt_check_analysis_ptr(ptr) ((ptr) + ((ptr) - (const AnalysisInfo*)(ptr))) /* Encoder/decoder Requests */ +/* Expose this option again when variable framesize actually works */ +#define OPUS_FRAMESIZE_VARIABLE 5010 /**< Optimize the frame size dynamically */ + + #define CELT_SET_PREDICTION_REQUEST 10002 /** Controls the use of interframe prediction. 0=Independent frames @@ -81,12 +97,24 @@ extern "C" { #define CELT_GET_MODE_REQUEST 10015 /** Get the CELTMode used by an encoder or decoder */ -#define CELT_GET_MODE(x) CELT_GET_MODE_REQUEST, _celt_check_mode_ptr_ptr(x) +#define CELT_GET_MODE(x) CELT_GET_MODE_REQUEST, __celt_check_mode_ptr_ptr(x) #define CELT_SET_SIGNALLING_REQUEST 10016 #define CELT_SET_SIGNALLING(x) CELT_SET_SIGNALLING_REQUEST, __opus_check_int(x) +#define CELT_SET_TONALITY_REQUEST 10018 +#define CELT_SET_TONALITY(x) CELT_SET_TONALITY_REQUEST, __opus_check_int(x) +#define CELT_SET_TONALITY_SLOPE_REQUEST 10020 +#define CELT_SET_TONALITY_SLOPE(x) CELT_SET_TONALITY_SLOPE_REQUEST, __opus_check_int(x) +#define CELT_SET_ANALYSIS_REQUEST 10022 +#define CELT_SET_ANALYSIS(x) CELT_SET_ANALYSIS_REQUEST, __celt_check_analysis_ptr(x) + +#define OPUS_SET_LFE_REQUEST 10024 +#define OPUS_SET_LFE(x) OPUS_SET_LFE_REQUEST, __opus_check_int(x) + +#define OPUS_SET_ENERGY_MASK_REQUEST 10026 +#define OPUS_SET_ENERGY_MASK(x) OPUS_SET_ENERGY_MASK_REQUEST, __opus_check_val16_ptr(x) /* Encoder stuff */ @@ -94,7 +122,8 @@ int celt_encoder_get_size(int channels); int celt_encode_with_ec(OpusCustomEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc); -int celt_encoder_init(CELTEncoder *st, opus_int32 sampling_rate, int channels); +int celt_encoder_init(CELTEncoder *st, opus_int32 sampling_rate, int channels, + int arch); @@ -110,6 +139,78 @@ int celt_decode_with_ec(OpusCustomDecoder * OPUS_RESTRICT st, const unsigned cha #define celt_encoder_ctl opus_custom_encoder_ctl #define celt_decoder_ctl opus_custom_decoder_ctl + +#ifdef CUSTOM_MODES +#define OPUS_CUSTOM_NOSTATIC +#else +#define OPUS_CUSTOM_NOSTATIC static OPUS_INLINE +#endif + +static const unsigned char trim_icdf[11] = {126, 124, 119, 109, 87, 41, 19, 9, 4, 2, 0}; +/* Probs: NONE: 21.875%, LIGHT: 6.25%, NORMAL: 65.625%, AGGRESSIVE: 6.25% */ +static const unsigned char spread_icdf[4] = {25, 23, 2, 0}; + +static const unsigned char tapset_icdf[3]={2,1,0}; + +#ifdef CUSTOM_MODES +static const unsigned char toOpusTable[20] = { + 0xE0, 0xE8, 0xF0, 0xF8, + 0xC0, 0xC8, 0xD0, 0xD8, + 0xA0, 0xA8, 0xB0, 0xB8, + 0x00, 0x00, 0x00, 0x00, + 0x80, 0x88, 0x90, 0x98, +}; + +static const unsigned char fromOpusTable[16] = { + 0x80, 0x88, 0x90, 0x98, + 0x40, 0x48, 0x50, 0x58, + 0x20, 0x28, 0x30, 0x38, + 0x00, 0x08, 0x10, 0x18 +}; + +static OPUS_INLINE int toOpus(unsigned char c) +{ + int ret=0; + if (c<0xA0) + ret = toOpusTable[c>>3]; + if (ret == 0) + return -1; + else + return ret|(c&0x7); +} + +static OPUS_INLINE int fromOpus(unsigned char c) +{ + if (c<0x80) + return -1; + else + return fromOpusTable[(c>>3)-16] | (c&0x7); +} +#endif /* CUSTOM_MODES */ + +#define COMBFILTER_MAXPERIOD 1024 +#define COMBFILTER_MINPERIOD 15 + +extern const signed char tf_select_table[4][8]; + +int resampling_factor(opus_int32 rate); + +void celt_preemphasis(const opus_val16 * OPUS_RESTRICT pcmp, celt_sig * OPUS_RESTRICT inp, + int N, int CC, int upsample, const opus_val16 *coef, celt_sig *mem, int clip); + +void comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N, + opus_val16 g0, opus_val16 g1, int tapset0, int tapset1, + const opus_val16 *window, int overlap); + +void init_caps(const CELTMode *m,int *cap,int LM,int C); + +#ifdef RESYNTH +void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, const opus_val16 *coef, celt_sig *mem, celt_sig * OPUS_RESTRICT scratch); + +void compute_inv_mdcts(const CELTMode *mode, int shortBlocks, celt_sig *X, + celt_sig * OPUS_RESTRICT out_mem[], int C, int LM); +#endif + #ifdef __cplusplus } #endif diff --git a/code/opus-1.1/celt/celt_decoder.c b/code/opus-1.1/celt/celt_decoder.c new file mode 100644 index 00000000..830398ee --- /dev/null +++ b/code/opus-1.1/celt/celt_decoder.c @@ -0,0 +1,1195 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2010 Xiph.Org Foundation + Copyright (c) 2008 Gregory Maxwell + Written by Jean-Marc Valin and Gregory Maxwell */ +/* + 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. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#define CELT_DECODER_C + +#include "cpu_support.h" +#include "os_support.h" +#include "mdct.h" +#include +#include "celt.h" +#include "pitch.h" +#include "bands.h" +#include "modes.h" +#include "entcode.h" +#include "quant_bands.h" +#include "rate.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "float_cast.h" +#include +#include "celt_lpc.h" +#include "vq.h" + +/**********************************************************************/ +/* */ +/* DECODER */ +/* */ +/**********************************************************************/ +#define DECODE_BUFFER_SIZE 2048 + +/** Decoder state + @brief Decoder state + */ +struct OpusCustomDecoder { + const OpusCustomMode *mode; + int overlap; + int channels; + int stream_channels; + + int downsample; + int start, end; + int signalling; + int arch; + + /* Everything beyond this point gets cleared on a reset */ +#define DECODER_RESET_START rng + + opus_uint32 rng; + int error; + int last_pitch_index; + int loss_count; + int postfilter_period; + int postfilter_period_old; + opus_val16 postfilter_gain; + opus_val16 postfilter_gain_old; + int postfilter_tapset; + int postfilter_tapset_old; + + celt_sig preemph_memD[2]; + + celt_sig _decode_mem[1]; /* Size = channels*(DECODE_BUFFER_SIZE+mode->overlap) */ + /* opus_val16 lpc[], Size = channels*LPC_ORDER */ + /* opus_val16 oldEBands[], Size = 2*mode->nbEBands */ + /* opus_val16 oldLogE[], Size = 2*mode->nbEBands */ + /* opus_val16 oldLogE2[], Size = 2*mode->nbEBands */ + /* opus_val16 backgroundLogE[], Size = 2*mode->nbEBands */ +}; + +int celt_decoder_get_size(int channels) +{ + const CELTMode *mode = opus_custom_mode_create(48000, 960, NULL); + return opus_custom_decoder_get_size(mode, channels); +} + +OPUS_CUSTOM_NOSTATIC int opus_custom_decoder_get_size(const CELTMode *mode, int channels) +{ + int size = sizeof(struct CELTDecoder) + + (channels*(DECODE_BUFFER_SIZE+mode->overlap)-1)*sizeof(celt_sig) + + channels*LPC_ORDER*sizeof(opus_val16) + + 4*2*mode->nbEBands*sizeof(opus_val16); + return size; +} + +#ifdef CUSTOM_MODES +CELTDecoder *opus_custom_decoder_create(const CELTMode *mode, int channels, int *error) +{ + int ret; + CELTDecoder *st = (CELTDecoder *)opus_alloc(opus_custom_decoder_get_size(mode, channels)); + ret = opus_custom_decoder_init(st, mode, channels); + if (ret != OPUS_OK) + { + opus_custom_decoder_destroy(st); + st = NULL; + } + if (error) + *error = ret; + return st; +} +#endif /* CUSTOM_MODES */ + +int celt_decoder_init(CELTDecoder *st, opus_int32 sampling_rate, int channels) +{ + int ret; + ret = opus_custom_decoder_init(st, opus_custom_mode_create(48000, 960, NULL), channels); + if (ret != OPUS_OK) + return ret; + st->downsample = resampling_factor(sampling_rate); + if (st->downsample==0) + return OPUS_BAD_ARG; + else + return OPUS_OK; +} + +OPUS_CUSTOM_NOSTATIC int opus_custom_decoder_init(CELTDecoder *st, const CELTMode *mode, int channels) +{ + if (channels < 0 || channels > 2) + return OPUS_BAD_ARG; + + if (st==NULL) + return OPUS_ALLOC_FAIL; + + OPUS_CLEAR((char*)st, opus_custom_decoder_get_size(mode, channels)); + + st->mode = mode; + st->overlap = mode->overlap; + st->stream_channels = st->channels = channels; + + st->downsample = 1; + st->start = 0; + st->end = st->mode->effEBands; + st->signalling = 1; + st->arch = opus_select_arch(); + + st->loss_count = 0; + + opus_custom_decoder_ctl(st, OPUS_RESET_STATE); + + return OPUS_OK; +} + +#ifdef CUSTOM_MODES +void opus_custom_decoder_destroy(CELTDecoder *st) +{ + opus_free(st); +} +#endif /* CUSTOM_MODES */ + +static OPUS_INLINE opus_val16 SIG2WORD16(celt_sig x) +{ +#ifdef FIXED_POINT + x = PSHR32(x, SIG_SHIFT); + x = MAX32(x, -32768); + x = MIN32(x, 32767); + return EXTRACT16(x); +#else + return (opus_val16)x; +#endif +} + +#ifndef RESYNTH +static +#endif +void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, const opus_val16 *coef, celt_sig *mem, celt_sig * OPUS_RESTRICT scratch) +{ + int c; + int Nd; + int apply_downsampling=0; + opus_val16 coef0; + + coef0 = coef[0]; + Nd = N/downsample; + c=0; do { + int j; + celt_sig * OPUS_RESTRICT x; + opus_val16 * OPUS_RESTRICT y; + celt_sig m = mem[c]; + x =in[c]; + y = pcm+c; +#ifdef CUSTOM_MODES + if (coef[1] != 0) + { + opus_val16 coef1 = coef[1]; + opus_val16 coef3 = coef[3]; + for (j=0;j1) + { + /* Shortcut for the standard (non-custom modes) case */ + for (j=0;jshortMdctSize; + shift = mode->maxLM; + } else { + B = 1; + N = mode->shortMdctSize<maxLM-LM; + } + c=0; do { + /* IMDCT on the interleaved the sub-frames, overlap-add is performed by the IMDCT */ + for (b=0;bmdct, &X[b+c*N*B], out_mem[c]+N*b, mode->window, overlap, shift, B); + } while (++cstorage*8; + tell = ec_tell(dec); + logp = isTransient ? 2 : 4; + tf_select_rsv = LM>0 && tell+logp+1<=budget; + budget -= tf_select_rsv; + tf_changed = curr = 0; + for (i=start;ichannels; + celt_sig *decode_mem[2]; + celt_sig *out_syn[2]; + opus_val16 *lpc; + opus_val16 *oldBandE, *oldLogE, *oldLogE2, *backgroundLogE; + const OpusCustomMode *mode; + int nbEBands; + int overlap; + int start; + int downsample; + int loss_count; + int noise_based; + const opus_int16 *eBands; + VARDECL(celt_sig, scratch); + SAVE_STACK; + + mode = st->mode; + nbEBands = mode->nbEBands; + overlap = mode->overlap; + eBands = mode->eBands; + + c=0; do { + decode_mem[c] = st->_decode_mem + c*(DECODE_BUFFER_SIZE+overlap); + out_syn[c] = decode_mem[c]+DECODE_BUFFER_SIZE-N; + } while (++c_decode_mem+(DECODE_BUFFER_SIZE+overlap)*C); + oldBandE = lpc+C*LPC_ORDER; + oldLogE = oldBandE + 2*nbEBands; + oldLogE2 = oldLogE + 2*nbEBands; + backgroundLogE = oldLogE2 + 2*nbEBands; + + loss_count = st->loss_count; + start = st->start; + downsample = st->downsample; + noise_based = loss_count >= 5 || start != 0; + ALLOC(scratch, noise_based?N*C:N, celt_sig); + if (noise_based) + { + /* Noise-based PLC/CNG */ + celt_sig *freq; + VARDECL(celt_norm, X); + opus_uint32 seed; + opus_val16 *plcLogE; + int end; + int effEnd; + + end = st->end; + effEnd = IMAX(start, IMIN(end, mode->effEBands)); + + /* Share the interleaved signal MDCT coefficient buffer with the + deemphasis scratch buffer. */ + freq = scratch; + ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */ + + if (loss_count >= 5) + plcLogE = backgroundLogE; + else { + /* Energy decay */ + opus_val16 decay = loss_count==0 ? + QCONST16(1.5f, DB_SHIFT) : QCONST16(.5f, DB_SHIFT); + c=0; do + { + for (i=start;irng; + for (c=0;c>20); + } + renormalise_vector(X+boffs, blen, Q15ONE); + } + } + st->rng = seed; + + denormalise_bands(mode, X, freq, plcLogE, start, effEnd, C, 1<>1)); + } while (++c>1, opus_val16 ); + pitch_downsample(decode_mem, lp_pitch_buf, + DECODE_BUFFER_SIZE, C, st->arch); + pitch_search(lp_pitch_buf+(PLC_PITCH_LAG_MAX>>1), lp_pitch_buf, + DECODE_BUFFER_SIZE-PLC_PITCH_LAG_MAX, + PLC_PITCH_LAG_MAX-PLC_PITCH_LAG_MIN, &pitch_index, st->arch); + pitch_index = PLC_PITCH_LAG_MAX-pitch_index; + st->last_pitch_index = pitch_index; + } else { + pitch_index = st->last_pitch_index; + fade = QCONST16(.8f,15); + } + + ALLOC(etmp, overlap, opus_val32); + ALLOC(exc, MAX_PERIOD, opus_val16); + window = mode->window; + c=0; do { + opus_val16 decay; + opus_val16 attenuation; + opus_val32 S1=0; + celt_sig *buf; + int extrapolation_offset; + int extrapolation_len; + int exc_length; + int j; + + buf = decode_mem[c]; + for (i=0;iarch); + /* Add a noise floor of -40 dB. */ +#ifdef FIXED_POINT + ac[0] += SHR32(ac[0],13); +#else + ac[0] *= 1.0001f; +#endif + /* Use lag windowing to stabilize the Levinson-Durbin recursion. */ + for (i=1;i<=LPC_ORDER;i++) + { + /*ac[i] *= exp(-.5*(2*M_PI*.002*i)*(2*M_PI*.002*i));*/ +#ifdef FIXED_POINT + ac[i] -= MULT16_32_Q15(2*i*i, ac[i]); +#else + ac[i] -= ac[i]*(0.008f*0.008f)*i*i; +#endif + } + _celt_lpc(lpc+c*LPC_ORDER, ac, LPC_ORDER); + } + /* We want the excitation for 2 pitch periods in order to look for a + decaying signal, but we can't get more than MAX_PERIOD. */ + exc_length = IMIN(2*pitch_index, MAX_PERIOD); + /* Initialize the LPC history with the samples just before the start + of the region for which we're computing the excitation. */ + { + opus_val16 lpc_mem[LPC_ORDER]; + for (i=0;i>1; + for (i=0;i= pitch_index) { + j -= pitch_index; + attenuation = MULT16_16_Q15(attenuation, decay); + } + buf[DECODE_BUFFER_SIZE-N+i] = + SHL32(EXTEND32(MULT16_16_Q15(attenuation, + exc[extrapolation_offset+j])), SIG_SHIFT); + /* Compute the energy of the previously decoded signal whose + excitation we're copying. */ + tmp = ROUND16( + buf[DECODE_BUFFER_SIZE-MAX_PERIOD-N+extrapolation_offset+j], + SIG_SHIFT); + S1 += SHR32(MULT16_16(tmp, tmp), 8); + } + + { + opus_val16 lpc_mem[LPC_ORDER]; + /* Copy the last decoded samples (prior to the overlap region) to + synthesis filter memory so we can have a continuous signal. */ + for (i=0;i SHR32(S2,2))) +#else + /* The float test is written this way to catch NaNs in the output + of the IIR filter at the same time. */ + if (!(S1 > 0.2f*S2)) +#endif + { + for (i=0;ipostfilter_period, st->postfilter_period, overlap, + -st->postfilter_gain, -st->postfilter_gain, + st->postfilter_tapset, st->postfilter_tapset, NULL, 0); + + /* Simulate TDAC on the concealed audio so that it blends with the + MDCT of the next frame. */ + for (i=0;ipreemph, st->preemph_memD, scratch); + + st->loss_count = loss_count+1; + + RESTORE_STACK; +} + +int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, opus_val16 * OPUS_RESTRICT pcm, int frame_size, ec_dec *dec) +{ + int c, i, N; + int spread_decision; + opus_int32 bits; + ec_dec _dec; + VARDECL(celt_sig, freq); + VARDECL(celt_norm, X); + VARDECL(int, fine_quant); + VARDECL(int, pulses); + VARDECL(int, cap); + VARDECL(int, offsets); + VARDECL(int, fine_priority); + VARDECL(int, tf_res); + VARDECL(unsigned char, collapse_masks); + celt_sig *decode_mem[2]; + celt_sig *out_syn[2]; + opus_val16 *lpc; + opus_val16 *oldBandE, *oldLogE, *oldLogE2, *backgroundLogE; + + int shortBlocks; + int isTransient; + int intra_ener; + const int CC = st->channels; + int LM, M; + int effEnd; + int codedBands; + int alloc_trim; + int postfilter_pitch; + opus_val16 postfilter_gain; + int intensity=0; + int dual_stereo=0; + opus_int32 total_bits; + opus_int32 balance; + opus_int32 tell; + int dynalloc_logp; + int postfilter_tapset; + int anti_collapse_rsv; + int anti_collapse_on=0; + int silence; + int C = st->stream_channels; + const OpusCustomMode *mode; + int nbEBands; + int overlap; + const opus_int16 *eBands; + ALLOC_STACK; + + mode = st->mode; + nbEBands = mode->nbEBands; + overlap = mode->overlap; + eBands = mode->eBands; + frame_size *= st->downsample; + + c=0; do { + decode_mem[c] = st->_decode_mem + c*(DECODE_BUFFER_SIZE+overlap); + } while (++c_decode_mem+(DECODE_BUFFER_SIZE+overlap)*CC); + oldBandE = lpc+CC*LPC_ORDER; + oldLogE = oldBandE + 2*nbEBands; + oldLogE2 = oldLogE + 2*nbEBands; + backgroundLogE = oldLogE2 + 2*nbEBands; + +#ifdef CUSTOM_MODES + if (st->signalling && data!=NULL) + { + int data0=data[0]; + /* Convert "standard mode" to Opus header */ + if (mode->Fs==48000 && mode->shortMdctSize==120) + { + data0 = fromOpus(data0); + if (data0<0) + return OPUS_INVALID_PACKET; + } + st->end = IMAX(1, mode->effEBands-2*(data0>>5)); + LM = (data0>>3)&0x3; + C = 1 + ((data0>>2)&0x1); + data++; + len--; + if (LM>mode->maxLM) + return OPUS_INVALID_PACKET; + if (frame_size < mode->shortMdctSize<shortMdctSize<maxLM;LM++) + if (mode->shortMdctSize<mode->maxLM) + return OPUS_BAD_ARG; + } + M=1<1275 || pcm==NULL) + return OPUS_BAD_ARG; + + N = M*mode->shortMdctSize; + + effEnd = st->end; + if (effEnd > mode->effEBands) + effEnd = mode->effEBands; + + if (data == NULL || len<=1) + { + celt_decode_lost(st, pcm, N, LM); + RESTORE_STACK; + return frame_size/st->downsample; + } + + if (dec == NULL) + { + ec_dec_init(&_dec,(unsigned char*)data,len); + dec = &_dec; + } + + if (C==1) + { + for (i=0;i= total_bits) + silence = 1; + else if (tell==1) + silence = ec_dec_bit_logp(dec, 15); + else + silence = 0; + if (silence) + { + /* Pretend we've read all the remaining bits */ + tell = len*8; + dec->nbits_total+=tell-ec_tell(dec); + } + + postfilter_gain = 0; + postfilter_pitch = 0; + postfilter_tapset = 0; + if (st->start==0 && tell+16 <= total_bits) + { + if(ec_dec_bit_logp(dec, 1)) + { + int qg, octave; + octave = ec_dec_uint(dec, 6); + postfilter_pitch = (16< 0 && tell+3 <= total_bits) + { + isTransient = ec_dec_bit_logp(dec, 3); + tell = ec_tell(dec); + } + else + isTransient = 0; + + if (isTransient) + shortBlocks = M; + else + shortBlocks = 0; + + /* Decode the global flags (first symbols in the stream) */ + intra_ener = tell+3<=total_bits ? ec_dec_bit_logp(dec, 3) : 0; + /* Get band energies */ + unquant_coarse_energy(mode, st->start, st->end, oldBandE, + intra_ener, dec, C, LM); + + ALLOC(tf_res, nbEBands, int); + tf_decode(st->start, st->end, isTransient, tf_res, LM, dec); + + tell = ec_tell(dec); + spread_decision = SPREAD_NORMAL; + if (tell+4 <= total_bits) + spread_decision = ec_dec_icdf(dec, spread_icdf, 5); + + ALLOC(cap, nbEBands, int); + + init_caps(mode,cap,LM,C); + + ALLOC(offsets, nbEBands, int); + + dynalloc_logp = 6; + total_bits<<=BITRES; + tell = ec_tell_frac(dec); + for (i=st->start;iend;i++) + { + int width, quanta; + int dynalloc_loop_logp; + int boost; + width = C*(eBands[i+1]-eBands[i])<0) + dynalloc_logp = IMAX(2, dynalloc_logp-1); + } + + ALLOC(fine_quant, nbEBands, int); + alloc_trim = tell+(6<=2&&bits>=((LM+2)<start, st->end, offsets, cap, + alloc_trim, &intensity, &dual_stereo, bits, &balance, pulses, + fine_quant, fine_priority, C, LM, dec, 0, 0, 0); + + unquant_fine_energy(mode, st->start, st->end, oldBandE, fine_quant, dec, C); + + /* Decode fixed codebook */ + ALLOC(collapse_masks, C*nbEBands, unsigned char); + ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */ + + quant_all_bands(0, mode, st->start, st->end, X, C==2 ? X+N : NULL, collapse_masks, + NULL, pulses, shortBlocks, spread_decision, dual_stereo, intensity, tf_res, + len*(8<rng); + + if (anti_collapse_rsv > 0) + { + anti_collapse_on = ec_dec_bits(dec, 1); + } + + unquant_energy_finalise(mode, st->start, st->end, oldBandE, + fine_quant, fine_priority, len*8-ec_tell(dec), dec, C); + + if (anti_collapse_on) + anti_collapse(mode, X, collapse_masks, LM, C, N, + st->start, st->end, oldBandE, oldLogE, oldLogE2, pulses, st->rng); + + ALLOC(freq, IMAX(CC,C)*N, celt_sig); /**< Interleaved signal MDCTs */ + + if (silence) + { + for (i=0;istart, effEnd, C, M); + } + c=0; do { + OPUS_MOVE(decode_mem[c], decode_mem[c]+N, DECODE_BUFFER_SIZE-N+overlap/2); + } while (++cdownsample!=1) + bound = IMIN(bound, N/st->downsample); + for (i=bound;ipostfilter_period=IMAX(st->postfilter_period, COMBFILTER_MINPERIOD); + st->postfilter_period_old=IMAX(st->postfilter_period_old, COMBFILTER_MINPERIOD); + comb_filter(out_syn[c], out_syn[c], st->postfilter_period_old, st->postfilter_period, mode->shortMdctSize, + st->postfilter_gain_old, st->postfilter_gain, st->postfilter_tapset_old, st->postfilter_tapset, + mode->window, overlap); + if (LM!=0) + comb_filter(out_syn[c]+mode->shortMdctSize, out_syn[c]+mode->shortMdctSize, st->postfilter_period, postfilter_pitch, N-mode->shortMdctSize, + st->postfilter_gain, postfilter_gain, st->postfilter_tapset, postfilter_tapset, + mode->window, overlap); + + } while (++cpostfilter_period_old = st->postfilter_period; + st->postfilter_gain_old = st->postfilter_gain; + st->postfilter_tapset_old = st->postfilter_tapset; + st->postfilter_period = postfilter_pitch; + st->postfilter_gain = postfilter_gain; + st->postfilter_tapset = postfilter_tapset; + if (LM!=0) + { + st->postfilter_period_old = st->postfilter_period; + st->postfilter_gain_old = st->postfilter_gain; + st->postfilter_tapset_old = st->postfilter_tapset; + } + + if (C==1) { + for (i=0;istart;i++) + { + oldBandE[c*nbEBands+i]=0; + oldLogE[c*nbEBands+i]=oldLogE2[c*nbEBands+i]=-QCONST16(28.f,DB_SHIFT); + } + for (i=st->end;irng = dec->rng; + + /* We reuse freq[] as scratch space for the de-emphasis */ + deemphasis(out_syn, pcm, N, CC, st->downsample, mode->preemph, st->preemph_memD, freq); + st->loss_count = 0; + RESTORE_STACK; + if (ec_tell(dec) > 8*len) + return OPUS_INTERNAL_ERROR; + if(ec_get_error(dec)) + st->error = 1; + return frame_size/st->downsample; +} + + +#ifdef CUSTOM_MODES + +#ifdef FIXED_POINT +int opus_custom_decode(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, opus_int16 * OPUS_RESTRICT pcm, int frame_size) +{ + return celt_decode_with_ec(st, data, len, pcm, frame_size, NULL); +} + +#ifndef DISABLE_FLOAT_API +int opus_custom_decode_float(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, float * OPUS_RESTRICT pcm, int frame_size) +{ + int j, ret, C, N; + VARDECL(opus_int16, out); + ALLOC_STACK; + + if (pcm==NULL) + return OPUS_BAD_ARG; + + C = st->channels; + N = frame_size; + + ALLOC(out, C*N, opus_int16); + ret=celt_decode_with_ec(st, data, len, out, frame_size, NULL); + if (ret>0) + for (j=0;jchannels; + N = frame_size; + ALLOC(out, C*N, celt_sig); + + ret=celt_decode_with_ec(st, data, len, out, frame_size, NULL); + + if (ret>0) + for (j=0;j=st->mode->nbEBands) + goto bad_arg; + st->start = value; + } + break; + case CELT_SET_END_BAND_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if (value<1 || value>st->mode->nbEBands) + goto bad_arg; + st->end = value; + } + break; + case CELT_SET_CHANNELS_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if (value<1 || value>2) + goto bad_arg; + st->stream_channels = value; + } + break; + case CELT_GET_AND_CLEAR_ERROR_REQUEST: + { + opus_int32 *value = va_arg(ap, opus_int32*); + if (value==NULL) + goto bad_arg; + *value=st->error; + st->error = 0; + } + break; + case OPUS_GET_LOOKAHEAD_REQUEST: + { + opus_int32 *value = va_arg(ap, opus_int32*); + if (value==NULL) + goto bad_arg; + *value = st->overlap/st->downsample; + } + break; + case OPUS_RESET_STATE: + { + int i; + opus_val16 *lpc, *oldBandE, *oldLogE, *oldLogE2; + lpc = (opus_val16*)(st->_decode_mem+(DECODE_BUFFER_SIZE+st->overlap)*st->channels); + oldBandE = lpc+st->channels*LPC_ORDER; + oldLogE = oldBandE + 2*st->mode->nbEBands; + oldLogE2 = oldLogE + 2*st->mode->nbEBands; + OPUS_CLEAR((char*)&st->DECODER_RESET_START, + opus_custom_decoder_get_size(st->mode, st->channels)- + ((char*)&st->DECODER_RESET_START - (char*)st)); + for (i=0;i<2*st->mode->nbEBands;i++) + oldLogE[i]=oldLogE2[i]=-QCONST16(28.f,DB_SHIFT); + } + break; + case OPUS_GET_PITCH_REQUEST: + { + opus_int32 *value = va_arg(ap, opus_int32*); + if (value==NULL) + goto bad_arg; + *value = st->postfilter_period; + } + break; + case CELT_GET_MODE_REQUEST: + { + const CELTMode ** value = va_arg(ap, const CELTMode**); + if (value==0) + goto bad_arg; + *value=st->mode; + } + break; + case CELT_SET_SIGNALLING_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + st->signalling = value; + } + break; + case OPUS_GET_FINAL_RANGE_REQUEST: + { + opus_uint32 * value = va_arg(ap, opus_uint32 *); + if (value==0) + goto bad_arg; + *value=st->rng; + } + break; + default: + goto bad_request; + } + va_end(ap); + return OPUS_OK; +bad_arg: + va_end(ap); + return OPUS_BAD_ARG; +bad_request: + va_end(ap); + return OPUS_UNIMPLEMENTED; +} diff --git a/code/opus-1.1/celt/celt_encoder.c b/code/opus-1.1/celt/celt_encoder.c new file mode 100644 index 00000000..ffff0775 --- /dev/null +++ b/code/opus-1.1/celt/celt_encoder.c @@ -0,0 +1,2353 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2010 Xiph.Org Foundation + Copyright (c) 2008 Gregory Maxwell + Written by Jean-Marc Valin and Gregory Maxwell */ +/* + 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. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#define CELT_ENCODER_C + +#include "cpu_support.h" +#include "os_support.h" +#include "mdct.h" +#include +#include "celt.h" +#include "pitch.h" +#include "bands.h" +#include "modes.h" +#include "entcode.h" +#include "quant_bands.h" +#include "rate.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "float_cast.h" +#include +#include "celt_lpc.h" +#include "vq.h" + + +/** Encoder state + @brief Encoder state + */ +struct OpusCustomEncoder { + const OpusCustomMode *mode; /**< Mode used by the encoder */ + int overlap; + int channels; + int stream_channels; + + int force_intra; + int clip; + int disable_pf; + int complexity; + int upsample; + int start, end; + + opus_int32 bitrate; + int vbr; + int signalling; + int constrained_vbr; /* If zero, VBR can do whatever it likes with the rate */ + int loss_rate; + int lsb_depth; + int variable_duration; + int lfe; + int arch; + + /* Everything beyond this point gets cleared on a reset */ +#define ENCODER_RESET_START rng + + opus_uint32 rng; + int spread_decision; + opus_val32 delayedIntra; + int tonal_average; + int lastCodedBands; + int hf_average; + int tapset_decision; + + int prefilter_period; + opus_val16 prefilter_gain; + int prefilter_tapset; +#ifdef RESYNTH + int prefilter_period_old; + opus_val16 prefilter_gain_old; + int prefilter_tapset_old; +#endif + int consec_transient; + AnalysisInfo analysis; + + opus_val32 preemph_memE[2]; + opus_val32 preemph_memD[2]; + + /* VBR-related parameters */ + opus_int32 vbr_reservoir; + opus_int32 vbr_drift; + opus_int32 vbr_offset; + opus_int32 vbr_count; + opus_val32 overlap_max; + opus_val16 stereo_saving; + int intensity; + opus_val16 *energy_mask; + opus_val16 spec_avg; + +#ifdef RESYNTH + /* +MAX_PERIOD/2 to make space for overlap */ + celt_sig syn_mem[2][2*MAX_PERIOD+MAX_PERIOD/2]; +#endif + + celt_sig in_mem[1]; /* Size = channels*mode->overlap */ + /* celt_sig prefilter_mem[], Size = channels*COMBFILTER_MAXPERIOD */ + /* opus_val16 oldBandE[], Size = channels*mode->nbEBands */ + /* opus_val16 oldLogE[], Size = channels*mode->nbEBands */ + /* opus_val16 oldLogE2[], Size = channels*mode->nbEBands */ +}; + +int celt_encoder_get_size(int channels) +{ + CELTMode *mode = opus_custom_mode_create(48000, 960, NULL); + return opus_custom_encoder_get_size(mode, channels); +} + +OPUS_CUSTOM_NOSTATIC int opus_custom_encoder_get_size(const CELTMode *mode, int channels) +{ + int size = sizeof(struct CELTEncoder) + + (channels*mode->overlap-1)*sizeof(celt_sig) /* celt_sig in_mem[channels*mode->overlap]; */ + + channels*COMBFILTER_MAXPERIOD*sizeof(celt_sig) /* celt_sig prefilter_mem[channels*COMBFILTER_MAXPERIOD]; */ + + 3*channels*mode->nbEBands*sizeof(opus_val16); /* opus_val16 oldBandE[channels*mode->nbEBands]; */ + /* opus_val16 oldLogE[channels*mode->nbEBands]; */ + /* opus_val16 oldLogE2[channels*mode->nbEBands]; */ + return size; +} + +#ifdef CUSTOM_MODES +CELTEncoder *opus_custom_encoder_create(const CELTMode *mode, int channels, int *error) +{ + int ret; + CELTEncoder *st = (CELTEncoder *)opus_alloc(opus_custom_encoder_get_size(mode, channels)); + /* init will handle the NULL case */ + ret = opus_custom_encoder_init(st, mode, channels); + if (ret != OPUS_OK) + { + opus_custom_encoder_destroy(st); + st = NULL; + } + if (error) + *error = ret; + return st; +} +#endif /* CUSTOM_MODES */ + +static int opus_custom_encoder_init_arch(CELTEncoder *st, const CELTMode *mode, + int channels, int arch) +{ + if (channels < 0 || channels > 2) + return OPUS_BAD_ARG; + + if (st==NULL || mode==NULL) + return OPUS_ALLOC_FAIL; + + OPUS_CLEAR((char*)st, opus_custom_encoder_get_size(mode, channels)); + + st->mode = mode; + st->overlap = mode->overlap; + st->stream_channels = st->channels = channels; + + st->upsample = 1; + st->start = 0; + st->end = st->mode->effEBands; + st->signalling = 1; + + st->arch = arch; + + st->constrained_vbr = 1; + st->clip = 1; + + st->bitrate = OPUS_BITRATE_MAX; + st->vbr = 0; + st->force_intra = 0; + st->complexity = 5; + st->lsb_depth=24; + + opus_custom_encoder_ctl(st, OPUS_RESET_STATE); + + return OPUS_OK; +} + +#ifdef CUSTOM_MODES +int opus_custom_encoder_init(CELTEncoder *st, const CELTMode *mode, int channels) +{ + return opus_custom_encoder_init_arch(st, mode, channels, opus_select_arch()); +} +#endif + +int celt_encoder_init(CELTEncoder *st, opus_int32 sampling_rate, int channels, + int arch) +{ + int ret; + ret = opus_custom_encoder_init_arch(st, + opus_custom_mode_create(48000, 960, NULL), channels, arch); + if (ret != OPUS_OK) + return ret; + st->upsample = resampling_factor(sampling_rate); + return OPUS_OK; +} + +#ifdef CUSTOM_MODES +void opus_custom_encoder_destroy(CELTEncoder *st) +{ + opus_free(st); +} +#endif /* CUSTOM_MODES */ + + +static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int C, + opus_val16 *tf_estimate, int *tf_chan) +{ + int i; + VARDECL(opus_val16, tmp); + opus_val32 mem0,mem1; + int is_transient = 0; + opus_int32 mask_metric = 0; + int c; + opus_val16 tf_max; + int len2; + /* Table of 6*64/x, trained on real data to minimize the average error */ + static const unsigned char inv_table[128] = { + 255,255,156,110, 86, 70, 59, 51, 45, 40, 37, 33, 31, 28, 26, 25, + 23, 22, 21, 20, 19, 18, 17, 16, 16, 15, 15, 14, 13, 13, 12, 12, + 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 9, 9, 9, 8, 8, + 8, 8, 8, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, + }; + SAVE_STACK; + ALLOC(tmp, len, opus_val16); + + len2=len/2; + for (c=0;c=0;i--) + { +#ifdef FIXED_POINT + /* FIXME: Use PSHR16() instead */ + tmp[i] = mem0 + PSHR32(tmp[i]-mem0,3); +#else + tmp[i] = mem0 + MULT16_16_P15(QCONST16(0.125f,15),tmp[i]-mem0); +#endif + mem0 = tmp[i]; + maxE = MAX16(maxE, mem0); + } + /*for (i=0;i>1))); +#else + mean = celt_sqrt(mean * maxE*.5*len2); +#endif + /* Inverse of the mean energy in Q15+6 */ + norm = SHL32(EXTEND32(len2),6+14)/ADD32(EPSILON,SHR32(mean,1)); + /* Compute harmonic mean discarding the unreliable boundaries + The data is smooth, so we only take 1/4th of the samples */ + unmask=0; + for (i=12;imask_metric) + { + *tf_chan = c; + mask_metric = unmask; + } + } + is_transient = mask_metric>200; + + /* Arbitrary metric for VBR boost */ + tf_max = MAX16(0,celt_sqrt(27*mask_metric)-42); + /* *tf_estimate = 1 + MIN16(1, sqrt(MAX16(0, tf_max-30))/20); */ + *tf_estimate = celt_sqrt(MAX16(0, SHL32(MULT16_16(QCONST16(0.0069,14),MIN16(163,tf_max)),14)-QCONST32(0.139,28))); + /*printf("%d %f\n", tf_max, mask_metric);*/ + RESTORE_STACK; +#ifdef FUZZING + is_transient = rand()&0x1; +#endif + /*printf("%d %f %d\n", is_transient, (float)*tf_estimate, tf_max);*/ + return is_transient; +} + +/* Looks for sudden increases of energy to decide whether we need to patch + the transient decision */ +int patch_transient_decision(opus_val16 *newE, opus_val16 *oldE, int nbEBands, + int end, int C) +{ + int i, c; + opus_val32 mean_diff=0; + opus_val16 spread_old[26]; + /* Apply an aggressive (-6 dB/Bark) spreading function to the old frame to + avoid false detection caused by irrelevant bands */ + if (C==1) + { + spread_old[0] = oldE[0]; + for (i=1;i=0;i--) + spread_old[i] = MAX16(spread_old[i], spread_old[i+1]-QCONST16(1.0f, DB_SHIFT)); + /* Compute mean increase */ + c=0; do { + for (i=2;i QCONST16(1.f, DB_SHIFT); +} + +/** Apply window and compute the MDCT for all sub-frames and + all channels in a frame */ +static void compute_mdcts(const CELTMode *mode, int shortBlocks, celt_sig * OPUS_RESTRICT in, + celt_sig * OPUS_RESTRICT out, int C, int CC, int LM, int upsample) +{ + const int overlap = OVERLAP(mode); + int N; + int B; + int shift; + int i, b, c; + if (shortBlocks) + { + B = shortBlocks; + N = mode->shortMdctSize; + shift = mode->maxLM; + } else { + B = 1; + N = mode->shortMdctSize<maxLM-LM; + } + c=0; do { + for (b=0;bmdct, in+c*(B*N+overlap)+b*N, &out[b+c*N*B], mode->window, overlap, shift, B); + } + } while (++ceBands[len]-m->eBands[len-1])<eBands[len]-m->eBands[len-1])<eBands[i+1]-m->eBands[i])<eBands[i+1]-m->eBands[i])==1; + for (j=0;jeBands[i]<eBands[i]<>LM, 1<>k, 1<=0;i--) + { + if (tf_res[i+1] == 1) + tf_res[i] = path1[i+1]; + else + tf_res[i] = path0[i+1]; + } + /*printf("%d %f\n", *tf_sum, tf_estimate);*/ + RESTORE_STACK; +#ifdef FUZZING + tf_select = rand()&0x1; + tf_res[0] = rand()&0x1; + for (i=1;istorage*8; + tell = ec_tell(enc); + logp = isTransient ? 2 : 4; + /* Reserve space to code the tf_select decision. */ + tf_select_rsv = LM>0 && tell+logp+1 <= budget; + budget -= tf_select_rsv; + curr = tf_changed = 0; + for (i=start;ieBands[i]<eBands[i+1]<eBands[i]<eBands[i+1]< QCONST16(.995f,10)) + trim_index-=4; + else if (sum > QCONST16(.92f,10)) + trim_index-=3; + else if (sum > QCONST16(.85f,10)) + trim_index-=2; + else if (sum > QCONST16(.8f,10)) + trim_index-=1; + /* mid-side savings estimations based on the LF average*/ + logXC = celt_log2(QCONST32(1.001f, 20)-MULT16_16(sum, sum)); + /* mid-side savings estimations based on min correlation */ + logXC2 = MAX16(HALF16(logXC), celt_log2(QCONST32(1.001f, 20)-MULT16_16(minXC, minXC))); +#ifdef FIXED_POINT + /* Compensate for Q20 vs Q14 input and convert output to Q8 */ + logXC = PSHR32(logXC-QCONST16(6.f, DB_SHIFT),DB_SHIFT-8); + logXC2 = PSHR32(logXC2-QCONST16(6.f, DB_SHIFT),DB_SHIFT-8); +#endif + + trim += MAX16(-QCONST16(4.f, 8), MULT16_16_Q15(QCONST16(.75f,15),logXC)); + *stereo_saving = MIN16(*stereo_saving + QCONST16(0.25f, 8), -HALF16(logXC2)); + } + + /* Estimate spectral tilt */ + c=0; do { + for (i=0;inbEBands]*(opus_int32)(2+2*i-end); + } + } while (++c QCONST16(2.f, DB_SHIFT)) + trim_index--; + if (diff > QCONST16(8.f, DB_SHIFT)) + trim_index--; + if (diff < -QCONST16(4.f, DB_SHIFT)) + trim_index++; + if (diff < -QCONST16(10.f, DB_SHIFT)) + trim_index++; + trim -= MAX16(-QCONST16(2.f, 8), MIN16(QCONST16(2.f, 8), SHR16(diff+QCONST16(1.f, DB_SHIFT),DB_SHIFT-8)/6 )); + trim -= SHR16(surround_trim, DB_SHIFT-8); + trim -= 2*SHR16(tf_estimate, 14-8); +#ifndef DISABLE_FLOAT_API + if (analysis->valid) + { + trim -= MAX16(-QCONST16(2.f, 8), MIN16(QCONST16(2.f, 8), + (opus_val16)(QCONST16(2.f, 8)*(analysis->tonality_slope+.05f)))); + } +#endif + +#ifdef FIXED_POINT + trim_index = PSHR32(trim, 8); +#else + trim_index = (int)floor(.5f+trim); +#endif + if (trim_index<0) + trim_index = 0; + if (trim_index>10) + trim_index = 10; + /*printf("%d\n", trim_index);*/ +#ifdef FUZZING + trim_index = rand()%11; +#endif + return trim_index; +} + +static int stereo_analysis(const CELTMode *m, const celt_norm *X, + int LM, int N0) +{ + int i; + int thetas; + opus_val32 sumLR = EPSILON, sumMS = EPSILON; + + /* Use the L1 norm to model the entropy of the L/R signal vs the M/S signal */ + for (i=0;i<13;i++) + { + int j; + for (j=m->eBands[i]<eBands[i+1]<eBands[13]<<(LM+1))+thetas, sumMS) + > MULT16_32_Q15(m->eBands[13]<<(LM+1), sumLR); +} + +static opus_val16 dynalloc_analysis(const opus_val16 *bandLogE, const opus_val16 *bandLogE2, + int nbEBands, int start, int end, int C, int *offsets, int lsb_depth, const opus_int16 *logN, + int isTransient, int vbr, int constrained_vbr, const opus_int16 *eBands, int LM, + int effectiveBytes, opus_int32 *tot_boost_, int lfe, opus_val16 *surround_dynalloc) +{ + int i, c; + opus_int32 tot_boost=0; + opus_val16 maxDepth; + VARDECL(opus_val16, follower); + VARDECL(opus_val16, noise_floor); + SAVE_STACK; + ALLOC(follower, C*nbEBands, opus_val16); + ALLOC(noise_floor, C*nbEBands, opus_val16); + for (i=0;i 50 && LM>=1 && !lfe) + { + int last=0; + c=0;do + { + follower[c*nbEBands] = bandLogE2[c*nbEBands]; + for (i=1;i bandLogE2[c*nbEBands+i-1]+QCONST16(.5f,DB_SHIFT)) + last=i; + follower[c*nbEBands+i] = MIN16(follower[c*nbEBands+i-1]+QCONST16(1.5f,DB_SHIFT), bandLogE2[c*nbEBands+i]); + } + for (i=last-1;i>=0;i--) + follower[c*nbEBands+i] = MIN16(follower[c*nbEBands+i], MIN16(follower[c*nbEBands+i+1]+QCONST16(2.f,DB_SHIFT), bandLogE2[c*nbEBands+i])); + for (i=0;i=12) + follower[i] = HALF16(follower[i]); + follower[i] = MIN16(follower[i], QCONST16(4, DB_SHIFT)); + + width = C*(eBands[i+1]-eBands[i])< 48) { + boost = (int)SHR32(EXTEND32(follower[i])*8,DB_SHIFT); + boost_bits = (boost*width<>BITRES>>3 > effectiveBytes/4) + { + opus_int32 cap = ((effectiveBytes/4)<mode; + ALLOC(_pre, CC*(N+COMBFILTER_MAXPERIOD), celt_sig); + + pre[0] = _pre; + pre[1] = _pre + (N+COMBFILTER_MAXPERIOD); + + + c=0; do { + OPUS_COPY(pre[c], prefilter_mem+c*COMBFILTER_MAXPERIOD, COMBFILTER_MAXPERIOD); + OPUS_COPY(pre[c]+COMBFILTER_MAXPERIOD, in+c*(N+st->overlap)+st->overlap, N); + } while (++c>1, opus_val16); + + pitch_downsample(pre, pitch_buf, COMBFILTER_MAXPERIOD+N, CC, st->arch); + /* Don't search for the fir last 1.5 octave of the range because + there's too many false-positives due to short-term correlation */ + pitch_search(pitch_buf+(COMBFILTER_MAXPERIOD>>1), pitch_buf, N, + COMBFILTER_MAXPERIOD-3*COMBFILTER_MINPERIOD, &pitch_index, + st->arch); + pitch_index = COMBFILTER_MAXPERIOD-pitch_index; + + gain1 = remove_doubling(pitch_buf, COMBFILTER_MAXPERIOD, COMBFILTER_MINPERIOD, + N, &pitch_index, st->prefilter_period, st->prefilter_gain); + if (pitch_index > COMBFILTER_MAXPERIOD-2) + pitch_index = COMBFILTER_MAXPERIOD-2; + gain1 = MULT16_16_Q15(QCONST16(.7f,15),gain1); + /*printf("%d %d %f %f\n", pitch_change, pitch_index, gain1, st->analysis.tonality);*/ + if (st->loss_rate>2) + gain1 = HALF32(gain1); + if (st->loss_rate>4) + gain1 = HALF32(gain1); + if (st->loss_rate>8) + gain1 = 0; + } else { + gain1 = 0; + pitch_index = COMBFILTER_MINPERIOD; + } + + /* Gain threshold for enabling the prefilter/postfilter */ + pf_threshold = QCONST16(.2f,15); + + /* Adjusting the threshold based on rate and continuity */ + if (abs(pitch_index-st->prefilter_period)*10>pitch_index) + pf_threshold += QCONST16(.2f,15); + if (nbAvailableBytes<25) + pf_threshold += QCONST16(.1f,15); + if (nbAvailableBytes<35) + pf_threshold += QCONST16(.1f,15); + if (st->prefilter_gain > QCONST16(.4f,15)) + pf_threshold -= QCONST16(.1f,15); + if (st->prefilter_gain > QCONST16(.55f,15)) + pf_threshold -= QCONST16(.1f,15); + + /* Hard threshold at 0.2 */ + pf_threshold = MAX16(pf_threshold, QCONST16(.2f,15)); + if (gain1prefilter_gain)prefilter_gain; + +#ifdef FIXED_POINT + qg = ((gain1+1536)>>10)/3-1; +#else + qg = (int)floor(.5f+gain1*32/3)-1; +#endif + qg = IMAX(0, IMIN(7, qg)); + gain1 = QCONST16(0.09375f,15)*(qg+1); + pf_on = 1; + } + /*printf("%d %f\n", pitch_index, gain1);*/ + + c=0; do { + int offset = mode->shortMdctSize-st->overlap; + st->prefilter_period=IMAX(st->prefilter_period, COMBFILTER_MINPERIOD); + OPUS_COPY(in+c*(N+st->overlap), st->in_mem+c*(st->overlap), st->overlap); + if (offset) + comb_filter(in+c*(N+st->overlap)+st->overlap, pre[c]+COMBFILTER_MAXPERIOD, + st->prefilter_period, st->prefilter_period, offset, -st->prefilter_gain, -st->prefilter_gain, + st->prefilter_tapset, st->prefilter_tapset, NULL, 0); + + comb_filter(in+c*(N+st->overlap)+st->overlap+offset, pre[c]+COMBFILTER_MAXPERIOD+offset, + st->prefilter_period, pitch_index, N-offset, -st->prefilter_gain, -gain1, + st->prefilter_tapset, prefilter_tapset, mode->window, st->overlap); + OPUS_COPY(st->in_mem+c*(st->overlap), in+c*(N+st->overlap)+N, st->overlap); + + if (N>COMBFILTER_MAXPERIOD) + { + OPUS_MOVE(prefilter_mem+c*COMBFILTER_MAXPERIOD, pre[c]+N, COMBFILTER_MAXPERIOD); + } else { + OPUS_MOVE(prefilter_mem+c*COMBFILTER_MAXPERIOD, prefilter_mem+c*COMBFILTER_MAXPERIOD+N, COMBFILTER_MAXPERIOD-N); + OPUS_MOVE(prefilter_mem+c*COMBFILTER_MAXPERIOD+COMBFILTER_MAXPERIOD-N, pre[c]+COMBFILTER_MAXPERIOD, N); + } + } while (++cnbEBands; + eBands = mode->eBands; + + coded_bands = lastCodedBands ? lastCodedBands : nbEBands; + coded_bins = eBands[coded_bands]<analysis.activity, st->analysis.tonality, tf_estimate, st->stereo_saving, tot_boost, coded_bands);*/ +#ifndef DISABLE_FLOAT_API + if (analysis->valid && analysis->activity<.4) + target -= (opus_int32)((coded_bins<activity)); +#endif + /* Stereo savings */ + if (C==2) + { + int coded_stereo_bands; + int coded_stereo_dof; + opus_val16 max_frac; + coded_stereo_bands = IMIN(intensity, coded_bands); + coded_stereo_dof = (eBands[coded_stereo_bands]<valid && !lfe) + { + opus_int32 tonal_target; + float tonal; + + /* Tonality boost (compensating for the average). */ + tonal = MAX16(0.f,analysis->tonality-.15f)-0.09f; + tonal_target = target + (opus_int32)((coded_bins<tonality, tonal);*/ + target = tonal_target; + } +#endif + + if (has_surround_mask&&!lfe) + { + opus_int32 surround_target = target + (opus_int32)SHR32(MULT16_16(surround_masking,coded_bins<end, st->intensity, surround_target, target, st->bitrate);*/ + target = IMAX(target/4, surround_target); + } + + { + opus_int32 floor_depth; + int bins; + bins = eBands[nbEBands-2]<>2); + target = IMIN(target, floor_depth); + /*printf("%f %d\n", maxDepth, floor_depth);*/ + } + + if ((!has_surround_mask||lfe) && (constrained_vbr || bitrate<64000)) + { + opus_val16 rate_factor; +#ifdef FIXED_POINT + rate_factor = MAX16(0,(bitrate-32000)); +#else + rate_factor = MAX16(0,(1.f/32768)*(bitrate-32000)); +#endif + if (constrained_vbr) + rate_factor = MIN16(rate_factor, QCONST16(0.67f, 15)); + target = base_target + (opus_int32)MULT16_32_Q15(rate_factor, target-base_target); + + } + + if (!has_surround_mask && tf_estimate < QCONST16(.2f, 14)) + { + opus_val16 amount; + opus_val16 tvbr_factor; + amount = MULT16_16_Q15(QCONST16(.0000031f, 30), IMAX(0, IMIN(32000, 96000-bitrate))); + tvbr_factor = SHR32(MULT16_16(temporal_vbr, amount), DB_SHIFT); + target += (opus_int32)MULT16_32_Q15(tvbr_factor, target); + } + + /* Don't allow more than doubling the rate */ + target = IMIN(2*base_target, target); + + return target; +} + +int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc) +{ + int i, c, N; + opus_int32 bits; + ec_enc _enc; + VARDECL(celt_sig, in); + VARDECL(celt_sig, freq); + VARDECL(celt_norm, X); + VARDECL(celt_ener, bandE); + VARDECL(opus_val16, bandLogE); + VARDECL(opus_val16, bandLogE2); + VARDECL(int, fine_quant); + VARDECL(opus_val16, error); + VARDECL(int, pulses); + VARDECL(int, cap); + VARDECL(int, offsets); + VARDECL(int, fine_priority); + VARDECL(int, tf_res); + VARDECL(unsigned char, collapse_masks); + celt_sig *prefilter_mem; + opus_val16 *oldBandE, *oldLogE, *oldLogE2; + int shortBlocks=0; + int isTransient=0; + const int CC = st->channels; + const int C = st->stream_channels; + int LM, M; + int tf_select; + int nbFilledBytes, nbAvailableBytes; + int effEnd; + int codedBands; + int tf_sum; + int alloc_trim; + int pitch_index=COMBFILTER_MINPERIOD; + opus_val16 gain1 = 0; + int dual_stereo=0; + int effectiveBytes; + int dynalloc_logp; + opus_int32 vbr_rate; + opus_int32 total_bits; + opus_int32 total_boost; + opus_int32 balance; + opus_int32 tell; + int prefilter_tapset=0; + int pf_on; + int anti_collapse_rsv; + int anti_collapse_on=0; + int silence=0; + int tf_chan = 0; + opus_val16 tf_estimate; + int pitch_change=0; + opus_int32 tot_boost; + opus_val32 sample_max; + opus_val16 maxDepth; + const OpusCustomMode *mode; + int nbEBands; + int overlap; + const opus_int16 *eBands; + int secondMdct; + int signalBandwidth; + int transient_got_disabled=0; + opus_val16 surround_masking=0; + opus_val16 temporal_vbr=0; + opus_val16 surround_trim = 0; + opus_int32 equiv_rate = 510000; + VARDECL(opus_val16, surround_dynalloc); + ALLOC_STACK; + + mode = st->mode; + nbEBands = mode->nbEBands; + overlap = mode->overlap; + eBands = mode->eBands; + tf_estimate = 0; + if (nbCompressedBytes<2 || pcm==NULL) + { + RESTORE_STACK; + return OPUS_BAD_ARG; + } + + frame_size *= st->upsample; + for (LM=0;LM<=mode->maxLM;LM++) + if (mode->shortMdctSize<mode->maxLM) + { + RESTORE_STACK; + return OPUS_BAD_ARG; + } + M=1<shortMdctSize; + + prefilter_mem = st->in_mem+CC*(st->overlap); + oldBandE = (opus_val16*)(st->in_mem+CC*(st->overlap+COMBFILTER_MAXPERIOD)); + oldLogE = oldBandE + CC*nbEBands; + oldLogE2 = oldLogE + CC*nbEBands; + + if (enc==NULL) + { + tell=1; + nbFilledBytes=0; + } else { + tell=ec_tell(enc); + nbFilledBytes=(tell+4)>>3; + } + +#ifdef CUSTOM_MODES + if (st->signalling && enc==NULL) + { + int tmp = (mode->effEBands-st->end)>>1; + st->end = IMAX(1, mode->effEBands-tmp); + compressed[0] = tmp<<5; + compressed[0] |= LM<<3; + compressed[0] |= (C==2)<<2; + /* Convert "standard mode" to Opus header */ + if (mode->Fs==48000 && mode->shortMdctSize==120) + { + int c0 = toOpus(compressed[0]); + if (c0<0) + { + RESTORE_STACK; + return OPUS_BAD_ARG; + } + compressed[0] = c0; + } + compressed++; + nbCompressedBytes--; + } +#else + celt_assert(st->signalling==0); +#endif + + /* Can't produce more than 1275 output bytes */ + nbCompressedBytes = IMIN(nbCompressedBytes,1275); + nbAvailableBytes = nbCompressedBytes - nbFilledBytes; + + if (st->vbr && st->bitrate!=OPUS_BITRATE_MAX) + { + opus_int32 den=mode->Fs>>BITRES; + vbr_rate=(st->bitrate*frame_size+(den>>1))/den; +#ifdef CUSTOM_MODES + if (st->signalling) + vbr_rate -= 8<>(3+BITRES); + } else { + opus_int32 tmp; + vbr_rate = 0; + tmp = st->bitrate*frame_size; + if (tell>1) + tmp += tell; + if (st->bitrate!=OPUS_BITRATE_MAX) + nbCompressedBytes = IMAX(2, IMIN(nbCompressedBytes, + (tmp+4*mode->Fs)/(8*mode->Fs)-!!st->signalling)); + effectiveBytes = nbCompressedBytes; + } + if (st->bitrate != OPUS_BITRATE_MAX) + equiv_rate = st->bitrate - (40*C+20)*((400>>LM) - 50); + + if (enc==NULL) + { + ec_enc_init(&_enc, compressed, nbCompressedBytes); + enc = &_enc; + } + + if (vbr_rate>0) + { + /* Computes the max bit-rate allowed in VBR mode to avoid violating the + target rate and buffering. + We must do this up front so that bust-prevention logic triggers + correctly if we don't have enough bits. */ + if (st->constrained_vbr) + { + opus_int32 vbr_bound; + opus_int32 max_allowed; + /* We could use any multiple of vbr_rate as bound (depending on the + delay). + This is clamped to ensure we use at least two bytes if the encoder + was entirely empty, but to allow 0 in hybrid mode. */ + vbr_bound = vbr_rate; + max_allowed = IMIN(IMAX(tell==1?2:0, + (vbr_rate+vbr_bound-st->vbr_reservoir)>>(BITRES+3)), + nbAvailableBytes); + if(max_allowed < nbAvailableBytes) + { + nbCompressedBytes = nbFilledBytes+max_allowed; + nbAvailableBytes = max_allowed; + ec_enc_shrink(enc, nbCompressedBytes); + } + } + } + total_bits = nbCompressedBytes*8; + + effEnd = st->end; + if (effEnd > mode->effEBands) + effEnd = mode->effEBands; + + ALLOC(in, CC*(N+st->overlap), celt_sig); + + sample_max=MAX32(st->overlap_max, celt_maxabs16(pcm, C*(N-overlap)/st->upsample)); + st->overlap_max=celt_maxabs16(pcm+C*(N-overlap)/st->upsample, C*overlap/st->upsample); + sample_max=MAX32(sample_max, st->overlap_max); +#ifdef FIXED_POINT + silence = (sample_max==0); +#else + silence = (sample_max <= (opus_val16)1/(1<lsb_depth)); +#endif +#ifdef FUZZING + if ((rand()&0x3F)==0) + silence = 1; +#endif + if (tell==1) + ec_enc_bit_logp(enc, silence, 15); + else + silence=0; + if (silence) + { + /*In VBR mode there is no need to send more than the minimum. */ + if (vbr_rate>0) + { + effectiveBytes=nbCompressedBytes=IMIN(nbCompressedBytes, nbFilledBytes+2); + total_bits=nbCompressedBytes*8; + nbAvailableBytes=2; + ec_enc_shrink(enc, nbCompressedBytes); + } + /* Pretend we've filled all the remaining bits with zeros + (that's what the initialiser did anyway) */ + tell = nbCompressedBytes*8; + enc->nbits_total+=tell-ec_tell(enc); + } + c=0; do { + celt_preemphasis(pcm+c, in+c*(N+st->overlap)+st->overlap, N, CC, st->upsample, + mode->preemph, st->preemph_memE+c, st->clip); + } while (++clfe&&nbAvailableBytes>3) || nbAvailableBytes>12*C) && st->start==0 && !silence && !st->disable_pf + && st->complexity >= 5 && !(st->consec_transient && LM!=3 && st->variable_duration==OPUS_FRAMESIZE_VARIABLE); + + prefilter_tapset = st->tapset_decision; + pf_on = run_prefilter(st, in, prefilter_mem, CC, N, prefilter_tapset, &pitch_index, &gain1, &qg, enabled, nbAvailableBytes); + if ((gain1 > QCONST16(.4f,15) || st->prefilter_gain > QCONST16(.4f,15)) && (!st->analysis.valid || st->analysis.tonality > .3) + && (pitch_index > 1.26*st->prefilter_period || pitch_index < .79*st->prefilter_period)) + pitch_change = 1; + if (pf_on==0) + { + if(st->start==0 && tell+16<=total_bits) + ec_enc_bit_logp(enc, 0, 1); + } else { + /*This block is not gated by a total bits check only because + of the nbAvailableBytes check above.*/ + int octave; + ec_enc_bit_logp(enc, 1, 1); + pitch_index += 1; + octave = EC_ILOG(pitch_index)-5; + ec_enc_uint(enc, octave, 6); + ec_enc_bits(enc, pitch_index-(16<complexity >= 1 && !st->lfe) + { + isTransient = transient_analysis(in, N+st->overlap, CC, + &tf_estimate, &tf_chan); + } + if (LM>0 && ec_tell(enc)+3<=total_bits) + { + if (isTransient) + shortBlocks = M; + } else { + isTransient = 0; + transient_got_disabled=1; + } + + ALLOC(freq, CC*N, celt_sig); /**< Interleaved signal MDCTs */ + ALLOC(bandE,nbEBands*CC, celt_ener); + ALLOC(bandLogE,nbEBands*CC, opus_val16); + + secondMdct = shortBlocks && st->complexity>=8; + ALLOC(bandLogE2, C*nbEBands, opus_val16); + if (secondMdct) + { + compute_mdcts(mode, 0, in, freq, C, CC, LM, st->upsample); + compute_band_energies(mode, freq, bandE, effEnd, C, M); + amp2Log2(mode, effEnd, st->end, bandE, bandLogE2, C); + for (i=0;iupsample); + if (CC==2&&C==1) + tf_chan = 0; + compute_band_energies(mode, freq, bandE, effEnd, C, M); + + if (st->lfe) + { + for (i=2;iend;i++) + { + bandE[i] = IMIN(bandE[i], MULT16_32_Q15(QCONST16(1e-4f,15),bandE[0])); + bandE[i] = MAX32(bandE[i], EPSILON); + } + } + amp2Log2(mode, effEnd, st->end, bandE, bandLogE, C); + + ALLOC(surround_dynalloc, C*nbEBands, opus_val16); + for(i=0;iend;i++) + surround_dynalloc[i] = 0; + /* This computes how much masking takes place between surround channels */ + if (st->start==0&&st->energy_mask&&!st->lfe) + { + int mask_end; + int midband; + int count_dynalloc; + opus_val32 mask_avg=0; + opus_val32 diff=0; + int count=0; + mask_end = IMAX(2,st->lastCodedBands); + for (c=0;cenergy_mask[nbEBands*c+i], + QCONST16(.25f, DB_SHIFT)), -QCONST16(2.0f, DB_SHIFT)); + if (mask > 0) + mask = HALF16(mask); + mask_avg += MULT16_16(mask, eBands[i+1]-eBands[i]); + count += eBands[i+1]-eBands[i]; + diff += MULT16_16(mask, 1+2*i-mask_end); + } + } + mask_avg = DIV32_16(mask_avg,count); + mask_avg += QCONST16(.2f, DB_SHIFT); + diff = diff*6/(C*(mask_end-1)*(mask_end+1)*mask_end); + /* Again, being conservative */ + diff = HALF32(diff); + diff = MAX32(MIN32(diff, QCONST32(.031f, DB_SHIFT)), -QCONST32(.031f, DB_SHIFT)); + /* Find the band that's in the middle of the coded spectrum */ + for (midband=0;eBands[midband+1] < eBands[mask_end]/2;midband++); + count_dynalloc=0; + for(i=0;ienergy_mask[i], st->energy_mask[nbEBands+i]); + else + unmask = st->energy_mask[i]; + unmask = MIN16(unmask, QCONST16(.0f, DB_SHIFT)); + unmask -= lin; + if (unmask > QCONST16(.25f, DB_SHIFT)) + { + surround_dynalloc[i] = unmask - QCONST16(.25f, DB_SHIFT); + count_dynalloc++; + } + } + if (count_dynalloc>=3) + { + /* If we need dynalloc in many bands, it's probably because our + initial masking rate was too low. */ + mask_avg += QCONST16(.25f, DB_SHIFT); + if (mask_avg>0) + { + /* Something went really wrong in the original calculations, + disabling masking. */ + mask_avg = 0; + diff = 0; + for(i=0;ilfe) + { + opus_val16 follow=-QCONST16(10.0f,DB_SHIFT); + opus_val32 frame_avg=0; + opus_val16 offset = shortBlocks?HALF16(SHL16(LM, DB_SHIFT)):0; + for(i=st->start;iend;i++) + { + follow = MAX16(follow-QCONST16(1.f, DB_SHIFT), bandLogE[i]-offset); + if (C==2) + follow = MAX16(follow, bandLogE[i+nbEBands]-offset); + frame_avg += follow; + } + frame_avg /= (st->end-st->start); + temporal_vbr = SUB16(frame_avg,st->spec_avg); + temporal_vbr = MIN16(QCONST16(3.f, DB_SHIFT), MAX16(-QCONST16(1.5f, DB_SHIFT), temporal_vbr)); + st->spec_avg += MULT16_16_Q15(QCONST16(.02f, 15), temporal_vbr); + } + /*for (i=0;i<21;i++) + printf("%f ", bandLogE[i]); + printf("\n");*/ + + if (!secondMdct) + { + for (i=0;i0 && ec_tell(enc)+3<=total_bits && !isTransient && st->complexity>=5 && !st->lfe) + { + if (patch_transient_decision(bandLogE, oldBandE, nbEBands, st->end, C)) + { + isTransient = 1; + shortBlocks = M; + compute_mdcts(mode, shortBlocks, in, freq, C, CC, LM, st->upsample); + compute_band_energies(mode, freq, bandE, effEnd, C, M); + amp2Log2(mode, effEnd, st->end, bandE, bandLogE, C); + /* Compensate for the scaling of short vs long mdcts */ + for (i=0;i0 && ec_tell(enc)+3<=total_bits) + ec_enc_bit_logp(enc, isTransient, 3); + + ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */ + + /* Band normalisation */ + normalise_bands(mode, freq, X, bandE, effEnd, C, M); + + ALLOC(tf_res, nbEBands, int); + /* Disable variable tf resolution for hybrid and at very low bitrate */ + if (effectiveBytes>=15*C && st->start==0 && st->complexity>=2 && !st->lfe) + { + int lambda; + if (effectiveBytes<40) + lambda = 12; + else if (effectiveBytes<60) + lambda = 6; + else if (effectiveBytes<100) + lambda = 4; + else + lambda = 3; + lambda*=2; + tf_select = tf_analysis(mode, effEnd, isTransient, tf_res, lambda, X, N, LM, &tf_sum, tf_estimate, tf_chan); + for (i=effEnd;iend;i++) + tf_res[i] = tf_res[effEnd-1]; + } else { + tf_sum = 0; + for (i=0;iend;i++) + tf_res[i] = isTransient; + tf_select=0; + } + + ALLOC(error, C*nbEBands, opus_val16); + quant_coarse_energy(mode, st->start, st->end, effEnd, bandLogE, + oldBandE, total_bits, error, enc, + C, LM, nbAvailableBytes, st->force_intra, + &st->delayedIntra, st->complexity >= 4, st->loss_rate, st->lfe); + + tf_encode(st->start, st->end, isTransient, tf_res, LM, tf_select, enc); + + if (ec_tell(enc)+4<=total_bits) + { + if (st->lfe) + { + st->tapset_decision = 0; + st->spread_decision = SPREAD_NORMAL; + } else if (shortBlocks || st->complexity < 3 || nbAvailableBytes < 10*C || st->start != 0) + { + if (st->complexity == 0) + st->spread_decision = SPREAD_NONE; + else + st->spread_decision = SPREAD_NORMAL; + } else { + /* Disable new spreading+tapset estimator until we can show it works + better than the old one. So far it seems like spreading_decision() + works best. */ +#if 0 + if (st->analysis.valid) + { + static const opus_val16 spread_thresholds[3] = {-QCONST16(.6f, 15), -QCONST16(.2f, 15), -QCONST16(.07f, 15)}; + static const opus_val16 spread_histeresis[3] = {QCONST16(.15f, 15), QCONST16(.07f, 15), QCONST16(.02f, 15)}; + static const opus_val16 tapset_thresholds[2] = {QCONST16(.0f, 15), QCONST16(.15f, 15)}; + static const opus_val16 tapset_histeresis[2] = {QCONST16(.1f, 15), QCONST16(.05f, 15)}; + st->spread_decision = hysteresis_decision(-st->analysis.tonality, spread_thresholds, spread_histeresis, 3, st->spread_decision); + st->tapset_decision = hysteresis_decision(st->analysis.tonality_slope, tapset_thresholds, tapset_histeresis, 2, st->tapset_decision); + } else +#endif + { + st->spread_decision = spreading_decision(mode, X, + &st->tonal_average, st->spread_decision, &st->hf_average, + &st->tapset_decision, pf_on&&!shortBlocks, effEnd, C, M); + } + /*printf("%d %d\n", st->tapset_decision, st->spread_decision);*/ + /*printf("%f %d %f %d\n\n", st->analysis.tonality, st->spread_decision, st->analysis.tonality_slope, st->tapset_decision);*/ + } + ec_enc_icdf(enc, st->spread_decision, spread_icdf, 5); + } + + ALLOC(offsets, nbEBands, int); + + maxDepth = dynalloc_analysis(bandLogE, bandLogE2, nbEBands, st->start, st->end, C, offsets, + st->lsb_depth, mode->logN, isTransient, st->vbr, st->constrained_vbr, + eBands, LM, effectiveBytes, &tot_boost, st->lfe, surround_dynalloc); + /* For LFE, everything interesting is in the first band */ + if (st->lfe) + offsets[0] = IMIN(8, effectiveBytes/3); + ALLOC(cap, nbEBands, int); + init_caps(mode,cap,LM,C); + + dynalloc_logp = 6; + total_bits<<=BITRES; + total_boost = 0; + tell = ec_tell_frac(enc); + for (i=st->start;iend;i++) + { + int width, quanta; + int dynalloc_loop_logp; + int boost; + int j; + width = C*(eBands[i+1]-eBands[i])<intensity = hysteresis_decision((opus_val16)(equiv_rate/1000), + intensity_thresholds, intensity_histeresis, 21, st->intensity); + st->intensity = IMIN(st->end,IMAX(st->start, st->intensity)); + } + + alloc_trim = 5; + if (tell+(6<lfe) + alloc_trim = 5; + else + alloc_trim = alloc_trim_analysis(mode, X, bandLogE, + st->end, LM, C, N, &st->analysis, &st->stereo_saving, tf_estimate, st->intensity, surround_trim); + ec_enc_icdf(enc, alloc_trim, trim_icdf, 7); + tell = ec_tell_frac(enc); + } + + /* Variable bitrate */ + if (vbr_rate>0) + { + opus_val16 alpha; + opus_int32 delta; + /* The target rate in 8th bits per frame */ + opus_int32 target, base_target; + opus_int32 min_allowed; + int lm_diff = mode->maxLM - LM; + + /* Don't attempt to use more than 510 kb/s, even for frames smaller than 20 ms. + The CELT allocator will just not be able to use more than that anyway. */ + nbCompressedBytes = IMIN(nbCompressedBytes,1275>>(3-LM)); + base_target = vbr_rate - ((40*C+20)<constrained_vbr) + base_target += (st->vbr_offset>>lm_diff); + + target = compute_vbr(mode, &st->analysis, base_target, LM, equiv_rate, + st->lastCodedBands, C, st->intensity, st->constrained_vbr, + st->stereo_saving, tot_boost, tf_estimate, pitch_change, maxDepth, + st->variable_duration, st->lfe, st->energy_mask!=NULL, surround_masking, + temporal_vbr); + + /* The current offset is removed from the target and the space used + so far is added*/ + target=target+tell; + /* In VBR mode the frame size must not be reduced so much that it would + result in the encoder running out of bits. + The margin of 2 bytes ensures that none of the bust-prevention logic + in the decoder will have triggered so far. */ + min_allowed = ((tell+total_boost+(1<<(BITRES+3))-1)>>(BITRES+3)) + 2 - nbFilledBytes; + + nbAvailableBytes = (target+(1<<(BITRES+2)))>>(BITRES+3); + nbAvailableBytes = IMAX(min_allowed,nbAvailableBytes); + nbAvailableBytes = IMIN(nbCompressedBytes,nbAvailableBytes+nbFilledBytes) - nbFilledBytes; + + /* By how much did we "miss" the target on that frame */ + delta = target - vbr_rate; + + target=nbAvailableBytes<<(BITRES+3); + + /*If the frame is silent we don't adjust our drift, otherwise + the encoder will shoot to very high rates after hitting a + span of silence, but we do allow the bitres to refill. + This means that we'll undershoot our target in CVBR/VBR modes + on files with lots of silence. */ + if(silence) + { + nbAvailableBytes = 2; + target = 2*8<vbr_count < 970) + { + st->vbr_count++; + alpha = celt_rcp(SHL32(EXTEND32(st->vbr_count+20),16)); + } else + alpha = QCONST16(.001f,15); + /* How many bits have we used in excess of what we're allowed */ + if (st->constrained_vbr) + st->vbr_reservoir += target - vbr_rate; + /*printf ("%d\n", st->vbr_reservoir);*/ + + /* Compute the offset we need to apply in order to reach the target */ + if (st->constrained_vbr) + { + st->vbr_drift += (opus_int32)MULT16_32_Q15(alpha,(delta*(1<vbr_offset-st->vbr_drift); + st->vbr_offset = -st->vbr_drift; + } + /*printf ("%d\n", st->vbr_drift);*/ + + if (st->constrained_vbr && st->vbr_reservoir < 0) + { + /* We're under the min value -- increase rate */ + int adjust = (-st->vbr_reservoir)/(8<vbr_reservoir = 0; + /*printf ("+%d\n", adjust);*/ + } + nbCompressedBytes = IMIN(nbCompressedBytes,nbAvailableBytes+nbFilledBytes); + /*printf("%d\n", nbCompressedBytes*50*8);*/ + /* This moves the raw bits to take into account the new compressed size */ + ec_enc_shrink(enc, nbCompressedBytes); + } + + /* Bit allocation */ + ALLOC(fine_quant, nbEBands, int); + ALLOC(pulses, nbEBands, int); + ALLOC(fine_priority, nbEBands, int); + + /* bits = packet size - where we are - safety*/ + bits = (((opus_int32)nbCompressedBytes*8)<=2&&bits>=((LM+2)<end-1; +#ifndef DISABLE_FLOAT_API + if (st->analysis.valid) + { + int min_bandwidth; + if (equiv_rate < (opus_int32)32000*C) + min_bandwidth = 13; + else if (equiv_rate < (opus_int32)48000*C) + min_bandwidth = 16; + else if (equiv_rate < (opus_int32)60000*C) + min_bandwidth = 18; + else if (equiv_rate < (opus_int32)80000*C) + min_bandwidth = 19; + else + min_bandwidth = 20; + signalBandwidth = IMAX(st->analysis.bandwidth, min_bandwidth); + } +#endif + if (st->lfe) + signalBandwidth = 1; + codedBands = compute_allocation(mode, st->start, st->end, offsets, cap, + alloc_trim, &st->intensity, &dual_stereo, bits, &balance, pulses, + fine_quant, fine_priority, C, LM, enc, 1, st->lastCodedBands, signalBandwidth); + if (st->lastCodedBands) + st->lastCodedBands = IMIN(st->lastCodedBands+1,IMAX(st->lastCodedBands-1,codedBands)); + else + st->lastCodedBands = codedBands; + + quant_fine_energy(mode, st->start, st->end, oldBandE, error, fine_quant, enc, C); + + /* Residual quantisation */ + ALLOC(collapse_masks, C*nbEBands, unsigned char); + quant_all_bands(1, mode, st->start, st->end, X, C==2 ? X+N : NULL, collapse_masks, + bandE, pulses, shortBlocks, st->spread_decision, dual_stereo, st->intensity, tf_res, + nbCompressedBytes*(8<rng); + + if (anti_collapse_rsv > 0) + { + anti_collapse_on = st->consec_transient<2; +#ifdef FUZZING + anti_collapse_on = rand()&0x1; +#endif + ec_enc_bits(enc, anti_collapse_on, 1); + } + quant_energy_finalise(mode, st->start, st->end, oldBandE, error, fine_quant, fine_priority, nbCompressedBytes*8-ec_tell(enc), enc, C); + + if (silence) + { + for (i=0;istart, st->end, oldBandE, oldLogE, oldLogE2, pulses, st->rng); + } + + if (silence) + { + for (i=0;istart, effEnd, C, M); + } + + c=0; do { + OPUS_MOVE(st->syn_mem[c], st->syn_mem[c]+N, 2*MAX_PERIOD-N+overlap/2); + } while (++csyn_mem[c]+2*MAX_PERIOD-N; + } while (++cprefilter_period=IMAX(st->prefilter_period, COMBFILTER_MINPERIOD); + st->prefilter_period_old=IMAX(st->prefilter_period_old, COMBFILTER_MINPERIOD); + comb_filter(out_mem[c], out_mem[c], st->prefilter_period_old, st->prefilter_period, mode->shortMdctSize, + st->prefilter_gain_old, st->prefilter_gain, st->prefilter_tapset_old, st->prefilter_tapset, + mode->window, st->overlap); + if (LM!=0) + comb_filter(out_mem[c]+mode->shortMdctSize, out_mem[c]+mode->shortMdctSize, st->prefilter_period, pitch_index, N-mode->shortMdctSize, + st->prefilter_gain, gain1, st->prefilter_tapset, prefilter_tapset, + mode->window, overlap); + } while (++cupsample, mode->preemph, st->preemph_memD, freq); + st->prefilter_period_old = st->prefilter_period; + st->prefilter_gain_old = st->prefilter_gain; + st->prefilter_tapset_old = st->prefilter_tapset; + } +#endif + + st->prefilter_period = pitch_index; + st->prefilter_gain = gain1; + st->prefilter_tapset = prefilter_tapset; +#ifdef RESYNTH + if (LM!=0) + { + st->prefilter_period_old = st->prefilter_period; + st->prefilter_gain_old = st->prefilter_gain; + st->prefilter_tapset_old = st->prefilter_tapset; + } +#endif + + if (CC==2&&C==1) { + for (i=0;istart;i++) + { + oldBandE[c*nbEBands+i]=0; + oldLogE[c*nbEBands+i]=oldLogE2[c*nbEBands+i]=-QCONST16(28.f,DB_SHIFT); + } + for (i=st->end;iconsec_transient++; + else + st->consec_transient=0; + st->rng = enc->rng; + + /* If there's any room left (can only happen for very high rates), + it's already filled with zeros */ + ec_enc_done(enc); + +#ifdef CUSTOM_MODES + if (st->signalling) + nbCompressedBytes++; +#endif + + RESTORE_STACK; + if (ec_get_error(enc)) + return OPUS_INTERNAL_ERROR; + else + return nbCompressedBytes; +} + + +#ifdef CUSTOM_MODES + +#ifdef FIXED_POINT +int opus_custom_encode(CELTEncoder * OPUS_RESTRICT st, const opus_int16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes) +{ + return celt_encode_with_ec(st, pcm, frame_size, compressed, nbCompressedBytes, NULL); +} + +#ifndef DISABLE_FLOAT_API +int opus_custom_encode_float(CELTEncoder * OPUS_RESTRICT st, const float * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes) +{ + int j, ret, C, N; + VARDECL(opus_int16, in); + ALLOC_STACK; + + if (pcm==NULL) + return OPUS_BAD_ARG; + + C = st->channels; + N = frame_size; + ALLOC(in, C*N, opus_int16); + + for (j=0;jchannels; + N=frame_size; + ALLOC(in, C*N, celt_sig); + for (j=0;j10) + goto bad_arg; + st->complexity = value; + } + break; + case CELT_SET_START_BAND_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if (value<0 || value>=st->mode->nbEBands) + goto bad_arg; + st->start = value; + } + break; + case CELT_SET_END_BAND_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if (value<1 || value>st->mode->nbEBands) + goto bad_arg; + st->end = value; + } + break; + case CELT_SET_PREDICTION_REQUEST: + { + int value = va_arg(ap, opus_int32); + if (value<0 || value>2) + goto bad_arg; + st->disable_pf = value<=1; + st->force_intra = value==0; + } + break; + case OPUS_SET_PACKET_LOSS_PERC_REQUEST: + { + int value = va_arg(ap, opus_int32); + if (value<0 || value>100) + goto bad_arg; + st->loss_rate = value; + } + break; + case OPUS_SET_VBR_CONSTRAINT_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + st->constrained_vbr = value; + } + break; + case OPUS_SET_VBR_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + st->vbr = value; + } + break; + case OPUS_SET_BITRATE_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if (value<=500 && value!=OPUS_BITRATE_MAX) + goto bad_arg; + value = IMIN(value, 260000*st->channels); + st->bitrate = value; + } + break; + case CELT_SET_CHANNELS_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if (value<1 || value>2) + goto bad_arg; + st->stream_channels = value; + } + break; + case OPUS_SET_LSB_DEPTH_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if (value<8 || value>24) + goto bad_arg; + st->lsb_depth=value; + } + break; + case OPUS_GET_LSB_DEPTH_REQUEST: + { + opus_int32 *value = va_arg(ap, opus_int32*); + *value=st->lsb_depth; + } + break; + case OPUS_SET_EXPERT_FRAME_DURATION_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + st->variable_duration = value; + } + break; + case OPUS_RESET_STATE: + { + int i; + opus_val16 *oldBandE, *oldLogE, *oldLogE2; + oldBandE = (opus_val16*)(st->in_mem+st->channels*(st->overlap+COMBFILTER_MAXPERIOD)); + oldLogE = oldBandE + st->channels*st->mode->nbEBands; + oldLogE2 = oldLogE + st->channels*st->mode->nbEBands; + OPUS_CLEAR((char*)&st->ENCODER_RESET_START, + opus_custom_encoder_get_size(st->mode, st->channels)- + ((char*)&st->ENCODER_RESET_START - (char*)st)); + for (i=0;ichannels*st->mode->nbEBands;i++) + oldLogE[i]=oldLogE2[i]=-QCONST16(28.f,DB_SHIFT); + st->vbr_offset = 0; + st->delayedIntra = 1; + st->spread_decision = SPREAD_NORMAL; + st->tonal_average = 256; + st->hf_average = 0; + st->tapset_decision = 0; + } + break; +#ifdef CUSTOM_MODES + case CELT_SET_INPUT_CLIPPING_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + st->clip = value; + } + break; +#endif + case CELT_SET_SIGNALLING_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + st->signalling = value; + } + break; + case CELT_SET_ANALYSIS_REQUEST: + { + AnalysisInfo *info = va_arg(ap, AnalysisInfo *); + if (info) + OPUS_COPY(&st->analysis, info, 1); + } + break; + case CELT_GET_MODE_REQUEST: + { + const CELTMode ** value = va_arg(ap, const CELTMode**); + if (value==0) + goto bad_arg; + *value=st->mode; + } + break; + case OPUS_GET_FINAL_RANGE_REQUEST: + { + opus_uint32 * value = va_arg(ap, opus_uint32 *); + if (value==0) + goto bad_arg; + *value=st->rng; + } + break; + case OPUS_SET_LFE_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + st->lfe = value; + } + break; + case OPUS_SET_ENERGY_MASK_REQUEST: + { + opus_val16 *value = va_arg(ap, opus_val16*); + st->energy_mask = value; + } + break; + default: + goto bad_request; + } + va_end(ap); + return OPUS_OK; +bad_arg: + va_end(ap); + return OPUS_BAD_ARG; +bad_request: + va_end(ap); + return OPUS_UNIMPLEMENTED; +} diff --git a/code/opus-1.1/celt/celt_lpc.c b/code/opus-1.1/celt/celt_lpc.c new file mode 100644 index 00000000..fa29d626 --- /dev/null +++ b/code/opus-1.1/celt/celt_lpc.c @@ -0,0 +1,309 @@ +/* Copyright (c) 2009-2010 Xiph.Org Foundation + Written 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. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "celt_lpc.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "pitch.h" + +void _celt_lpc( + opus_val16 *_lpc, /* out: [0...p-1] LPC coefficients */ +const opus_val32 *ac, /* in: [0...p] autocorrelation values */ +int p +) +{ + int i, j; + opus_val32 r; + opus_val32 error = ac[0]; +#ifdef FIXED_POINT + opus_val32 lpc[LPC_ORDER]; +#else + float *lpc = _lpc; +#endif + + for (i = 0; i < p; i++) + lpc[i] = 0; + if (ac[0] != 0) + { + for (i = 0; i < p; i++) { + /* Sum up this iteration's reflection coefficient */ + opus_val32 rr = 0; + for (j = 0; j < i; j++) + rr += MULT32_32_Q31(lpc[j],ac[i - j]); + rr += SHR32(ac[i + 1],3); + r = -frac_div32(SHL32(rr,3), error); + /* Update LPC coefficients and total error */ + lpc[i] = SHR32(r,3); + for (j = 0; j < (i+1)>>1; j++) + { + opus_val32 tmp1, tmp2; + tmp1 = lpc[j]; + tmp2 = lpc[i-1-j]; + lpc[j] = tmp1 + MULT32_32_Q31(r,tmp2); + lpc[i-1-j] = tmp2 + MULT32_32_Q31(r,tmp1); + } + + error = error - MULT32_32_Q31(MULT32_32_Q31(r,r),error); + /* Bail out once we get 30 dB gain */ +#ifdef FIXED_POINT + if (error=1;j--) + { + mem[j]=mem[j-1]; + } + mem[0] = ROUND16(sum,SIG_SHIFT); + _y[i] = sum; + } +#else + int i,j; + VARDECL(opus_val16, rden); + VARDECL(opus_val16, y); + SAVE_STACK; + + celt_assert((ord&3)==0); + ALLOC(rden, ord, opus_val16); + ALLOC(y, N+ord, opus_val16); + for(i=0;i0); + celt_assert(overlap>=0); + if (overlap == 0) + { + xptr = x; + } else { + for (i=0;i0) + { + for(i=0;i= 536870912) + { + int shift2=1; + if (ac[0] >= 1073741824) + shift2++; + for (i=0;i<=lag;i++) + ac[i] = SHR32(ac[i], shift2); + shift += shift2; + } +#endif + + RESTORE_STACK; + return shift; +} diff --git a/code/opus-1.0.2/celt/celt_lpc.h b/code/opus-1.1/celt/celt_lpc.h similarity index 93% rename from code/opus-1.0.2/celt/celt_lpc.h rename to code/opus-1.1/celt/celt_lpc.h index 2baa77ed..dc2a0a3d 100644 --- a/code/opus-1.0.2/celt/celt_lpc.h +++ b/code/opus-1.1/celt/celt_lpc.h @@ -48,6 +48,7 @@ void celt_iir(const opus_val32 *x, int ord, opus_val16 *mem); -void _celt_autocorr(const opus_val16 *x, opus_val32 *ac, const opus_val16 *window, int overlap, int lag, int n); +int _celt_autocorr(const opus_val16 *x, opus_val32 *ac, + const opus_val16 *window, int overlap, int lag, int n, int arch); #endif /* PLC_H */ diff --git a/code/opus-1.0.2/celt/pitch.h b/code/opus-1.1/celt/cpu_support.h similarity index 68% rename from code/opus-1.0.2/celt/pitch.h rename to code/opus-1.1/celt/cpu_support.h index 2757071a..d68dbe62 100644 --- a/code/opus-1.0.2/celt/pitch.h +++ b/code/opus-1.1/celt/cpu_support.h @@ -1,11 +1,5 @@ -/* Copyright (c) 2007-2008 CSIRO - Copyright (c) 2007-2009 Xiph.Org Foundation - Written by Jean-Marc Valin */ -/** - @file pitch.h - @brief Pitch analysis - */ - +/* Copyright (c) 2010 Xiph.Org Foundation + * Copyright (c) 2013 Parrot */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -31,18 +25,30 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef PITCH_H -#define PITCH_H +#ifndef CPU_SUPPORT_H +#define CPU_SUPPORT_H -#include "modes.h" +#include "opus_types.h" +#include "opus_defines.h" -void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x_lp, - int len, int C); +#if defined(OPUS_HAVE_RTCD) && defined(OPUS_ARM_ASM) +#include "arm/armcpu.h" -void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTRICT y, - int len, int max_pitch, int *pitch); +/* We currently support 4 ARM variants: + * arch[0] -> ARMv4 + * arch[1] -> ARMv5E + * arch[2] -> ARMv6 + * arch[3] -> NEON + */ +#define OPUS_ARCHMASK 3 -opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod, - int N, int *T0, int prev_period, opus_val16 prev_gain); +#else +#define OPUS_ARCHMASK 0 + +static OPUS_INLINE int opus_select_arch(void) +{ + return 0; +} +#endif #endif diff --git a/code/opus-1.1/celt/cwrs.c b/code/opus-1.1/celt/cwrs.c new file mode 100644 index 00000000..ad980cc7 --- /dev/null +++ b/code/opus-1.1/celt/cwrs.c @@ -0,0 +1,697 @@ +/* Copyright (c) 2007-2008 CSIRO + Copyright (c) 2007-2009 Xiph.Org Foundation + Copyright (c) 2007-2009 Timothy B. Terriberry + Written by Timothy B. Terriberry and 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. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "os_support.h" +#include "cwrs.h" +#include "mathops.h" +#include "arch.h" + +#ifdef CUSTOM_MODES + +/*Guaranteed to return a conservatively large estimate of the binary logarithm + with frac bits of fractional precision. + Tested for all possible 32-bit inputs with frac=4, where the maximum + overestimation is 0.06254243 bits.*/ +int log2_frac(opus_uint32 val, int frac) +{ + int l; + l=EC_ILOG(val); + if(val&(val-1)){ + /*This is (val>>l-16), but guaranteed to round up, even if adding a bias + before the shift would cause overflow (e.g., for 0xFFFFxxxx). + Doesn't work for val=0, but that case fails the test above.*/ + if(l>16)val=((val-1)>>(l-16))+1; + else val<<=16-l; + l=(l-1)<>16); + l+=b<>b; + val=(val*val+0x7FFF)>>15; + } + while(frac-->0); + /*If val is not exactly 0x8000, then we have to round up the remainder.*/ + return l+(val>0x8000); + } + /*Exact powers of two require no rounding.*/ + else return (l-1)<0 ? sum(k=1...K,2**k*choose(N,k)*choose(K-1,k-1)) : 1, + where choose() is the binomial function. + A table of values for N<10 and K<10 looks like: + V[10][10] = { + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {1, 2, 2, 2, 2, 2, 2, 2, 2, 2}, + {1, 4, 8, 12, 16, 20, 24, 28, 32, 36}, + {1, 6, 18, 38, 66, 102, 146, 198, 258, 326}, + {1, 8, 32, 88, 192, 360, 608, 952, 1408, 1992}, + {1, 10, 50, 170, 450, 1002, 1970, 3530, 5890, 9290}, + {1, 12, 72, 292, 912, 2364, 5336, 10836, 20256, 35436}, + {1, 14, 98, 462, 1666, 4942, 12642, 28814, 59906, 115598}, + {1, 16, 128, 688, 2816, 9424, 27008, 68464, 157184, 332688}, + {1, 18, 162, 978, 4482, 16722, 53154, 148626, 374274, 864146} + }; + + U(N,K) = the number of such combinations wherein N-1 objects are taken at + most K-1 at a time. + This is given by + U(N,K) = sum(k=0...K-1,V(N-1,k)) + = K>0 ? (V(N-1,K-1) + V(N,K-1))/2 : 0. + The latter expression also makes clear that U(N,K) is half the number of such + combinations wherein the first object is taken at least once. + Although it may not be clear from either of these definitions, U(N,K) is the + natural function to work with when enumerating the pulse vector codebooks, + not V(N,K). + U(N,K) is not well-defined for N=0, but with the extension + U(0,K) = K>0 ? 0 : 1, + the function becomes symmetric: U(N,K) = U(K,N), with a similar table: + U[10][10] = { + {1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + {0, 1, 3, 5, 7, 9, 11, 13, 15, 17}, + {0, 1, 5, 13, 25, 41, 61, 85, 113, 145}, + {0, 1, 7, 25, 63, 129, 231, 377, 575, 833}, + {0, 1, 9, 41, 129, 321, 681, 1289, 2241, 3649}, + {0, 1, 11, 61, 231, 681, 1683, 3653, 7183, 13073}, + {0, 1, 13, 85, 377, 1289, 3653, 8989, 19825, 40081}, + {0, 1, 15, 113, 575, 2241, 7183, 19825, 48639, 108545}, + {0, 1, 17, 145, 833, 3649, 13073, 40081, 108545, 265729} + }; + + With this extension, V(N,K) may be written in terms of U(N,K): + V(N,K) = U(N,K) + U(N,K+1) + for all N>=0, K>=0. + Thus U(N,K+1) represents the number of combinations where the first element + is positive or zero, and U(N,K) represents the number of combinations where + it is negative. + With a large enough table of U(N,K) values, we could write O(N) encoding + and O(min(N*log(K),N+K)) decoding routines, but such a table would be + prohibitively large for small embedded devices (K may be as large as 32767 + for small N, and N may be as large as 200). + + Both functions obey the same recurrence relation: + V(N,K) = V(N-1,K) + V(N,K-1) + V(N-1,K-1), + U(N,K) = U(N-1,K) + U(N,K-1) + U(N-1,K-1), + for all N>0, K>0, with different initial conditions at N=0 or K=0. + This allows us to construct a row of one of the tables above given the + previous row or the next row. + Thus we can derive O(NK) encoding and decoding routines with O(K) memory + using only addition and subtraction. + + When encoding, we build up from the U(2,K) row and work our way forwards. + When decoding, we need to start at the U(N,K) row and work our way backwards, + which requires a means of computing U(N,K). + U(N,K) may be computed from two previous values with the same N: + U(N,K) = ((2*N-1)*U(N,K-1) - U(N,K-2))/(K-1) + U(N,K-2) + for all N>1, and since U(N,K) is symmetric, a similar relation holds for two + previous values with the same K: + U(N,K>1) = ((2*K-1)*U(N-1,K) - U(N-2,K))/(N-1) + U(N-2,K) + for all K>1. + This allows us to construct an arbitrary row of the U(N,K) table by starting + with the first two values, which are constants. + This saves roughly 2/3 the work in our O(NK) decoding routine, but costs O(K) + multiplications. + Similar relations can be derived for V(N,K), but are not used here. + + For N>0 and K>0, U(N,K) and V(N,K) take on the form of an (N-1)-degree + polynomial for fixed N. + The first few are + U(1,K) = 1, + U(2,K) = 2*K-1, + U(3,K) = (2*K-2)*K+1, + U(4,K) = (((4*K-6)*K+8)*K-3)/3, + U(5,K) = ((((2*K-4)*K+10)*K-8)*K+3)/3, + and + V(1,K) = 2, + V(2,K) = 4*K, + V(3,K) = 4*K*K+2, + V(4,K) = 8*(K*K+2)*K/3, + V(5,K) = ((4*K*K+20)*K*K+6)/3, + for all K>0. + This allows us to derive O(N) encoding and O(N*log(K)) decoding routines for + small N (and indeed decoding is also O(N) for N<3). + + @ARTICLE{Fis86, + author="Thomas R. Fischer", + title="A Pyramid Vector Quantizer", + journal="IEEE Transactions on Information Theory", + volume="IT-32", + number=4, + pages="568--583", + month=Jul, + year=1986 + }*/ + +#if !defined(SMALL_FOOTPRINT) + +/*U(N,K) = U(K,N) := N>0?K>0?U(N-1,K)+U(N,K-1)+U(N-1,K-1):0:K>0?1:0*/ +# define CELT_PVQ_U(_n,_k) (CELT_PVQ_U_ROW[IMIN(_n,_k)][IMAX(_n,_k)]) +/*V(N,K) := U(N,K)+U(N,K+1) = the number of PVQ codewords for a band of size N + with K pulses allocated to it.*/ +# define CELT_PVQ_V(_n,_k) (CELT_PVQ_U(_n,_k)+CELT_PVQ_U(_n,(_k)+1)) + +/*For each V(N,K) supported, we will access element U(min(N,K+1),max(N,K+1)). + Thus, the number of entries in row I is the larger of the maximum number of + pulses we will ever allocate for a given N=I (K=128, or however many fit in + 32 bits, whichever is smaller), plus one, and the maximum N for which + K=I-1 pulses fit in 32 bits. + The largest band size in an Opus Custom mode is 208. + Otherwise, we can limit things to the set of N which can be achieved by + splitting a band from a standard Opus mode: 176, 144, 96, 88, 72, 64, 48, + 44, 36, 32, 24, 22, 18, 16, 8, 4, 2).*/ +#if defined(CUSTOM_MODES) +static const opus_uint32 CELT_PVQ_U_DATA[1488]={ +#else +static const opus_uint32 CELT_PVQ_U_DATA[1272]={ +#endif + /*N=0, K=0...176:*/ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +#if defined(CUSTOM_MODES) + /*...208:*/ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, +#endif + /*N=1, K=1...176:*/ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +#if defined(CUSTOM_MODES) + /*...208:*/ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, +#endif + /*N=2, K=2...176:*/ + 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, + 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, + 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, + 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, + 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, + 175, 177, 179, 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203, + 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 233, + 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 257, 259, 261, 263, + 265, 267, 269, 271, 273, 275, 277, 279, 281, 283, 285, 287, 289, 291, 293, + 295, 297, 299, 301, 303, 305, 307, 309, 311, 313, 315, 317, 319, 321, 323, + 325, 327, 329, 331, 333, 335, 337, 339, 341, 343, 345, 347, 349, 351, +#if defined(CUSTOM_MODES) + /*...208:*/ + 353, 355, 357, 359, 361, 363, 365, 367, 369, 371, 373, 375, 377, 379, 381, + 383, 385, 387, 389, 391, 393, 395, 397, 399, 401, 403, 405, 407, 409, 411, + 413, 415, +#endif + /*N=3, K=3...176:*/ + 13, 25, 41, 61, 85, 113, 145, 181, 221, 265, 313, 365, 421, 481, 545, 613, + 685, 761, 841, 925, 1013, 1105, 1201, 1301, 1405, 1513, 1625, 1741, 1861, + 1985, 2113, 2245, 2381, 2521, 2665, 2813, 2965, 3121, 3281, 3445, 3613, 3785, + 3961, 4141, 4325, 4513, 4705, 4901, 5101, 5305, 5513, 5725, 5941, 6161, 6385, + 6613, 6845, 7081, 7321, 7565, 7813, 8065, 8321, 8581, 8845, 9113, 9385, 9661, + 9941, 10225, 10513, 10805, 11101, 11401, 11705, 12013, 12325, 12641, 12961, + 13285, 13613, 13945, 14281, 14621, 14965, 15313, 15665, 16021, 16381, 16745, + 17113, 17485, 17861, 18241, 18625, 19013, 19405, 19801, 20201, 20605, 21013, + 21425, 21841, 22261, 22685, 23113, 23545, 23981, 24421, 24865, 25313, 25765, + 26221, 26681, 27145, 27613, 28085, 28561, 29041, 29525, 30013, 30505, 31001, + 31501, 32005, 32513, 33025, 33541, 34061, 34585, 35113, 35645, 36181, 36721, + 37265, 37813, 38365, 38921, 39481, 40045, 40613, 41185, 41761, 42341, 42925, + 43513, 44105, 44701, 45301, 45905, 46513, 47125, 47741, 48361, 48985, 49613, + 50245, 50881, 51521, 52165, 52813, 53465, 54121, 54781, 55445, 56113, 56785, + 57461, 58141, 58825, 59513, 60205, 60901, 61601, +#if defined(CUSTOM_MODES) + /*...208:*/ + 62305, 63013, 63725, 64441, 65161, 65885, 66613, 67345, 68081, 68821, 69565, + 70313, 71065, 71821, 72581, 73345, 74113, 74885, 75661, 76441, 77225, 78013, + 78805, 79601, 80401, 81205, 82013, 82825, 83641, 84461, 85285, 86113, +#endif + /*N=4, K=4...176:*/ + 63, 129, 231, 377, 575, 833, 1159, 1561, 2047, 2625, 3303, 4089, 4991, 6017, + 7175, 8473, 9919, 11521, 13287, 15225, 17343, 19649, 22151, 24857, 27775, + 30913, 34279, 37881, 41727, 45825, 50183, 54809, 59711, 64897, 70375, 76153, + 82239, 88641, 95367, 102425, 109823, 117569, 125671, 134137, 142975, 152193, + 161799, 171801, 182207, 193025, 204263, 215929, 228031, 240577, 253575, + 267033, 280959, 295361, 310247, 325625, 341503, 357889, 374791, 392217, + 410175, 428673, 447719, 467321, 487487, 508225, 529543, 551449, 573951, + 597057, 620775, 645113, 670079, 695681, 721927, 748825, 776383, 804609, + 833511, 863097, 893375, 924353, 956039, 988441, 1021567, 1055425, 1090023, + 1125369, 1161471, 1198337, 1235975, 1274393, 1313599, 1353601, 1394407, + 1436025, 1478463, 1521729, 1565831, 1610777, 1656575, 1703233, 1750759, + 1799161, 1848447, 1898625, 1949703, 2001689, 2054591, 2108417, 2163175, + 2218873, 2275519, 2333121, 2391687, 2451225, 2511743, 2573249, 2635751, + 2699257, 2763775, 2829313, 2895879, 2963481, 3032127, 3101825, 3172583, + 3244409, 3317311, 3391297, 3466375, 3542553, 3619839, 3698241, 3777767, + 3858425, 3940223, 4023169, 4107271, 4192537, 4278975, 4366593, 4455399, + 4545401, 4636607, 4729025, 4822663, 4917529, 5013631, 5110977, 5209575, + 5309433, 5410559, 5512961, 5616647, 5721625, 5827903, 5935489, 6044391, + 6154617, 6266175, 6379073, 6493319, 6608921, 6725887, 6844225, 6963943, + 7085049, 7207551, +#if defined(CUSTOM_MODES) + /*...208:*/ + 7331457, 7456775, 7583513, 7711679, 7841281, 7972327, 8104825, 8238783, + 8374209, 8511111, 8649497, 8789375, 8930753, 9073639, 9218041, 9363967, + 9511425, 9660423, 9810969, 9963071, 10116737, 10271975, 10428793, 10587199, + 10747201, 10908807, 11072025, 11236863, 11403329, 11571431, 11741177, + 11912575, +#endif + /*N=5, K=5...176:*/ + 321, 681, 1289, 2241, 3649, 5641, 8361, 11969, 16641, 22569, 29961, 39041, + 50049, 63241, 78889, 97281, 118721, 143529, 172041, 204609, 241601, 283401, + 330409, 383041, 441729, 506921, 579081, 658689, 746241, 842249, 947241, + 1061761, 1186369, 1321641, 1468169, 1626561, 1797441, 1981449, 2179241, + 2391489, 2618881, 2862121, 3121929, 3399041, 3694209, 4008201, 4341801, + 4695809, 5071041, 5468329, 5888521, 6332481, 6801089, 7295241, 7815849, + 8363841, 8940161, 9545769, 10181641, 10848769, 11548161, 12280841, 13047849, + 13850241, 14689089, 15565481, 16480521, 17435329, 18431041, 19468809, + 20549801, 21675201, 22846209, 24064041, 25329929, 26645121, 28010881, + 29428489, 30899241, 32424449, 34005441, 35643561, 37340169, 39096641, + 40914369, 42794761, 44739241, 46749249, 48826241, 50971689, 53187081, + 55473921, 57833729, 60268041, 62778409, 65366401, 68033601, 70781609, + 73612041, 76526529, 79526721, 82614281, 85790889, 89058241, 92418049, + 95872041, 99421961, 103069569, 106816641, 110664969, 114616361, 118672641, + 122835649, 127107241, 131489289, 135983681, 140592321, 145317129, 150160041, + 155123009, 160208001, 165417001, 170752009, 176215041, 181808129, 187533321, + 193392681, 199388289, 205522241, 211796649, 218213641, 224775361, 231483969, + 238341641, 245350569, 252512961, 259831041, 267307049, 274943241, 282741889, + 290705281, 298835721, 307135529, 315607041, 324252609, 333074601, 342075401, + 351257409, 360623041, 370174729, 379914921, 389846081, 399970689, 410291241, + 420810249, 431530241, 442453761, 453583369, 464921641, 476471169, 488234561, + 500214441, 512413449, 524834241, 537479489, 550351881, 563454121, 576788929, + 590359041, 604167209, 618216201, 632508801, +#if defined(CUSTOM_MODES) + /*...208:*/ + 647047809, 661836041, 676876329, 692171521, 707724481, 723538089, 739615241, + 755958849, 772571841, 789457161, 806617769, 824056641, 841776769, 859781161, + 878072841, 896654849, 915530241, 934702089, 954173481, 973947521, 994027329, + 1014416041, 1035116809, 1056132801, 1077467201, 1099123209, 1121104041, + 1143412929, 1166053121, 1189027881, 1212340489, 1235994241, +#endif + /*N=6, K=6...96:*/ + 1683, 3653, 7183, 13073, 22363, 36365, 56695, 85305, 124515, 177045, 246047, + 335137, 448427, 590557, 766727, 982729, 1244979, 1560549, 1937199, 2383409, + 2908411, 3522221, 4235671, 5060441, 6009091, 7095093, 8332863, 9737793, + 11326283, 13115773, 15124775, 17372905, 19880915, 22670725, 25765455, + 29189457, 32968347, 37129037, 41699767, 46710137, 52191139, 58175189, + 64696159, 71789409, 79491819, 87841821, 96879431, 106646281, 117185651, + 128542501, 140763503, 153897073, 167993403, 183104493, 199284183, 216588185, + 235074115, 254801525, 275831935, 298228865, 322057867, 347386557, 374284647, + 402823977, 433078547, 465124549, 499040399, 534906769, 572806619, 612825229, + 655050231, 699571641, 746481891, 795875861, 847850911, 902506913, 959946283, + 1020274013, 1083597703, 1150027593, 1219676595, 1292660325, 1369097135, + 1449108145, 1532817275, 1620351277, 1711839767, 1807415257, 1907213187, + 2011371957, 2120032959, +#if defined(CUSTOM_MODES) + /*...109:*/ + 2233340609U, 2351442379U, 2474488829U, 2602633639U, 2736033641U, 2874848851U, + 3019242501U, 3169381071U, 3325434321U, 3487575323U, 3655980493U, 3830829623U, + 4012305913U, +#endif + /*N=7, K=7...54*/ + 8989, 19825, 40081, 75517, 134245, 227305, 369305, 579125, 880685, 1303777, + 1884961, 2668525, 3707509, 5064793, 6814249, 9041957, 11847485, 15345233, + 19665841, 24957661, 31388293, 39146185, 48442297, 59511829, 72616013, + 88043969, 106114625, 127178701, 151620757, 179861305, 212358985, 249612805, + 292164445, 340600625, 395555537, 457713341, 527810725, 606639529, 695049433, + 793950709, 904317037, 1027188385, 1163673953, 1314955181, 1482288821, + 1667010073, 1870535785, 2094367717, +#if defined(CUSTOM_MODES) + /*...60:*/ + 2340095869U, 2609401873U, 2904062449U, 3225952925U, 3577050821U, 3959439497U, +#endif + /*N=8, K=8...37*/ + 48639, 108545, 224143, 433905, 795455, 1392065, 2340495, 3800305, 5984767, + 9173505, 13726991, 20103025, 28875327, 40754369, 56610575, 77500017, + 104692735, 139703809, 184327311, 240673265, 311207743, 398796225, 506750351, + 638878193, 799538175, 993696769, 1226990095, 1505789553, 1837271615, + 2229491905U, +#if defined(CUSTOM_MODES) + /*...40:*/ + 2691463695U, 3233240945U, 3866006015U, +#endif + /*N=9, K=9...28:*/ + 265729, 598417, 1256465, 2485825, 4673345, 8405905, 14546705, 24331777, + 39490049, 62390545, 96220561, 145198913, 214828609, 312193553, 446304145, + 628496897, 872893441, 1196924561, 1621925137, 2173806145U, +#if defined(CUSTOM_MODES) + /*...29:*/ + 2883810113U, +#endif + /*N=10, K=10...24:*/ + 1462563, 3317445, 7059735, 14218905, 27298155, 50250765, 89129247, 152951073, + 254831667, 413442773, 654862247, 1014889769, 1541911931, 2300409629U, + 3375210671U, + /*N=11, K=11...19:*/ + 8097453, 18474633, 39753273, 81270333, 158819253, 298199265, 540279585, + 948062325, 1616336765, +#if defined(CUSTOM_MODES) + /*...20:*/ + 2684641785U, +#endif + /*N=12, K=12...18:*/ + 45046719, 103274625, 224298231, 464387817, 921406335, 1759885185, + 3248227095U, + /*N=13, K=13...16:*/ + 251595969, 579168825, 1267854873, 2653649025U, + /*N=14, K=14:*/ + 1409933619 +}; + +#if defined(CUSTOM_MODES) +static const opus_uint32 *const CELT_PVQ_U_ROW[15]={ + CELT_PVQ_U_DATA+ 0,CELT_PVQ_U_DATA+ 208,CELT_PVQ_U_DATA+ 415, + CELT_PVQ_U_DATA+ 621,CELT_PVQ_U_DATA+ 826,CELT_PVQ_U_DATA+1030, + CELT_PVQ_U_DATA+1233,CELT_PVQ_U_DATA+1336,CELT_PVQ_U_DATA+1389, + CELT_PVQ_U_DATA+1421,CELT_PVQ_U_DATA+1441,CELT_PVQ_U_DATA+1455, + CELT_PVQ_U_DATA+1464,CELT_PVQ_U_DATA+1470,CELT_PVQ_U_DATA+1473 +}; +#else +static const opus_uint32 *const CELT_PVQ_U_ROW[15]={ + CELT_PVQ_U_DATA+ 0,CELT_PVQ_U_DATA+ 176,CELT_PVQ_U_DATA+ 351, + CELT_PVQ_U_DATA+ 525,CELT_PVQ_U_DATA+ 698,CELT_PVQ_U_DATA+ 870, + CELT_PVQ_U_DATA+1041,CELT_PVQ_U_DATA+1131,CELT_PVQ_U_DATA+1178, + CELT_PVQ_U_DATA+1207,CELT_PVQ_U_DATA+1226,CELT_PVQ_U_DATA+1240, + CELT_PVQ_U_DATA+1248,CELT_PVQ_U_DATA+1254,CELT_PVQ_U_DATA+1257 +}; +#endif + +#if defined(CUSTOM_MODES) +void get_required_bits(opus_int16 *_bits,int _n,int _maxk,int _frac){ + int k; + /*_maxk==0 => there's nothing to do.*/ + celt_assert(_maxk>0); + _bits[0]=0; + for(k=1;k<=_maxk;k++)_bits[k]=log2_frac(CELT_PVQ_V(_n,k),_frac); +} +#endif + +static opus_uint32 icwrs(int _n,const int *_y){ + opus_uint32 i; + int j; + int k; + celt_assert(_n>=2); + j=_n-1; + i=_y[j]<0; + k=abs(_y[j]); + do{ + j--; + i+=CELT_PVQ_U(_n-j,k); + k+=abs(_y[j]); + if(_y[j]<0)i+=CELT_PVQ_U(_n-j,k+1); + } + while(j>0); + return i; +} + +void encode_pulses(const int *_y,int _n,int _k,ec_enc *_enc){ + celt_assert(_k>0); + ec_enc_uint(_enc,icwrs(_n,_y),CELT_PVQ_V(_n,_k)); +} + +static void cwrsi(int _n,int _k,opus_uint32 _i,int *_y){ + opus_uint32 p; + int s; + int k0; + celt_assert(_k>0); + celt_assert(_n>1); + while(_n>2){ + opus_uint32 q; + /*Lots of pulses case:*/ + if(_k>=_n){ + const opus_uint32 *row; + row=CELT_PVQ_U_ROW[_n]; + /*Are the pulses in this dimension negative?*/ + p=row[_k+1]; + s=-(_i>=p); + _i-=p&s; + /*Count how many pulses were placed in this dimension.*/ + k0=_k; + q=row[_n]; + if(q>_i){ + celt_assert(p>q); + _k=_n; + do p=CELT_PVQ_U_ROW[--_k][_n]; + while(p>_i); + } + else for(p=row[_k];p>_i;p=row[_k])_k--; + _i-=p; + *_y++=(k0-_k+s)^s; + } + /*Lots of dimensions case:*/ + else{ + /*Are there any pulses in this dimension at all?*/ + p=CELT_PVQ_U_ROW[_k][_n]; + q=CELT_PVQ_U_ROW[_k+1][_n]; + if(p<=_i&&_i=q); + _i-=q&s; + /*Count how many pulses were placed in this dimension.*/ + k0=_k; + do p=CELT_PVQ_U_ROW[--_k][_n]; + while(p>_i); + _i-=p; + *_y++=(k0-_k+s)^s; + } + } + _n--; + } + /*_n==2*/ + p=2*_k+1; + s=-(_i>=p); + _i-=p&s; + k0=_k; + _k=(_i+1)>>1; + if(_k)_i-=2*_k-1; + *_y++=(k0-_k+s)^s; + /*_n==1*/ + s=-(int)_i; + *_y=(_k+s)^s; +} + +void decode_pulses(int *_y,int _n,int _k,ec_dec *_dec){ + cwrsi(_n,_k,ec_dec_uint(_dec,CELT_PVQ_V(_n,_k)),_y); +} + +#else /* SMALL_FOOTPRINT */ + +/*Computes the next row/column of any recurrence that obeys the relation + u[i][j]=u[i-1][j]+u[i][j-1]+u[i-1][j-1]. + _ui0 is the base case for the new row/column.*/ +static OPUS_INLINE void unext(opus_uint32 *_ui,unsigned _len,opus_uint32 _ui0){ + opus_uint32 ui1; + unsigned j; + /*This do-while will overrun the array if we don't have storage for at least + 2 values.*/ + j=1; do { + ui1=UADD32(UADD32(_ui[j],_ui[j-1]),_ui0); + _ui[j-1]=_ui0; + _ui0=ui1; + } while (++j<_len); + _ui[j-1]=_ui0; +} + +/*Computes the previous row/column of any recurrence that obeys the relation + u[i-1][j]=u[i][j]-u[i][j-1]-u[i-1][j-1]. + _ui0 is the base case for the new row/column.*/ +static OPUS_INLINE void uprev(opus_uint32 *_ui,unsigned _n,opus_uint32 _ui0){ + opus_uint32 ui1; + unsigned j; + /*This do-while will overrun the array if we don't have storage for at least + 2 values.*/ + j=1; do { + ui1=USUB32(USUB32(_ui[j],_ui[j-1]),_ui0); + _ui[j-1]=_ui0; + _ui0=ui1; + } while (++j<_n); + _ui[j-1]=_ui0; +} + +/*Compute V(_n,_k), as well as U(_n,0..._k+1). + _u: On exit, _u[i] contains U(_n,i) for i in [0..._k+1].*/ +static opus_uint32 ncwrs_urow(unsigned _n,unsigned _k,opus_uint32 *_u){ + opus_uint32 um2; + unsigned len; + unsigned k; + len=_k+2; + /*We require storage at least 3 values (e.g., _k>0).*/ + celt_assert(len>=3); + _u[0]=0; + _u[1]=um2=1; + /*If _n==0, _u[0] should be 1 and the rest should be 0.*/ + /*If _n==1, _u[i] should be 1 for i>1.*/ + celt_assert(_n>=2); + /*If _k==0, the following do-while loop will overflow the buffer.*/ + celt_assert(_k>0); + k=2; + do _u[k]=(k<<1)-1; + while(++k0); + j=0; + do{ + opus_uint32 p; + int s; + int yj; + p=_u[_k+1]; + s=-(_i>=p); + _i-=p&s; + yj=_k; + p=_u[_k]; + while(p>_i)p=_u[--_k]; + _i-=p; + yj-=_k; + _y[j]=(yj+s)^s; + uprev(_u,_k+2,0); + } + while(++j<_n); +} + +/*Returns the index of the given combination of K elements chosen from a set + of size 1 with associated sign bits. + _y: The vector of pulses, whose sum of absolute values is K. + _k: Returns K.*/ +static OPUS_INLINE opus_uint32 icwrs1(const int *_y,int *_k){ + *_k=abs(_y[0]); + return _y[0]<0; +} + +/*Returns the index of the given combination of K elements chosen from a set + of size _n with associated sign bits. + _y: The vector of pulses, whose sum of absolute values must be _k. + _nc: Returns V(_n,_k).*/ +static OPUS_INLINE opus_uint32 icwrs(int _n,int _k,opus_uint32 *_nc,const int *_y, + opus_uint32 *_u){ + opus_uint32 i; + int j; + int k; + /*We can't unroll the first two iterations of the loop unless _n>=2.*/ + celt_assert(_n>=2); + _u[0]=0; + for(k=1;k<=_k+1;k++)_u[k]=(k<<1)-1; + i=icwrs1(_y+_n-1,&k); + j=_n-2; + i+=_u[k]; + k+=abs(_y[j]); + if(_y[j]<0)i+=_u[k+1]; + while(j-->0){ + unext(_u,_k+2,0); + i+=_u[k]; + k+=abs(_y[j]); + if(_y[j]<0)i+=_u[k+1]; + } + *_nc=_u[k]+_u[k+1]; + return i; +} + +#ifdef CUSTOM_MODES +void get_required_bits(opus_int16 *_bits,int _n,int _maxk,int _frac){ + int k; + /*_maxk==0 => there's nothing to do.*/ + celt_assert(_maxk>0); + _bits[0]=0; + if (_n==1) + { + for (k=1;k<=_maxk;k++) + _bits[k] = 1<<_frac; + } + else { + VARDECL(opus_uint32,u); + SAVE_STACK; + ALLOC(u,_maxk+2U,opus_uint32); + ncwrs_urow(_n,_maxk,u); + for(k=1;k<=_maxk;k++) + _bits[k]=log2_frac(u[k]+u[k+1],_frac); + RESTORE_STACK; + } +} +#endif /* CUSTOM_MODES */ + +void encode_pulses(const int *_y,int _n,int _k,ec_enc *_enc){ + opus_uint32 i; + VARDECL(opus_uint32,u); + opus_uint32 nc; + SAVE_STACK; + celt_assert(_k>0); + ALLOC(u,_k+2U,opus_uint32); + i=icwrs(_n,_k,&nc,_y,u); + ec_enc_uint(_enc,i,nc); + RESTORE_STACK; +} + +void decode_pulses(int *_y,int _n,int _k,ec_dec *_dec){ + VARDECL(opus_uint32,u); + SAVE_STACK; + celt_assert(_k>0); + ALLOC(u,_k+2U,opus_uint32); + cwrsi(_n,_k,ec_dec_uint(_dec,ncwrs_urow(_n,_k,u)),_y,u); + RESTORE_STACK; +} + +#endif /* SMALL_FOOTPRINT */ diff --git a/code/opus-1.0.2/celt/cwrs.h b/code/opus-1.1/celt/cwrs.h similarity index 100% rename from code/opus-1.0.2/celt/cwrs.h rename to code/opus-1.1/celt/cwrs.h diff --git a/code/opus-1.0.2/celt/ecintrin.h b/code/opus-1.1/celt/ecintrin.h similarity index 97% rename from code/opus-1.0.2/celt/ecintrin.h rename to code/opus-1.1/celt/ecintrin.h index be57dd40..2263cff6 100644 --- a/code/opus-1.0.2/celt/ecintrin.h +++ b/code/opus-1.1/celt/ecintrin.h @@ -33,7 +33,7 @@ #if !defined(_ecintrin_H) # define _ecintrin_H (1) -/*Some specific platforms may have optimized intrinsic or inline assembly +/*Some specific platforms may have optimized intrinsic or OPUS_INLINE assembly versions of these functions which can substantially improve performance. We define macros for them to allow easy incorporation of these non-ANSI features.*/ diff --git a/code/opus-1.0.2/celt/entcode.c b/code/opus-1.1/celt/entcode.c similarity index 100% rename from code/opus-1.0.2/celt/entcode.c rename to code/opus-1.1/celt/entcode.c diff --git a/code/opus-1.0.2/celt/entcode.h b/code/opus-1.1/celt/entcode.h similarity index 94% rename from code/opus-1.0.2/celt/entcode.h rename to code/opus-1.1/celt/entcode.h index aebecc06..dd13e49e 100644 --- a/code/opus-1.0.2/celt/entcode.h +++ b/code/opus-1.1/celt/entcode.h @@ -26,6 +26,7 @@ */ #include "opus_types.h" +#include "opus_defines.h" #if !defined(_entcode_H) # define _entcode_H (1) @@ -83,15 +84,15 @@ struct ec_ctx{ int error; }; -static inline opus_uint32 ec_range_bytes(ec_ctx *_this){ +static OPUS_INLINE opus_uint32 ec_range_bytes(ec_ctx *_this){ return _this->offs; } -static inline unsigned char *ec_get_buffer(ec_ctx *_this){ +static OPUS_INLINE unsigned char *ec_get_buffer(ec_ctx *_this){ return _this->buf; } -static inline int ec_get_error(ec_ctx *_this){ +static OPUS_INLINE int ec_get_error(ec_ctx *_this){ return _this->error; } @@ -101,7 +102,7 @@ static inline int ec_get_error(ec_ctx *_this){ Return: The number of bits. This will always be slightly larger than the exact value (e.g., all rounding error is in the positive direction).*/ -static inline int ec_tell(ec_ctx *_this){ +static OPUS_INLINE int ec_tell(ec_ctx *_this){ return _this->nbits_total-EC_ILOG(_this->rng); } diff --git a/code/opus-1.0.2/celt/entdec.c b/code/opus-1.1/celt/entdec.c similarity index 98% rename from code/opus-1.0.2/celt/entdec.c rename to code/opus-1.1/celt/entdec.c index 75e3e45a..3c264685 100644 --- a/code/opus-1.0.2/celt/entdec.c +++ b/code/opus-1.1/celt/entdec.c @@ -85,7 +85,7 @@ number=3, pages="256--294", month=Jul, - URL="http://www.stanford.edu/class/ee398/handouts/papers/Moffat98ArithmCoding.pdf" + URL="http://www.stanford.edu/class/ee398a/handouts/papers/Moffat98ArithmCoding.pdf" }*/ static int ec_read_byte(ec_dec *_this){ diff --git a/code/opus-1.0.2/celt/entdec.h b/code/opus-1.1/celt/entdec.h similarity index 100% rename from code/opus-1.0.2/celt/entdec.h rename to code/opus-1.1/celt/entdec.h diff --git a/code/opus-1.0.2/celt/entenc.c b/code/opus-1.1/celt/entenc.c similarity index 100% rename from code/opus-1.0.2/celt/entenc.c rename to code/opus-1.1/celt/entenc.c diff --git a/code/opus-1.0.2/celt/entenc.h b/code/opus-1.1/celt/entenc.h similarity index 100% rename from code/opus-1.0.2/celt/entenc.h rename to code/opus-1.1/celt/entenc.h diff --git a/code/opus-1.0.2/celt/fixed_debug.h b/code/opus-1.1/celt/fixed_debug.h similarity index 90% rename from code/opus-1.0.2/celt/fixed_debug.h rename to code/opus-1.1/celt/fixed_debug.h index f11d890d..80bc9491 100644 --- a/code/opus-1.0.2/celt/fixed_debug.h +++ b/code/opus-1.1/celt/fixed_debug.h @@ -33,9 +33,9 @@ #define FIXED_DEBUG_H #include +#include "opus_defines.h" #ifdef CELT_C -#include "opus_defines.h" OPUS_EXPORT opus_int64 celt_mips=0; #else extern opus_int64 celt_mips; @@ -59,7 +59,7 @@ extern opus_int64 celt_mips; #define SHR(a,b) SHR32(a,b) #define PSHR(a,b) PSHR32(a,b) -static inline short NEG16(int x) +static OPUS_INLINE short NEG16(int x) { int res; if (!VERIFY_SHORT(x)) @@ -80,7 +80,7 @@ static inline short NEG16(int x) celt_mips++; return res; } -static inline int NEG32(opus_int64 x) +static OPUS_INLINE int NEG32(opus_int64 x) { opus_int64 res; if (!VERIFY_INT(x)) @@ -103,7 +103,7 @@ static inline int NEG32(opus_int64 x) } #define EXTRACT16(x) EXTRACT16_(x, __FILE__, __LINE__) -static inline short EXTRACT16_(int x, char *file, int line) +static OPUS_INLINE short EXTRACT16_(int x, char *file, int line) { int res; if (!VERIFY_SHORT(x)) @@ -119,7 +119,7 @@ static inline short EXTRACT16_(int x, char *file, int line) } #define EXTEND32(x) EXTEND32_(x, __FILE__, __LINE__) -static inline int EXTEND32_(int x, char *file, int line) +static OPUS_INLINE int EXTEND32_(int x, char *file, int line) { int res; if (!VERIFY_SHORT(x)) @@ -135,7 +135,7 @@ static inline int EXTEND32_(int x, char *file, int line) } #define SHR16(a, shift) SHR16_(a, shift, __FILE__, __LINE__) -static inline short SHR16_(int a, int shift, char *file, int line) +static OPUS_INLINE short SHR16_(int a, int shift, char *file, int line) { int res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift)) @@ -157,7 +157,7 @@ static inline short SHR16_(int a, int shift, char *file, int line) return res; } #define SHL16(a, shift) SHL16_(a, shift, __FILE__, __LINE__) -static inline short SHL16_(int a, int shift, char *file, int line) +static OPUS_INLINE short SHL16_(int a, int shift, char *file, int line) { int res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift)) @@ -179,7 +179,7 @@ static inline short SHL16_(int a, int shift, char *file, int line) return res; } -static inline int SHR32(opus_int64 a, int shift) +static OPUS_INLINE int SHR32(opus_int64 a, int shift) { opus_int64 res; if (!VERIFY_INT(a) || !VERIFY_SHORT(shift)) @@ -201,7 +201,7 @@ static inline int SHR32(opus_int64 a, int shift) return res; } #define SHL32(a, shift) SHL32_(a, shift, __FILE__, __LINE__) -static inline int SHL32_(opus_int64 a, int shift, char *file, int line) +static OPUS_INLINE int SHL32_(opus_int64 a, int shift, char *file, int line) { opus_int64 res; if (!VERIFY_INT(a) || !VERIFY_SHORT(shift)) @@ -234,7 +234,7 @@ static inline int SHL32_(opus_int64 a, int shift, char *file, int line) //#define SHL(a,shift) ((a) << (shift)) #define ADD16(a, b) ADD16_(a, b, __FILE__, __LINE__) -static inline short ADD16_(int a, int b, char *file, int line) +static OPUS_INLINE short ADD16_(int a, int b, char *file, int line) { int res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) @@ -257,7 +257,7 @@ static inline short ADD16_(int a, int b, char *file, int line) } #define SUB16(a, b) SUB16_(a, b, __FILE__, __LINE__) -static inline short SUB16_(int a, int b, char *file, int line) +static OPUS_INLINE short SUB16_(int a, int b, char *file, int line) { int res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) @@ -280,7 +280,7 @@ static inline short SUB16_(int a, int b, char *file, int line) } #define ADD32(a, b) ADD32_(a, b, __FILE__, __LINE__) -static inline int ADD32_(opus_int64 a, opus_int64 b, char *file, int line) +static OPUS_INLINE int ADD32_(opus_int64 a, opus_int64 b, char *file, int line) { opus_int64 res; if (!VERIFY_INT(a) || !VERIFY_INT(b)) @@ -303,7 +303,7 @@ static inline int ADD32_(opus_int64 a, opus_int64 b, char *file, int line) } #define SUB32(a, b) SUB32_(a, b, __FILE__, __LINE__) -static inline int SUB32_(opus_int64 a, opus_int64 b, char *file, int line) +static OPUS_INLINE int SUB32_(opus_int64 a, opus_int64 b, char *file, int line) { opus_int64 res; if (!VERIFY_INT(a) || !VERIFY_INT(b)) @@ -327,7 +327,7 @@ static inline int SUB32_(opus_int64 a, opus_int64 b, char *file, int line) #undef UADD32 #define UADD32(a, b) UADD32_(a, b, __FILE__, __LINE__) -static inline unsigned int UADD32_(opus_uint64 a, opus_uint64 b, char *file, int line) +static OPUS_INLINE unsigned int UADD32_(opus_uint64 a, opus_uint64 b, char *file, int line) { opus_uint64 res; if (!VERIFY_UINT(a) || !VERIFY_UINT(b)) @@ -351,7 +351,7 @@ static inline unsigned int UADD32_(opus_uint64 a, opus_uint64 b, char *file, int #undef USUB32 #define USUB32(a, b) USUB32_(a, b, __FILE__, __LINE__) -static inline unsigned int USUB32_(opus_uint64 a, opus_uint64 b, char *file, int line) +static OPUS_INLINE unsigned int USUB32_(opus_uint64 a, opus_uint64 b, char *file, int line) { opus_uint64 res; if (!VERIFY_UINT(a) || !VERIFY_UINT(b)) @@ -381,7 +381,7 @@ static inline unsigned int USUB32_(opus_uint64 a, opus_uint64 b, char *file, int } /* result fits in 16 bits */ -static inline short MULT16_16_16(int a, int b) +static OPUS_INLINE short MULT16_16_16(int a, int b) { int res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) @@ -404,7 +404,7 @@ static inline short MULT16_16_16(int a, int b) } #define MULT16_16(a, b) MULT16_16_(a, b, __FILE__, __LINE__) -static inline int MULT16_16_(int a, int b, char *file, int line) +static OPUS_INLINE int MULT16_16_(int a, int b, char *file, int line) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) @@ -429,7 +429,7 @@ static inline int MULT16_16_(int a, int b, char *file, int line) #define MAC16_16(c,a,b) (celt_mips-=2,ADD32((c),MULT16_16((a),(b)))) #define MULT16_32_QX(a, b, Q) MULT16_32_QX_(a, b, Q, __FILE__, __LINE__) -static inline int MULT16_32_QX_(int a, opus_int64 b, int Q, char *file, int line) +static OPUS_INLINE int MULT16_32_QX_(int a, opus_int64 b, int Q, char *file, int line) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_INT(b)) @@ -462,7 +462,7 @@ static inline int MULT16_32_QX_(int a, opus_int64 b, int Q, char *file, int line } #define MULT16_32_PX(a, b, Q) MULT16_32_PX_(a, b, Q, __FILE__, __LINE__) -static inline int MULT16_32_PX_(int a, opus_int64 b, int Q, char *file, int line) +static OPUS_INLINE int MULT16_32_PX_(int a, opus_int64 b, int Q, char *file, int line) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_INT(b)) @@ -497,7 +497,7 @@ static inline int MULT16_32_PX_(int a, opus_int64 b, int Q, char *file, int line #define MULT16_32_Q15(a,b) MULT16_32_QX(a,b,15) #define MAC16_32_Q15(c,a,b) (celt_mips-=2,ADD32((c),MULT16_32_Q15((a),(b)))) -static inline int SATURATE(int a, int b) +static OPUS_INLINE int SATURATE(int a, int b) { if (a>b) a=b; @@ -507,7 +507,17 @@ static inline int SATURATE(int a, int b) return a; } -static inline int MULT16_16_Q11_32(int a, int b) +static OPUS_INLINE opus_int16 SATURATE16(opus_int32 a) +{ + celt_mips+=3; + if (a>32767) + return 32767; + else if (a<-32768) + return -32768; + else return a; +} + +static OPUS_INLINE int MULT16_16_Q11_32(int a, int b) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) @@ -529,7 +539,7 @@ static inline int MULT16_16_Q11_32(int a, int b) celt_mips+=3; return res; } -static inline short MULT16_16_Q13(int a, int b) +static OPUS_INLINE short MULT16_16_Q13(int a, int b) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) @@ -551,7 +561,7 @@ static inline short MULT16_16_Q13(int a, int b) celt_mips+=3; return res; } -static inline short MULT16_16_Q14(int a, int b) +static OPUS_INLINE short MULT16_16_Q14(int a, int b) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) @@ -575,7 +585,7 @@ static inline short MULT16_16_Q14(int a, int b) } #define MULT16_16_Q15(a, b) MULT16_16_Q15_(a, b, __FILE__, __LINE__) -static inline short MULT16_16_Q15_(int a, int b, char *file, int line) +static OPUS_INLINE short MULT16_16_Q15_(int a, int b, char *file, int line) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) @@ -598,7 +608,7 @@ static inline short MULT16_16_Q15_(int a, int b, char *file, int line) return res; } -static inline short MULT16_16_P13(int a, int b) +static OPUS_INLINE short MULT16_16_P13(int a, int b) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) @@ -628,7 +638,7 @@ static inline short MULT16_16_P13(int a, int b) celt_mips+=4; return res; } -static inline short MULT16_16_P14(int a, int b) +static OPUS_INLINE short MULT16_16_P14(int a, int b) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) @@ -658,7 +668,7 @@ static inline short MULT16_16_P14(int a, int b) celt_mips+=4; return res; } -static inline short MULT16_16_P15(int a, int b) +static OPUS_INLINE short MULT16_16_P15(int a, int b) { opus_int64 res; if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b)) @@ -691,7 +701,7 @@ static inline short MULT16_16_P15(int a, int b) #define DIV32_16(a, b) DIV32_16_(a, b, __FILE__, __LINE__) -static inline int DIV32_16_(opus_int64 a, opus_int64 b, char *file, int line) +static OPUS_INLINE int DIV32_16_(opus_int64 a, opus_int64 b, char *file, int line) { opus_int64 res; if (b==0) @@ -726,7 +736,7 @@ static inline int DIV32_16_(opus_int64 a, opus_int64 b, char *file, int line) } #define DIV32(a, b) DIV32_(a, b, __FILE__, __LINE__) -static inline int DIV32_(opus_int64 a, opus_int64 b, char *file, int line) +static OPUS_INLINE int DIV32_(opus_int64 a, opus_int64 b, char *file, int line) { opus_int64 res; if (b==0) diff --git a/code/opus-1.0.2/celt/fixed_generic.h b/code/opus-1.1/celt/fixed_generic.h similarity index 95% rename from code/opus-1.0.2/celt/fixed_generic.h rename to code/opus-1.1/celt/fixed_generic.h index 71e28d62..ecf018a2 100644 --- a/code/opus-1.0.2/celt/fixed_generic.h +++ b/code/opus-1.1/celt/fixed_generic.h @@ -40,7 +40,7 @@ #define MULT16_32_Q16(a,b) ADD32(MULT16_16((a),SHR((b),16)), SHR(MULT16_16SU((a),((b)&0x0000ffff)),16)) /** 16x32 multiplication, followed by a 16-bit shift right (round-to-nearest). Results fits in 32 bits */ -#define MULT16_32_P16(a,b) ADD32(MULT16_16((a),SHR((b),16)), PSHR(MULT16_16((a),((b)&0x0000ffff)),16)) +#define MULT16_32_P16(a,b) ADD32(MULT16_16((a),SHR((b),16)), PSHR(MULT16_16SU((a),((b)&0x0000ffff)),16)) /** 16x32 multiplication, followed by a 15-bit shift right. Results fits in 32 bits */ #define MULT16_32_Q15(a,b) ADD32(SHL(MULT16_16((a),SHR((b),16)),1), SHR(MULT16_16SU((a),((b)&0x0000ffff)),15)) @@ -84,6 +84,8 @@ #define PSHR(a,shift) (SHR((a)+((EXTEND32(1)<<((shift))>>1)),shift)) #define SATURATE(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x))) +#define SATURATE16(x) (EXTRACT16((x)>32767 ? 32767 : (x)<-32768 ? -32768 : (x))) + /** Shift by a and round-to-neareast 32-bit value. Result is a 16-bit value */ #define ROUND16(x,a) (EXTRACT16(PSHR32((x),(a)))) /** Divide by two */ @@ -108,10 +110,13 @@ /** 16x16 multiply-add where the result fits in 32 bits */ #define MAC16_16(c,a,b) (ADD32((c),MULT16_16((a),(b)))) -/** 16x32 multiply-add, followed by a 15-bit shift right. Results fits in 32 bits */ +/** 16x32 multiply, followed by a 15-bit shift right and 32-bit add. + b must fit in 31 bits. + Result fits in 32 bits. */ #define MAC16_32_Q15(c,a,b) ADD32(c,ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15))) #define MULT16_16_Q11_32(a,b) (SHR(MULT16_16((a),(b)),11)) +#define MULT16_16_Q11(a,b) (SHR(MULT16_16((a),(b)),11)) #define MULT16_16_Q13(a,b) (SHR(MULT16_16((a),(b)),13)) #define MULT16_16_Q14(a,b) (SHR(MULT16_16((a),(b)),14)) #define MULT16_16_Q15(a,b) (SHR(MULT16_16((a),(b)),15)) diff --git a/code/opus-1.0.2/celt/float_cast.h b/code/opus-1.1/celt/float_cast.h similarity index 97% rename from code/opus-1.0.2/celt/float_cast.h rename to code/opus-1.1/celt/float_cast.h index 5ded2915..ede65748 100644 --- a/code/opus-1.0.2/celt/float_cast.h +++ b/code/opus-1.1/celt/float_cast.h @@ -101,7 +101,7 @@ #include /* Win32 doesn't seem to have these functions. - ** Therefore implement inline versions of these functions here. + ** Therefore implement OPUS_INLINE versions of these functions here. */ __inline long int @@ -128,7 +128,7 @@ #endif #ifndef DISABLE_FLOAT_API -static inline opus_int16 FLOAT2INT16(float x) +static OPUS_INLINE opus_int16 FLOAT2INT16(float x) { x = x*CELT_SIG_SCALE; x = MAX32(x, -32768); diff --git a/code/opus-1.0.2/celt/kiss_fft.c b/code/opus-1.1/celt/kiss_fft.c similarity index 99% rename from code/opus-1.0.2/celt/kiss_fft.c rename to code/opus-1.1/celt/kiss_fft.c index dcd69686..ad706c73 100644 --- a/code/opus-1.0.2/celt/kiss_fft.c +++ b/code/opus-1.1/celt/kiss_fft.c @@ -40,7 +40,6 @@ #include "os_support.h" #include "mathops.h" #include "stack_alloc.h" -#include "os_support.h" /* The guts header contains all the multiplication and addition macros that are defined for complex numbers. It also delares the kf_ internal functions. @@ -142,8 +141,6 @@ static void kf_bfly4( C_ADDTO(*Fout, scratch[1]); C_ADD( scratch[3] , scratch[0] , scratch[2] ); C_SUB( scratch[4] , scratch[0] , scratch[2] ); - Fout[m2].r = PSHR32(Fout[m2].r, 2); - Fout[m2].i = PSHR32(Fout[m2].i, 2); C_SUB( Fout[m2], *Fout, scratch[3] ); tw1 += fstride; tw2 += fstride*2; diff --git a/code/opus-1.0.2/celt/kiss_fft.h b/code/opus-1.1/celt/kiss_fft.h similarity index 100% rename from code/opus-1.0.2/celt/kiss_fft.h rename to code/opus-1.1/celt/kiss_fft.h diff --git a/code/opus-1.0.2/celt/laplace.c b/code/opus-1.1/celt/laplace.c similarity index 100% rename from code/opus-1.0.2/celt/laplace.c rename to code/opus-1.1/celt/laplace.c diff --git a/code/opus-1.0.2/celt/laplace.h b/code/opus-1.1/celt/laplace.h similarity index 100% rename from code/opus-1.0.2/celt/laplace.h rename to code/opus-1.1/celt/laplace.h diff --git a/code/opus-1.0.2/celt/mathops.c b/code/opus-1.1/celt/mathops.c similarity index 98% rename from code/opus-1.0.2/celt/mathops.c rename to code/opus-1.1/celt/mathops.c index ce472c9f..3f8c5dcc 100644 --- a/code/opus-1.0.2/celt/mathops.c +++ b/code/opus-1.1/celt/mathops.c @@ -123,6 +123,8 @@ opus_val32 celt_sqrt(opus_val32 x) static const opus_val16 C[5] = {23175, 11561, -3011, 1699, -664}; if (x==0) return 0; + else if (x>=1073741824) + return 32767; k = (celt_ilog2(x)>>1)-7; x = VSHR32(x, 2*k); n = x-32768; @@ -137,7 +139,7 @@ opus_val32 celt_sqrt(opus_val32 x) #define L3 8277 #define L4 -626 -static inline opus_val16 _celt_cos_pi_2(opus_val16 x) +static OPUS_INLINE opus_val16 _celt_cos_pi_2(opus_val16 x) { opus_val16 x2; diff --git a/code/opus-1.0.2/celt/mathops.h b/code/opus-1.1/celt/mathops.h similarity index 82% rename from code/opus-1.0.2/celt/mathops.h rename to code/opus-1.1/celt/mathops.h index 4e977956..a0525a96 100644 --- a/code/opus-1.0.2/celt/mathops.h +++ b/code/opus-1.1/celt/mathops.h @@ -43,6 +43,41 @@ unsigned isqrt32(opus_uint32 _val); +#ifndef OVERRIDE_CELT_MAXABS16 +static OPUS_INLINE opus_val32 celt_maxabs16(const opus_val16 *x, int len) +{ + int i; + opus_val16 maxval = 0; + opus_val16 minval = 0; + for (i=0;i0, "celt_ilog2() only defined for strictly positive numbers"); return EC_ILOG(x)-1; } #endif -#ifndef OVERRIDE_CELT_MAXABS16 -static inline opus_val16 celt_maxabs16(opus_val16 *x, int len) -{ - int i; - opus_val16 maxval = 0; - for (i=0;in; N >>= shift; N2 = N>>1; N4 = N>>2; ALLOC(f, N2, kiss_fft_scalar); + ALLOC(f2, N2, kiss_fft_scalar); /* sin(x) ~= x here */ #ifdef FIXED_POINT sine = TRIG_UPSCALE*(QCONST16(0.7853981f, 15)+N2)/N; @@ -131,7 +133,7 @@ void clt_mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar kiss_fft_scalar * OPUS_RESTRICT yp = f; const opus_val16 * OPUS_RESTRICT wp1 = window+(overlap>>1); const opus_val16 * OPUS_RESTRICT wp2 = window+(overlap>>1)-1; - for(i=0;i<(overlap>>2);i++) + for(i=0;i<((overlap+3)>>2);i++) { /* Real part arranged as -d-cR, Imag part arranged as -b+aR*/ *yp++ = MULT16_32_Q15(*wp2, xp1[N2]) + MULT16_32_Q15(*wp1,*xp2); @@ -143,7 +145,7 @@ void clt_mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar } wp1 = window; wp2 = window+overlap-1; - for(;i>2);i++) + for(;i>2);i++) { /* Real part arranged as a-bR, Imag part arranged as -c-dR */ *yp++ = *xp2; @@ -180,12 +182,12 @@ void clt_mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar } /* N/4 complex FFT, down-scales by 4/N */ - opus_fft(l->kfft[shift], (kiss_fft_cpx *)f, (kiss_fft_cpx *)in); + opus_fft(l->kfft[shift], (kiss_fft_cpx *)f, (kiss_fft_cpx *)f2); /* Post-rotate */ { /* Temp pointers to make it really clear to the compiler what we're doing */ - const kiss_fft_scalar * OPUS_RESTRICT fp = in; + const kiss_fft_scalar * OPUS_RESTRICT fp = f2; kiss_fft_scalar * OPUS_RESTRICT yp1 = out; kiss_fft_scalar * OPUS_RESTRICT yp2 = out+stride*(N2-1); const kiss_twiddle_scalar *t = &l->trig[0]; @@ -212,14 +214,12 @@ void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scala int i; int N, N2, N4; kiss_twiddle_scalar sine; - VARDECL(kiss_fft_scalar, f); VARDECL(kiss_fft_scalar, f2); SAVE_STACK; N = l->n; N >>= shift; N2 = N>>1; N4 = N>>2; - ALLOC(f, N2, kiss_fft_scalar); ALLOC(f2, N2, kiss_fft_scalar); /* sin(x) ~= x here */ #ifdef FIXED_POINT @@ -249,81 +249,60 @@ void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scala } /* Inverse N/4 complex FFT. This one should *not* downscale even in fixed-point */ - opus_ifft(l->kfft[shift], (kiss_fft_cpx *)f2, (kiss_fft_cpx *)f); + opus_ifft(l->kfft[shift], (kiss_fft_cpx *)f2, (kiss_fft_cpx *)(out+(overlap>>1))); - /* Post-rotate */ + /* Post-rotate and de-shuffle from both ends of the buffer at once to make + it in-place. */ { - kiss_fft_scalar * OPUS_RESTRICT fp = f; + kiss_fft_scalar * OPUS_RESTRICT yp0 = out+(overlap>>1); + kiss_fft_scalar * OPUS_RESTRICT yp1 = out+(overlap>>1)+N2-2; const kiss_twiddle_scalar *t = &l->trig[0]; - - for(i=0;i>1 to handle odd N4. When N4 is odd, the + middle pair will be computed twice. */ + for(i=0;i<(N4+1)>>1;i++) { kiss_fft_scalar re, im, yr, yi; - re = fp[0]; - im = fp[1]; + kiss_twiddle_scalar t0, t1; + re = yp0[0]; + im = yp0[1]; + t0 = t[i<>1; + /* Mirror on both sides for TDAC */ { - kiss_fft_scalar * OPUS_RESTRICT fp1 = f2+N4-1; - kiss_fft_scalar * OPUS_RESTRICT xp1 = out+N2-1; - kiss_fft_scalar * OPUS_RESTRICT yp1 = out+N4-overlap/2; + kiss_fft_scalar * OPUS_RESTRICT xp1 = out+overlap-1; + kiss_fft_scalar * OPUS_RESTRICT yp1 = out; const opus_val16 * OPUS_RESTRICT wp1 = window; const opus_val16 * OPUS_RESTRICT wp2 = window+overlap-1; - for(i = 0; i< N4-overlap/2; i++) + + for(i = 0; i < overlap/2; i++) { - *xp1 = *fp1; - xp1--; - fp1--; - } - for(; i < N4; i++) - { - kiss_fft_scalar x1; - x1 = *fp1--; - *yp1++ +=-MULT16_32_Q15(*wp1, x1); - *xp1-- += MULT16_32_Q15(*wp2, x1); - wp1++; - wp2--; - } - } - { - kiss_fft_scalar * OPUS_RESTRICT fp2 = f2+N4; - kiss_fft_scalar * OPUS_RESTRICT xp2 = out+N2; - kiss_fft_scalar * OPUS_RESTRICT yp2 = out+N-1-(N4-overlap/2); - const opus_val16 * OPUS_RESTRICT wp1 = window; - const opus_val16 * OPUS_RESTRICT wp2 = window+overlap-1; - for(i = 0; i< N4-overlap/2; i++) - { - *xp2 = *fp2; - xp2++; - fp2++; - } - for(; i < N4; i++) - { - kiss_fft_scalar x2; - x2 = *fp2++; - *yp2-- = MULT16_32_Q15(*wp1, x2); - *xp2++ = MULT16_32_Q15(*wp2, x2); + kiss_fft_scalar x1, x2; + x1 = *xp1; + x2 = *yp1; + *yp1++ = MULT16_32_Q15(*wp2, x2) - MULT16_32_Q15(*wp1, x1); + *xp1-- = MULT16_32_Q15(*wp1, x2) + MULT16_32_Q15(*wp2, x1); wp1++; wp2--; } diff --git a/code/opus-1.0.2/celt/mdct.h b/code/opus-1.1/celt/mdct.h similarity index 100% rename from code/opus-1.0.2/celt/mdct.h rename to code/opus-1.1/celt/mdct.h diff --git a/code/opus-1.0.2/celt/mfrngcod.h b/code/opus-1.1/celt/mfrngcod.h similarity index 100% rename from code/opus-1.0.2/celt/mfrngcod.h rename to code/opus-1.1/celt/mfrngcod.h diff --git a/code/opus-1.0.2/celt/modes.c b/code/opus-1.1/celt/modes.c similarity index 98% rename from code/opus-1.0.2/celt/modes.c rename to code/opus-1.1/celt/modes.c index ed204d7d..42e68e1c 100644 --- a/code/opus-1.0.2/celt/modes.c +++ b/code/opus-1.1/celt/modes.c @@ -345,6 +345,14 @@ CELTMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error) mode->eBands = compute_ebands(Fs, mode->shortMdctSize, res, &mode->nbEBands); if (mode->eBands==NULL) goto failure; +#if !defined(SMALL_FOOTPRINT) + /* Make sure we don't allocate a band larger than our PVQ table. + 208 should be enough, but let's be paranoid. */ + if ((mode->eBands[mode->nbEBands] - mode->eBands[mode->nbEBands-1])< + 208) { + goto failure; + } +#endif mode->effEBands = mode->nbEBands; while (mode->eBands[mode->effEBands] > mode->shortMdctSize) diff --git a/code/opus-1.0.2/celt/modes.h b/code/opus-1.1/celt/modes.h similarity index 100% rename from code/opus-1.0.2/celt/modes.h rename to code/opus-1.1/celt/modes.h diff --git a/code/opus-1.0.2/celt/opus_custom_demo.c b/code/opus-1.1/celt/opus_custom_demo.c similarity index 100% rename from code/opus-1.0.2/celt/opus_custom_demo.c rename to code/opus-1.1/celt/opus_custom_demo.c diff --git a/code/opus-1.0.2/celt/os_support.h b/code/opus-1.1/celt/os_support.h similarity index 93% rename from code/opus-1.0.2/celt/os_support.h rename to code/opus-1.1/celt/os_support.h index 2484f0b2..5e47e3cf 100644 --- a/code/opus-1.0.2/celt/os_support.h +++ b/code/opus-1.1/celt/os_support.h @@ -35,13 +35,16 @@ # include "custom_support.h" #endif +#include "opus_types.h" +#include "opus_defines.h" + #include #include #include /** Opus wrapper for malloc(). To do your own dynamic allocation, all you need to do is replace this function and opus_free */ #ifndef OVERRIDE_OPUS_ALLOC -static inline void *opus_alloc (size_t size) +static OPUS_INLINE void *opus_alloc (size_t size) { return malloc(size); } @@ -49,7 +52,7 @@ static inline void *opus_alloc (size_t size) /** Same as celt_alloc(), except that the area is only needed inside a CELT call (might cause problem with wideband though) */ #ifndef OVERRIDE_OPUS_ALLOC_SCRATCH -static inline void *opus_alloc_scratch (size_t size) +static OPUS_INLINE void *opus_alloc_scratch (size_t size) { /* Scratch space doesn't need to be cleared */ return opus_alloc(size); @@ -58,7 +61,7 @@ static inline void *opus_alloc_scratch (size_t size) /** Opus wrapper for free(). To do your own dynamic allocation, all you need to do is replace this function and opus_alloc */ #ifndef OVERRIDE_OPUS_FREE -static inline void opus_free (void *ptr) +static OPUS_INLINE void opus_free (void *ptr) { free(ptr); } diff --git a/code/opus-1.0.2/celt/pitch.c b/code/opus-1.1/celt/pitch.c similarity index 69% rename from code/opus-1.0.2/celt/pitch.c rename to code/opus-1.1/celt/pitch.c index ca0f523e..d2b30544 100644 --- a/code/opus-1.0.2/celt/pitch.c +++ b/code/opus-1.1/celt/pitch.c @@ -102,13 +102,57 @@ static void find_best_pitch(opus_val32 *xcorr, opus_val16 *y, int len, } } +static void celt_fir5(const opus_val16 *x, + const opus_val16 *num, + opus_val16 *y, + int N, + opus_val16 *mem) +{ + int i; + opus_val16 num0, num1, num2, num3, num4; + opus_val32 mem0, mem1, mem2, mem3, mem4; + num0=num[0]; + num1=num[1]; + num2=num[2]; + num3=num[3]; + num4=num[4]; + mem0=mem[0]; + mem1=mem[1]; + mem2=mem[2]; + mem3=mem[3]; + mem4=mem[4]; + for (i=0;i>1); + 4, len>>1, arch); /* Noise floor -40 dB */ #ifdef FIXED_POINT @@ -161,16 +205,96 @@ void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x tmp = MULT16_16_Q15(QCONST16(.9f,15), tmp); lpc[i] = MULT16_16_Q15(lpc[i], tmp); } - celt_fir(x_lp, lpc, x_lp, len>>1, 4, mem); - - mem[0]=0; - lpc[0]=QCONST16(.8f,12); - celt_fir(x_lp, lpc, x_lp, len>>1, 1, mem); - + /* Add a zero */ + lpc2[0] = lpc[0] + QCONST16(.8f,SIG_SHIFT); + lpc2[1] = lpc[1] + MULT16_16_Q15(c1,lpc[0]); + lpc2[2] = lpc[2] + MULT16_16_Q15(c1,lpc[1]); + lpc2[3] = lpc[3] + MULT16_16_Q15(c1,lpc[2]); + lpc2[4] = MULT16_16_Q15(c1,lpc[3]); + celt_fir5(x_lp, lpc2, x_lp, len>>1, mem); } +#if 0 /* This is a simple version of the pitch correlation that should work + well on DSPs like Blackfin and TI C5x/C6x */ + +#ifdef FIXED_POINT +opus_val32 +#else +void +#endif +celt_pitch_xcorr(opus_val16 *x, opus_val16 *y, opus_val32 *xcorr, int len, int max_pitch) +{ + int i, j; +#ifdef FIXED_POINT + opus_val32 maxcorr=1; +#endif + for (i=0;i0); + celt_assert((((unsigned char *)_x-(unsigned char *)NULL)&3)==0); +#ifdef FIXED_POINT + opus_val32 maxcorr=1; +#endif + for (i=0;i>2); ymax = celt_maxabs16(y_lp4, lag>>2); - shift = celt_ilog2(MAX16(1, MAX16(xmax, ymax)))-11; + shift = celt_ilog2(MAX32(1, MAX32(xmax, ymax)))-11; if (shift>0) { for (j=0;j>2;j++) @@ -220,16 +344,11 @@ void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTR /* Coarse search with 4x decimation */ - for (i=0;i>2;i++) - { - opus_val32 sum = 0; - for (j=0;j>2;j++) - sum = MAC16_16(sum, x_lp4[j],y_lp4[i+j]); - xcorr[i] = MAX32(-1, sum); #ifdef FIXED_POINT - maxcorr = MAX32(maxcorr, sum); + maxcorr = #endif - } + celt_pitch_xcorr(x_lp4, y_lp4, xcorr, len>>2, max_pitch>>2, arch); + find_best_pitch(xcorr, y_lp4, len>>2, max_pitch>>2, best_pitch #ifdef FIXED_POINT , 0, maxcorr @@ -287,11 +406,13 @@ opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod, int k, i, T, T0; opus_val16 g, g0; opus_val16 pg; - opus_val32 xy,xx,yy; + opus_val32 xy,xx,yy,xy2; opus_val32 xcorr[3]; opus_val32 best_xy, best_yy; int offset; int minperiod0; + VARDECL(opus_val32, yy_lookup); + SAVE_STACK; minperiod0 = minperiod; maxperiod /= 2; @@ -304,13 +425,16 @@ opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod, *T0_=maxperiod-1; T = T0 = *T0_; - xx=xy=yy=0; - for (i=0;i QCONST16(.3f,15) + MULT16_16_Q15(QCONST16(.4f,15),g0)-cont) + thresh = MAX16(QCONST16(.3f,15), MULT16_16_Q15(QCONST16(.7f,15),g0)-cont); + /* Bias against very high pitch (very short period) to avoid false-positives + due to short-term correlation */ + if (T1<3*minperiod) + thresh = MAX16(QCONST16(.4f,15), MULT16_16_Q15(QCONST16(.85f,15),g0)-cont); + else if (T1<2*minperiod) + thresh = MAX16(QCONST16(.5f,15), MULT16_16_Q15(QCONST16(.9f,15),g0)-cont); + if (g1 > thresh) { best_xy = xy; best_yy = yy; @@ -406,5 +532,6 @@ opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod, if (*T0_=3); + y_3=0; /* gcc doesn't realize that y_3 can't be used uninitialized */ + y_0=*y++; + y_1=*y++; + y_2=*y++; + for (j=0;j=2) + qi = IMIN(qi, 0); if (budget-tell >= 15) { int pi; @@ -253,13 +255,13 @@ static int quant_coarse_energy_impl(const CELTMode *m, int start, int end, prev[c] = prev[c] + SHL32(q,7) - MULT16_16(beta,PSHR32(q,8)); } while (++c < C); } - return badness; + return lfe ? 0 : badness; } void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd, const opus_val16 *eBands, opus_val16 *oldEBands, opus_uint32 budget, opus_val16 *error, ec_enc *enc, int C, int LM, int nbAvailableBytes, - int force_intra, opus_val32 *delayedIntra, int two_pass, int loss_rate) + int force_intra, opus_val32 *delayedIntra, int two_pass, int loss_rate, int lfe) { int intra; opus_val16 max_decay; @@ -280,9 +282,6 @@ void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd, if (tell+3 > budget) two_pass = intra = 0; - /* Encode the global flags using a simple probability model - (first symbols in the stream) */ - max_decay = QCONST16(16.f,DB_SHIFT); if (end-start>10) { @@ -292,6 +291,8 @@ void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd, max_decay = MIN32(max_decay, .125f*nbAvailableBytes); #endif } + if (lfe) + max_decay=3; enc_start_state = *enc; ALLOC(oldEBands_intra, C*m->nbEBands, opus_val16); @@ -301,7 +302,7 @@ void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd, if (two_pass || intra) { badness1 = quant_coarse_energy_impl(m, start, end, eBands, oldEBands_intra, budget, - tell, e_prob_model[LM][1], error_intra, enc, C, LM, 1, max_decay); + tell, e_prob_model[LM][1], error_intra, enc, C, LM, 1, max_decay, lfe); } if (!intra) @@ -311,6 +312,7 @@ void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd, opus_int32 tell_intra; opus_uint32 nstart_bytes; opus_uint32 nintra_bytes; + opus_uint32 save_bytes; int badness2; VARDECL(unsigned char, intra_bits); @@ -321,14 +323,17 @@ void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd, nstart_bytes = ec_range_bytes(&enc_start_state); nintra_bytes = ec_range_bytes(&enc_intra_state); intra_buf = ec_get_buffer(&enc_intra_state) + nstart_bytes; - ALLOC(intra_bits, nintra_bytes-nstart_bytes, unsigned char); + save_bytes = nintra_bytes-nstart_bytes; + if (save_bytes == 0) + save_bytes = ALLOC_NONE; + ALLOC(intra_bits, save_bytes, unsigned char); /* Copy bits from intra bit-stream */ OPUS_COPY(intra_bits, intra_buf, nintra_bytes - nstart_bytes); *enc = enc_start_state; badness2 = quant_coarse_energy_impl(m, start, end, eBands, oldEBands, budget, - tell, e_prob_model[LM][intra], error, enc, C, LM, 0, max_decay); + tell, e_prob_model[LM][intra], error, enc, C, LM, 0, max_decay, lfe); if (two_pass && (badness1 < badness2 || (badness1 == badness2 && ((opus_int32)ec_tell_frac(enc))+intra_bias > tell_intra))) { @@ -535,25 +540,6 @@ void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 * } } -void log2Amp(const CELTMode *m, int start, int end, - celt_ener *eBands, const opus_val16 *oldEBands, int C) -{ - int c, i; - c=0; - do { - for (i=0;inbEBands] = 0; - for (;inbEBands], - SHL16((opus_val16)eMeans[i],6)); - eBands[i+c*m->nbEBands] = PSHR32(celt_exp2(lg),4); - } - for (;inbEBands;i++) - eBands[i+c*m->nbEBands] = 0; - } while (++c < C); -} - void amp2Log2(const CELTMode *m, int effEnd, int end, celt_ener *bandE, opus_val16 *bandLogE, int C) { diff --git a/code/opus-1.0.2/celt/quant_bands.h b/code/opus-1.1/celt/quant_bands.h similarity index 94% rename from code/opus-1.0.2/celt/quant_bands.h rename to code/opus-1.1/celt/quant_bands.h index bec2855c..0490bca4 100644 --- a/code/opus-1.0.2/celt/quant_bands.h +++ b/code/opus-1.1/celt/quant_bands.h @@ -35,6 +35,12 @@ #include "entdec.h" #include "mathops.h" +#ifdef FIXED_POINT +extern const signed char eMeans[25]; +#else +extern const opus_val16 eMeans[25]; +#endif + void amp2Log2(const CELTMode *m, int effEnd, int end, celt_ener *bandE, opus_val16 *bandLogE, int C); @@ -45,7 +51,7 @@ void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd, const opus_val16 *eBands, opus_val16 *oldEBands, opus_uint32 budget, opus_val16 *error, ec_enc *enc, int C, int LM, int nbAvailableBytes, int force_intra, opus_val32 *delayedIntra, - int two_pass, int loss_rate); + int two_pass, int loss_rate, int lfe); void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, ec_enc *enc, int C); diff --git a/code/opus-1.0.2/celt/rate.c b/code/opus-1.1/celt/rate.c similarity index 98% rename from code/opus-1.0.2/celt/rate.c rename to code/opus-1.1/celt/rate.c index 4e96787f..e13d839d 100644 --- a/code/opus-1.0.2/celt/rate.c +++ b/code/opus-1.1/celt/rate.c @@ -245,10 +245,10 @@ void compute_pulse_cache(CELTMode *m, int LM) #define ALLOC_STEPS 6 -static inline int interp_bits2pulses(const CELTMode *m, int start, int end, int skip_start, +static OPUS_INLINE int interp_bits2pulses(const CELTMode *m, int start, int end, int skip_start, const int *bits1, const int *bits2, const int *thresh, const int *cap, opus_int32 total, opus_int32 *_balance, int skip_rsv, int *intensity, int intensity_rsv, int *dual_stereo, int dual_stereo_rsv, int *bits, - int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev) + int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev, int signalBandwidth) { opus_int32 psum; int lo, hi; @@ -353,7 +353,7 @@ static inline int interp_bits2pulses(const CELTMode *m, int start, int end, int #ifdef FUZZING if ((rand()&0x1) == 0) #else - if (codedBands<=start+2 || band_bits > ((j>4) + if (codedBands<=start+2 || (band_bits > ((j>4 && j<=signalBandwidth)) #endif { ec_enc_bit_logp(ec, 1, 1); @@ -524,7 +524,7 @@ static inline int interp_bits2pulses(const CELTMode *m, int start, int end, int } int compute_allocation(const CELTMode *m, int start, int end, const int *offsets, const int *cap, int alloc_trim, int *intensity, int *dual_stereo, - opus_int32 total, opus_int32 *balance, int *pulses, int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev) + opus_int32 total, opus_int32 *balance, int *pulses, int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev, int signalBandwidth) { int lo, hi, len, j; int codedBands; @@ -631,7 +631,7 @@ int compute_allocation(const CELTMode *m, int start, int end, const int *offsets } codedBands = interp_bits2pulses(m, start, end, skip_start, bits1, bits2, thresh, cap, total, balance, skip_rsv, intensity, intensity_rsv, dual_stereo, dual_stereo_rsv, - pulses, ebits, fine_priority, C, LM, ec, encode, prev); + pulses, ebits, fine_priority, C, LM, ec, encode, prev, signalBandwidth); RESTORE_STACK; return codedBands; } diff --git a/code/opus-1.0.2/celt/rate.h b/code/opus-1.1/celt/rate.h similarity index 92% rename from code/opus-1.0.2/celt/rate.h rename to code/opus-1.1/celt/rate.h index e0d50223..f1e06611 100644 --- a/code/opus-1.0.2/celt/rate.h +++ b/code/opus-1.1/celt/rate.h @@ -45,12 +45,12 @@ void compute_pulse_cache(CELTMode *m, int LM); -static inline int get_pulses(int i) +static OPUS_INLINE int get_pulses(int i) { return i<8 ? i : (8 + (i&7)) << ((i>>3)-1); } -static inline int bits2pulses(const CELTMode *m, int band, int LM, int bits) +static OPUS_INLINE int bits2pulses(const CELTMode *m, int band, int LM, int bits) { int i; int lo, hi; @@ -77,7 +77,7 @@ static inline int bits2pulses(const CELTMode *m, int band, int LM, int bits) return hi; } -static inline int pulses2bits(const CELTMode *m, int band, int LM, int pulses) +static OPUS_INLINE int pulses2bits(const CELTMode *m, int band, int LM, int pulses) { const unsigned char *cache; @@ -96,6 +96,6 @@ static inline int pulses2bits(const CELTMode *m, int band, int LM, int pulses) @return Total number of bits allocated */ int compute_allocation(const CELTMode *m, int start, int end, const int *offsets, const int *cap, int alloc_trim, int *intensity, int *dual_stero, - opus_int32 total, opus_int32 *balance, int *pulses, int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev); + opus_int32 total, opus_int32 *balance, int *pulses, int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev, int signalBandwidth); #endif diff --git a/code/opus-1.0.2/celt/stack_alloc.h b/code/opus-1.1/celt/stack_alloc.h similarity index 83% rename from code/opus-1.0.2/celt/stack_alloc.h rename to code/opus-1.1/celt/stack_alloc.h index a6f06d22..316a6ce1 100644 --- a/code/opus-1.0.2/celt/stack_alloc.h +++ b/code/opus-1.1/celt/stack_alloc.h @@ -32,6 +32,9 @@ #ifndef STACK_ALLOC_H #define STACK_ALLOC_H +#include "opus_types.h" +#include "opus_defines.h" + #if (!defined (VAR_ARRAYS) && !defined (USE_ALLOCA) && !defined (NONTHREADSAFE_PSEUDOSTACK)) #error "Opus requires one of VAR_ARRAYS, USE_ALLOCA, or NONTHREADSAFE_PSEUDOSTACK be defined to select the temporary allocation mode." #endif @@ -92,6 +95,8 @@ #define SAVE_STACK #define RESTORE_STACK #define ALLOC_STACK +/* C99 does not allow VLAs of size zero */ +#define ALLOC_NONE 1 #elif defined(USE_ALLOCA) @@ -106,6 +111,7 @@ #define SAVE_STACK #define RESTORE_STACK #define ALLOC_STACK +#define ALLOC_NONE 0 #else @@ -143,7 +149,30 @@ extern char *global_stack_top; #define VARDECL(type, var) type *var #define ALLOC(var, size, type) var = PUSH(global_stack, size, type) #define SAVE_STACK char *_saved_stack = global_stack; +#define ALLOC_NONE 0 #endif /* VAR_ARRAYS */ + +#ifdef ENABLE_VALGRIND + +#include +#define OPUS_CHECK_ARRAY(ptr, len) VALGRIND_CHECK_MEM_IS_DEFINED(ptr, len*sizeof(*ptr)) +#define OPUS_CHECK_VALUE(value) VALGRIND_CHECK_VALUE_IS_DEFINED(value) +#define OPUS_CHECK_ARRAY_COND(ptr, len) VALGRIND_CHECK_MEM_IS_DEFINED(ptr, len*sizeof(*ptr)) +#define OPUS_CHECK_VALUE_COND(value) VALGRIND_CHECK_VALUE_IS_DEFINED(value) +#define OPUS_PRINT_INT(value) do {fprintf(stderr, #value " = %d at %s:%d\n", value, __FILE__, __LINE__);}while(0) +#define OPUS_FPRINTF fprintf + +#else + +static OPUS_INLINE int _opus_false(void) {return 0;} +#define OPUS_CHECK_ARRAY(ptr, len) _opus_false() +#define OPUS_CHECK_VALUE(value) _opus_false() +#define OPUS_PRINT_INT(value) do{}while(0) +#define OPUS_FPRINTF (void) + +#endif + + #endif /* STACK_ALLOC_H */ diff --git a/code/opus-1.0.2/celt/static_modes_fixed.h b/code/opus-1.1/celt/static_modes_fixed.h similarity index 100% rename from code/opus-1.0.2/celt/static_modes_fixed.h rename to code/opus-1.1/celt/static_modes_fixed.h diff --git a/code/opus-1.0.2/celt/static_modes_float.h b/code/opus-1.1/celt/static_modes_float.h similarity index 100% rename from code/opus-1.0.2/celt/static_modes_float.h rename to code/opus-1.1/celt/static_modes_float.h diff --git a/code/opus-1.0.2/celt/vq.c b/code/opus-1.1/celt/vq.c similarity index 100% rename from code/opus-1.0.2/celt/vq.c rename to code/opus-1.1/celt/vq.c diff --git a/code/opus-1.0.2/celt/vq.h b/code/opus-1.1/celt/vq.h similarity index 89% rename from code/opus-1.0.2/celt/vq.h rename to code/opus-1.1/celt/vq.h index 1ceeeeb2..ffdc69cd 100644 --- a/code/opus-1.0.2/celt/vq.h +++ b/code/opus-1.1/celt/vq.h @@ -40,11 +40,9 @@ /** Algebraic pulse-vector quantiser. The signal x is replaced by the sum of * the pitch and a combination of pulses such that its norm is still equal * to 1. This is the function that will typically require the most CPU. - * @param x Residual signal to quantise/encode (returns quantised version) - * @param W Perceptual weight to use when optimising (currently unused) + * @param X Residual signal to quantise/encode (returns quantised version) * @param N Number of samples to encode * @param K Number of pulses to use - * @param p Pitch vector (it is assumed that p+x is a unit vector) * @param enc Entropy encoder state * @ret A mask indicating which blocks in the band received pulses */ @@ -56,10 +54,9 @@ unsigned alg_quant(celt_norm *X, int N, int K, int spread, int B, ); /** Algebraic pulse decoder - * @param x Decoded normalised spectrum (returned) + * @param X Decoded normalised spectrum (returned) * @param N Number of samples to decode * @param K Number of pulses to use - * @param p Pitch vector (automatically added to x) * @param dec Entropy decoder state * @ret A mask indicating which blocks in the band received pulses */ diff --git a/code/opus-1.1/celt/x86/pitch_sse.h b/code/opus-1.1/celt/x86/pitch_sse.h new file mode 100644 index 00000000..695122a5 --- /dev/null +++ b/code/opus-1.1/celt/x86/pitch_sse.h @@ -0,0 +1,156 @@ +/* Copyright (c) 2013 Jean-Marc Valin and John Ridges */ +/** + @file pitch_sse.h + @brief Pitch analysis + */ + +/* + 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. +*/ + +#ifndef PITCH_SSE_H +#define PITCH_SSE_H + +#include +#include "arch.h" + +#define OVERRIDE_XCORR_KERNEL +static OPUS_INLINE void xcorr_kernel(const opus_val16 *x, const opus_val16 *y, opus_val32 sum[4], int len) +{ + int j; + __m128 xsum1, xsum2; + xsum1 = _mm_loadu_ps(sum); + xsum2 = _mm_setzero_ps(); + + for (j = 0; j < len-3; j += 4) + { + __m128 x0 = _mm_loadu_ps(x+j); + __m128 yj = _mm_loadu_ps(y+j); + __m128 y3 = _mm_loadu_ps(y+j+3); + + xsum1 = _mm_add_ps(xsum1,_mm_mul_ps(_mm_shuffle_ps(x0,x0,0x00),yj)); + xsum2 = _mm_add_ps(xsum2,_mm_mul_ps(_mm_shuffle_ps(x0,x0,0x55), + _mm_shuffle_ps(yj,y3,0x49))); + xsum1 = _mm_add_ps(xsum1,_mm_mul_ps(_mm_shuffle_ps(x0,x0,0xaa), + _mm_shuffle_ps(yj,y3,0x9e))); + xsum2 = _mm_add_ps(xsum2,_mm_mul_ps(_mm_shuffle_ps(x0,x0,0xff),y3)); + } + if (j < len) + { + xsum1 = _mm_add_ps(xsum1,_mm_mul_ps(_mm_load1_ps(x+j),_mm_loadu_ps(y+j))); + if (++j < len) + { + xsum2 = _mm_add_ps(xsum2,_mm_mul_ps(_mm_load1_ps(x+j),_mm_loadu_ps(y+j))); + if (++j < len) + { + xsum1 = _mm_add_ps(xsum1,_mm_mul_ps(_mm_load1_ps(x+j),_mm_loadu_ps(y+j))); + } + } + } + _mm_storeu_ps(sum,_mm_add_ps(xsum1,xsum2)); +} + +#define OVERRIDE_DUAL_INNER_PROD +static OPUS_INLINE void dual_inner_prod(const opus_val16 *x, const opus_val16 *y01, const opus_val16 *y02, + int N, opus_val32 *xy1, opus_val32 *xy2) +{ + int i; + __m128 xsum1, xsum2; + xsum1 = _mm_setzero_ps(); + xsum2 = _mm_setzero_ps(); + for (i=0;iopus_int32: size of data * @param [out] out_toc char*: TOC pointer * @param [out] frames char*[48] encapsulated frames - * @param [out] size short[48] sizes of the encapsulated frames + * @param [out] size opus_int16[48] sizes of the encapsulated frames * @param [out] payload_offset int*: returns the position of the payload within the packet (in bytes) * @returns number of frames */ @@ -529,7 +529,7 @@ OPUS_EXPORT int opus_packet_parse( opus_int32 len, unsigned char *out_toc, const unsigned char *frames[48], - short size[48], + opus_int16 size[48], int *payload_offset ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(4); @@ -566,6 +566,7 @@ OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_channels(const unsign * @param [in] packet char*: Opus packet * @param [in] len opus_int32: 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); @@ -577,6 +578,7 @@ OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_frames(const unsigned * 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); @@ -586,9 +588,24 @@ OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_packet_get_nb_samples(const unsigne * @param [in] packet char*: Opus packet * @param [in] len opus_int32: 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 float*: Input PCM and modified PCM + * @param [in] frame_size int Number of samples per channel to process + * @param [in] channels int: Number of channels + * @param [in,out] softclip_mem float*: 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 @@ -894,6 +911,64 @@ OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_repacketizer_get_nb_frames(OpusRepa */ 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 const unsigned char*: The buffer containing the + * packet to pad. + * @param len opus_int32: The size of the packet. + * This must be at least 1. + * @param new_len opus_int32: 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 const unsigned char*: The buffer containing the + * packet to strip. + * @param len opus_int32: 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 const unsigned char*: The buffer containing the + * packet to pad. + * @param len opus_int32: The size of the packet. + * This must be at least 1. + * @param new_len opus_int32: The desired size of the packet after padding. + * This must be at least 1. + * @param nb_streams opus_int32: 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 const unsigned char*: The buffer containing the + * packet to strip. + * @param len opus_int32: The size of the packet. + * This must be at least 1. + * @param nb_streams opus_int32: 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 diff --git a/code/opus-1.0.2/include/opus_custom.h b/code/opus-1.1/include/opus_custom.h similarity index 97% rename from code/opus-1.0.2/include/opus_custom.h rename to code/opus-1.1/include/opus_custom.h index e7861d6f..41f36bf2 100644 --- a/code/opus-1.0.2/include/opus_custom.h +++ b/code/opus-1.1/include/opus_custom.h @@ -42,15 +42,15 @@ extern "C" { #endif #ifdef CUSTOM_MODES -#define OPUS_CUSTOM_EXPORT OPUS_EXPORT -#define OPUS_CUSTOM_EXPORT_STATIC OPUS_EXPORT +# define OPUS_CUSTOM_EXPORT OPUS_EXPORT +# define OPUS_CUSTOM_EXPORT_STATIC OPUS_EXPORT #else -#define OPUS_CUSTOM_EXPORT -#ifdef CELT_C -#define OPUS_CUSTOM_EXPORT_STATIC static inline -#else -#define OPUS_CUSTOM_EXPORT_STATIC -#endif +# define OPUS_CUSTOM_EXPORT +# ifdef OPUS_BUILD +# define OPUS_CUSTOM_EXPORT_STATIC static OPUS_INLINE +# else +# define OPUS_CUSTOM_EXPORT_STATIC +# endif #endif /** @defgroup opus_custom Opus Custom @@ -126,6 +126,9 @@ OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomMode *opus_custom_mode_crea */ OPUS_CUSTOM_EXPORT void opus_custom_mode_destroy(OpusCustomMode *mode); + +#if !defined(OPUS_BUILD) || defined(CELT_ENCODER_C) + /* Encoder */ /** Gets the size of an OpusCustomEncoder structure. * @param [in] mode OpusCustomMode *: Mode configuration @@ -137,6 +140,28 @@ OPUS_CUSTOM_EXPORT_STATIC OPUS_WARN_UNUSED_RESULT int opus_custom_encoder_get_si int channels ) OPUS_ARG_NONNULL(1); +# ifdef CUSTOM_MODES +/** Initializes a previously allocated encoder state + * The memory pointed to by st must be the size returned by opus_custom_encoder_get_size. + * This is intended for applications which use their own allocator instead of malloc. + * @see opus_custom_encoder_create(),opus_custom_encoder_get_size() + * To reset a previously initialized state use the OPUS_RESET_STATE CTL. + * @param [in] st OpusCustomEncoder*: Encoder state + * @param [in] mode OpusCustomMode *: Contains all the information about the characteristics of + * the stream (must be the same characteristics as used for the + * decoder) + * @param [in] channels int: Number of channels + * @return OPUS_OK Success or @ref opus_errorcodes + */ +OPUS_CUSTOM_EXPORT int opus_custom_encoder_init( + OpusCustomEncoder *st, + const OpusCustomMode *mode, + int channels +) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2); +# endif +#endif + + /** Creates a new encoder state. Each stream needs its own encoder * state (can't be shared across simultaneous streams). * @param [in] mode OpusCustomMode*: Contains all the information about the characteristics of @@ -152,23 +177,6 @@ OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomEncoder *opus_custom_encode int *error ) OPUS_ARG_NONNULL(1); -/** Initializes a previously allocated encoder state - * The memory pointed to by st must be the size returned by opus_custom_encoder_get_size. - * This is intended for applications which use their own allocator instead of malloc. - * @see opus_custom_encoder_create(),opus_custom_encoder_get_size() - * To reset a previously initialized state use the OPUS_RESET_STATE CTL. - * @param [in] st OpusCustomEncoder*: Encoder state - * @param [in] mode OpusCustomMode *: Contains all the information about the characteristics of - * the stream (must be the same characteristics as used for the - * decoder) - * @param [in] channels int: Number of channels - * @return OPUS_OK Success or @ref opus_errorcodes - */ -OPUS_CUSTOM_EXPORT_STATIC int opus_custom_encoder_init( - OpusCustomEncoder *st, - const OpusCustomMode *mode, - int channels -) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2); /** Destroys a an encoder state. * @param[in] st OpusCustomEncoder*: State to be freed. @@ -229,6 +237,8 @@ OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT int opus_custom_encode( */ OPUS_CUSTOM_EXPORT int opus_custom_encoder_ctl(OpusCustomEncoder * OPUS_RESTRICT st, int request, ...) OPUS_ARG_NONNULL(1); + +#if !defined(OPUS_BUILD) || defined(CELT_DECODER_C) /* Decoder */ /** Gets the size of an OpusCustomDecoder structure. @@ -241,20 +251,6 @@ OPUS_CUSTOM_EXPORT_STATIC OPUS_WARN_UNUSED_RESULT int opus_custom_decoder_get_si int channels ) OPUS_ARG_NONNULL(1); -/** Creates a new decoder state. Each stream needs its own decoder state (can't - * be shared across simultaneous streams). - * @param [in] mode OpusCustomMode: Contains all the information about the characteristics of the - * stream (must be the same characteristics as used for the encoder) - * @param [in] channels int: Number of channels - * @param [out] error int*: Returns an error code - * @return Newly created decoder state. - */ -OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomDecoder *opus_custom_decoder_create( - const OpusCustomMode *mode, - int channels, - int *error -) OPUS_ARG_NONNULL(1); - /** Initializes a previously allocated decoder state * The memory pointed to by st must be the size returned by opus_custom_decoder_get_size. * This is intended for applications which use their own allocator instead of malloc. @@ -273,6 +269,23 @@ OPUS_CUSTOM_EXPORT_STATIC int opus_custom_decoder_init( int channels ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2); +#endif + + +/** Creates a new decoder state. Each stream needs its own decoder state (can't + * be shared across simultaneous streams). + * @param [in] mode OpusCustomMode: Contains all the information about the characteristics of the + * stream (must be the same characteristics as used for the encoder) + * @param [in] channels int: Number of channels + * @param [out] error int*: Returns an error code + * @return Newly created decoder state. + */ +OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomDecoder *opus_custom_decoder_create( + const OpusCustomMode *mode, + int channels, + int *error +) OPUS_ARG_NONNULL(1); + /** Destroys a an decoder state. * @param[in] st OpusCustomDecoder*: State to be freed. */ diff --git a/code/opus-1.0.2/include/opus_defines.h b/code/opus-1.1/include/opus_defines.h similarity index 88% rename from code/opus-1.0.2/include/opus_defines.h rename to code/opus-1.1/include/opus_defines.h index cdde061a..265089f6 100644 --- a/code/opus-1.0.2/include/opus_defines.h +++ b/code/opus-1.1/include/opus_defines.h @@ -64,14 +64,14 @@ extern "C" { /**Export control for opus functions */ #ifndef OPUS_EXPORT -# if defined(__GNUC__) && defined(OPUS_BUILD) -# define OPUS_EXPORT __attribute__ ((visibility ("default"))) -# elif defined(WIN32) && !defined(__MINGW32__) +# if defined(WIN32) # ifdef OPUS_BUILD # 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 @@ -98,6 +98,18 @@ extern "C" { # 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. */ @@ -148,8 +160,11 @@ extern "C" { #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 */ @@ -157,6 +172,7 @@ extern "C" { #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))) /** @endcond */ /** @defgroup opus_ctlvalues Pre-defined values for CTL interface @@ -185,6 +201,14 @@ extern "C" { #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 */ + /**@}*/ @@ -525,6 +549,53 @@ extern "C" { * @param[out] x opus_int32 *: 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) + +/** 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 really + * know what you are doing. + * @see OPUS_GET_EXPERT_VARIABLE_DURATION + * @param[in] x opus_int32: Allowed values: + *
+ *
OPUS_FRAMESIZE_ARG
Select frame size from the argument (default).
+ *
OPUS_FRAMESIZE_2_5_MS
Use 2.5 ms frames.
+ *
OPUS_FRAMESIZE_5_MS
Use 2.5 ms frames.
+ *
OPUS_FRAMESIZE_10_MS
Use 10 ms frames.
+ *
OPUS_FRAMESIZE_20_MS
Use 20 ms frames.
+ *
OPUS_FRAMESIZE_40_MS
Use 40 ms frames.
+ *
OPUS_FRAMESIZE_60_MS
Use 60 ms frames.
+ *
OPUS_FRAMESIZE_VARIABLE
Optimize the frame size dynamically.
+ *
+ * @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_VARIABLE_DURATION + * @param[out] x opus_int32 *: Returns one of the following values: + *
+ *
OPUS_FRAMESIZE_ARG
Select frame size from the argument (default).
+ *
OPUS_FRAMESIZE_2_5_MS
Use 2.5 ms frames.
+ *
OPUS_FRAMESIZE_5_MS
Use 2.5 ms frames.
+ *
OPUS_FRAMESIZE_10_MS
Use 10 ms frames.
+ *
OPUS_FRAMESIZE_20_MS
Use 20 ms frames.
+ *
OPUS_FRAMESIZE_40_MS
Use 40 ms frames.
+ *
OPUS_FRAMESIZE_60_MS
Use 60 ms frames.
+ *
OPUS_FRAMESIZE_VARIABLE
Optimize the frame size dynamically.
+ *
+ * @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. (default : 0) + * @hideinitializer */ +#define OPUS_SET_PREDICTION_DISABLED(x) OPUS_SET_PREDICTION_DISABLED_REQUEST, __opus_check_int(x) +/** Gets the encoder's configured prediction status. + * @hideinitializer */ +#define OPUS_GET_PREDICTION_DISABLED(x) OPUS_GET_PREDICTION_DISABLED_REQUEST, __opus_check_int_ptr(x) + /**@}*/ /** @defgroup opus_genericctls Generic CTLs diff --git a/code/opus-1.0.2/include/opus_multistream.h b/code/opus-1.1/include/opus_multistream.h similarity index 97% rename from code/opus-1.0.2/include/opus_multistream.h rename to code/opus-1.1/include/opus_multistream.h index 658067f7..ae599793 100644 --- a/code/opus-1.0.2/include/opus_multistream.h +++ b/code/opus-1.1/include/opus_multistream.h @@ -205,6 +205,12 @@ OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_encoder_get_size int coupled_streams ); +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_multistream_surround_encoder_get_size( + int channels, + int mapping_family +); + + /** Allocates and initializes a multistream encoder state. * Call opus_multistream_encoder_destroy() to release * this object when finished. @@ -258,6 +264,17 @@ OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusMSEncoder *opus_multistream_encoder_crea int *error ) OPUS_ARG_NONNULL(5); +OPUS_EXPORT OPUS_WARN_UNUSED_RESULT OpusMSEncoder *opus_multistream_surround_encoder_create( + opus_int32 Fs, + int channels, + int mapping_family, + int *streams, + int *coupled_streams, + unsigned char *mapping, + int application, + int *error +) OPUS_ARG_NONNULL(5); + /** Initialize a previously allocated multistream encoder state. * The memory pointed to by \a st must be at least the size returned by * opus_multistream_encoder_get_size(). @@ -316,6 +333,17 @@ OPUS_EXPORT int opus_multistream_encoder_init( int application ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6); +OPUS_EXPORT int opus_multistream_surround_encoder_init( + OpusMSEncoder *st, + opus_int32 Fs, + int channels, + int mapping_family, + int *streams, + int *coupled_streams, + unsigned char *mapping, + int application +) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(6); + /** Encodes a multistream Opus frame. * @param st OpusMSEncoder*: Multistream encoder state. * @param[in] pcm const opus_int16*: The input signal as interleaved diff --git a/code/opus-1.0.2/include/opus_types.h b/code/opus-1.1/include/opus_types.h similarity index 100% rename from code/opus-1.0.2/include/opus_types.h rename to code/opus-1.1/include/opus_types.h diff --git a/code/opus-1.0.2/silk/A2NLSF.c b/code/opus-1.1/silk/A2NLSF.c similarity index 97% rename from code/opus-1.0.2/silk/A2NLSF.c rename to code/opus-1.1/silk/A2NLSF.c index 49d5d9d9..74b1b95d 100644 --- a/code/opus-1.0.2/silk/A2NLSF.c +++ b/code/opus-1.1/silk/A2NLSF.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -44,7 +44,7 @@ POSSIBILITY OF SUCH DAMAGE. /* Helper function for A2NLSF(..) */ /* Transforms polynomials from cos(n*f) to cos(f)^n */ -static inline void silk_A2NLSF_trans_poly( +static OPUS_INLINE void silk_A2NLSF_trans_poly( opus_int32 *p, /* I/O Polynomial */ const opus_int dd /* I Polynomial order (= filter order / 2 ) */ ) @@ -60,7 +60,7 @@ static inline void silk_A2NLSF_trans_poly( } /* Helper function for A2NLSF(..) */ /* Polynomial evaluation */ -static inline opus_int32 silk_A2NLSF_eval_poly( /* return the polynomial evaluation, in Q16 */ +static OPUS_INLINE opus_int32 silk_A2NLSF_eval_poly( /* return the polynomial evaluation, in Q16 */ opus_int32 *p, /* I Polynomial, Q16 */ const opus_int32 x, /* I Evaluation point, Q12 */ const opus_int dd /* I Order */ @@ -77,7 +77,7 @@ static inline opus_int32 silk_A2NLSF_eval_poly( /* return the polynomial evaluat return y32; } -static inline void silk_A2NLSF_init( +static OPUS_INLINE void silk_A2NLSF_init( const opus_int32 *a_Q16, opus_int32 *P, opus_int32 *Q, diff --git a/code/opus-1.0.2/silk/API.h b/code/opus-1.1/silk/API.h similarity index 98% rename from code/opus-1.0.2/silk/API.h rename to code/opus-1.1/silk/API.h index 4b8ca12a..f0601bcf 100644 --- a/code/opus-1.0.2/silk/API.h +++ b/code/opus-1.1/silk/API.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -64,6 +64,7 @@ opus_int silk_Get_Encoder_Size( /* O Returns error co /*************************/ opus_int silk_InitEncoder( /* O Returns error code */ void *encState, /* I/O State */ + int arch, /* I Run-time architecture */ silk_EncControlStruct *encStatus /* O Encoder Status */ ); diff --git a/code/opus-1.0.2/silk/CNG.c b/code/opus-1.1/silk/CNG.c similarity index 97% rename from code/opus-1.0.2/silk/CNG.c rename to code/opus-1.1/silk/CNG.c index d0a619c1..8481d95d 100644 --- a/code/opus-1.0.2/silk/CNG.c +++ b/code/opus-1.1/silk/CNG.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,9 +30,10 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "main.h" +#include "stack_alloc.h" /* Generates excitation for CNG LPC synthesis */ -static inline void silk_CNG_exc( +static OPUS_INLINE void silk_CNG_exc( opus_int32 residual_Q10[], /* O CNG residual signal Q10 */ opus_int32 exc_buf_Q14[], /* I Random samples buffer Q10 */ opus_int32 Gain_Q16, /* I Gain to apply */ @@ -86,8 +87,8 @@ void silk_CNG( opus_int i, subfr; opus_int32 sum_Q6, max_Gain_Q16; opus_int16 A_Q12[ MAX_LPC_ORDER ]; - opus_int32 CNG_sig_Q10[ MAX_FRAME_LENGTH + MAX_LPC_ORDER ]; silk_CNG_struct *psCNG = &psDec->sCNG; + SAVE_STACK; if( psDec->fs_kHz != psCNG->fs_kHz ) { /* Reset state */ @@ -123,6 +124,9 @@ void silk_CNG( /* Add CNG when packet is lost or during DTX */ if( psDec->lossCnt ) { + VARDECL( opus_int32, CNG_sig_Q10 ); + + ALLOC( CNG_sig_Q10, length + MAX_LPC_ORDER, opus_int32 ); /* Generate CNG excitation */ silk_CNG_exc( CNG_sig_Q10 + MAX_LPC_ORDER, psCNG->CNG_exc_buf_Q14, psCNG->CNG_smth_Gain_Q16, length, &psCNG->rand_seed ); @@ -164,4 +168,5 @@ void silk_CNG( } else { silk_memset( psCNG->CNG_synth_state, 0, psDec->LPC_order * sizeof( opus_int32 ) ); } + RESTORE_STACK; } diff --git a/code/opus-1.0.2/silk/HP_variable_cutoff.c b/code/opus-1.1/silk/HP_variable_cutoff.c similarity index 99% rename from code/opus-1.0.2/silk/HP_variable_cutoff.c rename to code/opus-1.1/silk/HP_variable_cutoff.c index 199dbb34..bbe10f04 100644 --- a/code/opus-1.0.2/silk/HP_variable_cutoff.c +++ b/code/opus-1.1/silk/HP_variable_cutoff.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/Inlines.h b/code/opus-1.1/silk/Inlines.h similarity index 93% rename from code/opus-1.0.2/silk/Inlines.h rename to code/opus-1.1/silk/Inlines.h index 87ac2e20..ec986cdf 100644 --- a/code/opus-1.0.2/silk/Inlines.h +++ b/code/opus-1.1/silk/Inlines.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -26,7 +26,7 @@ POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ /*! \file silk_Inlines.h - * \brief silk_Inlines.h defines inline signal processing functions. + * \brief silk_Inlines.h defines OPUS_INLINE signal processing functions. */ #ifndef SILK_FIX_INLINES_H @@ -38,7 +38,7 @@ extern "C" #endif /* count leading zeros of opus_int64 */ -static inline opus_int32 silk_CLZ64( opus_int64 in ) +static OPUS_INLINE opus_int32 silk_CLZ64( opus_int64 in ) { opus_int32 in_upper; @@ -53,7 +53,7 @@ static inline opus_int32 silk_CLZ64( opus_int64 in ) } /* get number of leading zeros and fractional part (the bits right after the leading one */ -static inline void silk_CLZ_FRAC( +static OPUS_INLINE void silk_CLZ_FRAC( opus_int32 in, /* I input */ opus_int32 *lz, /* O number of leading zeros */ opus_int32 *frac_Q7 /* O the 7 bits right after the leading one */ @@ -68,7 +68,7 @@ static inline void silk_CLZ_FRAC( /* Approximation of square root */ /* Accuracy: < +/- 10% for output values > 15 */ /* < +/- 2.5% for output values > 120 */ -static inline opus_int32 silk_SQRT_APPROX( opus_int32 x ) +static OPUS_INLINE opus_int32 silk_SQRT_APPROX( opus_int32 x ) { opus_int32 y, lz, frac_Q7; @@ -94,7 +94,7 @@ static inline opus_int32 silk_SQRT_APPROX( opus_int32 x ) } /* Divide two int32 values and return result as int32 in a given Q-domain */ -static inline opus_int32 silk_DIV32_varQ( /* O returns a good approximation of "(a32 << Qres) / b32" */ +static OPUS_INLINE opus_int32 silk_DIV32_varQ( /* O returns a good approximation of "(a32 << Qres) / b32" */ const opus_int32 a32, /* I numerator (Q0) */ const opus_int32 b32, /* I denominator (Q0) */ const opus_int Qres /* I Q-domain of result (>= 0) */ @@ -140,7 +140,7 @@ static inline opus_int32 silk_DIV32_varQ( /* O returns a good approximation } /* Invert int32 value and return result as int32 in a given Q-domain */ -static inline opus_int32 silk_INVERSE32_varQ( /* O returns a good approximation of "(1 << Qres) / b32" */ +static OPUS_INLINE opus_int32 silk_INVERSE32_varQ( /* O returns a good approximation of "(1 << Qres) / b32" */ const opus_int32 b32, /* I denominator (Q0) */ const opus_int Qres /* I Q-domain of result (> 0) */ ) diff --git a/code/opus-1.0.2/silk/LPC_analysis_filter.c b/code/opus-1.1/silk/LPC_analysis_filter.c similarity index 89% rename from code/opus-1.0.2/silk/LPC_analysis_filter.c rename to code/opus-1.1/silk/LPC_analysis_filter.c index 421dba0b..9d1f16cb 100644 --- a/code/opus-1.0.2/silk/LPC_analysis_filter.c +++ b/code/opus-1.1/silk/LPC_analysis_filter.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "SigProc_FIX.h" +#include "celt_lpc.h" /*******************************************/ /* LPC analysis filter */ @@ -46,14 +47,33 @@ void silk_LPC_analysis_filter( const opus_int32 d /* I Filter order */ ) { - opus_int ix, j; + opus_int j; +#ifdef FIXED_POINT + opus_int16 mem[SILK_MAX_ORDER_LPC]; + opus_int16 num[SILK_MAX_ORDER_LPC]; +#else + int ix; opus_int32 out32_Q12, out32; const opus_int16 *in_ptr; +#endif silk_assert( d >= 6 ); silk_assert( (d & 1) == 0 ); silk_assert( d <= len ); +#ifdef FIXED_POINT + silk_assert( d <= SILK_MAX_ORDER_LPC ); + for ( j = 0; j < d; j++ ) { + num[ j ] = -B[ j ]; + } + for (j=0;j> 16) * (opus_int32)((opus_int16)b32) + (((a32 & 0x0000FFFF) * (opus_int32)((opus_int16)b32)) >> 16); return ret; } #undef silk_SMLAWB -static inline opus_int32 silk_SMLAWB(opus_int32 a32, opus_int32 b32, opus_int32 c32){ +static OPUS_INLINE opus_int32 silk_SMLAWB(opus_int32 a32, opus_int32 b32, opus_int32 c32){ opus_int32 ret; ops_count += 5; ret = ((a32) + ((((b32) >> 16) * (opus_int32)((opus_int16)(c32))) + ((((b32) & 0x0000FFFF) * (opus_int32)((opus_int16)(c32))) >> 16))); @@ -97,14 +97,14 @@ static inline opus_int32 silk_SMLAWB(opus_int32 a32, opus_int32 b32, opus_int32 } #undef silk_SMULWT -static inline opus_int32 silk_SMULWT(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int32 silk_SMULWT(opus_int32 a32, opus_int32 b32){ opus_int32 ret; ops_count += 4; ret = (a32 >> 16) * (b32 >> 16) + (((a32 & 0x0000FFFF) * (b32 >> 16)) >> 16); return ret; } #undef silk_SMLAWT -static inline opus_int32 silk_SMLAWT(opus_int32 a32, opus_int32 b32, opus_int32 c32){ +static OPUS_INLINE opus_int32 silk_SMLAWT(opus_int32 a32, opus_int32 b32, opus_int32 c32){ opus_int32 ret; ops_count += 4; ret = a32 + ((b32 >> 16) * (c32 >> 16)) + (((b32 & 0x0000FFFF) * ((c32 >> 16)) >> 16)); @@ -112,14 +112,14 @@ static inline opus_int32 silk_SMLAWT(opus_int32 a32, opus_int32 b32, opus_int32 } #undef silk_SMULBB -static inline opus_int32 silk_SMULBB(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int32 silk_SMULBB(opus_int32 a32, opus_int32 b32){ opus_int32 ret; ops_count += 1; ret = (opus_int32)((opus_int16)a32) * (opus_int32)((opus_int16)b32); return ret; } #undef silk_SMLABB -static inline opus_int32 silk_SMLABB(opus_int32 a32, opus_int32 b32, opus_int32 c32){ +static OPUS_INLINE opus_int32 silk_SMLABB(opus_int32 a32, opus_int32 b32, opus_int32 c32){ opus_int32 ret; ops_count += 1; ret = a32 + (opus_int32)((opus_int16)b32) * (opus_int32)((opus_int16)c32); @@ -127,7 +127,7 @@ static inline opus_int32 silk_SMLABB(opus_int32 a32, opus_int32 b32, opus_int32 } #undef silk_SMULBT -static inline opus_int32 silk_SMULBT(opus_int32 a32, opus_int32 b32 ){ +static OPUS_INLINE opus_int32 silk_SMULBT(opus_int32 a32, opus_int32 b32 ){ opus_int32 ret; ops_count += 4; ret = ((opus_int32)((opus_int16)a32)) * (b32 >> 16); @@ -135,7 +135,7 @@ static inline opus_int32 silk_SMULBT(opus_int32 a32, opus_int32 b32 ){ } #undef silk_SMLABT -static inline opus_int32 silk_SMLABT(opus_int32 a32, opus_int32 b32, opus_int32 c32){ +static OPUS_INLINE opus_int32 silk_SMLABT(opus_int32 a32, opus_int32 b32, opus_int32 c32){ opus_int32 ret; ops_count += 1; ret = a32 + ((opus_int32)((opus_int16)b32)) * (c32 >> 16); @@ -143,7 +143,7 @@ static inline opus_int32 silk_SMLABT(opus_int32 a32, opus_int32 b32, opus_int32 } #undef silk_SMULTT -static inline opus_int32 silk_SMULTT(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int32 silk_SMULTT(opus_int32 a32, opus_int32 b32){ opus_int32 ret; ops_count += 1; ret = (a32 >> 16) * (b32 >> 16); @@ -151,7 +151,7 @@ static inline opus_int32 silk_SMULTT(opus_int32 a32, opus_int32 b32){ } #undef silk_SMLATT -static inline opus_int32 silk_SMLATT(opus_int32 a32, opus_int32 b32, opus_int32 c32){ +static OPUS_INLINE opus_int32 silk_SMLATT(opus_int32 a32, opus_int32 b32, opus_int32 c32){ opus_int32 ret; ops_count += 1; ret = a32 + (b32 >> 16) * (c32 >> 16); @@ -179,7 +179,7 @@ static inline opus_int32 silk_SMLATT(opus_int32 a32, opus_int32 b32, opus_int32 #define silk_SMLAWT_ovflw silk_SMLAWT #undef silk_SMULL -static inline opus_int64 silk_SMULL(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int64 silk_SMULL(opus_int32 a32, opus_int32 b32){ opus_int64 ret; ops_count += 8; ret = ((opus_int64)(a32) * /*(opus_int64)*/(b32)); @@ -187,14 +187,14 @@ static inline opus_int64 silk_SMULL(opus_int32 a32, opus_int32 b32){ } #undef silk_SMLAL -static inline opus_int64 silk_SMLAL(opus_int64 a64, opus_int32 b32, opus_int32 c32){ +static OPUS_INLINE opus_int64 silk_SMLAL(opus_int64 a64, opus_int32 b32, opus_int32 c32){ opus_int64 ret; ops_count += 8; ret = a64 + ((opus_int64)(b32) * /*(opus_int64)*/(c32)); return ret; } #undef silk_SMLALBB -static inline opus_int64 silk_SMLALBB(opus_int64 a64, opus_int16 b16, opus_int16 c16){ +static OPUS_INLINE opus_int64 silk_SMLALBB(opus_int64 a64, opus_int16 b16, opus_int16 c16){ opus_int64 ret; ops_count += 4; ret = a64 + ((opus_int64)(b16) * /*(opus_int64)*/(c16)); @@ -202,7 +202,7 @@ static inline opus_int64 silk_SMLALBB(opus_int64 a64, opus_int16 b16, opus_int16 } #undef SigProcFIX_CLZ16 -static inline opus_int32 SigProcFIX_CLZ16(opus_int16 in16) +static OPUS_INLINE opus_int32 SigProcFIX_CLZ16(opus_int16 in16) { opus_int32 out32 = 0; ops_count += 10; @@ -240,7 +240,7 @@ static inline opus_int32 SigProcFIX_CLZ16(opus_int16 in16) } #undef SigProcFIX_CLZ32 -static inline opus_int32 SigProcFIX_CLZ32(opus_int32 in32) +static OPUS_INLINE opus_int32 SigProcFIX_CLZ32(opus_int32 in32) { /* test highest 16 bits and convert to opus_int16 */ ops_count += 2; @@ -252,19 +252,19 @@ static inline opus_int32 SigProcFIX_CLZ32(opus_int32 in32) } #undef silk_DIV32 -static inline opus_int32 silk_DIV32(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int32 silk_DIV32(opus_int32 a32, opus_int32 b32){ ops_count += 64; return a32 / b32; } #undef silk_DIV32_16 -static inline opus_int32 silk_DIV32_16(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int32 silk_DIV32_16(opus_int32 a32, opus_int32 b32){ ops_count += 32; return a32 / b32; } #undef silk_SAT8 -static inline opus_int8 silk_SAT8(opus_int64 a){ +static OPUS_INLINE opus_int8 silk_SAT8(opus_int64 a){ opus_int8 tmp; ops_count += 1; tmp = (opus_int8)((a) > silk_int8_MAX ? silk_int8_MAX : \ @@ -273,7 +273,7 @@ static inline opus_int8 silk_SAT8(opus_int64 a){ } #undef silk_SAT16 -static inline opus_int16 silk_SAT16(opus_int64 a){ +static OPUS_INLINE opus_int16 silk_SAT16(opus_int64 a){ opus_int16 tmp; ops_count += 1; tmp = (opus_int16)((a) > silk_int16_MAX ? silk_int16_MAX : \ @@ -281,7 +281,7 @@ static inline opus_int16 silk_SAT16(opus_int64 a){ return(tmp); } #undef silk_SAT32 -static inline opus_int32 silk_SAT32(opus_int64 a){ +static OPUS_INLINE opus_int32 silk_SAT32(opus_int64 a){ opus_int32 tmp; ops_count += 1; tmp = (opus_int32)((a) > silk_int32_MAX ? silk_int32_MAX : \ @@ -289,7 +289,7 @@ static inline opus_int32 silk_SAT32(opus_int64 a){ return(tmp); } #undef silk_POS_SAT32 -static inline opus_int32 silk_POS_SAT32(opus_int64 a){ +static OPUS_INLINE opus_int32 silk_POS_SAT32(opus_int64 a){ opus_int32 tmp; ops_count += 1; tmp = (opus_int32)((a) > silk_int32_MAX ? silk_int32_MAX : (a)); @@ -297,14 +297,14 @@ static inline opus_int32 silk_POS_SAT32(opus_int64 a){ } #undef silk_ADD_POS_SAT8 -static inline opus_int8 silk_ADD_POS_SAT8(opus_int64 a, opus_int64 b){ +static OPUS_INLINE opus_int8 silk_ADD_POS_SAT8(opus_int64 a, opus_int64 b){ opus_int8 tmp; ops_count += 1; tmp = (opus_int8)((((a)+(b)) & 0x80) ? silk_int8_MAX : ((a)+(b))); return(tmp); } #undef silk_ADD_POS_SAT16 -static inline opus_int16 silk_ADD_POS_SAT16(opus_int64 a, opus_int64 b){ +static OPUS_INLINE opus_int16 silk_ADD_POS_SAT16(opus_int64 a, opus_int64 b){ opus_int16 tmp; ops_count += 1; tmp = (opus_int16)((((a)+(b)) & 0x8000) ? silk_int16_MAX : ((a)+(b))); @@ -312,7 +312,7 @@ static inline opus_int16 silk_ADD_POS_SAT16(opus_int64 a, opus_int64 b){ } #undef silk_ADD_POS_SAT32 -static inline opus_int32 silk_ADD_POS_SAT32(opus_int64 a, opus_int64 b){ +static OPUS_INLINE opus_int32 silk_ADD_POS_SAT32(opus_int64 a, opus_int64 b){ opus_int32 tmp; ops_count += 1; tmp = (opus_int32)((((a)+(b)) & 0x80000000) ? silk_int32_MAX : ((a)+(b))); @@ -320,7 +320,7 @@ static inline opus_int32 silk_ADD_POS_SAT32(opus_int64 a, opus_int64 b){ } #undef silk_ADD_POS_SAT64 -static inline opus_int64 silk_ADD_POS_SAT64(opus_int64 a, opus_int64 b){ +static OPUS_INLINE opus_int64 silk_ADD_POS_SAT64(opus_int64 a, opus_int64 b){ opus_int64 tmp; ops_count += 1; tmp = ((((a)+(b)) & 0x8000000000000000LL) ? silk_int64_MAX : ((a)+(b))); @@ -328,40 +328,40 @@ static inline opus_int64 silk_ADD_POS_SAT64(opus_int64 a, opus_int64 b){ } #undef silk_LSHIFT8 -static inline opus_int8 silk_LSHIFT8(opus_int8 a, opus_int32 shift){ +static OPUS_INLINE opus_int8 silk_LSHIFT8(opus_int8 a, opus_int32 shift){ opus_int8 ret; ops_count += 1; ret = a << shift; return ret; } #undef silk_LSHIFT16 -static inline opus_int16 silk_LSHIFT16(opus_int16 a, opus_int32 shift){ +static OPUS_INLINE opus_int16 silk_LSHIFT16(opus_int16 a, opus_int32 shift){ opus_int16 ret; ops_count += 1; ret = a << shift; return ret; } #undef silk_LSHIFT32 -static inline opus_int32 silk_LSHIFT32(opus_int32 a, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_LSHIFT32(opus_int32 a, opus_int32 shift){ opus_int32 ret; ops_count += 1; ret = a << shift; return ret; } #undef silk_LSHIFT64 -static inline opus_int64 silk_LSHIFT64(opus_int64 a, opus_int shift){ +static OPUS_INLINE opus_int64 silk_LSHIFT64(opus_int64 a, opus_int shift){ ops_count += 1; return a << shift; } #undef silk_LSHIFT_ovflw -static inline opus_int32 silk_LSHIFT_ovflw(opus_int32 a, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_LSHIFT_ovflw(opus_int32 a, opus_int32 shift){ ops_count += 1; return a << shift; } #undef silk_LSHIFT_uint -static inline opus_uint32 silk_LSHIFT_uint(opus_uint32 a, opus_int32 shift){ +static OPUS_INLINE opus_uint32 silk_LSHIFT_uint(opus_uint32 a, opus_int32 shift){ opus_uint32 ret; ops_count += 1; ret = a << shift; @@ -369,83 +369,83 @@ static inline opus_uint32 silk_LSHIFT_uint(opus_uint32 a, opus_int32 shift){ } #undef silk_RSHIFT8 -static inline opus_int8 silk_RSHIFT8(opus_int8 a, opus_int32 shift){ +static OPUS_INLINE opus_int8 silk_RSHIFT8(opus_int8 a, opus_int32 shift){ ops_count += 1; return a >> shift; } #undef silk_RSHIFT16 -static inline opus_int16 silk_RSHIFT16(opus_int16 a, opus_int32 shift){ +static OPUS_INLINE opus_int16 silk_RSHIFT16(opus_int16 a, opus_int32 shift){ ops_count += 1; return a >> shift; } #undef silk_RSHIFT32 -static inline opus_int32 silk_RSHIFT32(opus_int32 a, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_RSHIFT32(opus_int32 a, opus_int32 shift){ ops_count += 1; return a >> shift; } #undef silk_RSHIFT64 -static inline opus_int64 silk_RSHIFT64(opus_int64 a, opus_int64 shift){ +static OPUS_INLINE opus_int64 silk_RSHIFT64(opus_int64 a, opus_int64 shift){ ops_count += 1; return a >> shift; } #undef silk_RSHIFT_uint -static inline opus_uint32 silk_RSHIFT_uint(opus_uint32 a, opus_int32 shift){ +static OPUS_INLINE opus_uint32 silk_RSHIFT_uint(opus_uint32 a, opus_int32 shift){ ops_count += 1; return a >> shift; } #undef silk_ADD_LSHIFT -static inline opus_int32 silk_ADD_LSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_ADD_LSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){ opus_int32 ret; ops_count += 1; ret = a + (b << shift); return ret; /* shift >= 0*/ } #undef silk_ADD_LSHIFT32 -static inline opus_int32 silk_ADD_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_ADD_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ opus_int32 ret; ops_count += 1; ret = a + (b << shift); return ret; /* shift >= 0*/ } #undef silk_ADD_LSHIFT_uint -static inline opus_uint32 silk_ADD_LSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){ +static OPUS_INLINE opus_uint32 silk_ADD_LSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){ opus_uint32 ret; ops_count += 1; ret = a + (b << shift); return ret; /* shift >= 0*/ } #undef silk_ADD_RSHIFT -static inline opus_int32 silk_ADD_RSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_ADD_RSHIFT(opus_int32 a, opus_int32 b, opus_int32 shift){ opus_int32 ret; ops_count += 1; ret = a + (b >> shift); return ret; /* shift > 0*/ } #undef silk_ADD_RSHIFT32 -static inline opus_int32 silk_ADD_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_ADD_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ opus_int32 ret; ops_count += 1; ret = a + (b >> shift); return ret; /* shift > 0*/ } #undef silk_ADD_RSHIFT_uint -static inline opus_uint32 silk_ADD_RSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){ +static OPUS_INLINE opus_uint32 silk_ADD_RSHIFT_uint(opus_uint32 a, opus_uint32 b, opus_int32 shift){ opus_uint32 ret; ops_count += 1; ret = a + (b >> shift); return ret; /* shift > 0*/ } #undef silk_SUB_LSHIFT32 -static inline opus_int32 silk_SUB_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_SUB_LSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ opus_int32 ret; ops_count += 1; ret = a - (b << shift); return ret; /* shift >= 0*/ } #undef silk_SUB_RSHIFT32 -static inline opus_int32 silk_SUB_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_SUB_RSHIFT32(opus_int32 a, opus_int32 b, opus_int32 shift){ opus_int32 ret; ops_count += 1; ret = a - (b >> shift); @@ -453,7 +453,7 @@ static inline opus_int32 silk_SUB_RSHIFT32(opus_int32 a, opus_int32 b, opus_int3 } #undef silk_RSHIFT_ROUND -static inline opus_int32 silk_RSHIFT_ROUND(opus_int32 a, opus_int32 shift){ +static OPUS_INLINE opus_int32 silk_RSHIFT_ROUND(opus_int32 a, opus_int32 shift){ opus_int32 ret; ops_count += 3; ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1; @@ -461,7 +461,7 @@ static inline opus_int32 silk_RSHIFT_ROUND(opus_int32 a, opus_int32 shift){ } #undef silk_RSHIFT_ROUND64 -static inline opus_int64 silk_RSHIFT_ROUND64(opus_int64 a, opus_int32 shift){ +static OPUS_INLINE opus_int64 silk_RSHIFT_ROUND64(opus_int64 a, opus_int32 shift){ opus_int64 ret; ops_count += 6; ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1; @@ -469,13 +469,13 @@ static inline opus_int64 silk_RSHIFT_ROUND64(opus_int64 a, opus_int32 shift){ } #undef silk_abs_int64 -static inline opus_int64 silk_abs_int64(opus_int64 a){ +static OPUS_INLINE opus_int64 silk_abs_int64(opus_int64 a){ ops_count += 1; return (((a) > 0) ? (a) : -(a)); /* Be careful, silk_abs returns wrong when input equals to silk_intXX_MIN*/ } #undef silk_abs_int32 -static inline opus_int32 silk_abs_int32(opus_int32 a){ +static OPUS_INLINE opus_int32 silk_abs_int32(opus_int32 a){ ops_count += 1; return silk_abs(a); } @@ -498,7 +498,7 @@ static silk_sign(a){ } #undef silk_ADD16 -static inline opus_int16 silk_ADD16(opus_int16 a, opus_int16 b){ +static OPUS_INLINE opus_int16 silk_ADD16(opus_int16 a, opus_int16 b){ opus_int16 ret; ops_count += 1; ret = a + b; @@ -506,7 +506,7 @@ static inline opus_int16 silk_ADD16(opus_int16 a, opus_int16 b){ } #undef silk_ADD32 -static inline opus_int32 silk_ADD32(opus_int32 a, opus_int32 b){ +static OPUS_INLINE opus_int32 silk_ADD32(opus_int32 a, opus_int32 b){ opus_int32 ret; ops_count += 1; ret = a + b; @@ -514,7 +514,7 @@ static inline opus_int32 silk_ADD32(opus_int32 a, opus_int32 b){ } #undef silk_ADD64 -static inline opus_int64 silk_ADD64(opus_int64 a, opus_int64 b){ +static OPUS_INLINE opus_int64 silk_ADD64(opus_int64 a, opus_int64 b){ opus_int64 ret; ops_count += 2; ret = a + b; @@ -522,7 +522,7 @@ static inline opus_int64 silk_ADD64(opus_int64 a, opus_int64 b){ } #undef silk_SUB16 -static inline opus_int16 silk_SUB16(opus_int16 a, opus_int16 b){ +static OPUS_INLINE opus_int16 silk_SUB16(opus_int16 a, opus_int16 b){ opus_int16 ret; ops_count += 1; ret = a - b; @@ -530,7 +530,7 @@ static inline opus_int16 silk_SUB16(opus_int16 a, opus_int16 b){ } #undef silk_SUB32 -static inline opus_int32 silk_SUB32(opus_int32 a, opus_int32 b){ +static OPUS_INLINE opus_int32 silk_SUB32(opus_int32 a, opus_int32 b){ opus_int32 ret; ops_count += 1; ret = a - b; @@ -538,7 +538,7 @@ static inline opus_int32 silk_SUB32(opus_int32 a, opus_int32 b){ } #undef silk_SUB64 -static inline opus_int64 silk_SUB64(opus_int64 a, opus_int64 b){ +static OPUS_INLINE opus_int64 silk_SUB64(opus_int64 a, opus_int64 b){ opus_int64 ret; ops_count += 2; ret = a - b; @@ -546,7 +546,7 @@ static inline opus_int64 silk_SUB64(opus_int64 a, opus_int64 b){ } #undef silk_ADD_SAT16 -static inline opus_int16 silk_ADD_SAT16( opus_int16 a16, opus_int16 b16 ) { +static OPUS_INLINE opus_int16 silk_ADD_SAT16( opus_int16 a16, opus_int16 b16 ) { opus_int16 res; /* Nb will be counted in AKP_add32 and silk_SAT16*/ res = (opus_int16)silk_SAT16( silk_ADD32( (opus_int32)(a16), (b16) ) ); @@ -554,7 +554,7 @@ static inline opus_int16 silk_ADD_SAT16( opus_int16 a16, opus_int16 b16 ) { } #undef silk_ADD_SAT32 -static inline opus_int32 silk_ADD_SAT32(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int32 silk_ADD_SAT32(opus_int32 a32, opus_int32 b32){ opus_int32 res; ops_count += 1; res = ((((a32) + (b32)) & 0x80000000) == 0 ? \ @@ -564,7 +564,7 @@ static inline opus_int32 silk_ADD_SAT32(opus_int32 a32, opus_int32 b32){ } #undef silk_ADD_SAT64 -static inline opus_int64 silk_ADD_SAT64( opus_int64 a64, opus_int64 b64 ) { +static OPUS_INLINE opus_int64 silk_ADD_SAT64( opus_int64 a64, opus_int64 b64 ) { opus_int64 res; ops_count += 1; res = ((((a64) + (b64)) & 0x8000000000000000LL) == 0 ? \ @@ -574,7 +574,7 @@ static inline opus_int64 silk_ADD_SAT64( opus_int64 a64, opus_int64 b64 ) { } #undef silk_SUB_SAT16 -static inline opus_int16 silk_SUB_SAT16( opus_int16 a16, opus_int16 b16 ) { +static OPUS_INLINE opus_int16 silk_SUB_SAT16( opus_int16 a16, opus_int16 b16 ) { opus_int16 res; silk_assert(0); /* Nb will be counted in sub-macros*/ @@ -583,7 +583,7 @@ static inline opus_int16 silk_SUB_SAT16( opus_int16 a16, opus_int16 b16 ) { } #undef silk_SUB_SAT32 -static inline opus_int32 silk_SUB_SAT32( opus_int32 a32, opus_int32 b32 ) { +static OPUS_INLINE opus_int32 silk_SUB_SAT32( opus_int32 a32, opus_int32 b32 ) { opus_int32 res; ops_count += 1; res = ((((a32)-(b32)) & 0x80000000) == 0 ? \ @@ -593,7 +593,7 @@ static inline opus_int32 silk_SUB_SAT32( opus_int32 a32, opus_int32 b32 ) { } #undef silk_SUB_SAT64 -static inline opus_int64 silk_SUB_SAT64( opus_int64 a64, opus_int64 b64 ) { +static OPUS_INLINE opus_int64 silk_SUB_SAT64( opus_int64 a64, opus_int64 b64 ) { opus_int64 res; ops_count += 1; res = ((((a64)-(b64)) & 0x8000000000000000LL) == 0 ? \ @@ -604,7 +604,7 @@ static inline opus_int64 silk_SUB_SAT64( opus_int64 a64, opus_int64 b64 ) { } #undef silk_SMULWW -static inline opus_int32 silk_SMULWW(opus_int32 a32, opus_int32 b32){ +static OPUS_INLINE opus_int32 silk_SMULWW(opus_int32 a32, opus_int32 b32){ opus_int32 ret; /* Nb will be counted in sub-macros*/ ret = silk_MLA(silk_SMULWB((a32), (b32)), (a32), silk_RSHIFT_ROUND((b32), 16)); @@ -612,7 +612,7 @@ static inline opus_int32 silk_SMULWW(opus_int32 a32, opus_int32 b32){ } #undef silk_SMLAWW -static inline opus_int32 silk_SMLAWW(opus_int32 a32, opus_int32 b32, opus_int32 c32){ +static OPUS_INLINE opus_int32 silk_SMLAWW(opus_int32 a32, opus_int32 b32, opus_int32 c32){ opus_int32 ret; /* Nb will be counted in sub-macros*/ ret = silk_MLA(silk_SMLAWB((a32), (b32), (c32)), (b32), silk_RSHIFT_ROUND((c32), 16)); @@ -620,26 +620,26 @@ static inline opus_int32 silk_SMLAWW(opus_int32 a32, opus_int32 b32, opus_int32 } #undef silk_min_int -static inline opus_int silk_min_int(opus_int a, opus_int b) +static OPUS_INLINE opus_int silk_min_int(opus_int a, opus_int b) { ops_count += 1; return (((a) < (b)) ? (a) : (b)); } #undef silk_min_16 -static inline opus_int16 silk_min_16(opus_int16 a, opus_int16 b) +static OPUS_INLINE opus_int16 silk_min_16(opus_int16 a, opus_int16 b) { ops_count += 1; return (((a) < (b)) ? (a) : (b)); } #undef silk_min_32 -static inline opus_int32 silk_min_32(opus_int32 a, opus_int32 b) +static OPUS_INLINE opus_int32 silk_min_32(opus_int32 a, opus_int32 b) { ops_count += 1; return (((a) < (b)) ? (a) : (b)); } #undef silk_min_64 -static inline opus_int64 silk_min_64(opus_int64 a, opus_int64 b) +static OPUS_INLINE opus_int64 silk_min_64(opus_int64 a, opus_int64 b) { ops_count += 1; return (((a) < (b)) ? (a) : (b)); @@ -647,26 +647,26 @@ static inline opus_int64 silk_min_64(opus_int64 a, opus_int64 b) /* silk_min() versions with typecast in the function call */ #undef silk_max_int -static inline opus_int silk_max_int(opus_int a, opus_int b) +static OPUS_INLINE opus_int silk_max_int(opus_int a, opus_int b) { ops_count += 1; return (((a) > (b)) ? (a) : (b)); } #undef silk_max_16 -static inline opus_int16 silk_max_16(opus_int16 a, opus_int16 b) +static OPUS_INLINE opus_int16 silk_max_16(opus_int16 a, opus_int16 b) { ops_count += 1; return (((a) > (b)) ? (a) : (b)); } #undef silk_max_32 -static inline opus_int32 silk_max_32(opus_int32 a, opus_int32 b) +static OPUS_INLINE opus_int32 silk_max_32(opus_int32 a, opus_int32 b) { ops_count += 1; return (((a) > (b)) ? (a) : (b)); } #undef silk_max_64 -static inline opus_int64 silk_max_64(opus_int64 a, opus_int64 b) +static OPUS_INLINE opus_int64 silk_max_64(opus_int64 a, opus_int64 b) { ops_count += 1; return (((a) > (b)) ? (a) : (b)); @@ -674,7 +674,7 @@ static inline opus_int64 silk_max_64(opus_int64 a, opus_int64 b) #undef silk_LIMIT_int -static inline opus_int silk_LIMIT_int(opus_int a, opus_int limit1, opus_int limit2) +static OPUS_INLINE opus_int silk_LIMIT_int(opus_int a, opus_int limit1, opus_int limit2) { opus_int ret; ops_count += 6; @@ -686,7 +686,7 @@ static inline opus_int silk_LIMIT_int(opus_int a, opus_int limit1, opus_int limi } #undef silk_LIMIT_16 -static inline opus_int16 silk_LIMIT_16(opus_int16 a, opus_int16 limit1, opus_int16 limit2) +static OPUS_INLINE opus_int16 silk_LIMIT_16(opus_int16 a, opus_int16 limit1, opus_int16 limit2) { opus_int16 ret; ops_count += 6; @@ -699,7 +699,7 @@ return(ret); #undef silk_LIMIT_32 -static inline opus_int silk_LIMIT_32(opus_int32 a, opus_int32 limit1, opus_int32 limit2) +static OPUS_INLINE opus_int silk_LIMIT_32(opus_int32 a, opus_int32 limit1, opus_int32 limit2) { opus_int32 ret; ops_count += 6; diff --git a/code/opus-1.0.2/silk/MacroDebug.h b/code/opus-1.1/silk/MacroDebug.h similarity index 84% rename from code/opus-1.0.2/silk/MacroDebug.h rename to code/opus-1.1/silk/MacroDebug.h index ecd90bc4..35aedc5c 100644 --- a/code/opus-1.0.2/silk/MacroDebug.h +++ b/code/opus-1.1/silk/MacroDebug.h @@ -9,11 +9,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE. #undef silk_ADD16 #define silk_ADD16(a,b) silk_ADD16_((a), (b), __FILE__, __LINE__) -static inline opus_int16 silk_ADD16_(opus_int16 a, opus_int16 b, char *file, int line){ +static OPUS_INLINE opus_int16 silk_ADD16_(opus_int16 a, opus_int16 b, char *file, int line){ opus_int16 ret; ret = a + b; @@ -52,7 +52,7 @@ static inline opus_int16 silk_ADD16_(opus_int16 a, opus_int16 b, char *file, int #undef silk_ADD32 #define silk_ADD32(a,b) silk_ADD32_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_ADD32_(opus_int32 a, opus_int32 b, char *file, int line){ +static OPUS_INLINE opus_int32 silk_ADD32_(opus_int32 a, opus_int32 b, char *file, int line){ opus_int32 ret; ret = a + b; @@ -68,7 +68,7 @@ static inline opus_int32 silk_ADD32_(opus_int32 a, opus_int32 b, char *file, int #undef silk_ADD64 #define silk_ADD64(a,b) silk_ADD64_((a), (b), __FILE__, __LINE__) -static inline opus_int64 silk_ADD64_(opus_int64 a, opus_int64 b, char *file, int line){ +static OPUS_INLINE opus_int64 silk_ADD64_(opus_int64 a, opus_int64 b, char *file, int line){ opus_int64 ret; ret = a + b; @@ -84,7 +84,7 @@ static inline opus_int64 silk_ADD64_(opus_int64 a, opus_int64 b, char *file, int #undef silk_SUB16 #define silk_SUB16(a,b) silk_SUB16_((a), (b), __FILE__, __LINE__) -static inline opus_int16 silk_SUB16_(opus_int16 a, opus_int16 b, char *file, int line){ +static OPUS_INLINE opus_int16 silk_SUB16_(opus_int16 a, opus_int16 b, char *file, int line){ opus_int16 ret; ret = a - b; @@ -100,7 +100,7 @@ static inline opus_int16 silk_SUB16_(opus_int16 a, opus_int16 b, char *file, int #undef silk_SUB32 #define silk_SUB32(a,b) silk_SUB32_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_SUB32_(opus_int32 a, opus_int32 b, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SUB32_(opus_int32 a, opus_int32 b, char *file, int line){ opus_int32 ret; ret = a - b; @@ -116,7 +116,7 @@ static inline opus_int32 silk_SUB32_(opus_int32 a, opus_int32 b, char *file, int #undef silk_SUB64 #define silk_SUB64(a,b) silk_SUB64_((a), (b), __FILE__, __LINE__) -static inline opus_int64 silk_SUB64_(opus_int64 a, opus_int64 b, char *file, int line){ +static OPUS_INLINE opus_int64 silk_SUB64_(opus_int64 a, opus_int64 b, char *file, int line){ opus_int64 ret; ret = a - b; @@ -132,7 +132,7 @@ static inline opus_int64 silk_SUB64_(opus_int64 a, opus_int64 b, char *file, int #undef silk_ADD_SAT16 #define silk_ADD_SAT16(a,b) silk_ADD_SAT16_((a), (b), __FILE__, __LINE__) -static inline opus_int16 silk_ADD_SAT16_( opus_int16 a16, opus_int16 b16, char *file, int line) { +static OPUS_INLINE opus_int16 silk_ADD_SAT16_( opus_int16 a16, opus_int16 b16, char *file, int line) { opus_int16 res; res = (opus_int16)silk_SAT16( silk_ADD32( (opus_int32)(a16), (b16) ) ); if ( res != silk_SAT16( (opus_int32)a16 + (opus_int32)b16 ) ) @@ -147,7 +147,7 @@ static inline opus_int16 silk_ADD_SAT16_( opus_int16 a16, opus_int16 b16, char * #undef silk_ADD_SAT32 #define silk_ADD_SAT32(a,b) silk_ADD_SAT32_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_ADD_SAT32_(opus_int32 a32, opus_int32 b32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_ADD_SAT32_(opus_int32 a32, opus_int32 b32, char *file, int line){ opus_int32 res; res = ((((opus_uint32)(a32) + (opus_uint32)(b32)) & 0x80000000) == 0 ? \ ((((a32) & (b32)) & 0x80000000) != 0 ? silk_int32_MIN : (a32)+(b32)) : \ @@ -164,7 +164,7 @@ static inline opus_int32 silk_ADD_SAT32_(opus_int32 a32, opus_int32 b32, char *f #undef silk_ADD_SAT64 #define silk_ADD_SAT64(a,b) silk_ADD_SAT64_((a), (b), __FILE__, __LINE__) -static inline opus_int64 silk_ADD_SAT64_( opus_int64 a64, opus_int64 b64, char *file, int line) { +static OPUS_INLINE opus_int64 silk_ADD_SAT64_( opus_int64 a64, opus_int64 b64, char *file, int line) { opus_int64 res; int fail = 0; res = ((((a64) + (b64)) & 0x8000000000000000LL) == 0 ? \ @@ -193,7 +193,7 @@ static inline opus_int64 silk_ADD_SAT64_( opus_int64 a64, opus_int64 b64, char * #undef silk_SUB_SAT16 #define silk_SUB_SAT16(a,b) silk_SUB_SAT16_((a), (b), __FILE__, __LINE__) -static inline opus_int16 silk_SUB_SAT16_( opus_int16 a16, opus_int16 b16, char *file, int line ) { +static OPUS_INLINE opus_int16 silk_SUB_SAT16_( opus_int16 a16, opus_int16 b16, char *file, int line ) { opus_int16 res; res = (opus_int16)silk_SAT16( silk_SUB32( (opus_int32)(a16), (b16) ) ); if ( res != silk_SAT16( (opus_int32)a16 - (opus_int32)b16 ) ) @@ -208,7 +208,7 @@ static inline opus_int16 silk_SUB_SAT16_( opus_int16 a16, opus_int16 b16, char * #undef silk_SUB_SAT32 #define silk_SUB_SAT32(a,b) silk_SUB_SAT32_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_SUB_SAT32_( opus_int32 a32, opus_int32 b32, char *file, int line ) { +static OPUS_INLINE opus_int32 silk_SUB_SAT32_( opus_int32 a32, opus_int32 b32, char *file, int line ) { opus_int32 res; res = ((((opus_uint32)(a32)-(opus_uint32)(b32)) & 0x80000000) == 0 ? \ (( (a32) & ((b32)^0x80000000) & 0x80000000) ? silk_int32_MIN : (a32)-(b32)) : \ @@ -225,7 +225,7 @@ static inline opus_int32 silk_SUB_SAT32_( opus_int32 a32, opus_int32 b32, char * #undef silk_SUB_SAT64 #define silk_SUB_SAT64(a,b) silk_SUB_SAT64_((a), (b), __FILE__, __LINE__) -static inline opus_int64 silk_SUB_SAT64_( opus_int64 a64, opus_int64 b64, char *file, int line ) { +static OPUS_INLINE opus_int64 silk_SUB_SAT64_( opus_int64 a64, opus_int64 b64, char *file, int line ) { opus_int64 res; int fail = 0; res = ((((a64)-(b64)) & 0x8000000000000000LL) == 0 ? \ @@ -254,7 +254,7 @@ static inline opus_int64 silk_SUB_SAT64_( opus_int64 a64, opus_int64 b64, char * #undef silk_MUL #define silk_MUL(a,b) silk_MUL_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_MUL_(opus_int32 a32, opus_int32 b32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_MUL_(opus_int32 a32, opus_int32 b32, char *file, int line){ opus_int32 ret; opus_int64 ret64; ret = a32 * b32; @@ -271,7 +271,7 @@ static inline opus_int32 silk_MUL_(opus_int32 a32, opus_int32 b32, char *file, i #undef silk_MUL_uint #define silk_MUL_uint(a,b) silk_MUL_uint_((a), (b), __FILE__, __LINE__) -static inline opus_uint32 silk_MUL_uint_(opus_uint32 a32, opus_uint32 b32, char *file, int line){ +static OPUS_INLINE opus_uint32 silk_MUL_uint_(opus_uint32 a32, opus_uint32 b32, char *file, int line){ opus_uint32 ret; ret = a32 * b32; if ( (opus_uint64)ret != (opus_uint64)a32 * (opus_uint64)b32 ) @@ -286,7 +286,7 @@ static inline opus_uint32 silk_MUL_uint_(opus_uint32 a32, opus_uint32 b32, char #undef silk_MLA #define silk_MLA(a,b,c) silk_MLA_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_MLA_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_MLA_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ opus_int32 ret; ret = a32 + b32 * c32; if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (opus_int64)c32 ) @@ -301,7 +301,7 @@ static inline opus_int32 silk_MLA_(opus_int32 a32, opus_int32 b32, opus_int32 c3 #undef silk_MLA_uint #define silk_MLA_uint(a,b,c) silk_MLA_uint_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_MLA_uint_(opus_uint32 a32, opus_uint32 b32, opus_uint32 c32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_MLA_uint_(opus_uint32 a32, opus_uint32 b32, opus_uint32 c32, char *file, int line){ opus_uint32 ret; ret = a32 + b32 * c32; if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (opus_int64)c32 ) @@ -316,7 +316,7 @@ static inline opus_int32 silk_MLA_uint_(opus_uint32 a32, opus_uint32 b32, opus_u #undef silk_SMULWB #define silk_SMULWB(a,b) silk_SMULWB_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_SMULWB_(opus_int32 a32, opus_int32 b32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMULWB_(opus_int32 a32, opus_int32 b32, char *file, int line){ opus_int32 ret; ret = (a32 >> 16) * (opus_int32)((opus_int16)b32) + (((a32 & 0x0000FFFF) * (opus_int32)((opus_int16)b32)) >> 16); if ( (opus_int64)ret != ((opus_int64)a32 * (opus_int16)b32) >> 16 ) @@ -331,7 +331,7 @@ static inline opus_int32 silk_SMULWB_(opus_int32 a32, opus_int32 b32, char *file #undef silk_SMLAWB #define silk_SMLAWB(a,b,c) silk_SMLAWB_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_SMLAWB_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMLAWB_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ opus_int32 ret; ret = silk_ADD32( a32, silk_SMULWB( b32, c32 ) ); if ( silk_ADD32( a32, silk_SMULWB( b32, c32 ) ) != silk_ADD_SAT32( a32, silk_SMULWB( b32, c32 ) ) ) @@ -346,7 +346,7 @@ static inline opus_int32 silk_SMLAWB_(opus_int32 a32, opus_int32 b32, opus_int32 #undef silk_SMULWT #define silk_SMULWT(a,b) silk_SMULWT_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_SMULWT_(opus_int32 a32, opus_int32 b32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMULWT_(opus_int32 a32, opus_int32 b32, char *file, int line){ opus_int32 ret; ret = (a32 >> 16) * (b32 >> 16) + (((a32 & 0x0000FFFF) * (b32 >> 16)) >> 16); if ( (opus_int64)ret != ((opus_int64)a32 * (b32 >> 16)) >> 16 ) @@ -361,7 +361,7 @@ static inline opus_int32 silk_SMULWT_(opus_int32 a32, opus_int32 b32, char *file #undef silk_SMLAWT #define silk_SMLAWT(a,b,c) silk_SMLAWT_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_SMLAWT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMLAWT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ opus_int32 ret; ret = a32 + ((b32 >> 16) * (c32 >> 16)) + (((b32 & 0x0000FFFF) * ((c32 >> 16)) >> 16)); if ( (opus_int64)ret != (opus_int64)a32 + (((opus_int64)b32 * (c32 >> 16)) >> 16) ) @@ -376,7 +376,7 @@ static inline opus_int32 silk_SMLAWT_(opus_int32 a32, opus_int32 b32, opus_int32 #undef silk_SMULL #define silk_SMULL(a,b) silk_SMULL_((a), (b), __FILE__, __LINE__) -static inline opus_int64 silk_SMULL_(opus_int64 a64, opus_int64 b64, char *file, int line){ +static OPUS_INLINE opus_int64 silk_SMULL_(opus_int64 a64, opus_int64 b64, char *file, int line){ opus_int64 ret64; int fail = 0; ret64 = a64 * b64; @@ -398,7 +398,7 @@ static inline opus_int64 silk_SMULL_(opus_int64 a64, opus_int64 b64, char *file, /* no checking needed for silk_SMULBB */ #undef silk_SMLABB #define silk_SMLABB(a,b,c) silk_SMLABB_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_SMLABB_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMLABB_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ opus_int32 ret; ret = a32 + (opus_int32)((opus_int16)b32) * (opus_int32)((opus_int16)c32); if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (opus_int16)c32 ) @@ -414,7 +414,7 @@ static inline opus_int32 silk_SMLABB_(opus_int32 a32, opus_int32 b32, opus_int32 /* no checking needed for silk_SMULBT */ #undef silk_SMLABT #define silk_SMLABT(a,b,c) silk_SMLABT_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_SMLABT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMLABT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ opus_int32 ret; ret = a32 + ((opus_int32)((opus_int16)b32)) * (c32 >> 16); if ( (opus_int64)ret != (opus_int64)a32 + (opus_int64)b32 * (c32 >> 16) ) @@ -430,7 +430,7 @@ static inline opus_int32 silk_SMLABT_(opus_int32 a32, opus_int32 b32, opus_int32 /* no checking needed for silk_SMULTT */ #undef silk_SMLATT #define silk_SMLATT(a,b,c) silk_SMLATT_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_SMLATT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMLATT_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ opus_int32 ret; ret = a32 + (b32 >> 16) * (c32 >> 16); if ( (opus_int64)ret != (opus_int64)a32 + (b32 >> 16) * (c32 >> 16) ) @@ -445,7 +445,7 @@ static inline opus_int32 silk_SMLATT_(opus_int32 a32, opus_int32 b32, opus_int32 #undef silk_SMULWW #define silk_SMULWW(a,b) silk_SMULWW_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_SMULWW_(opus_int32 a32, opus_int32 b32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMULWW_(opus_int32 a32, opus_int32 b32, char *file, int line){ opus_int32 ret, tmp1, tmp2; opus_int64 ret64; int fail = 0; @@ -476,7 +476,7 @@ static inline opus_int32 silk_SMULWW_(opus_int32 a32, opus_int32 b32, char *file #undef silk_SMLAWW #define silk_SMLAWW(a,b,c) silk_SMLAWW_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_SMLAWW_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SMLAWW_(opus_int32 a32, opus_int32 b32, opus_int32 c32, char *file, int line){ opus_int32 ret, tmp; tmp = silk_SMULWW( b32, c32 ); @@ -505,7 +505,7 @@ static inline opus_int32 silk_SMLAWW_(opus_int32 a32, opus_int32 b32, opus_int32 #undef silk_DIV32 #define silk_DIV32(a,b) silk_DIV32_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_DIV32_(opus_int32 a32, opus_int32 b32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_DIV32_(opus_int32 a32, opus_int32 b32, char *file, int line){ if ( b32 == 0 ) { fprintf (stderr, "silk_DIV32(%d, %d) in %s: line %d\n", a32, b32, file, line); @@ -518,7 +518,7 @@ static inline opus_int32 silk_DIV32_(opus_int32 a32, opus_int32 b32, char *file, #undef silk_DIV32_16 #define silk_DIV32_16(a,b) silk_DIV32_16_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_DIV32_16_(opus_int32 a32, opus_int32 b32, char *file, int line){ +static OPUS_INLINE opus_int32 silk_DIV32_16_(opus_int32 a32, opus_int32 b32, char *file, int line){ int fail = 0; fail |= b32 == 0; fail |= b32 > silk_int16_MAX; @@ -544,7 +544,7 @@ static inline opus_int32 silk_DIV32_16_(opus_int32 a32, opus_int32 b32, char *fi #undef silk_LSHIFT8 #define silk_LSHIFT8(a,b) silk_LSHIFT8_((a), (b), __FILE__, __LINE__) -static inline opus_int8 silk_LSHIFT8_(opus_int8 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int8 silk_LSHIFT8_(opus_int8 a, opus_int32 shift, char *file, int line){ opus_int8 ret; int fail = 0; ret = a << shift; @@ -563,7 +563,7 @@ static inline opus_int8 silk_LSHIFT8_(opus_int8 a, opus_int32 shift, char *file, #undef silk_LSHIFT16 #define silk_LSHIFT16(a,b) silk_LSHIFT16_((a), (b), __FILE__, __LINE__) -static inline opus_int16 silk_LSHIFT16_(opus_int16 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int16 silk_LSHIFT16_(opus_int16 a, opus_int32 shift, char *file, int line){ opus_int16 ret; int fail = 0; ret = a << shift; @@ -582,7 +582,7 @@ static inline opus_int16 silk_LSHIFT16_(opus_int16 a, opus_int32 shift, char *fi #undef silk_LSHIFT32 #define silk_LSHIFT32(a,b) silk_LSHIFT32_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_LSHIFT32_(opus_int32 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int32 silk_LSHIFT32_(opus_int32 a, opus_int32 shift, char *file, int line){ opus_int32 ret; int fail = 0; ret = a << shift; @@ -601,7 +601,7 @@ static inline opus_int32 silk_LSHIFT32_(opus_int32 a, opus_int32 shift, char *fi #undef silk_LSHIFT64 #define silk_LSHIFT64(a,b) silk_LSHIFT64_((a), (b), __FILE__, __LINE__) -static inline opus_int64 silk_LSHIFT64_(opus_int64 a, opus_int shift, char *file, int line){ +static OPUS_INLINE opus_int64 silk_LSHIFT64_(opus_int64 a, opus_int shift, char *file, int line){ opus_int64 ret; int fail = 0; ret = a << shift; @@ -620,7 +620,7 @@ static inline opus_int64 silk_LSHIFT64_(opus_int64 a, opus_int shift, char *file #undef silk_LSHIFT_ovflw #define silk_LSHIFT_ovflw(a,b) silk_LSHIFT_ovflw_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_LSHIFT_ovflw_(opus_int32 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int32 silk_LSHIFT_ovflw_(opus_int32 a, opus_int32 shift, char *file, int line){ if ( (shift < 0) || (shift >= 32) ) /* no check for overflow */ { fprintf (stderr, "silk_LSHIFT_ovflw(%d, %d) in %s: line %d\n", a, shift, file, line); @@ -633,7 +633,7 @@ static inline opus_int32 silk_LSHIFT_ovflw_(opus_int32 a, opus_int32 shift, char #undef silk_LSHIFT_uint #define silk_LSHIFT_uint(a,b) silk_LSHIFT_uint_((a), (b), __FILE__, __LINE__) -static inline opus_uint32 silk_LSHIFT_uint_(opus_uint32 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_uint32 silk_LSHIFT_uint_(opus_uint32 a, opus_int32 shift, char *file, int line){ opus_uint32 ret; ret = a << shift; if ( (shift < 0) || ((opus_int64)ret != ((opus_int64)a) << shift)) @@ -648,7 +648,7 @@ static inline opus_uint32 silk_LSHIFT_uint_(opus_uint32 a, opus_int32 shift, cha #undef silk_RSHIFT8 #define silk_RSHITF8(a,b) silk_RSHIFT8_((a), (b), __FILE__, __LINE__) -static inline opus_int8 silk_RSHIFT8_(opus_int8 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int8 silk_RSHIFT8_(opus_int8 a, opus_int32 shift, char *file, int line){ if ( (shift < 0) || (shift>=8) ) { fprintf (stderr, "silk_RSHITF8(%d, %d) in %s: line %d\n", a, shift, file, line); @@ -661,7 +661,7 @@ static inline opus_int8 silk_RSHIFT8_(opus_int8 a, opus_int32 shift, char *file, #undef silk_RSHIFT16 #define silk_RSHITF16(a,b) silk_RSHIFT16_((a), (b), __FILE__, __LINE__) -static inline opus_int16 silk_RSHIFT16_(opus_int16 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int16 silk_RSHIFT16_(opus_int16 a, opus_int32 shift, char *file, int line){ if ( (shift < 0) || (shift>=16) ) { fprintf (stderr, "silk_RSHITF16(%d, %d) in %s: line %d\n", a, shift, file, line); @@ -674,7 +674,7 @@ static inline opus_int16 silk_RSHIFT16_(opus_int16 a, opus_int32 shift, char *fi #undef silk_RSHIFT32 #define silk_RSHIFT32(a,b) silk_RSHIFT32_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_RSHIFT32_(opus_int32 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int32 silk_RSHIFT32_(opus_int32 a, opus_int32 shift, char *file, int line){ if ( (shift < 0) || (shift>=32) ) { fprintf (stderr, "silk_RSHITF32(%d, %d) in %s: line %d\n", a, shift, file, line); @@ -687,7 +687,7 @@ static inline opus_int32 silk_RSHIFT32_(opus_int32 a, opus_int32 shift, char *fi #undef silk_RSHIFT64 #define silk_RSHIFT64(a,b) silk_RSHIFT64_((a), (b), __FILE__, __LINE__) -static inline opus_int64 silk_RSHIFT64_(opus_int64 a, opus_int64 shift, char *file, int line){ +static OPUS_INLINE opus_int64 silk_RSHIFT64_(opus_int64 a, opus_int64 shift, char *file, int line){ if ( (shift < 0) || (shift>=64) ) { fprintf (stderr, "silk_RSHITF64(%lld, %lld) in %s: line %d\n", (long long)a, (long long)shift, file, line); @@ -700,7 +700,7 @@ static inline opus_int64 silk_RSHIFT64_(opus_int64 a, opus_int64 shift, char *fi #undef silk_RSHIFT_uint #define silk_RSHIFT_uint(a,b) silk_RSHIFT_uint_((a), (b), __FILE__, __LINE__) -static inline opus_uint32 silk_RSHIFT_uint_(opus_uint32 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_uint32 silk_RSHIFT_uint_(opus_uint32 a, opus_int32 shift, char *file, int line){ if ( (shift < 0) || (shift>32) ) { fprintf (stderr, "silk_RSHIFT_uint(%u, %d) in %s: line %d\n", a, shift, file, line); @@ -713,7 +713,7 @@ static inline opus_uint32 silk_RSHIFT_uint_(opus_uint32 a, opus_int32 shift, cha #undef silk_ADD_LSHIFT #define silk_ADD_LSHIFT(a,b,c) silk_ADD_LSHIFT_((a), (b), (c), __FILE__, __LINE__) -static inline int silk_ADD_LSHIFT_(int a, int b, int shift, char *file, int line){ +static OPUS_INLINE int silk_ADD_LSHIFT_(int a, int b, int shift, char *file, int line){ opus_int16 ret; ret = a + (b << shift); if ( (shift < 0) || (shift>15) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) ) @@ -728,7 +728,7 @@ static inline int silk_ADD_LSHIFT_(int a, int b, int shift, char *file, int line #undef silk_ADD_LSHIFT32 #define silk_ADD_LSHIFT32(a,b,c) silk_ADD_LSHIFT32_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_ADD_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int32 silk_ADD_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ opus_int32 ret; ret = a + (b << shift); if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) ) @@ -743,7 +743,7 @@ static inline opus_int32 silk_ADD_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int #undef silk_ADD_LSHIFT_uint #define silk_ADD_LSHIFT_uint(a,b,c) silk_ADD_LSHIFT_uint_((a), (b), (c), __FILE__, __LINE__) -static inline opus_uint32 silk_ADD_LSHIFT_uint_(opus_uint32 a, opus_uint32 b, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_uint32 silk_ADD_LSHIFT_uint_(opus_uint32 a, opus_uint32 b, opus_int32 shift, char *file, int line){ opus_uint32 ret; ret = a + (b << shift); if ( (shift < 0) || (shift>32) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) ) @@ -758,7 +758,7 @@ static inline opus_uint32 silk_ADD_LSHIFT_uint_(opus_uint32 a, opus_uint32 b, op #undef silk_ADD_RSHIFT #define silk_ADD_RSHIFT(a,b,c) silk_ADD_RSHIFT_((a), (b), (c), __FILE__, __LINE__) -static inline int silk_ADD_RSHIFT_(int a, int b, int shift, char *file, int line){ +static OPUS_INLINE int silk_ADD_RSHIFT_(int a, int b, int shift, char *file, int line){ opus_int16 ret; ret = a + (b >> shift); if ( (shift < 0) || (shift>15) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) ) @@ -773,7 +773,7 @@ static inline int silk_ADD_RSHIFT_(int a, int b, int shift, char *file, int line #undef silk_ADD_RSHIFT32 #define silk_ADD_RSHIFT32(a,b,c) silk_ADD_RSHIFT32_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_ADD_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int32 silk_ADD_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ opus_int32 ret; ret = a + (b >> shift); if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) ) @@ -788,7 +788,7 @@ static inline opus_int32 silk_ADD_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int #undef silk_ADD_RSHIFT_uint #define silk_ADD_RSHIFT_uint(a,b,c) silk_ADD_RSHIFT_uint_((a), (b), (c), __FILE__, __LINE__) -static inline opus_uint32 silk_ADD_RSHIFT_uint_(opus_uint32 a, opus_uint32 b, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_uint32 silk_ADD_RSHIFT_uint_(opus_uint32 a, opus_uint32 b, opus_int32 shift, char *file, int line){ opus_uint32 ret; ret = a + (b >> shift); if ( (shift < 0) || (shift>32) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) ) @@ -803,7 +803,7 @@ static inline opus_uint32 silk_ADD_RSHIFT_uint_(opus_uint32 a, opus_uint32 b, op #undef silk_SUB_LSHIFT32 #define silk_SUB_LSHIFT32(a,b,c) silk_SUB_LSHIFT32_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_SUB_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SUB_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ opus_int32 ret; ret = a - (b << shift); if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a - (((opus_int64)b) << shift)) ) @@ -818,7 +818,7 @@ static inline opus_int32 silk_SUB_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int #undef silk_SUB_RSHIFT32 #define silk_SUB_RSHIFT32(a,b,c) silk_SUB_RSHIFT32_((a), (b), (c), __FILE__, __LINE__) -static inline opus_int32 silk_SUB_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int32 silk_SUB_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char *file, int line){ opus_int32 ret; ret = a - (b >> shift); if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a - (((opus_int64)b) >> shift)) ) @@ -833,7 +833,7 @@ static inline opus_int32 silk_SUB_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int #undef silk_RSHIFT_ROUND #define silk_RSHIFT_ROUND(a,b) silk_RSHIFT_ROUND_((a), (b), __FILE__, __LINE__) -static inline opus_int32 silk_RSHIFT_ROUND_(opus_int32 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int32 silk_RSHIFT_ROUND_(opus_int32 a, opus_int32 shift, char *file, int line){ opus_int32 ret; ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1; /* the marco definition can't handle a shift of zero */ @@ -849,7 +849,7 @@ static inline opus_int32 silk_RSHIFT_ROUND_(opus_int32 a, opus_int32 shift, char #undef silk_RSHIFT_ROUND64 #define silk_RSHIFT_ROUND64(a,b) silk_RSHIFT_ROUND64_((a), (b), __FILE__, __LINE__) -static inline opus_int64 silk_RSHIFT_ROUND64_(opus_int64 a, opus_int32 shift, char *file, int line){ +static OPUS_INLINE opus_int64 silk_RSHIFT_ROUND64_(opus_int64 a, opus_int32 shift, char *file, int line){ opus_int64 ret; /* the marco definition can't handle a shift of zero */ if ( (shift <= 0) || (shift>=64) ) @@ -865,14 +865,14 @@ static inline opus_int64 silk_RSHIFT_ROUND64_(opus_int64 a, opus_int32 shift, ch /* silk_abs is used on floats also, so doesn't work... */ /*#undef silk_abs -static inline opus_int32 silk_abs(opus_int32 a){ +static OPUS_INLINE opus_int32 silk_abs(opus_int32 a){ silk_assert(a != 0x80000000); return (((a) > 0) ? (a) : -(a)); // Be careful, silk_abs returns wrong when input equals to silk_intXX_MIN }*/ #undef silk_abs_int64 #define silk_abs_int64(a) silk_abs_int64_((a), __FILE__, __LINE__) -static inline opus_int64 silk_abs_int64_(opus_int64 a, char *file, int line){ +static OPUS_INLINE opus_int64 silk_abs_int64_(opus_int64 a, char *file, int line){ if ( a == silk_int64_MIN ) { fprintf (stderr, "silk_abs_int64(%lld) in %s: line %d\n", (long long)a, file, line); @@ -885,7 +885,7 @@ static inline opus_int64 silk_abs_int64_(opus_int64 a, char *file, int line){ #undef silk_abs_int32 #define silk_abs_int32(a) silk_abs_int32_((a), __FILE__, __LINE__) -static inline opus_int32 silk_abs_int32_(opus_int32 a, char *file, int line){ +static OPUS_INLINE opus_int32 silk_abs_int32_(opus_int32 a, char *file, int line){ if ( a == silk_int32_MIN ) { fprintf (stderr, "silk_abs_int32(%d) in %s: line %d\n", a, file, line); @@ -898,7 +898,7 @@ static inline opus_int32 silk_abs_int32_(opus_int32 a, char *file, int line){ #undef silk_CHECK_FIT8 #define silk_CHECK_FIT8(a) silk_CHECK_FIT8_((a), __FILE__, __LINE__) -static inline opus_int8 silk_CHECK_FIT8_( opus_int64 a, char *file, int line ){ +static OPUS_INLINE opus_int8 silk_CHECK_FIT8_( opus_int64 a, char *file, int line ){ opus_int8 ret; ret = (opus_int8)a; if ( (opus_int64)ret != a ) @@ -913,7 +913,7 @@ static inline opus_int8 silk_CHECK_FIT8_( opus_int64 a, char *file, int line ){ #undef silk_CHECK_FIT16 #define silk_CHECK_FIT16(a) silk_CHECK_FIT16_((a), __FILE__, __LINE__) -static inline opus_int16 silk_CHECK_FIT16_( opus_int64 a, char *file, int line ){ +static OPUS_INLINE opus_int16 silk_CHECK_FIT16_( opus_int64 a, char *file, int line ){ opus_int16 ret; ret = (opus_int16)a; if ( (opus_int64)ret != a ) @@ -928,7 +928,7 @@ static inline opus_int16 silk_CHECK_FIT16_( opus_int64 a, char *file, int line ) #undef silk_CHECK_FIT32 #define silk_CHECK_FIT32(a) silk_CHECK_FIT32_((a), __FILE__, __LINE__) -static inline opus_int32 silk_CHECK_FIT32_( opus_int64 a, char *file, int line ){ +static OPUS_INLINE opus_int32 silk_CHECK_FIT32_( opus_int64 a, char *file, int line ){ opus_int32 ret; ret = (opus_int32)a; if ( (opus_int64)ret != a ) diff --git a/code/opus-1.0.2/silk/NLSF2A.c b/code/opus-1.1/silk/NLSF2A.c similarity index 99% rename from code/opus-1.0.2/silk/NLSF2A.c rename to code/opus-1.1/silk/NLSF2A.c index 10b66b64..b1c559ea 100644 --- a/code/opus-1.0.2/silk/NLSF2A.c +++ b/code/opus-1.1/silk/NLSF2A.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -41,7 +41,7 @@ POSSIBILITY OF SUCH DAMAGE. #define QA 16 /* helper function for NLSF2A(..) */ -static inline void silk_NLSF2A_find_poly( +static OPUS_INLINE void silk_NLSF2A_find_poly( opus_int32 *out, /* O intermediate polynomial, QA [dd+1] */ const opus_int32 *cLSF, /* I vector of interleaved 2*cos(LSFs), QA [d] */ opus_int dd /* I polynomial order (= 1/2 * filter order) */ diff --git a/code/opus-1.0.2/silk/NLSF_VQ.c b/code/opus-1.1/silk/NLSF_VQ.c similarity index 99% rename from code/opus-1.0.2/silk/NLSF_VQ.c rename to code/opus-1.1/silk/NLSF_VQ.c index 352dda26..69b6e22e 100644 --- a/code/opus-1.0.2/silk/NLSF_VQ.c +++ b/code/opus-1.1/silk/NLSF_VQ.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/NLSF_VQ_weights_laroia.c b/code/opus-1.1/silk/NLSF_VQ_weights_laroia.c similarity index 99% rename from code/opus-1.0.2/silk/NLSF_VQ_weights_laroia.c rename to code/opus-1.1/silk/NLSF_VQ_weights_laroia.c index 05bb17af..04894c59 100644 --- a/code/opus-1.0.2/silk/NLSF_VQ_weights_laroia.c +++ b/code/opus-1.1/silk/NLSF_VQ_weights_laroia.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/NLSF_decode.c b/code/opus-1.1/silk/NLSF_decode.c similarity index 97% rename from code/opus-1.0.2/silk/NLSF_decode.c rename to code/opus-1.1/silk/NLSF_decode.c index e007c49a..9f715060 100644 --- a/code/opus-1.0.2/silk/NLSF_decode.c +++ b/code/opus-1.1/silk/NLSF_decode.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "main.h" /* Predictive dequantizer for NLSF residuals */ -static inline void silk_NLSF_residual_dequant( /* O Returns RD value in Q30 */ +static OPUS_INLINE void silk_NLSF_residual_dequant( /* O Returns RD value in Q30 */ opus_int16 x_Q10[], /* O Output [ order ] */ const opus_int8 indices[], /* I Quantization indices [ order ] */ const opus_uint8 pred_coef_Q8[], /* I Backward predictor coefs [ order ] */ diff --git a/code/opus-1.0.2/silk/NLSF_del_dec_quant.c b/code/opus-1.1/silk/NLSF_del_dec_quant.c similarity index 99% rename from code/opus-1.0.2/silk/NLSF_del_dec_quant.c rename to code/opus-1.1/silk/NLSF_del_dec_quant.c index 78870de5..504dbbd0 100644 --- a/code/opus-1.0.2/silk/NLSF_del_dec_quant.c +++ b/code/opus-1.1/silk/NLSF_del_dec_quant.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -121,7 +121,7 @@ opus_int32 silk_NLSF_del_dec_quant( /* O Returns RD_Q25[ j + nStates ] = silk_SMLABB( silk_MLA( RD_tmp_Q25, silk_SMULBB( diff_Q10, diff_Q10 ), w_Q5[ i ] ), mu_Q20, rate1_Q5 ); } - if( nStates < NLSF_QUANT_DEL_DEC_STATES ) { + if( nStates <= ( NLSF_QUANT_DEL_DEC_STATES >> 1 ) ) { /* double number of states and copy */ for( j = 0; j < nStates; j++ ) { ind[ j + nStates ][ i ] = ind[ j ][ i ] + 1; diff --git a/code/opus-1.0.2/silk/NLSF_encode.c b/code/opus-1.1/silk/NLSF_encode.c similarity index 93% rename from code/opus-1.0.2/silk/NLSF_encode.c rename to code/opus-1.1/silk/NLSF_encode.c index 52a263d9..03a036fd 100644 --- a/code/opus-1.0.2/silk/NLSF_encode.c +++ b/code/opus-1.1/silk/NLSF_encode.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "main.h" +#include "stack_alloc.h" /***********************/ /* NLSF vector encoder */ @@ -46,10 +47,10 @@ opus_int32 silk_NLSF_encode( /* O Returns { opus_int i, s, ind1, bestIndex, prob_Q8, bits_q7; opus_int32 W_tmp_Q9; - opus_int32 err_Q26[ NLSF_VQ_MAX_VECTORS ]; - opus_int32 RD_Q25[ NLSF_VQ_MAX_SURVIVORS ]; - opus_int tempIndices1[ NLSF_VQ_MAX_SURVIVORS ]; - opus_int8 tempIndices2[ NLSF_VQ_MAX_SURVIVORS * MAX_LPC_ORDER ]; + VARDECL( opus_int32, err_Q26 ); + VARDECL( opus_int32, RD_Q25 ); + VARDECL( opus_int, tempIndices1 ); + VARDECL( opus_int8, tempIndices2 ); opus_int16 res_Q15[ MAX_LPC_ORDER ]; opus_int16 res_Q10[ MAX_LPC_ORDER ]; opus_int16 NLSF_tmp_Q15[ MAX_LPC_ORDER ]; @@ -58,6 +59,7 @@ opus_int32 silk_NLSF_encode( /* O Returns opus_uint8 pred_Q8[ MAX_LPC_ORDER ]; opus_int16 ec_ix[ MAX_LPC_ORDER ]; const opus_uint8 *pCB_element, *iCDF_ptr; + SAVE_STACK; silk_assert( nSurvivors <= NLSF_VQ_MAX_SURVIVORS ); silk_assert( signalType >= 0 && signalType <= 2 ); @@ -67,11 +69,16 @@ opus_int32 silk_NLSF_encode( /* O Returns silk_NLSF_stabilize( pNLSF_Q15, psNLSF_CB->deltaMin_Q15, psNLSF_CB->order ); /* First stage: VQ */ + ALLOC( err_Q26, psNLSF_CB->nVectors, opus_int32 ); silk_NLSF_VQ( err_Q26, pNLSF_Q15, psNLSF_CB->CB1_NLSF_Q8, psNLSF_CB->nVectors, psNLSF_CB->order ); /* Sort the quantization errors */ + ALLOC( tempIndices1, nSurvivors, opus_int ); silk_insertion_sort_increasing( err_Q26, tempIndices1, psNLSF_CB->nVectors, nSurvivors ); + ALLOC( RD_Q25, nSurvivors, opus_int32 ); + ALLOC( tempIndices2, nSurvivors * MAX_LPC_ORDER, opus_int8 ); + /* Loop over survivors */ for( s = 0; s < nSurvivors; s++ ) { ind1 = tempIndices1[ s ]; @@ -124,5 +131,6 @@ opus_int32 silk_NLSF_encode( /* O Returns /* Decode */ silk_NLSF_decode( pNLSF_Q15, NLSFIndices, psNLSF_CB ); + RESTORE_STACK; return RD_Q25[ 0 ]; } diff --git a/code/opus-1.0.2/silk/NLSF_stabilize.c b/code/opus-1.1/silk/NLSF_stabilize.c similarity index 99% rename from code/opus-1.0.2/silk/NLSF_stabilize.c rename to code/opus-1.1/silk/NLSF_stabilize.c index 7498b54a..1fa1ea37 100644 --- a/code/opus-1.0.2/silk/NLSF_stabilize.c +++ b/code/opus-1.1/silk/NLSF_stabilize.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/NLSF_unpack.c b/code/opus-1.1/silk/NLSF_unpack.c similarity index 99% rename from code/opus-1.0.2/silk/NLSF_unpack.c rename to code/opus-1.1/silk/NLSF_unpack.c index 47f6cfe8..17bd23f7 100644 --- a/code/opus-1.0.2/silk/NLSF_unpack.c +++ b/code/opus-1.1/silk/NLSF_unpack.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/NSQ.c b/code/opus-1.1/silk/NSQ.c similarity index 97% rename from code/opus-1.0.2/silk/NSQ.c rename to code/opus-1.1/silk/NSQ.c index b49cdf58..cf5b3fd5 100644 --- a/code/opus-1.0.2/silk/NSQ.c +++ b/code/opus-1.1/silk/NSQ.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,8 +30,9 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "main.h" +#include "stack_alloc.h" -static inline void silk_nsq_scale_states( +static OPUS_INLINE void silk_nsq_scale_states( const silk_encoder_state *psEncC, /* I Encoder State */ silk_nsq_state *NSQ, /* I/O NSQ state */ const opus_int32 x_Q3[], /* I input in Q3 */ @@ -45,7 +46,7 @@ static inline void silk_nsq_scale_states( const opus_int signal_type /* I Signal type */ ); -static inline void silk_noise_shape_quantizer( +static OPUS_INLINE void silk_noise_shape_quantizer( silk_nsq_state *NSQ, /* I/O NSQ state */ opus_int signalType, /* I Signal type */ const opus_int32 x_sc_Q10[], /* I */ @@ -88,11 +89,12 @@ void silk_NSQ( opus_int k, lag, start_idx, LSF_interpolation_flag; const opus_int16 *A_Q12, *B_Q14, *AR_shp_Q13; opus_int16 *pxq; - opus_int32 sLTP_Q15[ 2 * MAX_FRAME_LENGTH ]; - opus_int16 sLTP[ 2 * MAX_FRAME_LENGTH ]; + VARDECL( opus_int32, sLTP_Q15 ); + VARDECL( opus_int16, sLTP ); opus_int32 HarmShapeFIRPacked_Q14; opus_int offset_Q10; - opus_int32 x_sc_Q10[ MAX_SUB_FRAME_LENGTH ]; + VARDECL( opus_int32, x_sc_Q10 ); + SAVE_STACK; NSQ->rand_seed = psIndices->Seed; @@ -109,6 +111,10 @@ void silk_NSQ( LSF_interpolation_flag = 1; } + ALLOC( sLTP_Q15, + psEncC->ltp_mem_length + psEncC->frame_length, opus_int32 ); + ALLOC( sLTP, psEncC->ltp_mem_length + psEncC->frame_length, opus_int16 ); + ALLOC( x_sc_Q10, psEncC->subfr_length, opus_int32 ); /* Set up pointers to start of sub frame */ NSQ->sLTP_shp_buf_idx = psEncC->ltp_mem_length; NSQ->sLTP_buf_idx = psEncC->ltp_mem_length; @@ -160,12 +166,13 @@ void silk_NSQ( /* DEBUG_STORE_DATA( enc.pcm, &NSQ->xq[ psEncC->ltp_mem_length ], psEncC->frame_length * sizeof( opus_int16 ) ) */ silk_memmove( NSQ->xq, &NSQ->xq[ psEncC->frame_length ], psEncC->ltp_mem_length * sizeof( opus_int16 ) ); silk_memmove( NSQ->sLTP_shp_Q14, &NSQ->sLTP_shp_Q14[ psEncC->frame_length ], psEncC->ltp_mem_length * sizeof( opus_int32 ) ); + RESTORE_STACK; } /***********************************/ /* silk_noise_shape_quantizer */ /***********************************/ -static inline void silk_noise_shape_quantizer( +static OPUS_INLINE void silk_noise_shape_quantizer( silk_nsq_state *NSQ, /* I/O NSQ state */ opus_int signalType, /* I Signal type */ const opus_int32 x_sc_Q10[], /* I */ @@ -363,7 +370,7 @@ static inline void silk_noise_shape_quantizer( silk_memcpy( NSQ->sLPC_Q14, &NSQ->sLPC_Q14[ length ], NSQ_LPC_BUF_LENGTH * sizeof( opus_int32 ) ); } -static inline void silk_nsq_scale_states( +static OPUS_INLINE void silk_nsq_scale_states( const silk_encoder_state *psEncC, /* I Encoder State */ silk_nsq_state *NSQ, /* I/O NSQ state */ const opus_int32 x_Q3[], /* I input in Q3 */ diff --git a/code/opus-1.0.2/silk/NSQ_del_dec.c b/code/opus-1.1/silk/NSQ_del_dec.c similarity index 97% rename from code/opus-1.0.2/silk/NSQ_del_dec.c rename to code/opus-1.1/silk/NSQ_del_dec.c index b877fa96..522be406 100644 --- a/code/opus-1.0.2/silk/NSQ_del_dec.c +++ b/code/opus-1.1/silk/NSQ_del_dec.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "main.h" +#include "stack_alloc.h" typedef struct { opus_int32 sLPC_Q14[ MAX_SUB_FRAME_LENGTH + NSQ_LPC_BUF_LENGTH ]; @@ -54,7 +55,9 @@ typedef struct { opus_int32 LPC_exc_Q14; } NSQ_sample_struct; -static inline void silk_nsq_del_dec_scale_states( +typedef NSQ_sample_struct NSQ_sample_pair[ 2 ]; + +static OPUS_INLINE void silk_nsq_del_dec_scale_states( const silk_encoder_state *psEncC, /* I Encoder State */ silk_nsq_state *NSQ, /* I/O NSQ state */ NSQ_del_dec_struct psDelDec[], /* I/O Delayed decision states */ @@ -74,7 +77,7 @@ static inline void silk_nsq_del_dec_scale_states( /******************************************/ /* Noise shape quantizer for one subframe */ /******************************************/ -static inline void silk_noise_shape_quantizer_del_dec( +static OPUS_INLINE void silk_noise_shape_quantizer_del_dec( silk_nsq_state *NSQ, /* I/O NSQ state */ NSQ_del_dec_struct psDelDec[], /* I/O Delayed decision states */ opus_int signalType, /* I Signal type */ @@ -123,17 +126,18 @@ void silk_NSQ_del_dec( { opus_int i, k, lag, start_idx, LSF_interpolation_flag, Winner_ind, subfr; opus_int last_smple_idx, smpl_buf_idx, decisionDelay; - const opus_int16 *A_Q12, *B_Q14, *AR_shp_Q13; + const opus_int16 *A_Q12, *B_Q14, *AR_shp_Q13; opus_int16 *pxq; - opus_int32 sLTP_Q15[ 2 * MAX_FRAME_LENGTH ]; - opus_int16 sLTP[ 2 * MAX_FRAME_LENGTH ]; + VARDECL( opus_int32, sLTP_Q15 ); + VARDECL( opus_int16, sLTP ); opus_int32 HarmShapeFIRPacked_Q14; opus_int offset_Q10; opus_int32 RDmin_Q10, Gain_Q10; - opus_int32 x_sc_Q10[ MAX_SUB_FRAME_LENGTH ]; - opus_int32 delayedGain_Q10[ DECISION_DELAY ]; - NSQ_del_dec_struct psDelDec[ MAX_DEL_DEC_STATES ]; + VARDECL( opus_int32, x_sc_Q10 ); + VARDECL( opus_int32, delayedGain_Q10 ); + VARDECL( NSQ_del_dec_struct, psDelDec ); NSQ_del_dec_struct *psDD; + SAVE_STACK; /* Set unvoiced lag to the previous one, overwrite later for voiced */ lag = NSQ->lagPrev; @@ -141,6 +145,7 @@ void silk_NSQ_del_dec( silk_assert( NSQ->prev_gain_Q16 != 0 ); /* Initialize delayed decision states */ + ALLOC( psDelDec, psEncC->nStatesDelayedDecision, NSQ_del_dec_struct ); silk_memset( psDelDec, 0, psEncC->nStatesDelayedDecision * sizeof( NSQ_del_dec_struct ) ); for( k = 0; k < psEncC->nStatesDelayedDecision; k++ ) { psDD = &psDelDec[ k ]; @@ -175,6 +180,11 @@ void silk_NSQ_del_dec( LSF_interpolation_flag = 1; } + ALLOC( sLTP_Q15, + psEncC->ltp_mem_length + psEncC->frame_length, opus_int32 ); + ALLOC( sLTP, psEncC->ltp_mem_length + psEncC->frame_length, opus_int16 ); + ALLOC( x_sc_Q10, psEncC->subfr_length, opus_int32 ); + ALLOC( delayedGain_Q10, DECISION_DELAY, opus_int32 ); /* Set up pointers to start of sub frame */ pxq = &NSQ->xq[ psEncC->ltp_mem_length ]; NSQ->sLTP_shp_buf_idx = psEncC->ltp_mem_length; @@ -287,12 +297,13 @@ void silk_NSQ_del_dec( /* DEBUG_STORE_DATA( enc.pcm, &NSQ->xq[psEncC->ltp_mem_length], psEncC->frame_length * sizeof( opus_int16 ) ) */ silk_memmove( NSQ->xq, &NSQ->xq[ psEncC->frame_length ], psEncC->ltp_mem_length * sizeof( opus_int16 ) ); silk_memmove( NSQ->sLTP_shp_Q14, &NSQ->sLTP_shp_Q14[ psEncC->frame_length ], psEncC->ltp_mem_length * sizeof( opus_int32 ) ); + RESTORE_STACK; } /******************************************/ /* Noise shape quantizer for one subframe */ /******************************************/ -static inline void silk_noise_shape_quantizer_del_dec( +static OPUS_INLINE void silk_noise_shape_quantizer_del_dec( silk_nsq_state *NSQ, /* I/O NSQ state */ NSQ_del_dec_struct psDelDec[], /* I/O Delayed decision states */ opus_int signalType, /* I Signal type */ @@ -328,11 +339,13 @@ static inline void silk_noise_shape_quantizer_del_dec( opus_int32 q1_Q0, q1_Q10, q2_Q10, exc_Q14, LPC_exc_Q14, xq_Q14, Gain_Q10; opus_int32 tmp1, tmp2, sLF_AR_shp_Q14; opus_int32 *pred_lag_ptr, *shp_lag_ptr, *psLPC_Q14; - NSQ_sample_struct psSampleState[ MAX_DEL_DEC_STATES ][ 2 ]; + VARDECL( NSQ_sample_pair, psSampleState ); NSQ_del_dec_struct *psDD; NSQ_sample_struct *psSS; + SAVE_STACK; silk_assert( nStatesDelayedDecision > 0 ); + ALLOC( psSampleState, nStatesDelayedDecision, NSQ_sample_pair ); shp_lag_ptr = &NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx - lag + HARM_SHAPE_FIR_TAPS / 2 ]; pred_lag_ptr = &sLTP_Q15[ NSQ->sLTP_buf_idx - lag + LTP_ORDER / 2 ]; @@ -614,9 +627,10 @@ static inline void silk_noise_shape_quantizer_del_dec( psDD = &psDelDec[ k ]; silk_memcpy( psDD->sLPC_Q14, &psDD->sLPC_Q14[ length ], NSQ_LPC_BUF_LENGTH * sizeof( opus_int32 ) ); } + RESTORE_STACK; } -static inline void silk_nsq_del_dec_scale_states( +static OPUS_INLINE void silk_nsq_del_dec_scale_states( const silk_encoder_state *psEncC, /* I Encoder State */ silk_nsq_state *NSQ, /* I/O NSQ state */ NSQ_del_dec_struct psDelDec[], /* I/O Delayed decision states */ diff --git a/code/opus-1.0.2/silk/PLC.c b/code/opus-1.1/silk/PLC.c similarity index 99% rename from code/opus-1.0.2/silk/PLC.c rename to code/opus-1.1/silk/PLC.c index 8d547295..01f40014 100644 --- a/code/opus-1.0.2/silk/PLC.c +++ b/code/opus-1.1/silk/PLC.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -38,12 +38,12 @@ static const opus_int16 HARM_ATT_Q15[NB_ATT] = { 32440, 31130 }; /* static const opus_int16 PLC_RAND_ATTENUATE_V_Q15[NB_ATT] = { 31130, 26214 }; /* 0.95, 0.8 */ static const opus_int16 PLC_RAND_ATTENUATE_UV_Q15[NB_ATT] = { 32440, 29491 }; /* 0.99, 0.9 */ -static inline void silk_PLC_update( +static OPUS_INLINE void silk_PLC_update( silk_decoder_state *psDec, /* I/O Decoder state */ silk_decoder_control *psDecCtrl /* I/O Decoder control */ ); -static inline void silk_PLC_conceal( +static OPUS_INLINE void silk_PLC_conceal( silk_decoder_state *psDec, /* I/O Decoder state */ silk_decoder_control *psDecCtrl, /* I/O Decoder control */ opus_int16 frame[] /* O LPC residual signal */ @@ -92,7 +92,7 @@ void silk_PLC( /**************************************************/ /* Update state of PLC */ /**************************************************/ -static inline void silk_PLC_update( +static OPUS_INLINE void silk_PLC_update( silk_decoder_state *psDec, /* I/O Decoder state */ silk_decoder_control *psDecCtrl /* I/O Decoder control */ ) @@ -165,7 +165,7 @@ static inline void silk_PLC_update( psPLC->nb_subfr = psDec->nb_subfr; } -static inline void silk_PLC_conceal( +static OPUS_INLINE void silk_PLC_conceal( silk_decoder_state *psDec, /* I/O Decoder state */ silk_decoder_control *psDecCtrl, /* I/O Decoder control */ opus_int16 frame[] /* O LPC residual signal */ diff --git a/code/opus-1.0.2/silk/PLC.h b/code/opus-1.1/silk/PLC.h similarity index 99% rename from code/opus-1.0.2/silk/PLC.h rename to code/opus-1.1/silk/PLC.h index 1d2d9061..f1e2eccc 100644 --- a/code/opus-1.0.2/silk/PLC.h +++ b/code/opus-1.1/silk/PLC.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/SigProc_FIX.h b/code/opus-1.1/silk/SigProc_FIX.h similarity index 96% rename from code/opus-1.0.2/silk/SigProc_FIX.h rename to code/opus-1.1/silk/SigProc_FIX.h index daa5fd04..1b580579 100644 --- a/code/opus-1.0.2/silk/SigProc_FIX.h +++ b/code/opus-1.1/silk/SigProc_FIX.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -168,12 +168,6 @@ opus_int32 silk_log2lin( const opus_int32 inLog_Q7 /* I input on log scale */ ); -/* Function that returns the maximum absolut value of the input vector */ -opus_int16 silk_int16_array_maxabs( /* O Maximum absolute value, max: 2^15-1 */ - const opus_int16 *vec, /* I Input vector [len] */ - const opus_int32 len /* I Length of input vector */ -); - /* Compute number of bits to right shift the sum of squares of a vector */ /* of int16s to make it fit in an int32 */ void silk_sum_sqr_shift( @@ -233,7 +227,8 @@ void silk_autocorr( opus_int *scale, /* O Scaling of the correlation vector */ const opus_int16 *inputData, /* I Input data to correlate */ const opus_int inputDataSize, /* I Length of input */ - const opus_int correlationCount /* I Number of correlation taps to compute */ + const opus_int correlationCount, /* I Number of correlation taps to compute */ + int arch /* I Run-time architecture */ ); void silk_decode_pitch( @@ -252,10 +247,11 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 opus_int *LTPCorr_Q15, /* I/O Normalized correlation; input: value from previous frame */ opus_int prevLag, /* I Last lag of previous frame; set to zero is unvoiced */ const opus_int32 search_thres1_Q16, /* I First stage threshold for lag candidates 0 - 1 */ - const opus_int search_thres2_Q15, /* I Final threshold for lag candidates 0 - 1 */ + const opus_int search_thres2_Q13, /* I Final threshold for lag candidates 0 - 1 */ const opus_int Fs_kHz, /* I Sample frequency (kHz) */ const opus_int complexity, /* I Complexity setting, 0-2, where 2 is highest */ - const opus_int nb_subfr /* I number of 5 ms subframes */ + const opus_int nb_subfr, /* I number of 5 ms subframes */ + int arch /* I Run-time architecture */ ); /* Compute Normalized Line Spectral Frequencies (NLSFs) from whitening filter coefficients */ @@ -315,7 +311,8 @@ void silk_burg_modified( const opus_int32 minInvGain_Q30, /* I Inverse of max prediction gain */ const opus_int subfr_length, /* I Input signal subframe length (incl. D preceding samples) */ const opus_int nb_subfr, /* I Number of subframes stacked in x */ - const opus_int D /* I Order */ + const opus_int D, /* I Order */ + int arch /* I Run-time architecture */ ); /* Copy and multiply a vector by a constant */ @@ -364,8 +361,8 @@ opus_int64 silk_inner_prod16_aligned_64( /* Rotate a32 right by 'rot' bits. Negative rot values result in rotating left. Output is 32bit int. Note: contemporary compilers recognize the C expression below and - compile it into a 'ror' instruction if available. No need for inline ASM! */ -static inline opus_int32 silk_ROR32( opus_int32 a32, opus_int rot ) + compile it into a 'ror' instruction if available. No need for OPUS_INLINE ASM! */ +static OPUS_INLINE opus_int32 silk_ROR32( opus_int32 a32, opus_int rot ) { opus_uint32 x = (opus_uint32) a32; opus_uint32 r = (opus_uint32) rot; @@ -514,37 +511,37 @@ static inline opus_int32 silk_ROR32( opus_int32 a32, opus_int rot ) #define SILK_FIX_CONST( C, Q ) ((opus_int32)((C) * ((opus_int64)1 << (Q)) + 0.5)) /* silk_min() versions with typecast in the function call */ -static inline opus_int silk_min_int(opus_int a, opus_int b) +static OPUS_INLINE opus_int silk_min_int(opus_int a, opus_int b) { return (((a) < (b)) ? (a) : (b)); } -static inline opus_int16 silk_min_16(opus_int16 a, opus_int16 b) +static OPUS_INLINE opus_int16 silk_min_16(opus_int16 a, opus_int16 b) { return (((a) < (b)) ? (a) : (b)); } -static inline opus_int32 silk_min_32(opus_int32 a, opus_int32 b) +static OPUS_INLINE opus_int32 silk_min_32(opus_int32 a, opus_int32 b) { return (((a) < (b)) ? (a) : (b)); } -static inline opus_int64 silk_min_64(opus_int64 a, opus_int64 b) +static OPUS_INLINE opus_int64 silk_min_64(opus_int64 a, opus_int64 b) { return (((a) < (b)) ? (a) : (b)); } /* silk_min() versions with typecast in the function call */ -static inline opus_int silk_max_int(opus_int a, opus_int b) +static OPUS_INLINE opus_int silk_max_int(opus_int a, opus_int b) { return (((a) > (b)) ? (a) : (b)); } -static inline opus_int16 silk_max_16(opus_int16 a, opus_int16 b) +static OPUS_INLINE opus_int16 silk_max_16(opus_int16 a, opus_int16 b) { return (((a) > (b)) ? (a) : (b)); } -static inline opus_int32 silk_max_32(opus_int32 a, opus_int32 b) +static OPUS_INLINE opus_int32 silk_max_32(opus_int32 a, opus_int32 b) { return (((a) > (b)) ? (a) : (b)); } -static inline opus_int64 silk_max_64(opus_int64 a, opus_int64 b) +static OPUS_INLINE opus_int64 silk_max_64(opus_int64 a, opus_int64 b) { return (((a) > (b)) ? (a) : (b)); } @@ -582,6 +579,14 @@ static inline opus_int64 silk_max_64(opus_int64 a, opus_int64 b) #include "MacroCount.h" #include "MacroDebug.h" +#ifdef OPUS_ARM_INLINE_ASM +#include "arm/SigProc_FIX_armv4.h" +#endif + +#ifdef OPUS_ARM_INLINE_EDSP +#include "arm/SigProc_FIX_armv5e.h" +#endif + #ifdef __cplusplus } #endif diff --git a/code/opus-1.0.2/silk/VAD.c b/code/opus-1.1/silk/VAD.c similarity index 86% rename from code/opus-1.0.2/silk/VAD.c rename to code/opus-1.1/silk/VAD.c index bac89b44..a8090981 100644 --- a/code/opus-1.0.2/silk/VAD.c +++ b/code/opus-1.1/silk/VAD.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,9 +30,10 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "main.h" +#include "stack_alloc.h" /* Silk VAD noise level estimation */ -static inline void silk_VAD_GetNoiseLevels( +static OPUS_INLINE void silk_VAD_GetNoiseLevels( const opus_int32 pX[ VAD_N_BANDS ], /* I subband energies */ silk_VAD_state *psSilk_VAD /* I/O Pointer to Silk VAD state */ ); @@ -82,15 +83,19 @@ opus_int silk_VAD_GetSA_Q8( /* O Return v ) { opus_int SA_Q15, pSNR_dB_Q7, input_tilt; - opus_int decimated_framelength, dec_subframe_length, dec_subframe_offset, SNR_Q7, i, b, s; + opus_int decimated_framelength1, decimated_framelength2; + opus_int decimated_framelength; + opus_int dec_subframe_length, dec_subframe_offset, SNR_Q7, i, b, s; opus_int32 sumSquared, smooth_coef_Q16; opus_int16 HPstateTmp; - opus_int16 X[ VAD_N_BANDS ][ MAX_FRAME_LENGTH / 2 ]; + VARDECL( opus_int16, X ); opus_int32 Xnrg[ VAD_N_BANDS ]; opus_int32 NrgToNoiseRatio_Q8[ VAD_N_BANDS ]; opus_int32 speech_nrg, x_tmp; + opus_int X_offset[ VAD_N_BANDS ]; opus_int ret = 0; silk_VAD_state *psSilk_VAD = &psEncC->sVAD; + SAVE_STACK; /* Safety checks */ silk_assert( VAD_N_BANDS == 4 ); @@ -101,26 +106,46 @@ opus_int silk_VAD_GetSA_Q8( /* O Return v /***********************/ /* Filter and Decimate */ /***********************/ + decimated_framelength1 = silk_RSHIFT( psEncC->frame_length, 1 ); + decimated_framelength2 = silk_RSHIFT( psEncC->frame_length, 2 ); + decimated_framelength = silk_RSHIFT( psEncC->frame_length, 3 ); + /* Decimate into 4 bands: + 0 L 3L L 3L 5L + - -- - -- -- + 8 8 2 4 4 + + [0-1 kHz| temp. |1-2 kHz| 2-4 kHz | 4-8 kHz | + + They're arranged to allow the minimal ( frame_length / 4 ) extra + scratch space during the downsampling process */ + X_offset[ 0 ] = 0; + X_offset[ 1 ] = decimated_framelength + decimated_framelength2; + X_offset[ 2 ] = X_offset[ 1 ] + decimated_framelength; + X_offset[ 3 ] = X_offset[ 2 ] + decimated_framelength2; + ALLOC( X, X_offset[ 3 ] + decimated_framelength1, opus_int16 ); + /* 0-8 kHz to 0-4 kHz and 4-8 kHz */ - silk_ana_filt_bank_1( pIn, &psSilk_VAD->AnaState[ 0 ], &X[ 0 ][ 0 ], &X[ 3 ][ 0 ], psEncC->frame_length ); + silk_ana_filt_bank_1( pIn, &psSilk_VAD->AnaState[ 0 ], + X, &X[ X_offset[ 3 ] ], psEncC->frame_length ); /* 0-4 kHz to 0-2 kHz and 2-4 kHz */ - silk_ana_filt_bank_1( &X[ 0 ][ 0 ], &psSilk_VAD->AnaState1[ 0 ], &X[ 0 ][ 0 ], &X[ 2 ][ 0 ], silk_RSHIFT( psEncC->frame_length, 1 ) ); + silk_ana_filt_bank_1( X, &psSilk_VAD->AnaState1[ 0 ], + X, &X[ X_offset[ 2 ] ], decimated_framelength1 ); /* 0-2 kHz to 0-1 kHz and 1-2 kHz */ - silk_ana_filt_bank_1( &X[ 0 ][ 0 ], &psSilk_VAD->AnaState2[ 0 ], &X[ 0 ][ 0 ], &X[ 1 ][ 0 ], silk_RSHIFT( psEncC->frame_length, 2 ) ); + silk_ana_filt_bank_1( X, &psSilk_VAD->AnaState2[ 0 ], + X, &X[ X_offset[ 1 ] ], decimated_framelength2 ); /*********************************************/ /* HP filter on lowest band (differentiator) */ /*********************************************/ - decimated_framelength = silk_RSHIFT( psEncC->frame_length, 3 ); - X[ 0 ][ decimated_framelength - 1 ] = silk_RSHIFT( X[ 0 ][ decimated_framelength - 1 ], 1 ); - HPstateTmp = X[ 0 ][ decimated_framelength - 1 ]; + X[ decimated_framelength - 1 ] = silk_RSHIFT( X[ decimated_framelength - 1 ], 1 ); + HPstateTmp = X[ decimated_framelength - 1 ]; for( i = decimated_framelength - 1; i > 0; i-- ) { - X[ 0 ][ i - 1 ] = silk_RSHIFT( X[ 0 ][ i - 1 ], 1 ); - X[ 0 ][ i ] -= X[ 0 ][ i - 1 ]; + X[ i - 1 ] = silk_RSHIFT( X[ i - 1 ], 1 ); + X[ i ] -= X[ i - 1 ]; } - X[ 0 ][ 0 ] -= psSilk_VAD->HPstate; + X[ 0 ] -= psSilk_VAD->HPstate; psSilk_VAD->HPstate = HPstateTmp; /*************************************/ @@ -142,7 +167,8 @@ opus_int silk_VAD_GetSA_Q8( /* O Return v for( i = 0; i < dec_subframe_length; i++ ) { /* The energy will be less than dec_subframe_length * ( silk_int16_MIN / 8 ) ^ 2. */ /* Therefore we can accumulate with no risk of overflow (unless dec_subframe_length > 128) */ - x_tmp = silk_RSHIFT( X[ b ][ i + dec_subframe_offset ], 3 ); + x_tmp = silk_RSHIFT( + X[ X_offset[ b ] + i + dec_subframe_offset ], 3 ); sumSquared = silk_SMLABB( sumSquared, x_tmp, x_tmp ); /* Safety check */ @@ -263,13 +289,14 @@ opus_int silk_VAD_GetSA_Q8( /* O Return v psEncC->input_quality_bands_Q15[ b ] = silk_sigm_Q15( silk_RSHIFT( SNR_Q7 - 16 * 128, 4 ) ); } + RESTORE_STACK; return( ret ); } /**************************/ /* Noise level estimation */ /**************************/ -static inline void silk_VAD_GetNoiseLevels( +static OPUS_INLINE void silk_VAD_GetNoiseLevels( const opus_int32 pX[ VAD_N_BANDS ], /* I subband energies */ silk_VAD_state *psSilk_VAD /* I/O Pointer to Silk VAD state */ ) diff --git a/code/opus-1.0.2/silk/VQ_WMat_EC.c b/code/opus-1.1/silk/VQ_WMat_EC.c similarity index 90% rename from code/opus-1.0.2/silk/VQ_WMat_EC.c rename to code/opus-1.1/silk/VQ_WMat_EC.c index a308cfbf..13d5d34e 100644 --- a/code/opus-1.0.2/silk/VQ_WMat_EC.c +++ b/code/opus-1.1/silk/VQ_WMat_EC.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -35,15 +35,18 @@ POSSIBILITY OF SUCH DAMAGE. void silk_VQ_WMat_EC( opus_int8 *ind, /* O index of best codebook vector */ opus_int32 *rate_dist_Q14, /* O best weighted quant error + mu * rate */ + opus_int *gain_Q7, /* O sum of absolute LTP coefficients */ const opus_int16 *in_Q14, /* I input vector to be quantized */ const opus_int32 *W_Q18, /* I weighting matrix */ const opus_int8 *cb_Q7, /* I codebook */ + const opus_uint8 *cb_gain_Q7, /* I codebook effective gain */ const opus_uint8 *cl_Q5, /* I code length for each codebook vector */ const opus_int mu_Q9, /* I tradeoff betw. weighted error and rate */ + const opus_int32 max_gain_Q7, /* I maximum sum of absolute LTP coefficients */ opus_int L /* I number of vectors in codebook */ ) { - opus_int k; + opus_int k, gain_tmp_Q7; const opus_int8 *cb_row_Q7; opus_int16 diff_Q14[ 5 ]; opus_int32 sum1_Q14, sum2_Q16; @@ -52,6 +55,8 @@ void silk_VQ_WMat_EC( *rate_dist_Q14 = silk_int32_MAX; cb_row_Q7 = cb_Q7; for( k = 0; k < L; k++ ) { + gain_tmp_Q7 = cb_gain_Q7[k]; + diff_Q14[ 0 ] = in_Q14[ 0 ] - silk_LSHIFT( cb_row_Q7[ 0 ], 7 ); diff_Q14[ 1 ] = in_Q14[ 1 ] - silk_LSHIFT( cb_row_Q7[ 1 ], 7 ); diff_Q14[ 2 ] = in_Q14[ 2 ] - silk_LSHIFT( cb_row_Q7[ 2 ], 7 ); @@ -61,6 +66,9 @@ void silk_VQ_WMat_EC( /* Weighted rate */ sum1_Q14 = silk_SMULBB( mu_Q9, cl_Q5[ k ] ); + /* Penalty for too large gain */ + sum1_Q14 = silk_ADD_LSHIFT32( sum1_Q14, silk_max( silk_SUB32( gain_tmp_Q7, max_gain_Q7 ), 0 ), 10 ); + silk_assert( sum1_Q14 >= 0 ); /* first row of W_Q18 */ @@ -103,6 +111,7 @@ void silk_VQ_WMat_EC( if( sum1_Q14 < *rate_dist_Q14 ) { *rate_dist_Q14 = sum1_Q14; *ind = (opus_int8)k; + *gain_Q7 = gain_tmp_Q7; } /* Go to next cbk vector */ diff --git a/code/opus-1.0.2/silk/ana_filt_bank_1.c b/code/opus-1.1/silk/ana_filt_bank_1.c similarity index 99% rename from code/opus-1.0.2/silk/ana_filt_bank_1.c rename to code/opus-1.1/silk/ana_filt_bank_1.c index 4e04bef3..24cfb03f 100644 --- a/code/opus-1.0.2/silk/ana_filt_bank_1.c +++ b/code/opus-1.1/silk/ana_filt_bank_1.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.1/silk/arm/SigProc_FIX_armv4.h b/code/opus-1.1/silk/arm/SigProc_FIX_armv4.h new file mode 100644 index 00000000..ff62b1e5 --- /dev/null +++ b/code/opus-1.1/silk/arm/SigProc_FIX_armv4.h @@ -0,0 +1,47 @@ +/*********************************************************************** +Copyright (C) 2013 Xiph.Org Foundation and contributors +Copyright (c) 2013 Parrot +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. +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. +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. +***********************************************************************/ + +#ifndef SILK_SIGPROC_FIX_ARMv4_H +#define SILK_SIGPROC_FIX_ARMv4_H + +#undef silk_MLA +static OPUS_INLINE opus_int32 silk_MLA_armv4(opus_int32 a, opus_int32 b, + opus_int32 c) +{ + opus_int32 res; + __asm__( + "#silk_MLA\n\t" + "mla %0, %1, %2, %3\n\t" + : "=&r"(res) + : "r"(b), "r"(c), "r"(a) + ); + return res; +} +#define silk_MLA(a, b, c) (silk_MLA_armv4(a, b, c)) + +#endif diff --git a/code/opus-1.1/silk/arm/SigProc_FIX_armv5e.h b/code/opus-1.1/silk/arm/SigProc_FIX_armv5e.h new file mode 100644 index 00000000..617a09ca --- /dev/null +++ b/code/opus-1.1/silk/arm/SigProc_FIX_armv5e.h @@ -0,0 +1,61 @@ +/*********************************************************************** +Copyright (c) 2006-2011, Skype Limited. All rights reserved. +Copyright (c) 2013 Parrot +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. +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. +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. +***********************************************************************/ + +#ifndef SILK_SIGPROC_FIX_ARMv5E_H +#define SILK_SIGPROC_FIX_ARMv5E_H + +#undef silk_SMULTT +static OPUS_INLINE opus_int32 silk_SMULTT_armv5e(opus_int32 a, opus_int32 b) +{ + opus_int32 res; + __asm__( + "#silk_SMULTT\n\t" + "smultt %0, %1, %2\n\t" + : "=r"(res) + : "%r"(a), "r"(b) + ); + return res; +} +#define silk_SMULTT(a, b) (silk_SMULTT_armv5e(a, b)) + +#undef silk_SMLATT +static OPUS_INLINE opus_int32 silk_SMLATT_armv5e(opus_int32 a, opus_int32 b, + opus_int32 c) +{ + opus_int32 res; + __asm__( + "#silk_SMLATT\n\t" + "smlatt %0, %1, %2, %3\n\t" + : "=r"(res) + : "%r"(b), "r"(c), "r"(a) + ); + return res; +} +#define silk_SMLATT(a, b, c) (silk_SMLATT_armv5e(a, b, c)) + +#endif diff --git a/code/opus-1.1/silk/arm/macros_armv4.h b/code/opus-1.1/silk/arm/macros_armv4.h new file mode 100644 index 00000000..3f30e972 --- /dev/null +++ b/code/opus-1.1/silk/arm/macros_armv4.h @@ -0,0 +1,103 @@ +/*********************************************************************** +Copyright (C) 2013 Xiph.Org Foundation and contributors. +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. +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. +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. +***********************************************************************/ + +#ifndef SILK_MACROS_ARMv4_H +#define SILK_MACROS_ARMv4_H + +/* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */ +#undef silk_SMULWB +static OPUS_INLINE opus_int32 silk_SMULWB_armv4(opus_int32 a, opus_int16 b) +{ + unsigned rd_lo; + int rd_hi; + __asm__( + "#silk_SMULWB\n\t" + "smull %0, %1, %2, %3\n\t" + : "=&r"(rd_lo), "=&r"(rd_hi) + : "%r"(a), "r"(b<<16) + ); + return rd_hi; +} +#define silk_SMULWB(a, b) (silk_SMULWB_armv4(a, b)) + +/* a32 + (b32 * (opus_int32)((opus_int16)(c32))) >> 16 output have to be 32bit int */ +#undef silk_SMLAWB +#define silk_SMLAWB(a, b, c) ((a) + silk_SMULWB(b, c)) + +/* (a32 * (b32 >> 16)) >> 16 */ +#undef silk_SMULWT +static OPUS_INLINE opus_int32 silk_SMULWT_armv4(opus_int32 a, opus_int32 b) +{ + unsigned rd_lo; + int rd_hi; + __asm__( + "#silk_SMULWT\n\t" + "smull %0, %1, %2, %3\n\t" + : "=&r"(rd_lo), "=&r"(rd_hi) + : "%r"(a), "r"(b&~0xFFFF) + ); + return rd_hi; +} +#define silk_SMULWT(a, b) (silk_SMULWT_armv4(a, b)) + +/* a32 + (b32 * (c32 >> 16)) >> 16 */ +#undef silk_SMLAWT +#define silk_SMLAWT(a, b, c) ((a) + silk_SMULWT(b, c)) + +/* (a32 * b32) >> 16 */ +#undef silk_SMULWW +static OPUS_INLINE opus_int32 silk_SMULWW_armv4(opus_int32 a, opus_int32 b) +{ + unsigned rd_lo; + int rd_hi; + __asm__( + "#silk_SMULWW\n\t" + "smull %0, %1, %2, %3\n\t" + : "=&r"(rd_lo), "=&r"(rd_hi) + : "%r"(a), "r"(b) + ); + return (rd_hi<<16)+(rd_lo>>16); +} +#define silk_SMULWW(a, b) (silk_SMULWW_armv4(a, b)) + +#undef silk_SMLAWW +static OPUS_INLINE opus_int32 silk_SMLAWW_armv4(opus_int32 a, opus_int32 b, + opus_int32 c) +{ + unsigned rd_lo; + int rd_hi; + __asm__( + "#silk_SMLAWW\n\t" + "smull %0, %1, %2, %3\n\t" + : "=&r"(rd_lo), "=&r"(rd_hi) + : "%r"(b), "r"(c) + ); + return a+(rd_hi<<16)+(rd_lo>>16); +} +#define silk_SMLAWW(a, b, c) (silk_SMLAWW_armv4(a, b, c)) + +#endif /* SILK_MACROS_ARMv4_H */ diff --git a/code/opus-1.1/silk/arm/macros_armv5e.h b/code/opus-1.1/silk/arm/macros_armv5e.h new file mode 100644 index 00000000..aad4117e --- /dev/null +++ b/code/opus-1.1/silk/arm/macros_armv5e.h @@ -0,0 +1,213 @@ +/*********************************************************************** +Copyright (c) 2006-2011, Skype Limited. All rights reserved. +Copyright (c) 2013 Parrot +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. +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. +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. +***********************************************************************/ + +#ifndef SILK_MACROS_ARMv5E_H +#define SILK_MACROS_ARMv5E_H + +/* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */ +#undef silk_SMULWB +static OPUS_INLINE opus_int32 silk_SMULWB_armv5e(opus_int32 a, opus_int16 b) +{ + int res; + __asm__( + "#silk_SMULWB\n\t" + "smulwb %0, %1, %2\n\t" + : "=r"(res) + : "r"(a), "r"(b) + ); + return res; +} +#define silk_SMULWB(a, b) (silk_SMULWB_armv5e(a, b)) + +/* a32 + (b32 * (opus_int32)((opus_int16)(c32))) >> 16 output have to be 32bit int */ +#undef silk_SMLAWB +static OPUS_INLINE opus_int32 silk_SMLAWB_armv5e(opus_int32 a, opus_int32 b, + opus_int16 c) +{ + int res; + __asm__( + "#silk_SMLAWB\n\t" + "smlawb %0, %1, %2, %3\n\t" + : "=r"(res) + : "r"(b), "r"(c), "r"(a) + ); + return res; +} +#define silk_SMLAWB(a, b, c) (silk_SMLAWB_armv5e(a, b, c)) + +/* (a32 * (b32 >> 16)) >> 16 */ +#undef silk_SMULWT +static OPUS_INLINE opus_int32 silk_SMULWT_armv5e(opus_int32 a, opus_int32 b) +{ + int res; + __asm__( + "#silk_SMULWT\n\t" + "smulwt %0, %1, %2\n\t" + : "=r"(res) + : "r"(a), "r"(b) + ); + return res; +} +#define silk_SMULWT(a, b) (silk_SMULWT_armv5e(a, b)) + +/* a32 + (b32 * (c32 >> 16)) >> 16 */ +#undef silk_SMLAWT +static OPUS_INLINE opus_int32 silk_SMLAWT_armv5e(opus_int32 a, opus_int32 b, + opus_int32 c) +{ + int res; + __asm__( + "#silk_SMLAWT\n\t" + "smlawt %0, %1, %2, %3\n\t" + : "=r"(res) + : "r"(b), "r"(c), "r"(a) + ); + return res; +} +#define silk_SMLAWT(a, b, c) (silk_SMLAWT_armv5e(a, b, c)) + +/* (opus_int32)((opus_int16)(a3))) * (opus_int32)((opus_int16)(b32)) output have to be 32bit int */ +#undef silk_SMULBB +static OPUS_INLINE opus_int32 silk_SMULBB_armv5e(opus_int32 a, opus_int32 b) +{ + int res; + __asm__( + "#silk_SMULBB\n\t" + "smulbb %0, %1, %2\n\t" + : "=r"(res) + : "%r"(a), "r"(b) + ); + return res; +} +#define silk_SMULBB(a, b) (silk_SMULBB_armv5e(a, b)) + +/* a32 + (opus_int32)((opus_int16)(b32)) * (opus_int32)((opus_int16)(c32)) output have to be 32bit int */ +#undef silk_SMLABB +static OPUS_INLINE opus_int32 silk_SMLABB_armv5e(opus_int32 a, opus_int32 b, + opus_int32 c) +{ + int res; + __asm__( + "#silk_SMLABB\n\t" + "smlabb %0, %1, %2, %3\n\t" + : "=r"(res) + : "%r"(b), "r"(c), "r"(a) + ); + return res; +} +#define silk_SMLABB(a, b, c) (silk_SMLABB_armv5e(a, b, c)) + +/* (opus_int32)((opus_int16)(a32)) * (b32 >> 16) */ +#undef silk_SMULBT +static OPUS_INLINE opus_int32 silk_SMULBT_armv5e(opus_int32 a, opus_int32 b) +{ + int res; + __asm__( + "#silk_SMULBT\n\t" + "smulbt %0, %1, %2\n\t" + : "=r"(res) + : "r"(a), "r"(b) + ); + return res; +} +#define silk_SMULBT(a, b) (silk_SMULBT_armv5e(a, b)) + +/* a32 + (opus_int32)((opus_int16)(b32)) * (c32 >> 16) */ +#undef silk_SMLABT +static OPUS_INLINE opus_int32 silk_SMLABT_armv5e(opus_int32 a, opus_int32 b, + opus_int32 c) +{ + int res; + __asm__( + "#silk_SMLABT\n\t" + "smlabt %0, %1, %2, %3\n\t" + : "=r"(res) + : "r"(b), "r"(c), "r"(a) + ); + return res; +} +#define silk_SMLABT(a, b, c) (silk_SMLABT_armv5e(a, b, c)) + +/* add/subtract with output saturated */ +#undef silk_ADD_SAT32 +static OPUS_INLINE opus_int32 silk_ADD_SAT32_armv5e(opus_int32 a, opus_int32 b) +{ + int res; + __asm__( + "#silk_ADD_SAT32\n\t" + "qadd %0, %1, %2\n\t" + : "=r"(res) + : "%r"(a), "r"(b) + ); + return res; +} +#define silk_ADD_SAT32(a, b) (silk_ADD_SAT32_armv5e(a, b)) + +#undef silk_SUB_SAT32 +static OPUS_INLINE opus_int32 silk_SUB_SAT32_armv5e(opus_int32 a, opus_int32 b) +{ + int res; + __asm__( + "#silk_SUB_SAT32\n\t" + "qsub %0, %1, %2\n\t" + : "=r"(res) + : "r"(a), "r"(b) + ); + return res; +} +#define silk_SUB_SAT32(a, b) (silk_SUB_SAT32_armv5e(a, b)) + +#undef silk_CLZ16 +static OPUS_INLINE opus_int32 silk_CLZ16_armv5(opus_int16 in16) +{ + int res; + __asm__( + "#silk_CLZ16\n\t" + "clz %0, %1;\n" + : "=r"(res) + : "r"(in16<<16|0x8000) + ); + return res; +} +#define silk_CLZ16(in16) (silk_CLZ16_armv5(in16)) + +#undef silk_CLZ32 +static OPUS_INLINE opus_int32 silk_CLZ32_armv5(opus_int32 in32) +{ + int res; + __asm__( + "#silk_CLZ32\n\t" + "clz %0, %1\n\t" + : "=r"(res) + : "r"(in32) + ); + return res; +} +#define silk_CLZ32(in32) (silk_CLZ32_armv5(in32)) + +#endif /* SILK_MACROS_ARMv5E_H */ diff --git a/code/opus-1.0.2/silk/biquad_alt.c b/code/opus-1.1/silk/biquad_alt.c similarity index 99% rename from code/opus-1.0.2/silk/biquad_alt.c rename to code/opus-1.1/silk/biquad_alt.c index a639e21a..d55f5ee9 100644 --- a/code/opus-1.0.2/silk/biquad_alt.c +++ b/code/opus-1.1/silk/biquad_alt.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/bwexpander.c b/code/opus-1.1/silk/bwexpander.c similarity index 99% rename from code/opus-1.0.2/silk/bwexpander.c rename to code/opus-1.1/silk/bwexpander.c index 77ea1163..2eb44566 100644 --- a/code/opus-1.0.2/silk/bwexpander.c +++ b/code/opus-1.1/silk/bwexpander.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/bwexpander_32.c b/code/opus-1.1/silk/bwexpander_32.c similarity index 99% rename from code/opus-1.0.2/silk/bwexpander_32.c rename to code/opus-1.1/silk/bwexpander_32.c index 5ad92dd4..d0010f73 100644 --- a/code/opus-1.0.2/silk/bwexpander_32.c +++ b/code/opus-1.1/silk/bwexpander_32.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/check_control_input.c b/code/opus-1.1/silk/check_control_input.c similarity index 99% rename from code/opus-1.0.2/silk/check_control_input.c rename to code/opus-1.1/silk/check_control_input.c index 972a480d..b5de9ce4 100644 --- a/code/opus-1.0.2/silk/check_control_input.c +++ b/code/opus-1.1/silk/check_control_input.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/code_signs.c b/code/opus-1.1/silk/code_signs.c similarity index 99% rename from code/opus-1.0.2/silk/code_signs.c rename to code/opus-1.1/silk/code_signs.c index 9893cdd8..0419ea26 100644 --- a/code/opus-1.0.2/silk/code_signs.c +++ b/code/opus-1.1/silk/code_signs.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/control.h b/code/opus-1.1/silk/control.h similarity index 97% rename from code/opus-1.0.2/silk/control.h rename to code/opus-1.1/silk/control.h index c52ec3fe..747e5426 100644 --- a/code/opus-1.0.2/silk/control.h +++ b/code/opus-1.1/silk/control.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -92,6 +92,9 @@ typedef struct { /* I: Opus encoder is allowing us to switch bandwidth */ opus_int opusCanSwitch; + /* I: Make frames as independent as possible (but still use LPC) */ + opus_int reducedDependency; + /* O: Internal sampling rate used, in Hertz; 8000/12000/16000 */ opus_int32 internalSampleRate; diff --git a/code/opus-1.0.2/silk/control_SNR.c b/code/opus-1.1/silk/control_SNR.c similarity index 99% rename from code/opus-1.0.2/silk/control_SNR.c rename to code/opus-1.1/silk/control_SNR.c index 08e4e1a1..f04e69fc 100644 --- a/code/opus-1.0.2/silk/control_SNR.c +++ b/code/opus-1.1/silk/control_SNR.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/control_audio_bandwidth.c b/code/opus-1.1/silk/control_audio_bandwidth.c similarity index 97% rename from code/opus-1.0.2/silk/control_audio_bandwidth.c rename to code/opus-1.1/silk/control_audio_bandwidth.c index b645dd57..4f9bc5cb 100644 --- a/code/opus-1.0.2/silk/control_audio_bandwidth.c +++ b/code/opus-1.1/silk/control_audio_bandwidth.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -115,6 +115,9 @@ opus_int silk_control_audio_bandwidth( psEncC->sLP.mode = 1; } } + } else { + if (psEncC->sLP.mode<0) + psEncC->sLP.mode = 1; } } } diff --git a/code/opus-1.0.2/silk/control_codec.c b/code/opus-1.1/silk/control_codec.c similarity index 92% rename from code/opus-1.0.2/silk/control_codec.c rename to code/opus-1.1/silk/control_codec.c index ecc338ce..1f674bdd 100644 --- a/code/opus-1.0.2/silk/control_codec.c +++ b/code/opus-1.1/silk/control_codec.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -35,6 +35,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "main_FLP.h" #define silk_encoder_state_Fxx silk_encoder_state_FLP #endif +#include "stack_alloc.h" #include "tuning_parameters.h" #include "pitch_est_defines.h" @@ -54,7 +55,7 @@ static opus_int silk_setup_complexity( opus_int Complexity /* I */ ); -static inline opus_int silk_setup_LBRR( +static OPUS_INLINE opus_int silk_setup_LBRR( silk_encoder_state *psEncC, /* I/O */ const opus_int32 TargetRate_bps /* I */ ); @@ -137,7 +138,7 @@ static opus_int silk_setup_resamplers( ) { opus_int ret = SILK_NO_ERROR; - opus_int32 nSamples_temp; + SAVE_STACK; if( psEnc->sCmn.fs_kHz != fs_kHz || psEnc->sCmn.prev_API_fs_Hz != psEnc->sCmn.API_fs_Hz ) { @@ -145,44 +146,54 @@ static opus_int silk_setup_resamplers( /* Initialize the resampler for enc_API.c preparing resampling from API_fs_Hz to fs_kHz */ ret += silk_resampler_init( &psEnc->sCmn.resampler_state, psEnc->sCmn.API_fs_Hz, fs_kHz * 1000, 1 ); } else { - /* Allocate worst case space for temporary upsampling, 8 to 48 kHz, so a factor 6 */ - opus_int16 x_buf_API_fs_Hz[ ( 2 * MAX_FRAME_LENGTH_MS + LA_SHAPE_MS ) * MAX_API_FS_KHZ ]; - silk_resampler_state_struct temp_resampler_state; + VARDECL( opus_int16, x_buf_API_fs_Hz ); + VARDECL( silk_resampler_state_struct, temp_resampler_state ); #ifdef FIXED_POINT opus_int16 *x_bufFIX = psEnc->x_buf; #else - opus_int16 x_bufFIX[ 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ]; + VARDECL( opus_int16, x_bufFIX ); + opus_int32 new_buf_samples; #endif + opus_int32 api_buf_samples; + opus_int32 old_buf_samples; + opus_int32 buf_length_ms; - nSamples_temp = silk_LSHIFT( psEnc->sCmn.frame_length, 1 ) + LA_SHAPE_MS * psEnc->sCmn.fs_kHz; + buf_length_ms = silk_LSHIFT( psEnc->sCmn.nb_subfr * 5, 1 ) + LA_SHAPE_MS; + old_buf_samples = buf_length_ms * psEnc->sCmn.fs_kHz; #ifndef FIXED_POINT - silk_float2short_array( x_bufFIX, psEnc->x_buf, nSamples_temp ); + new_buf_samples = buf_length_ms * fs_kHz; + ALLOC( x_bufFIX, silk_max( old_buf_samples, new_buf_samples ), + opus_int16 ); + silk_float2short_array( x_bufFIX, psEnc->x_buf, old_buf_samples ); #endif /* Initialize resampler for temporary resampling of x_buf data to API_fs_Hz */ - ret += silk_resampler_init( &temp_resampler_state, silk_SMULBB( psEnc->sCmn.fs_kHz, 1000 ), psEnc->sCmn.API_fs_Hz, 0 ); + ALLOC( temp_resampler_state, 1, silk_resampler_state_struct ); + ret += silk_resampler_init( temp_resampler_state, silk_SMULBB( psEnc->sCmn.fs_kHz, 1000 ), psEnc->sCmn.API_fs_Hz, 0 ); + + /* Calculate number of samples to temporarily upsample */ + api_buf_samples = buf_length_ms * silk_DIV32_16( psEnc->sCmn.API_fs_Hz, 1000 ); /* Temporary resampling of x_buf data to API_fs_Hz */ - ret += silk_resampler( &temp_resampler_state, x_buf_API_fs_Hz, x_bufFIX, nSamples_temp ); - - /* Calculate number of samples that has been temporarily upsampled */ - nSamples_temp = silk_DIV32_16( nSamples_temp * psEnc->sCmn.API_fs_Hz, silk_SMULBB( psEnc->sCmn.fs_kHz, 1000 ) ); + ALLOC( x_buf_API_fs_Hz, api_buf_samples, opus_int16 ); + ret += silk_resampler( temp_resampler_state, x_buf_API_fs_Hz, x_bufFIX, old_buf_samples ); /* Initialize the resampler for enc_API.c preparing resampling from API_fs_Hz to fs_kHz */ ret += silk_resampler_init( &psEnc->sCmn.resampler_state, psEnc->sCmn.API_fs_Hz, silk_SMULBB( fs_kHz, 1000 ), 1 ); /* Correct resampler state by resampling buffered data from API_fs_Hz to fs_kHz */ - ret += silk_resampler( &psEnc->sCmn.resampler_state, x_bufFIX, x_buf_API_fs_Hz, nSamples_temp ); + ret += silk_resampler( &psEnc->sCmn.resampler_state, x_bufFIX, x_buf_API_fs_Hz, api_buf_samples ); #ifndef FIXED_POINT - silk_short2float_array( psEnc->x_buf, x_bufFIX, ( 2 * MAX_FRAME_LENGTH_MS + LA_SHAPE_MS ) * fs_kHz ); + silk_short2float_array( psEnc->x_buf, x_bufFIX, new_buf_samples); #endif } } psEnc->sCmn.prev_API_fs_Hz = psEnc->sCmn.API_fs_Hz; + RESTORE_STACK; return ret; } @@ -381,7 +392,7 @@ static opus_int silk_setup_complexity( return ret; } -static inline opus_int silk_setup_LBRR( +static OPUS_INLINE opus_int silk_setup_LBRR( silk_encoder_state *psEncC, /* I/O */ const opus_int32 TargetRate_bps /* I */ ) diff --git a/code/opus-1.0.2/silk/debug.c b/code/opus-1.1/silk/debug.c similarity index 99% rename from code/opus-1.0.2/silk/debug.c rename to code/opus-1.1/silk/debug.c index 9aa16cc8..9253faf7 100644 --- a/code/opus-1.0.2/silk/debug.c +++ b/code/opus-1.1/silk/debug.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/debug.h b/code/opus-1.1/silk/debug.h similarity index 98% rename from code/opus-1.0.2/silk/debug.h rename to code/opus-1.1/silk/debug.h index 8ae7094f..efb6d3e9 100644 --- a/code/opus-1.0.2/silk/debug.h +++ b/code/opus-1.1/silk/debug.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -28,10 +28,6 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_DEBUG_H #define SILK_DEBUG_H -#ifdef _WIN32 -#define _CRT_SECURE_NO_DEPRECATE 1 -#endif - #include "typedef.h" #include /* file writing */ #include /* strcpy, strcmp */ @@ -69,7 +65,6 @@ unsigned long GetHighResolutionTime(void); /* O time in usec*/ #if (defined(_WIN32) || defined(_WINCE)) #include /* timer */ -#pragma warning( disable : 4996 ) /* stop bitching about strcpy in TIC()*/ #else /* Linux or Mac*/ #include #endif diff --git a/code/opus-1.0.2/silk/dec_API.c b/code/opus-1.1/silk/dec_API.c similarity index 97% rename from code/opus-1.0.2/silk/dec_API.c rename to code/opus-1.1/silk/dec_API.c index 68403b7c..4cbcf715 100644 --- a/code/opus-1.0.2/silk/dec_API.c +++ b/code/opus-1.1/silk/dec_API.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -69,6 +69,9 @@ opus_int silk_InitDecoder( /* O Returns error co for( n = 0; n < DECODER_NUM_CHANNELS; n++ ) { ret = silk_init_decoder( &channel_state[ n ] ); } + silk_memset(&((silk_decoder *)decState)->sStereo, 0, sizeof(((silk_decoder *)decState)->sStereo)); + /* Not strictly needed, but it's cleaner that way */ + ((silk_decoder *)decState)->prev_decode_only_middle = 0; return ret; } @@ -97,6 +100,8 @@ opus_int silk_Decode( /* O Returns error co opus_int stereo_to_mono; SAVE_STACK; + silk_assert( decControl->nChannelsInternal == 1 || decControl->nChannelsInternal == 2 ); + /**********************************/ /* Test if first frame in payload */ /**********************************/ @@ -300,7 +305,7 @@ opus_int silk_Decode( /* O Returns error co /* Set up pointers to temp buffers */ ALLOC( samplesOut2_tmp, - decControl->nChannelsAPI == 2 ? *nSamplesOut : 0, opus_int16 ); + decControl->nChannelsAPI == 2 ? *nSamplesOut : ALLOC_NONE, opus_int16 ); if( decControl->nChannelsAPI == 2 ) { resample_out_ptr = samplesOut2_tmp; } else { diff --git a/code/opus-1.0.2/silk/decode_core.c b/code/opus-1.1/silk/decode_core.c similarity index 99% rename from code/opus-1.0.2/silk/decode_core.c rename to code/opus-1.1/silk/decode_core.c index 0365ffdf..a820bf11 100644 --- a/code/opus-1.0.2/silk/decode_core.c +++ b/code/opus-1.1/silk/decode_core.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/decode_frame.c b/code/opus-1.1/silk/decode_frame.c similarity index 99% rename from code/opus-1.0.2/silk/decode_frame.c rename to code/opus-1.1/silk/decode_frame.c index 3e4a6e2b..abc00a3d 100644 --- a/code/opus-1.0.2/silk/decode_frame.c +++ b/code/opus-1.1/silk/decode_frame.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/decode_indices.c b/code/opus-1.1/silk/decode_indices.c similarity index 99% rename from code/opus-1.0.2/silk/decode_indices.c rename to code/opus-1.1/silk/decode_indices.c index 69172102..7afe5c26 100644 --- a/code/opus-1.0.2/silk/decode_indices.c +++ b/code/opus-1.1/silk/decode_indices.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/decode_parameters.c b/code/opus-1.1/silk/decode_parameters.c similarity index 99% rename from code/opus-1.0.2/silk/decode_parameters.c rename to code/opus-1.1/silk/decode_parameters.c index e4c7e7a4..e345b1dc 100644 --- a/code/opus-1.0.2/silk/decode_parameters.c +++ b/code/opus-1.1/silk/decode_parameters.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/decode_pitch.c b/code/opus-1.1/silk/decode_pitch.c similarity index 99% rename from code/opus-1.0.2/silk/decode_pitch.c rename to code/opus-1.1/silk/decode_pitch.c index 80fb4d9f..fedbc6a5 100644 --- a/code/opus-1.0.2/silk/decode_pitch.c +++ b/code/opus-1.1/silk/decode_pitch.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/decode_pulses.c b/code/opus-1.1/silk/decode_pulses.c similarity index 99% rename from code/opus-1.0.2/silk/decode_pulses.c rename to code/opus-1.1/silk/decode_pulses.c index 1c781a0b..e8a87c2a 100644 --- a/code/opus-1.0.2/silk/decode_pulses.c +++ b/code/opus-1.1/silk/decode_pulses.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/decoder_set_fs.c b/code/opus-1.1/silk/decoder_set_fs.c similarity index 99% rename from code/opus-1.0.2/silk/decoder_set_fs.c rename to code/opus-1.1/silk/decoder_set_fs.c index 38ac249c..eef0fd25 100644 --- a/code/opus-1.0.2/silk/decoder_set_fs.c +++ b/code/opus-1.1/silk/decoder_set_fs.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/define.h b/code/opus-1.1/silk/define.h similarity index 99% rename from code/opus-1.0.2/silk/define.h rename to code/opus-1.1/silk/define.h index f74f4869..c47aca9f 100644 --- a/code/opus-1.0.2/silk/define.h +++ b/code/opus-1.1/silk/define.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/enc_API.c b/code/opus-1.1/silk/enc_API.c similarity index 94% rename from code/opus-1.0.2/silk/enc_API.c rename to code/opus-1.1/silk/enc_API.c index ec7915ce..43739efc 100644 --- a/code/opus-1.0.2/silk/enc_API.c +++ b/code/opus-1.1/silk/enc_API.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -32,6 +32,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "API.h" #include "control.h" #include "typedef.h" +#include "stack_alloc.h" #include "structs.h" #include "tuning_parameters.h" #ifdef FIXED_POINT @@ -68,6 +69,7 @@ opus_int silk_Get_Encoder_Size( /* O Returns error co /*************************/ opus_int silk_InitEncoder( /* O Returns error code */ void *encState, /* I/O State */ + int arch, /* I Run-time architecture */ silk_EncControlStruct *encStatus /* O Encoder Status */ ) { @@ -79,7 +81,7 @@ opus_int silk_InitEncoder( /* O Returns error co /* Reset encoder */ silk_memset( psEnc, 0, sizeof( silk_encoder ) ); for( n = 0; n < ENCODER_NUM_CHANNELS; n++ ) { - if( ret += silk_init_encoder( &psEnc->state_Fxx[ n ] ) ) { + if( ret += silk_init_encoder( &psEnc->state_Fxx[ n ], arch ) ) { silk_assert( 0 ); } } @@ -146,18 +148,26 @@ opus_int silk_Encode( /* O Returns error co ) { opus_int n, i, nBits, flags, tmp_payloadSize_ms = 0, tmp_complexity = 0, ret = 0; - opus_int nSamplesToBuffer, nBlocksOf10ms, nSamplesFromInput = 0; + opus_int nSamplesToBuffer, nSamplesToBufferMax, nBlocksOf10ms; + opus_int nSamplesFromInput = 0, nSamplesFromInputMax; opus_int speech_act_thr_for_switch_Q8; opus_int32 TargetRate_bps, MStargetRates_bps[ 2 ], channelRate_bps, LBRR_symbol, sum; silk_encoder *psEnc = ( silk_encoder * )encState; - opus_int16 buf[ MAX_FRAME_LENGTH_MS * MAX_API_FS_KHZ ]; + VARDECL( opus_int16, buf ); opus_int transition, curr_block, tot_blocks; + SAVE_STACK; + if (encControl->reducedDependency) + { + psEnc->state_Fxx[0].sCmn.first_frame_after_reset = 1; + psEnc->state_Fxx[1].sCmn.first_frame_after_reset = 1; + } psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded = psEnc->state_Fxx[ 1 ].sCmn.nFramesEncoded = 0; /* Check values in encoder control structure */ if( ( ret = check_control_input( encControl ) != 0 ) ) { silk_assert( 0 ); + RESTORE_STACK; return ret; } @@ -165,7 +175,7 @@ opus_int silk_Encode( /* O Returns error co if( encControl->nChannelsInternal > psEnc->nChannelsInternal ) { /* Mono -> Stereo transition: init state of second channel and stereo state */ - ret += silk_init_encoder( &psEnc->state_Fxx[ 1 ] ); + ret += silk_init_encoder( &psEnc->state_Fxx[ 1 ], psEnc->state_Fxx[ 0 ].sCmn.arch ); silk_memset( psEnc->sStereo.pred_prev_Q13, 0, sizeof( psEnc->sStereo.pred_prev_Q13 ) ); silk_memset( psEnc->sStereo.sSide, 0, sizeof( psEnc->sStereo.sSide ) ); psEnc->sStereo.mid_side_amp_Q0[ 0 ] = 0; @@ -191,15 +201,14 @@ opus_int silk_Encode( /* O Returns error co if( prefillFlag ) { /* Only accept input length of 10 ms */ if( nBlocksOf10ms != 1 ) { - ret = SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES; silk_assert( 0 ); - return ret; + RESTORE_STACK; + return SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES; } /* Reset Encoder */ for( n = 0; n < encControl->nChannelsInternal; n++ ) { - if( (ret = silk_init_encoder( &psEnc->state_Fxx[ n ] ) ) != 0 ) { - silk_assert( 0 ); - } + ret = silk_init_encoder( &psEnc->state_Fxx[ n ], psEnc->state_Fxx[ n ].sCmn.arch ); + silk_assert( !ret ); } tmp_payloadSize_ms = encControl->payloadSize_ms; encControl->payloadSize_ms = 10; @@ -212,15 +221,15 @@ opus_int silk_Encode( /* O Returns error co } else { /* Only accept input lengths that are a multiple of 10 ms */ if( nBlocksOf10ms * encControl->API_sampleRate != 100 * nSamplesIn || nSamplesIn < 0 ) { - ret = SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES; silk_assert( 0 ); - return ret; + RESTORE_STACK; + return SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES; } /* Make sure no more than one packet can be produced */ if( 1000 * (opus_int32)nSamplesIn > encControl->payloadSize_ms * encControl->API_sampleRate ) { - ret = SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES; silk_assert( 0 ); - return ret; + RESTORE_STACK; + return SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES; } } @@ -230,6 +239,7 @@ opus_int silk_Encode( /* O Returns error co opus_int force_fs_kHz = (n==1) ? psEnc->state_Fxx[0].sCmn.fs_kHz : 0; if( ( ret = silk_control_encoder( &psEnc->state_Fxx[ n ], encControl, TargetRate_bps, psEnc->allowBandwidthSwitch, n, force_fs_kHz ) ) != 0 ) { silk_assert( 0 ); + RESTORE_STACK; return ret; } if( psEnc->state_Fxx[n].sCmn.first_frame_after_reset || transition ) { @@ -242,9 +252,16 @@ opus_int silk_Encode( /* O Returns error co silk_assert( encControl->nChannelsInternal == 1 || psEnc->state_Fxx[ 0 ].sCmn.fs_kHz == psEnc->state_Fxx[ 1 ].sCmn.fs_kHz ); /* Input buffering/resampling and encoding */ + nSamplesToBufferMax = + 10 * nBlocksOf10ms * psEnc->state_Fxx[ 0 ].sCmn.fs_kHz; + nSamplesFromInputMax = + silk_DIV32_16( nSamplesToBufferMax * + psEnc->state_Fxx[ 0 ].sCmn.API_fs_Hz, + psEnc->state_Fxx[ 0 ].sCmn.fs_kHz * 1000 ); + ALLOC( buf, nSamplesFromInputMax, opus_int16 ); while( 1 ) { nSamplesToBuffer = psEnc->state_Fxx[ 0 ].sCmn.frame_length - psEnc->state_Fxx[ 0 ].sCmn.inputBufIx; - nSamplesToBuffer = silk_min( nSamplesToBuffer, 10 * nBlocksOf10ms * psEnc->state_Fxx[ 0 ].sCmn.fs_kHz ); + nSamplesToBuffer = silk_min( nSamplesToBuffer, nSamplesToBufferMax ); nSamplesFromInput = silk_DIV32_16( nSamplesToBuffer * psEnc->state_Fxx[ 0 ].sCmn.API_fs_Hz, psEnc->state_Fxx[ 0 ].sCmn.fs_kHz * 1000 ); /* Resample and write to buffer */ if( encControl->nChannelsAPI == 2 && encControl->nChannelsInternal == 2 ) { @@ -533,6 +550,7 @@ opus_int silk_Encode( /* O Returns error co } } + RESTORE_STACK; return ret; } diff --git a/code/opus-1.0.2/silk/encode_indices.c b/code/opus-1.1/silk/encode_indices.c similarity index 99% rename from code/opus-1.0.2/silk/encode_indices.c rename to code/opus-1.1/silk/encode_indices.c index 91e28aa9..666c8c0b 100644 --- a/code/opus-1.0.2/silk/encode_indices.c +++ b/code/opus-1.1/silk/encode_indices.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/encode_pulses.c b/code/opus-1.1/silk/encode_pulses.c similarity index 94% rename from code/opus-1.0.2/silk/encode_pulses.c rename to code/opus-1.1/silk/encode_pulses.c index b01b5853..a4501438 100644 --- a/code/opus-1.0.2/silk/encode_pulses.c +++ b/code/opus-1.1/silk/encode_pulses.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,12 +30,13 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "main.h" +#include "stack_alloc.h" /*********************************************/ /* Encode quantization indices of excitation */ /*********************************************/ -static inline opus_int combine_and_check( /* return ok */ +static OPUS_INLINE opus_int combine_and_check( /* return ok */ opus_int *pulses_comb, /* O */ const opus_int *pulses_in, /* I */ opus_int max_pulses, /* I max value for sum of pulses */ @@ -66,14 +67,15 @@ void silk_encode_pulses( { opus_int i, k, j, iter, bit, nLS, scale_down, RateLevelIndex = 0; opus_int32 abs_q, minSumBits_Q5, sumBits_Q5; - opus_int abs_pulses[ MAX_FRAME_LENGTH ]; - opus_int sum_pulses[ MAX_NB_SHELL_BLOCKS ]; - opus_int nRshifts[ MAX_NB_SHELL_BLOCKS ]; + VARDECL( opus_int, abs_pulses ); + VARDECL( opus_int, sum_pulses ); + VARDECL( opus_int, nRshifts ); opus_int pulses_comb[ 8 ]; opus_int *abs_pulses_ptr; const opus_int8 *pulses_ptr; const opus_uint8 *cdf_ptr; const opus_uint8 *nBits_ptr; + SAVE_STACK; silk_memset( pulses_comb, 0, 8 * sizeof( opus_int ) ); /* Fixing Valgrind reported problem*/ @@ -90,6 +92,8 @@ void silk_encode_pulses( } /* Take the absolute value of the pulses */ + ALLOC( abs_pulses, iter * SHELL_CODEC_FRAME_LENGTH, opus_int ); + silk_assert( !( SHELL_CODEC_FRAME_LENGTH & 3 ) ); for( i = 0; i < iter * SHELL_CODEC_FRAME_LENGTH; i+=4 ) { abs_pulses[i+0] = ( opus_int )silk_abs( pulses[ i + 0 ] ); abs_pulses[i+1] = ( opus_int )silk_abs( pulses[ i + 1 ] ); @@ -98,6 +102,8 @@ void silk_encode_pulses( } /* Calc sum pulses per shell code frame */ + ALLOC( sum_pulses, iter, opus_int ); + ALLOC( nRshifts, iter, opus_int ); abs_pulses_ptr = abs_pulses; for( i = 0; i < iter; i++ ) { nRshifts[ i ] = 0; @@ -196,4 +202,5 @@ void silk_encode_pulses( /* Encode signs */ /****************/ silk_encode_signs( psRangeEnc, pulses, frame_length, signalType, quantOffsetType, sum_pulses ); + RESTORE_STACK; } diff --git a/code/opus-1.0.2/silk/errors.h b/code/opus-1.1/silk/errors.h similarity index 99% rename from code/opus-1.0.2/silk/errors.h rename to code/opus-1.1/silk/errors.h index 0591e009..45070800 100644 --- a/code/opus-1.0.2/silk/errors.h +++ b/code/opus-1.1/silk/errors.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/fixed/LTP_analysis_filter_FIX.c b/code/opus-1.1/silk/fixed/LTP_analysis_filter_FIX.c similarity index 99% rename from code/opus-1.0.2/silk/fixed/LTP_analysis_filter_FIX.c rename to code/opus-1.1/silk/fixed/LTP_analysis_filter_FIX.c index a8fee555..a9419080 100644 --- a/code/opus-1.0.2/silk/fixed/LTP_analysis_filter_FIX.c +++ b/code/opus-1.1/silk/fixed/LTP_analysis_filter_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/fixed/LTP_scale_ctrl_FIX.c b/code/opus-1.1/silk/fixed/LTP_scale_ctrl_FIX.c similarity index 99% rename from code/opus-1.0.2/silk/fixed/LTP_scale_ctrl_FIX.c rename to code/opus-1.1/silk/fixed/LTP_scale_ctrl_FIX.c index ac2fba17..3dcedef8 100644 --- a/code/opus-1.0.2/silk/fixed/LTP_scale_ctrl_FIX.c +++ b/code/opus-1.1/silk/fixed/LTP_scale_ctrl_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/fixed/apply_sine_window_FIX.c b/code/opus-1.1/silk/fixed/apply_sine_window_FIX.c similarity index 99% rename from code/opus-1.0.2/silk/fixed/apply_sine_window_FIX.c rename to code/opus-1.1/silk/fixed/apply_sine_window_FIX.c index 897fdc30..4502b713 100644 --- a/code/opus-1.0.2/silk/fixed/apply_sine_window_FIX.c +++ b/code/opus-1.1/silk/fixed/apply_sine_window_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/fixed/autocorr_FIX.c b/code/opus-1.1/silk/fixed/autocorr_FIX.c similarity index 64% rename from code/opus-1.0.2/silk/fixed/autocorr_FIX.c rename to code/opus-1.1/silk/fixed/autocorr_FIX.c index c2ebb6a9..de95c986 100644 --- a/code/opus-1.0.2/silk/fixed/autocorr_FIX.c +++ b/code/opus-1.1/silk/fixed/autocorr_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "SigProc_FIX.h" +#include "celt_lpc.h" /* Compute autocorrelation */ void silk_autocorr( @@ -37,40 +38,11 @@ void silk_autocorr( opus_int *scale, /* O Scaling of the correlation vector */ const opus_int16 *inputData, /* I Input data to correlate */ const opus_int inputDataSize, /* I Length of input */ - const opus_int correlationCount /* I Number of correlation taps to compute */ + const opus_int correlationCount, /* I Number of correlation taps to compute */ + int arch /* I Run-time architecture */ ) { - opus_int i, lz, nRightShifts, corrCount; - opus_int64 corr64; - + opus_int corrCount; corrCount = silk_min_int( inputDataSize, correlationCount ); - - /* compute energy (zero-lag correlation) */ - corr64 = silk_inner_prod16_aligned_64( inputData, inputData, inputDataSize ); - - /* deal with all-zero input data */ - corr64 += 1; - - /* number of leading zeros */ - lz = silk_CLZ64( corr64 ); - - /* scaling: number of right shifts applied to correlations */ - nRightShifts = 35 - lz; - *scale = nRightShifts; - - if( nRightShifts <= 0 ) { - results[ 0 ] = silk_LSHIFT( (opus_int32)silk_CHECK_FIT32( corr64 ), -nRightShifts ); - - /* compute remaining correlations based on int32 inner product */ - for( i = 1; i < corrCount; i++ ) { - results[ i ] = silk_LSHIFT( silk_inner_prod_aligned( inputData, inputData + i, inputDataSize - i ), -nRightShifts ); - } - } else { - results[ 0 ] = (opus_int32)silk_CHECK_FIT32( silk_RSHIFT64( corr64, nRightShifts ) ); - - /* compute remaining correlations based on int64 inner product */ - for( i = 1; i < corrCount; i++ ) { - results[ i ] = (opus_int32)silk_CHECK_FIT32( silk_RSHIFT64( silk_inner_prod16_aligned_64( inputData, inputData + i, inputDataSize - i ), nRightShifts ) ); - } - } + *scale = _celt_autocorr(inputData, results, NULL, 0, corrCount-1, inputDataSize, arch); } diff --git a/code/opus-1.0.2/silk/fixed/burg_modified_FIX.c b/code/opus-1.1/silk/fixed/burg_modified_FIX.c similarity index 94% rename from code/opus-1.0.2/silk/fixed/burg_modified_FIX.c rename to code/opus-1.1/silk/fixed/burg_modified_FIX.c index 26a66b1c..db348295 100644 --- a/code/opus-1.0.2/silk/fixed/burg_modified_FIX.c +++ b/code/opus-1.1/silk/fixed/burg_modified_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -32,6 +32,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "SigProc_FIX.h" #include "define.h" #include "tuning_parameters.h" +#include "pitch.h" #define MAX_FRAME_SIZE 384 /* subfr_length * nb_subfr = ( 0.005 * 16000 + 16 ) * 4 = 384 */ @@ -49,7 +50,8 @@ void silk_burg_modified( const opus_int32 minInvGain_Q30, /* I Inverse of max prediction gain */ const opus_int subfr_length, /* I Input signal subframe length (incl. D preceding samples) */ const opus_int nb_subfr, /* I Number of subframes stacked in x */ - const opus_int D /* I Order */ + const opus_int D, /* I Order */ + int arch /* I Run-time architecture */ ) { opus_int k, n, s, lz, rshifts, rshifts_extra, reached_max_gain; @@ -60,6 +62,7 @@ void silk_burg_modified( opus_int32 Af_QA[ SILK_MAX_ORDER_LPC ]; opus_int32 CAf[ SILK_MAX_ORDER_LPC + 1 ]; opus_int32 CAb[ SILK_MAX_ORDER_LPC + 1 ]; + opus_int32 xcorr[ SILK_MAX_ORDER_LPC ]; silk_assert( subfr_length * nb_subfr <= MAX_FRAME_SIZE ); @@ -93,10 +96,17 @@ void silk_burg_modified( } } else { for( s = 0; s < nb_subfr; s++ ) { + int i; + opus_int32 d; x_ptr = x + s * subfr_length; + celt_pitch_xcorr(x_ptr, x_ptr + 1, xcorr, subfr_length - D, D, arch ); for( n = 1; n < D + 1; n++ ) { - C_first_row[ n - 1 ] += silk_LSHIFT32( - silk_inner_prod_aligned( x_ptr, x_ptr + n, subfr_length - n ), -rshifts ); + for ( i = n + subfr_length - D, d = 0; i < subfr_length; i++ ) + d = MAC16_16( d, x_ptr[ i ], x_ptr[ i - n ] ); + xcorr[ n - 1 ] += d; + } + for( n = 1; n < D + 1; n++ ) { + C_first_row[ n - 1 ] += silk_LSHIFT32( xcorr[ n - 1 ], -rshifts ); } } } @@ -263,7 +273,7 @@ void silk_burg_modified( tmp1 = silk_SMLAWW( tmp1, Atmp1, Atmp1 ); /* Q16 */ A_Q16[ k ] = -Atmp1; } - *res_nrg = silk_SMLAWW( nrg, silk_SMMUL( FIND_LPC_COND_FAC, C0 ), -tmp1 ); /* Q( -rshifts ) */ + *res_nrg = silk_SMLAWW( nrg, silk_SMMUL( SILK_FIX_CONST( FIND_LPC_COND_FAC, 32 ), C0 ), -tmp1 );/* Q( -rshifts ) */ *res_nrg_Q = -rshifts; - } + } } diff --git a/code/opus-1.0.2/silk/fixed/corrMatrix_FIX.c b/code/opus-1.1/silk/fixed/corrMatrix_FIX.c similarity index 99% rename from code/opus-1.0.2/silk/fixed/corrMatrix_FIX.c rename to code/opus-1.1/silk/fixed/corrMatrix_FIX.c index 21502499..c6172705 100644 --- a/code/opus-1.0.2/silk/fixed/corrMatrix_FIX.c +++ b/code/opus-1.1/silk/fixed/corrMatrix_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/fixed/encode_frame_FIX.c b/code/opus-1.1/silk/fixed/encode_frame_FIX.c similarity index 95% rename from code/opus-1.0.2/silk/fixed/encode_frame_FIX.c rename to code/opus-1.1/silk/fixed/encode_frame_FIX.c index a37a9f21..b490986b 100644 --- a/code/opus-1.0.2/silk/fixed/encode_frame_FIX.c +++ b/code/opus-1.1/silk/fixed/encode_frame_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,10 +30,11 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "main_FIX.h" +#include "stack_alloc.h" #include "tuning_parameters.h" /* Low Bitrate Redundancy (LBRR) encoding. Reuse all parameters but encode with lower bitrate */ -static inline void silk_LBRR_encode_FIX( +static OPUS_INLINE void silk_LBRR_encode_FIX( silk_encoder_state_FIX *psEnc, /* I/O Pointer to Silk FIX encoder state */ silk_encoder_control_FIX *psEncCtrl, /* I/O Pointer to Silk FIX encoder control struct */ const opus_int32 xfw_Q3[], /* I Input signal */ @@ -84,9 +85,7 @@ opus_int silk_encode_frame_FIX( { silk_encoder_control_FIX sEncCtrl; opus_int i, iter, maxIter, found_upper, found_lower, ret = 0; - opus_int16 *x_frame, *res_pitch_frame; - opus_int32 xfw_Q3[ MAX_FRAME_LENGTH ]; - opus_int16 res_pitch[ 2 * MAX_FRAME_LENGTH + LA_PITCH_MAX ]; + opus_int16 *x_frame; ec_enc sRangeEnc_copy, sRangeEnc_copy2; silk_nsq_state sNSQ_copy, sNSQ_copy2; opus_int32 seed_copy, nBits, nBits_lower, nBits_upper, gainMult_lower, gainMult_upper; @@ -95,7 +94,7 @@ opus_int silk_encode_frame_FIX( opus_int16 ec_prevLagIndex_copy; opus_int ec_prevSignalType_copy; opus_int8 LastGainIndex_copy2; - opus_uint8 ec_buf_copy[ 1275 ]; + SAVE_STACK; /* This is totally unnecessary but many compilers (including gcc) are too dumb to realise it */ LastGainIndex_copy2 = nBits_lower = nBits_upper = gainMult_lower = gainMult_upper = 0; @@ -105,9 +104,8 @@ opus_int silk_encode_frame_FIX( /**************************************************************/ /* Set up Input Pointers, and insert frame in input buffer */ /*************************************************************/ - /* pointers aligned with start of frame to encode */ - x_frame = psEnc->x_buf + psEnc->sCmn.ltp_mem_length; /* start of frame to encode */ - res_pitch_frame = res_pitch + psEnc->sCmn.ltp_mem_length; /* start of pitch LPC residual frame */ + /* start of frame to encode */ + x_frame = psEnc->x_buf + psEnc->sCmn.ltp_mem_length; /***************************************/ /* Ensure smooth bandwidth transitions */ @@ -120,15 +118,26 @@ opus_int silk_encode_frame_FIX( silk_memcpy( x_frame + LA_SHAPE_MS * psEnc->sCmn.fs_kHz, psEnc->sCmn.inputBuf + 1, psEnc->sCmn.frame_length * sizeof( opus_int16 ) ); if( !psEnc->sCmn.prefillFlag ) { + VARDECL( opus_int32, xfw_Q3 ); + VARDECL( opus_int16, res_pitch ); + VARDECL( opus_uint8, ec_buf_copy ); + opus_int16 *res_pitch_frame; + + ALLOC( res_pitch, + psEnc->sCmn.la_pitch + psEnc->sCmn.frame_length + + psEnc->sCmn.ltp_mem_length, opus_int16 ); + /* start of pitch LPC residual frame */ + res_pitch_frame = res_pitch + psEnc->sCmn.ltp_mem_length; + /*****************************************/ /* Find pitch lags, initial LPC analysis */ /*****************************************/ - silk_find_pitch_lags_FIX( psEnc, &sEncCtrl, res_pitch, x_frame ); + silk_find_pitch_lags_FIX( psEnc, &sEncCtrl, res_pitch, x_frame, psEnc->sCmn.arch ); /************************/ /* Noise shape analysis */ /************************/ - silk_noise_shape_analysis_FIX( psEnc, &sEncCtrl, res_pitch_frame, x_frame ); + silk_noise_shape_analysis_FIX( psEnc, &sEncCtrl, res_pitch_frame, x_frame, psEnc->sCmn.arch ); /***************************************************/ /* Find linear prediction coefficients (LPC + LTP) */ @@ -143,6 +152,7 @@ opus_int silk_encode_frame_FIX( /*****************************************/ /* Prefiltering for noise shaper */ /*****************************************/ + ALLOC( xfw_Q3, psEnc->sCmn.frame_length, opus_int32 ); silk_prefilter_FIX( psEnc, &sEncCtrl, xfw_Q3, x_frame ); /****************************************/ @@ -164,6 +174,7 @@ opus_int silk_encode_frame_FIX( seed_copy = psEnc->sCmn.indices.Seed; ec_prevLagIndex_copy = psEnc->sCmn.ec_prevLagIndex; ec_prevSignalType_copy = psEnc->sCmn.ec_prevSignalType; + ALLOC( ec_buf_copy, 1275, opus_uint8 ); for( iter = 0; ; iter++ ) { if( gainsID == gainsID_lower ) { nBits = nBits_lower; @@ -291,17 +302,18 @@ opus_int silk_encode_frame_FIX( silk_memmove( psEnc->x_buf, &psEnc->x_buf[ psEnc->sCmn.frame_length ], ( psEnc->sCmn.ltp_mem_length + LA_SHAPE_MS * psEnc->sCmn.fs_kHz ) * sizeof( opus_int16 ) ); - /* Parameters needed for next frame */ - psEnc->sCmn.prevLag = sEncCtrl.pitchL[ psEnc->sCmn.nb_subfr - 1 ]; - psEnc->sCmn.prevSignalType = psEnc->sCmn.indices.signalType; - /* Exit without entropy coding */ if( psEnc->sCmn.prefillFlag ) { /* No payload */ *pnBytesOut = 0; + RESTORE_STACK; return ret; } + /* Parameters needed for next frame */ + psEnc->sCmn.prevLag = sEncCtrl.pitchL[ psEnc->sCmn.nb_subfr - 1 ]; + psEnc->sCmn.prevSignalType = psEnc->sCmn.indices.signalType; + /****************************************/ /* Finalize payload */ /****************************************/ @@ -309,11 +321,12 @@ opus_int silk_encode_frame_FIX( /* Payload size */ *pnBytesOut = silk_RSHIFT( ec_tell( psRangeEnc ) + 7, 3 ); + RESTORE_STACK; return ret; } /* Low-Bitrate Redundancy (LBRR) encoding. Reuse all parameters but encode excitation at lower bitrate */ -static inline void silk_LBRR_encode_FIX( +static OPUS_INLINE void silk_LBRR_encode_FIX( silk_encoder_state_FIX *psEnc, /* I/O Pointer to Silk FIX encoder state */ silk_encoder_control_FIX *psEncCtrl, /* I/O Pointer to Silk FIX encoder control struct */ const opus_int32 xfw_Q3[], /* I Input signal */ diff --git a/code/opus-1.0.2/silk/fixed/find_LPC_FIX.c b/code/opus-1.1/silk/fixed/find_LPC_FIX.c similarity index 96% rename from code/opus-1.0.2/silk/fixed/find_LPC_FIX.c rename to code/opus-1.1/silk/fixed/find_LPC_FIX.c index 0ed7e846..783d32e2 100644 --- a/code/opus-1.0.2/silk/fixed/find_LPC_FIX.c +++ b/code/opus-1.1/silk/fixed/find_LPC_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "main_FIX.h" +#include "stack_alloc.h" #include "tuning_parameters.h" /* Finds LPC vector from correlations, and converts to NLSF */ @@ -51,7 +52,7 @@ void silk_find_LPC_FIX( opus_int res_nrg_interp_Q, res_nrg_Q, res_tmp_nrg_Q; opus_int16 a_tmp_Q12[ MAX_LPC_ORDER ]; opus_int16 NLSF0_Q15[ MAX_LPC_ORDER ]; - opus_int16 LPC_res[ MAX_FRAME_LENGTH + MAX_NB_SUBFR * MAX_LPC_ORDER ]; + SAVE_STACK; subfr_length = psEncC->subfr_length + psEncC->predictLPCOrder; @@ -59,11 +60,13 @@ void silk_find_LPC_FIX( psEncC->indices.NLSFInterpCoef_Q2 = 4; /* Burg AR analysis for the full frame */ - silk_burg_modified( &res_nrg, &res_nrg_Q, a_Q16, x, minInvGain_Q30, subfr_length, psEncC->nb_subfr, psEncC->predictLPCOrder ); + silk_burg_modified( &res_nrg, &res_nrg_Q, a_Q16, x, minInvGain_Q30, subfr_length, psEncC->nb_subfr, psEncC->predictLPCOrder, psEncC->arch ); if( psEncC->useInterpolatedNLSFs && !psEncC->first_frame_after_reset && psEncC->nb_subfr == MAX_NB_SUBFR ) { + VARDECL( opus_int16, LPC_res ); + /* Optimal solution for last 10 ms */ - silk_burg_modified( &res_tmp_nrg, &res_tmp_nrg_Q, a_tmp_Q16, x + 2 * subfr_length, minInvGain_Q30, subfr_length, 2, psEncC->predictLPCOrder ); + silk_burg_modified( &res_tmp_nrg, &res_tmp_nrg_Q, a_tmp_Q16, x + 2 * subfr_length, minInvGain_Q30, subfr_length, 2, psEncC->predictLPCOrder, psEncC->arch ); /* subtract residual energy here, as that's easier than adding it to the */ /* residual energy of the first 10 ms in each iteration of the search below */ @@ -81,6 +84,8 @@ void silk_find_LPC_FIX( /* Convert to NLSFs */ silk_A2NLSF( NLSF_Q15, a_tmp_Q16, psEncC->predictLPCOrder ); + ALLOC( LPC_res, 2 * subfr_length, opus_int16 ); + /* Search over interpolation indices to find the one with lowest residual energy */ for( k = 3; k >= 0; k-- ) { /* Interpolate NLSFs for first half */ @@ -142,4 +147,5 @@ void silk_find_LPC_FIX( } silk_assert( psEncC->indices.NLSFInterpCoef_Q2 == 4 || ( psEncC->useInterpolatedNLSFs && !psEncC->first_frame_after_reset && psEncC->nb_subfr == MAX_NB_SUBFR ) ); + RESTORE_STACK; } diff --git a/code/opus-1.0.2/silk/fixed/find_LTP_FIX.c b/code/opus-1.1/silk/fixed/find_LTP_FIX.c similarity index 99% rename from code/opus-1.0.2/silk/fixed/find_LTP_FIX.c rename to code/opus-1.1/silk/fixed/find_LTP_FIX.c index bd210874..8c4d7037 100644 --- a/code/opus-1.0.2/silk/fixed/find_LTP_FIX.c +++ b/code/opus-1.1/silk/fixed/find_LTP_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/fixed/find_pitch_lags_FIX.c b/code/opus-1.1/silk/fixed/find_pitch_lags_FIX.c similarity index 83% rename from code/opus-1.0.2/silk/fixed/find_pitch_lags_FIX.c rename to code/opus-1.1/silk/fixed/find_pitch_lags_FIX.c index 39c30487..620f8dcd 100644 --- a/code/opus-1.0.2/silk/fixed/find_pitch_lags_FIX.c +++ b/code/opus-1.1/silk/fixed/find_pitch_lags_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "main_FIX.h" +#include "stack_alloc.h" #include "tuning_parameters.h" /* Find pitch lags */ @@ -37,17 +38,20 @@ void silk_find_pitch_lags_FIX( silk_encoder_state_FIX *psEnc, /* I/O encoder state */ silk_encoder_control_FIX *psEncCtrl, /* I/O encoder control */ opus_int16 res[], /* O residual */ - const opus_int16 x[] /* I Speech signal */ + const opus_int16 x[], /* I Speech signal */ + int arch /* I Run-time architecture */ ) { opus_int buf_len, i, scale; - opus_int32 thrhld_Q15, res_nrg; + opus_int32 thrhld_Q13, res_nrg; const opus_int16 *x_buf, *x_buf_ptr; - opus_int16 Wsig[ FIND_PITCH_LPC_WIN_MAX ], *Wsig_ptr; + VARDECL( opus_int16, Wsig ); + opus_int16 *Wsig_ptr; opus_int32 auto_corr[ MAX_FIND_PITCH_LPC_ORDER + 1 ]; opus_int16 rc_Q15[ MAX_FIND_PITCH_LPC_ORDER ]; opus_int32 A_Q24[ MAX_FIND_PITCH_LPC_ORDER ]; opus_int16 A_Q12[ MAX_FIND_PITCH_LPC_ORDER ]; + SAVE_STACK; /******************************************/ /* Set up buffer lengths etc based on Fs */ @@ -65,6 +69,8 @@ void silk_find_pitch_lags_FIX( /* Calculate windowed signal */ + ALLOC( Wsig, psEnc->sCmn.pitch_LPC_win_length, opus_int16 ); + /* First LA_LTP samples */ x_buf_ptr = x_buf + buf_len - psEnc->sCmn.pitch_LPC_win_length; Wsig_ptr = Wsig; @@ -81,7 +87,7 @@ void silk_find_pitch_lags_FIX( silk_apply_sine_window( Wsig_ptr, x_buf_ptr, 2, psEnc->sCmn.la_pitch ); /* Calculate autocorrelation sequence */ - silk_autocorr( auto_corr, &scale, Wsig, psEnc->sCmn.pitch_LPC_win_length, psEnc->sCmn.pitchEstimationLPCOrder + 1 ); + silk_autocorr( auto_corr, &scale, Wsig, psEnc->sCmn.pitch_LPC_win_length, psEnc->sCmn.pitchEstimationLPCOrder + 1, arch ); /* Add white noise, as fraction of energy */ auto_corr[ 0 ] = silk_SMLAWB( auto_corr[ 0 ], auto_corr[ 0 ], SILK_FIX_CONST( FIND_PITCH_WHITE_NOISE_FRACTION, 16 ) ) + 1; @@ -110,19 +116,20 @@ void silk_find_pitch_lags_FIX( if( psEnc->sCmn.indices.signalType != TYPE_NO_VOICE_ACTIVITY && psEnc->sCmn.first_frame_after_reset == 0 ) { /* Threshold for pitch estimator */ - thrhld_Q15 = SILK_FIX_CONST( 0.6, 15 ); - thrhld_Q15 = silk_SMLABB( thrhld_Q15, SILK_FIX_CONST( -0.004, 15 ), psEnc->sCmn.pitchEstimationLPCOrder ); - thrhld_Q15 = silk_SMLABB( thrhld_Q15, SILK_FIX_CONST( -0.1, 7 ), psEnc->sCmn.speech_activity_Q8 ); - thrhld_Q15 = silk_SMLABB( thrhld_Q15, SILK_FIX_CONST( -0.15, 15 ), silk_RSHIFT( psEnc->sCmn.prevSignalType, 1 ) ); - thrhld_Q15 = silk_SMLAWB( thrhld_Q15, SILK_FIX_CONST( -0.1, 16 ), psEnc->sCmn.input_tilt_Q15 ); - thrhld_Q15 = silk_SAT16( thrhld_Q15 ); + thrhld_Q13 = SILK_FIX_CONST( 0.6, 13 ); + thrhld_Q13 = silk_SMLABB( thrhld_Q13, SILK_FIX_CONST( -0.004, 13 ), psEnc->sCmn.pitchEstimationLPCOrder ); + thrhld_Q13 = silk_SMLAWB( thrhld_Q13, SILK_FIX_CONST( -0.1, 21 ), psEnc->sCmn.speech_activity_Q8 ); + thrhld_Q13 = silk_SMLABB( thrhld_Q13, SILK_FIX_CONST( -0.15, 13 ), silk_RSHIFT( psEnc->sCmn.prevSignalType, 1 ) ); + thrhld_Q13 = silk_SMLAWB( thrhld_Q13, SILK_FIX_CONST( -0.1, 14 ), psEnc->sCmn.input_tilt_Q15 ); + thrhld_Q13 = silk_SAT16( thrhld_Q13 ); /*****************************************/ /* Call pitch estimator */ /*****************************************/ if( silk_pitch_analysis_core( res, psEncCtrl->pitchL, &psEnc->sCmn.indices.lagIndex, &psEnc->sCmn.indices.contourIndex, &psEnc->LTPCorr_Q15, psEnc->sCmn.prevLag, psEnc->sCmn.pitchEstimationThreshold_Q16, - (opus_int16)thrhld_Q15, psEnc->sCmn.fs_kHz, psEnc->sCmn.pitchEstimationComplexity, psEnc->sCmn.nb_subfr ) == 0 ) + (opus_int)thrhld_Q13, psEnc->sCmn.fs_kHz, psEnc->sCmn.pitchEstimationComplexity, psEnc->sCmn.nb_subfr, + psEnc->sCmn.arch) == 0 ) { psEnc->sCmn.indices.signalType = TYPE_VOICED; } else { @@ -134,4 +141,5 @@ void silk_find_pitch_lags_FIX( psEnc->sCmn.indices.contourIndex = 0; psEnc->LTPCorr_Q15 = 0; } + RESTORE_STACK; } diff --git a/code/opus-1.0.2/silk/fixed/find_pred_coefs_FIX.c b/code/opus-1.1/silk/fixed/find_pred_coefs_FIX.c similarity index 92% rename from code/opus-1.0.2/silk/fixed/find_pred_coefs_FIX.c rename to code/opus-1.1/silk/fixed/find_pred_coefs_FIX.c index 997989b5..5c22f828 100644 --- a/code/opus-1.0.2/silk/fixed/find_pred_coefs_FIX.c +++ b/code/opus-1.1/silk/fixed/find_pred_coefs_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "main_FIX.h" +#include "stack_alloc.h" void silk_find_pred_coefs_FIX( silk_encoder_state_FIX *psEnc, /* I/O encoder state */ @@ -40,13 +41,14 @@ void silk_find_pred_coefs_FIX( ) { opus_int i; - opus_int32 WLTP[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ]; opus_int32 invGains_Q16[ MAX_NB_SUBFR ], local_gains[ MAX_NB_SUBFR ], Wght_Q15[ MAX_NB_SUBFR ]; opus_int16 NLSF_Q15[ MAX_LPC_ORDER ]; const opus_int16 *x_ptr; - opus_int16 *x_pre_ptr, LPC_in_pre[ MAX_NB_SUBFR * MAX_LPC_ORDER + MAX_FRAME_LENGTH ]; + opus_int16 *x_pre_ptr; + VARDECL( opus_int16, LPC_in_pre ); opus_int32 tmp, min_gain_Q16, minInvGain_Q30; opus_int LTP_corrs_rshift[ MAX_NB_SUBFR ]; + SAVE_STACK; /* weighting for weighted least squares */ min_gain_Q16 = silk_int32_MAX >> 6; @@ -71,12 +73,19 @@ void silk_find_pred_coefs_FIX( local_gains[ i ] = silk_DIV32( ( (opus_int32)1 << 16 ), invGains_Q16[ i ] ); } + ALLOC( LPC_in_pre, + psEnc->sCmn.nb_subfr * psEnc->sCmn.predictLPCOrder + + psEnc->sCmn.frame_length, opus_int16 ); if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) { + VARDECL( opus_int32, WLTP ); + /**********/ /* VOICED */ /**********/ silk_assert( psEnc->sCmn.ltp_mem_length - psEnc->sCmn.predictLPCOrder >= psEncCtrl->pitchL[ 0 ] + LTP_ORDER / 2 ); + ALLOC( WLTP, psEnc->sCmn.nb_subfr * LTP_ORDER * LTP_ORDER, opus_int32 ); + /* LTP analysis */ silk_find_LTP_FIX( psEncCtrl->LTPCoef_Q14, WLTP, &psEncCtrl->LTPredCodGain_Q7, res_pitch, psEncCtrl->pitchL, Wght_Q15, psEnc->sCmn.subfr_length, @@ -84,7 +93,7 @@ void silk_find_pred_coefs_FIX( /* Quantize LTP gain parameters */ silk_quant_LTP_gains( psEncCtrl->LTPCoef_Q14, psEnc->sCmn.indices.LTPIndex, &psEnc->sCmn.indices.PERIndex, - WLTP, psEnc->sCmn.mu_LTP_Q9, psEnc->sCmn.LTPQuantLowComplexity, psEnc->sCmn.nb_subfr); + &psEnc->sCmn.sum_log_gain_Q7, WLTP, psEnc->sCmn.mu_LTP_Q9, psEnc->sCmn.LTPQuantLowComplexity, psEnc->sCmn.nb_subfr); /* Control LTP scaling */ silk_LTP_scale_ctrl_FIX( psEnc, psEncCtrl, condCoding ); @@ -109,6 +118,7 @@ void silk_find_pred_coefs_FIX( silk_memset( psEncCtrl->LTPCoef_Q14, 0, psEnc->sCmn.nb_subfr * LTP_ORDER * sizeof( opus_int16 ) ); psEncCtrl->LTPredCodGain_Q7 = 0; + psEnc->sCmn.sum_log_gain_Q7 = 0; } /* Limit on total predictive coding gain */ @@ -133,4 +143,5 @@ void silk_find_pred_coefs_FIX( /* Copy to prediction struct for use in next frame for interpolation */ silk_memcpy( psEnc->sCmn.prev_NLSFq_Q15, NLSF_Q15, sizeof( psEnc->sCmn.prev_NLSFq_Q15 ) ); + RESTORE_STACK; } diff --git a/code/opus-1.0.2/silk/fixed/k2a_FIX.c b/code/opus-1.1/silk/fixed/k2a_FIX.c similarity index 99% rename from code/opus-1.0.2/silk/fixed/k2a_FIX.c rename to code/opus-1.1/silk/fixed/k2a_FIX.c index cadc9274..5fee599b 100644 --- a/code/opus-1.0.2/silk/fixed/k2a_FIX.c +++ b/code/opus-1.1/silk/fixed/k2a_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/fixed/k2a_Q16_FIX.c b/code/opus-1.1/silk/fixed/k2a_Q16_FIX.c similarity index 99% rename from code/opus-1.0.2/silk/fixed/k2a_Q16_FIX.c rename to code/opus-1.1/silk/fixed/k2a_Q16_FIX.c index f96f3064..3b039875 100644 --- a/code/opus-1.0.2/silk/fixed/k2a_Q16_FIX.c +++ b/code/opus-1.1/silk/fixed/k2a_Q16_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/fixed/main_FIX.h b/code/opus-1.1/silk/fixed/main_FIX.h similarity index 96% rename from code/opus-1.0.2/silk/fixed/main_FIX.h rename to code/opus-1.1/silk/fixed/main_FIX.h index 369b31ee..a56ca07a 100644 --- a/code/opus-1.0.2/silk/fixed/main_FIX.h +++ b/code/opus-1.1/silk/fixed/main_FIX.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -73,7 +73,8 @@ opus_int silk_encode_frame_FIX( /* Initializes the Silk encoder state */ opus_int silk_init_encoder( - silk_encoder_state_Fxx *psEnc /* I/O Pointer to Silk FIX encoder state */ + silk_encoder_state_Fxx *psEnc, /* I/O Pointer to Silk FIX encoder state */ + int arch /* I Run-time architecture */ ); /* Control the Silk encoder */ @@ -104,7 +105,8 @@ void silk_noise_shape_analysis_FIX( silk_encoder_state_FIX *psEnc, /* I/O Encoder state FIX */ silk_encoder_control_FIX *psEncCtrl, /* I/O Encoder control FIX */ const opus_int16 *pitch_res, /* I LPC residual from pitch analysis */ - const opus_int16 *x /* I Input signal [ frame_length + la_shape ] */ + const opus_int16 *x, /* I Input signal [ frame_length + la_shape ] */ + int arch /* I Run-time architecture */ ); /* Autocorrelations for a warped frequency axis */ @@ -132,7 +134,8 @@ void silk_find_pitch_lags_FIX( silk_encoder_state_FIX *psEnc, /* I/O encoder state */ silk_encoder_control_FIX *psEncCtrl, /* I/O encoder control */ opus_int16 res[], /* O residual */ - const opus_int16 x[] /* I Speech signal */ + const opus_int16 x[], /* I Speech signal */ + int arch /* I Run-time architecture */ ); /* Find LPC and LTP coefficients */ diff --git a/code/opus-1.0.2/silk/fixed/noise_shape_analysis_FIX.c b/code/opus-1.1/silk/fixed/noise_shape_analysis_FIX.c similarity index 97% rename from code/opus-1.0.2/silk/fixed/noise_shape_analysis_FIX.c rename to code/opus-1.1/silk/fixed/noise_shape_analysis_FIX.c index d230e48d..e24d2e9d 100644 --- a/code/opus-1.0.2/silk/fixed/noise_shape_analysis_FIX.c +++ b/code/opus-1.1/silk/fixed/noise_shape_analysis_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,13 +30,14 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "main_FIX.h" +#include "stack_alloc.h" #include "tuning_parameters.h" /* Compute gain to make warped filter coefficients have a zero mean log frequency response on a */ /* non-warped frequency scale. (So that it can be implemented with a minimum-phase monic filter.) */ /* Note: A monic filter is one with the first coefficient equal to 1.0. In Silk we omit the first */ /* coefficient in an array of coefficients, for monic filters. */ -static inline opus_int32 warped_gain( /* gain in Q16*/ +static OPUS_INLINE opus_int32 warped_gain( /* gain in Q16*/ const opus_int32 *coefs_Q24, opus_int lambda_Q16, opus_int order @@ -55,7 +56,7 @@ static inline opus_int32 warped_gain( /* gain in Q16*/ /* Convert warped filter coefficients to monic pseudo-warped coefficients and limit maximum */ /* amplitude of monic warped coefficients by using bandwidth expansion on the true coefficients */ -static inline void limit_warped_coefs( +static OPUS_INLINE void limit_warped_coefs( opus_int32 *coefs_syn_Q24, opus_int32 *coefs_ana_Q24, opus_int lambda_Q16, @@ -144,7 +145,8 @@ void silk_noise_shape_analysis_FIX( silk_encoder_state_FIX *psEnc, /* I/O Encoder state FIX */ silk_encoder_control_FIX *psEncCtrl, /* I/O Encoder control FIX */ const opus_int16 *pitch_res, /* I LPC residual from pitch analysis */ - const opus_int16 *x /* I Input signal [ frame_length + la_shape ] */ + const opus_int16 *x, /* I Input signal [ frame_length + la_shape ] */ + int arch /* I Run-time architecture */ ) { silk_shape_state_FIX *psShapeSt = &psEnc->sShape; @@ -156,8 +158,9 @@ void silk_noise_shape_analysis_FIX( opus_int32 refl_coef_Q16[ MAX_SHAPE_LPC_ORDER ]; opus_int32 AR1_Q24[ MAX_SHAPE_LPC_ORDER ]; opus_int32 AR2_Q24[ MAX_SHAPE_LPC_ORDER ]; - opus_int16 x_windowed[ SHAPE_LPC_WIN_MAX ]; + VARDECL( opus_int16, x_windowed ); const opus_int16 *x_ptr, *pitch_res_ptr; + SAVE_STACK; /* Point to start of first LPC analysis block */ x_ptr = x - psEnc->sCmn.la_shape; @@ -258,6 +261,7 @@ void silk_noise_shape_analysis_FIX( /********************************************/ /* Compute noise shaping AR coefs and gains */ /********************************************/ + ALLOC( x_windowed, psEnc->sCmn.shapeWinLength, opus_int16 ); for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) { /* Apply window: sine slope followed by flat part followed by cosine slope */ opus_int shift, slope_part, flat_part; @@ -278,7 +282,7 @@ void silk_noise_shape_analysis_FIX( silk_warped_autocorrelation_FIX( auto_corr, &scale, x_windowed, warping_Q16, psEnc->sCmn.shapeWinLength, psEnc->sCmn.shapingLPCOrder ); } else { /* Calculate regular auto correlation */ - silk_autocorr( auto_corr, &scale, x_windowed, psEnc->sCmn.shapeWinLength, psEnc->sCmn.shapingLPCOrder + 1 ); + silk_autocorr( auto_corr, &scale, x_windowed, psEnc->sCmn.shapeWinLength, psEnc->sCmn.shapingLPCOrder + 1, arch ); } /* Add white noise, as a fraction of energy */ @@ -437,4 +441,5 @@ void silk_noise_shape_analysis_FIX( psEncCtrl->HarmShapeGain_Q14[ k ] = ( opus_int )silk_RSHIFT_ROUND( psShapeSt->HarmShapeGain_smth_Q16, 2 ); psEncCtrl->Tilt_Q14[ k ] = ( opus_int )silk_RSHIFT_ROUND( psShapeSt->Tilt_smth_Q16, 2 ); } + RESTORE_STACK; } diff --git a/code/opus-1.0.2/silk/fixed/pitch_analysis_core_FIX.c b/code/opus-1.1/silk/fixed/pitch_analysis_core_FIX.c similarity index 63% rename from code/opus-1.0.2/silk/fixed/pitch_analysis_core_FIX.c rename to code/opus-1.1/silk/fixed/pitch_analysis_core_FIX.c index d43f444d..1641a0fb 100644 --- a/code/opus-1.0.2/silk/fixed/pitch_analysis_core_FIX.c +++ b/code/opus-1.1/silk/fixed/pitch_analysis_core_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -34,24 +34,40 @@ POSSIBILITY OF SUCH DAMAGE. ********************************************************** */ #include "SigProc_FIX.h" #include "pitch_est_defines.h" +#include "stack_alloc.h" #include "debug.h" +#include "pitch.h" #define SCRATCH_SIZE 22 +#define SF_LENGTH_4KHZ ( PE_SUBFR_LENGTH_MS * 4 ) +#define SF_LENGTH_8KHZ ( PE_SUBFR_LENGTH_MS * 8 ) +#define MIN_LAG_4KHZ ( PE_MIN_LAG_MS * 4 ) +#define MIN_LAG_8KHZ ( PE_MIN_LAG_MS * 8 ) +#define MAX_LAG_4KHZ ( PE_MAX_LAG_MS * 4 ) +#define MAX_LAG_8KHZ ( PE_MAX_LAG_MS * 8 - 1 ) +#define CSTRIDE_4KHZ ( MAX_LAG_4KHZ + 1 - MIN_LAG_4KHZ ) +#define CSTRIDE_8KHZ ( MAX_LAG_8KHZ + 3 - ( MIN_LAG_8KHZ - 2 ) ) +#define D_COMP_MIN ( MIN_LAG_8KHZ - 3 ) +#define D_COMP_MAX ( MAX_LAG_8KHZ + 4 ) +#define D_COMP_STRIDE ( D_COMP_MAX - D_COMP_MIN ) + +typedef opus_int32 silk_pe_stage3_vals[ PE_NB_STAGE3_LAGS ]; /************************************************************/ /* Internally used functions */ /************************************************************/ -void silk_P_Ana_calc_corr_st3( - opus_int32 cross_corr_st3[ PE_MAX_NB_SUBFR ][ PE_NB_CBKS_STAGE3_MAX ][ PE_NB_STAGE3_LAGS ],/* (O) 3 DIM correlation array */ +static void silk_P_Ana_calc_corr_st3( + silk_pe_stage3_vals cross_corr_st3[], /* O 3 DIM correlation array */ const opus_int16 frame[], /* I vector to correlate */ opus_int start_lag, /* I lag offset to search around */ opus_int sf_length, /* I length of a 5 ms subframe */ opus_int nb_subfr, /* I number of subframes */ - opus_int complexity /* I Complexity setting */ + opus_int complexity, /* I Complexity setting */ + int arch /* I Run-time architecture */ ); -void silk_P_Ana_calc_energy_st3( - opus_int32 energies_st3[ PE_MAX_NB_SUBFR ][ PE_NB_CBKS_STAGE3_MAX ][ PE_NB_STAGE3_LAGS ],/* (O) 3 DIM energy array */ +static void silk_P_Ana_calc_energy_st3( + silk_pe_stage3_vals energies_st3[], /* O 3 DIM energy array */ const opus_int16 frame[], /* I vector to calc energy in */ opus_int start_lag, /* I lag offset to search around */ opus_int sf_length, /* I length of one 5 ms subframe */ @@ -59,12 +75,6 @@ void silk_P_Ana_calc_energy_st3( opus_int complexity /* I Complexity setting */ ); -opus_int32 silk_P_Ana_find_scaling( - const opus_int16 *frame, - const opus_int frame_length, - const opus_int sum_sqr_len -); - /*************************************************************/ /* FIXED POINT CORE PITCH ANALYSIS FUNCTION */ /*************************************************************/ @@ -76,36 +86,38 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 opus_int *LTPCorr_Q15, /* I/O Normalized correlation; input: value from previous frame */ opus_int prevLag, /* I Last lag of previous frame; set to zero is unvoiced */ const opus_int32 search_thres1_Q16, /* I First stage threshold for lag candidates 0 - 1 */ - const opus_int search_thres2_Q15, /* I Final threshold for lag candidates 0 - 1 */ + const opus_int search_thres2_Q13, /* I Final threshold for lag candidates 0 - 1 */ const opus_int Fs_kHz, /* I Sample frequency (kHz) */ const opus_int complexity, /* I Complexity setting, 0-2, where 2 is highest */ - const opus_int nb_subfr /* I number of 5 ms subframes */ + const opus_int nb_subfr, /* I number of 5 ms subframes */ + int arch /* I Run-time architecture */ ) { - opus_int16 frame_8kHz[ PE_MAX_FRAME_LENGTH_ST_2 ]; - opus_int16 frame_4kHz[ PE_MAX_FRAME_LENGTH_ST_1 ]; + VARDECL( opus_int16, frame_8kHz ); + VARDECL( opus_int16, frame_4kHz ); opus_int32 filt_state[ 6 ]; - opus_int32 scratch_mem[ 3 * PE_MAX_FRAME_LENGTH ]; - opus_int16 *input_frame_ptr; + const opus_int16 *input_frame_ptr; opus_int i, k, d, j; - opus_int16 C[ PE_MAX_NB_SUBFR ][ ( PE_MAX_LAG >> 1 ) + 5 ]; + VARDECL( opus_int16, C ); + VARDECL( opus_int32, xcorr32 ); const opus_int16 *target_ptr, *basis_ptr; opus_int32 cross_corr, normalizer, energy, shift, energy_basis, energy_target; opus_int d_srch[ PE_D_SRCH_LENGTH ], Cmax, length_d_srch, length_d_comp; - opus_int16 d_comp[ ( PE_MAX_LAG >> 1 ) + 5 ]; - opus_int32 sum, threshold, temp32, lag_counter; + VARDECL( opus_int16, d_comp ); + opus_int32 sum, threshold, lag_counter; opus_int CBimax, CBimax_new, CBimax_old, lag, start_lag, end_lag, lag_new; opus_int32 CC[ PE_NB_CBKS_STAGE2_EXT ], CCmax, CCmax_b, CCmax_new_b, CCmax_new; - opus_int32 energies_st3[ PE_MAX_NB_SUBFR ][ PE_NB_CBKS_STAGE3_MAX ][ PE_NB_STAGE3_LAGS ]; - opus_int32 crosscorr_st3[ PE_MAX_NB_SUBFR ][ PE_NB_CBKS_STAGE3_MAX ][ PE_NB_STAGE3_LAGS ]; - opus_int frame_length, frame_length_8kHz, frame_length_4kHz, max_sum_sq_length; - opus_int sf_length, sf_length_8kHz, sf_length_4kHz; - opus_int min_lag, min_lag_8kHz, min_lag_4kHz; - opus_int max_lag, max_lag_8kHz, max_lag_4kHz; - opus_int32 contour_bias_Q20, diff, lz, lshift; + VARDECL( silk_pe_stage3_vals, energies_st3 ); + VARDECL( silk_pe_stage3_vals, cross_corr_st3 ); + opus_int frame_length, frame_length_8kHz, frame_length_4kHz; + opus_int sf_length; + opus_int min_lag; + opus_int max_lag; + opus_int32 contour_bias_Q15, diff; opus_int nb_cbk_search, cbk_size; - opus_int32 delta_lag_log2_sqr_Q7, lag_log2_Q7, prevLag_log2_Q7, prev_lag_bias_Q15, corr_thres_Q15; + opus_int32 delta_lag_log2_sqr_Q7, lag_log2_Q7, prevLag_log2_Q7, prev_lag_bias_Q13; const opus_int8 *Lag_CB_ptr; + SAVE_STACK; /* Check for valid sampling frequency */ silk_assert( Fs_kHz == 8 || Fs_kHz == 12 || Fs_kHz == 16 ); @@ -114,25 +126,18 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 silk_assert( complexity <= SILK_PE_MAX_COMPLEX ); silk_assert( search_thres1_Q16 >= 0 && search_thres1_Q16 <= (1<<16) ); - silk_assert( search_thres2_Q15 >= 0 && search_thres2_Q15 <= (1<<15) ); + silk_assert( search_thres2_Q13 >= 0 && search_thres2_Q13 <= (1<<13) ); /* Set up frame lengths max / min lag for the sampling frequency */ frame_length = ( PE_LTP_MEM_LENGTH_MS + nb_subfr * PE_SUBFR_LENGTH_MS ) * Fs_kHz; frame_length_4kHz = ( PE_LTP_MEM_LENGTH_MS + nb_subfr * PE_SUBFR_LENGTH_MS ) * 4; frame_length_8kHz = ( PE_LTP_MEM_LENGTH_MS + nb_subfr * PE_SUBFR_LENGTH_MS ) * 8; sf_length = PE_SUBFR_LENGTH_MS * Fs_kHz; - sf_length_4kHz = PE_SUBFR_LENGTH_MS * 4; - sf_length_8kHz = PE_SUBFR_LENGTH_MS * 8; min_lag = PE_MIN_LAG_MS * Fs_kHz; - min_lag_4kHz = PE_MIN_LAG_MS * 4; - min_lag_8kHz = PE_MIN_LAG_MS * 8; max_lag = PE_MAX_LAG_MS * Fs_kHz - 1; - max_lag_4kHz = PE_MAX_LAG_MS * 4; - max_lag_8kHz = PE_MAX_LAG_MS * 8 - 1; - - silk_memset( C, 0, sizeof( opus_int16 ) * nb_subfr * ( ( PE_MAX_LAG >> 1 ) + 5) ); /* Resample from input sampled at Fs_kHz to 8 kHz */ + ALLOC( frame_8kHz, frame_length_8kHz, opus_int16 ); if( Fs_kHz == 16 ) { silk_memset( filt_state, 0, 2 * sizeof( opus_int32 ) ); silk_resampler_down2( filt_state, frame_8kHz, frame, frame_length ); @@ -146,6 +151,7 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 /* Decimate again to 4 kHz */ silk_memset( filt_state, 0, 2 * sizeof( opus_int32 ) );/* Set state to zero */ + ALLOC( frame_4kHz, frame_length_4kHz, opus_int16 ); silk_resampler_down2( filt_state, frame_4kHz, frame_8kHz, frame_length_8kHz ); /* Low-pass filter */ @@ -159,9 +165,9 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 *******************************************************************************/ /* Inner product is calculated with different lengths, so scale for the worst case */ - max_sum_sq_length = silk_max_32( sf_length_8kHz, silk_LSHIFT( sf_length_4kHz, 2 ) ); - shift = silk_P_Ana_find_scaling( frame_4kHz, frame_length_4kHz, max_sum_sq_length ); + silk_sum_sqr_shift( &energy, &shift, frame_4kHz, frame_length_4kHz ); if( shift > 0 ) { + shift = silk_RSHIFT( shift, 1 ); for( i = 0; i < frame_length_4kHz; i++ ) { frame_4kHz[ i ] = silk_RSHIFT( frame_4kHz[ i ], shift ); } @@ -170,94 +176,93 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 /****************************************************************************** * FIRST STAGE, operating in 4 khz ******************************************************************************/ - target_ptr = &frame_4kHz[ silk_LSHIFT( sf_length_4kHz, 2 ) ]; + ALLOC( C, nb_subfr * CSTRIDE_8KHZ, opus_int16 ); + ALLOC( xcorr32, MAX_LAG_4KHZ-MIN_LAG_4KHZ+1, opus_int32 ); + silk_memset( C, 0, (nb_subfr >> 1) * CSTRIDE_4KHZ * sizeof( opus_int16 ) ); + target_ptr = &frame_4kHz[ silk_LSHIFT( SF_LENGTH_4KHZ, 2 ) ]; for( k = 0; k < nb_subfr >> 1; k++ ) { /* Check that we are within range of the array */ silk_assert( target_ptr >= frame_4kHz ); - silk_assert( target_ptr + sf_length_8kHz <= frame_4kHz + frame_length_4kHz ); + silk_assert( target_ptr + SF_LENGTH_8KHZ <= frame_4kHz + frame_length_4kHz ); - basis_ptr = target_ptr - min_lag_4kHz; + basis_ptr = target_ptr - MIN_LAG_4KHZ; /* Check that we are within range of the array */ silk_assert( basis_ptr >= frame_4kHz ); - silk_assert( basis_ptr + sf_length_8kHz <= frame_4kHz + frame_length_4kHz ); + silk_assert( basis_ptr + SF_LENGTH_8KHZ <= frame_4kHz + frame_length_4kHz ); + + celt_pitch_xcorr( target_ptr, target_ptr - MAX_LAG_4KHZ, xcorr32, SF_LENGTH_8KHZ, MAX_LAG_4KHZ - MIN_LAG_4KHZ + 1, arch ); /* Calculate first vector products before loop */ - cross_corr = silk_inner_prod_aligned( target_ptr, basis_ptr, sf_length_8kHz ); - normalizer = silk_inner_prod_aligned( basis_ptr, basis_ptr, sf_length_8kHz ); - normalizer = silk_ADD_SAT32( normalizer, silk_SMULBB( sf_length_8kHz, 4000 ) ); + cross_corr = xcorr32[ MAX_LAG_4KHZ - MIN_LAG_4KHZ ]; + normalizer = silk_inner_prod_aligned( target_ptr, target_ptr, SF_LENGTH_8KHZ ); + normalizer = silk_ADD32( normalizer, silk_inner_prod_aligned( basis_ptr, basis_ptr, SF_LENGTH_8KHZ ) ); + normalizer = silk_ADD32( normalizer, silk_SMULBB( SF_LENGTH_8KHZ, 4000 ) ); - temp32 = silk_DIV32( cross_corr, silk_SQRT_APPROX( normalizer ) + 1 ); - C[ k ][ min_lag_4kHz ] = (opus_int16)silk_SAT16( temp32 ); /* Q0 */ + matrix_ptr( C, k, 0, CSTRIDE_4KHZ ) = + (opus_int16)silk_DIV32_varQ( cross_corr, normalizer, 13 + 1 ); /* Q13 */ /* From now on normalizer is computed recursively */ - for( d = min_lag_4kHz + 1; d <= max_lag_4kHz; d++ ) { + for( d = MIN_LAG_4KHZ + 1; d <= MAX_LAG_4KHZ; d++ ) { basis_ptr--; /* Check that we are within range of the array */ silk_assert( basis_ptr >= frame_4kHz ); - silk_assert( basis_ptr + sf_length_8kHz <= frame_4kHz + frame_length_4kHz ); + silk_assert( basis_ptr + SF_LENGTH_8KHZ <= frame_4kHz + frame_length_4kHz ); - cross_corr = silk_inner_prod_aligned( target_ptr, basis_ptr, sf_length_8kHz ); + cross_corr = xcorr32[ MAX_LAG_4KHZ - d ]; /* Add contribution of new sample and remove contribution from oldest sample */ - normalizer += + normalizer = silk_ADD32( normalizer, silk_SMULBB( basis_ptr[ 0 ], basis_ptr[ 0 ] ) - - silk_SMULBB( basis_ptr[ sf_length_8kHz ], basis_ptr[ sf_length_8kHz ] ); + silk_SMULBB( basis_ptr[ SF_LENGTH_8KHZ ], basis_ptr[ SF_LENGTH_8KHZ ] ) ); - temp32 = silk_DIV32( cross_corr, silk_SQRT_APPROX( normalizer ) + 1 ); - C[ k ][ d ] = (opus_int16)silk_SAT16( temp32 ); /* Q0 */ + matrix_ptr( C, k, d - MIN_LAG_4KHZ, CSTRIDE_4KHZ) = + (opus_int16)silk_DIV32_varQ( cross_corr, normalizer, 13 + 1 ); /* Q13 */ } /* Update target pointer */ - target_ptr += sf_length_8kHz; + target_ptr += SF_LENGTH_8KHZ; } /* Combine two subframes into single correlation measure and apply short-lag bias */ if( nb_subfr == PE_MAX_NB_SUBFR ) { - for( i = max_lag_4kHz; i >= min_lag_4kHz; i-- ) { - sum = (opus_int32)C[ 0 ][ i ] + (opus_int32)C[ 1 ][ i ]; /* Q0 */ - silk_assert( silk_RSHIFT( sum, 1 ) == silk_SAT16( silk_RSHIFT( sum, 1 ) ) ); - sum = silk_RSHIFT( sum, 1 ); /* Q-1 */ - silk_assert( silk_LSHIFT( (opus_int32)-i, 4 ) == silk_SAT16( silk_LSHIFT( (opus_int32)-i, 4 ) ) ); - sum = silk_SMLAWB( sum, sum, silk_LSHIFT( -i, 4 ) ); /* Q-1 */ - silk_assert( sum == silk_SAT16( sum ) ); - C[ 0 ][ i ] = (opus_int16)sum; /* Q-1 */ + for( i = MAX_LAG_4KHZ; i >= MIN_LAG_4KHZ; i-- ) { + sum = (opus_int32)matrix_ptr( C, 0, i - MIN_LAG_4KHZ, CSTRIDE_4KHZ ) + + (opus_int32)matrix_ptr( C, 1, i - MIN_LAG_4KHZ, CSTRIDE_4KHZ ); /* Q14 */ + sum = silk_SMLAWB( sum, sum, silk_LSHIFT( -i, 4 ) ); /* Q14 */ + C[ i - MIN_LAG_4KHZ ] = (opus_int16)sum; /* Q14 */ } } else { /* Only short-lag bias */ - for( i = max_lag_4kHz; i >= min_lag_4kHz; i-- ) { - sum = (opus_int32)C[ 0 ][ i ]; - sum = silk_SMLAWB( sum, sum, silk_LSHIFT( -i, 4 ) ); /* Q-1 */ - C[ 0 ][ i ] = (opus_int16)sum; /* Q-1 */ + for( i = MAX_LAG_4KHZ; i >= MIN_LAG_4KHZ; i-- ) { + sum = silk_LSHIFT( (opus_int32)C[ i - MIN_LAG_4KHZ ], 1 ); /* Q14 */ + sum = silk_SMLAWB( sum, sum, silk_LSHIFT( -i, 4 ) ); /* Q14 */ + C[ i - MIN_LAG_4KHZ ] = (opus_int16)sum; /* Q14 */ } } /* Sort */ length_d_srch = silk_ADD_LSHIFT32( 4, complexity, 1 ); silk_assert( 3 * length_d_srch <= PE_D_SRCH_LENGTH ); - silk_insertion_sort_decreasing_int16( &C[ 0 ][ min_lag_4kHz ], d_srch, max_lag_4kHz - min_lag_4kHz + 1, length_d_srch ); + silk_insertion_sort_decreasing_int16( C, d_srch, CSTRIDE_4KHZ, + length_d_srch ); /* Escape if correlation is very low already here */ - target_ptr = &frame_4kHz[ silk_SMULBB( sf_length_4kHz, nb_subfr ) ]; - energy = silk_inner_prod_aligned( target_ptr, target_ptr, silk_LSHIFT( sf_length_4kHz, 2 ) ); - energy = silk_ADD_SAT32( energy, 1000 ); /* Q0 */ - Cmax = (opus_int)C[ 0 ][ min_lag_4kHz ]; /* Q-1 */ - threshold = silk_SMULBB( Cmax, Cmax ); /* Q-2 */ - - /* Compare in Q-2 domain */ - if( silk_RSHIFT( energy, 4 + 2 ) > threshold ) { + Cmax = (opus_int)C[ 0 ]; /* Q14 */ + if( Cmax < SILK_FIX_CONST( 0.2, 14 ) ) { silk_memset( pitch_out, 0, nb_subfr * sizeof( opus_int ) ); *LTPCorr_Q15 = 0; *lagIndex = 0; *contourIndex = 0; + RESTORE_STACK; return 1; } threshold = silk_SMULWB( search_thres1_Q16, Cmax ); for( i = 0; i < length_d_srch; i++ ) { /* Convert to 8 kHz indices for the sorted correlation that exceeds the threshold */ - if( C[ 0 ][ min_lag_4kHz + i ] > threshold ) { - d_srch[ i ] = silk_LSHIFT( d_srch[ i ] + min_lag_4kHz, 1 ); + if( C[ i ] > threshold ) { + d_srch[ i ] = silk_LSHIFT( d_srch[ i ] + MIN_LAG_4KHZ, 1 ); } else { length_d_srch = i; break; @@ -265,34 +270,37 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 } silk_assert( length_d_srch > 0 ); - for( i = min_lag_8kHz - 5; i < max_lag_8kHz + 5; i++ ) { - d_comp[ i ] = 0; + ALLOC( d_comp, D_COMP_STRIDE, opus_int16 ); + for( i = D_COMP_MIN; i < D_COMP_MAX; i++ ) { + d_comp[ i - D_COMP_MIN ] = 0; } for( i = 0; i < length_d_srch; i++ ) { - d_comp[ d_srch[ i ] ] = 1; + d_comp[ d_srch[ i ] - D_COMP_MIN ] = 1; } /* Convolution */ - for( i = max_lag_8kHz + 3; i >= min_lag_8kHz; i-- ) { - d_comp[ i ] += d_comp[ i - 1 ] + d_comp[ i - 2 ]; + for( i = D_COMP_MAX - 1; i >= MIN_LAG_8KHZ; i-- ) { + d_comp[ i - D_COMP_MIN ] += + d_comp[ i - 1 - D_COMP_MIN ] + d_comp[ i - 2 - D_COMP_MIN ]; } length_d_srch = 0; - for( i = min_lag_8kHz; i < max_lag_8kHz + 1; i++ ) { - if( d_comp[ i + 1 ] > 0 ) { + for( i = MIN_LAG_8KHZ; i < MAX_LAG_8KHZ + 1; i++ ) { + if( d_comp[ i + 1 - D_COMP_MIN ] > 0 ) { d_srch[ length_d_srch ] = i; length_d_srch++; } } /* Convolution */ - for( i = max_lag_8kHz + 3; i >= min_lag_8kHz; i-- ) { - d_comp[ i ] += d_comp[ i - 1 ] + d_comp[ i - 2 ] + d_comp[ i - 3 ]; + for( i = D_COMP_MAX - 1; i >= MIN_LAG_8KHZ; i-- ) { + d_comp[ i - D_COMP_MIN ] += d_comp[ i - 1 - D_COMP_MIN ] + + d_comp[ i - 2 - D_COMP_MIN ] + d_comp[ i - 3 - D_COMP_MIN ]; } length_d_comp = 0; - for( i = min_lag_8kHz; i < max_lag_8kHz + 4; i++ ) { - if( d_comp[ i ] > 0 ) { + for( i = MIN_LAG_8KHZ; i < D_COMP_MAX; i++ ) { + if( d_comp[ i - D_COMP_MIN ] > 0 ) { d_comp[ length_d_comp ] = i - 2; length_d_comp++; } @@ -306,8 +314,9 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 ** Scale signal down to avoid correlations measures from overflowing *******************************************************************************/ /* find scaling as max scaling for each subframe */ - shift = silk_P_Ana_find_scaling( frame_8kHz, frame_length_8kHz, sf_length_8kHz ); + silk_sum_sqr_shift( &energy, &shift, frame_8kHz, frame_length_8kHz ); if( shift > 0 ) { + shift = silk_RSHIFT( shift, 1 ); for( i = 0; i < frame_length_8kHz; i++ ) { frame_8kHz[ i ] = silk_RSHIFT( frame_8kHz[ i ], shift ); } @@ -316,43 +325,37 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 /********************************************************************************* * Find energy of each subframe projected onto its history, for a range of delays *********************************************************************************/ - silk_memset( C, 0, PE_MAX_NB_SUBFR * ( ( PE_MAX_LAG >> 1 ) + 5 ) * sizeof( opus_int16 ) ); + silk_memset( C, 0, nb_subfr * CSTRIDE_8KHZ * sizeof( opus_int16 ) ); target_ptr = &frame_8kHz[ PE_LTP_MEM_LENGTH_MS * 8 ]; for( k = 0; k < nb_subfr; k++ ) { /* Check that we are within range of the array */ silk_assert( target_ptr >= frame_8kHz ); - silk_assert( target_ptr + sf_length_8kHz <= frame_8kHz + frame_length_8kHz ); + silk_assert( target_ptr + SF_LENGTH_8KHZ <= frame_8kHz + frame_length_8kHz ); - energy_target = silk_inner_prod_aligned( target_ptr, target_ptr, sf_length_8kHz ); + energy_target = silk_ADD32( silk_inner_prod_aligned( target_ptr, target_ptr, SF_LENGTH_8KHZ ), 1 ); for( j = 0; j < length_d_comp; j++ ) { d = d_comp[ j ]; basis_ptr = target_ptr - d; /* Check that we are within range of the array */ silk_assert( basis_ptr >= frame_8kHz ); - silk_assert( basis_ptr + sf_length_8kHz <= frame_8kHz + frame_length_8kHz ); + silk_assert( basis_ptr + SF_LENGTH_8KHZ <= frame_8kHz + frame_length_8kHz ); - cross_corr = silk_inner_prod_aligned( target_ptr, basis_ptr, sf_length_8kHz ); - energy_basis = silk_inner_prod_aligned( basis_ptr, basis_ptr, sf_length_8kHz ); + cross_corr = silk_inner_prod_aligned( target_ptr, basis_ptr, SF_LENGTH_8KHZ ); if( cross_corr > 0 ) { - energy = silk_max( energy_target, energy_basis ); /* Find max to make sure first division < 1.0 */ - lz = silk_CLZ32( cross_corr ); - lshift = silk_LIMIT_32( lz - 1, 0, 15 ); - temp32 = silk_DIV32( silk_LSHIFT( cross_corr, lshift ), silk_RSHIFT( energy, 15 - lshift ) + 1 ); /* Q15 */ - silk_assert( temp32 == silk_SAT16( temp32 ) ); - temp32 = silk_SMULWB( cross_corr, temp32 ); /* Q(-1), cc * ( cc / max(b, t) ) */ - temp32 = silk_ADD_SAT32( temp32, temp32 ); /* Q(0) */ - lz = silk_CLZ32( temp32 ); - lshift = silk_LIMIT_32( lz - 1, 0, 15 ); - energy = silk_min( energy_target, energy_basis ); - C[ k ][ d ] = silk_DIV32( silk_LSHIFT( temp32, lshift ), silk_RSHIFT( energy, 15 - lshift ) + 1 ); /* Q15*/ + energy_basis = silk_inner_prod_aligned( basis_ptr, basis_ptr, SF_LENGTH_8KHZ ); + matrix_ptr( C, k, d - ( MIN_LAG_8KHZ - 2 ), CSTRIDE_8KHZ ) = + (opus_int16)silk_DIV32_varQ( cross_corr, + silk_ADD32( energy_target, + energy_basis ), + 13 + 1 ); /* Q13 */ } else { - C[ k ][ d ] = 0; + matrix_ptr( C, k, d - ( MIN_LAG_8KHZ - 2 ), CSTRIDE_8KHZ ) = 0; } } - target_ptr += sf_length_8kHz; + target_ptr += SF_LENGTH_8KHZ; } /* search over lag range and lags codebook */ @@ -374,7 +377,7 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 } else { prevLag_log2_Q7 = 0; } - silk_assert( search_thres2_Q15 == silk_SAT16( search_thres2_Q15 ) ); + silk_assert( search_thres2_Q13 == silk_SAT16( search_thres2_Q13 ) ); /* Set up stage 2 codebook based on number of subframes */ if( nb_subfr == PE_MAX_NB_SUBFR ) { cbk_size = PE_NB_CBKS_STAGE2_EXT; @@ -385,12 +388,10 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 } else { nb_cbk_search = PE_NB_CBKS_STAGE2; } - corr_thres_Q15 = silk_RSHIFT( silk_SMULBB( search_thres2_Q15, search_thres2_Q15 ), 13 ); } else { cbk_size = PE_NB_CBKS_STAGE2_10MS; Lag_CB_ptr = &silk_CB_lags_stage2_10_ms[ 0 ][ 0 ]; nb_cbk_search = PE_NB_CBKS_STAGE2_10MS; - corr_thres_Q15 = silk_RSHIFT( silk_SMULBB( search_thres2_Q15, search_thres2_Q15 ), 14 ); } for( k = 0; k < length_d_srch; k++ ) { @@ -398,8 +399,13 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 for( j = 0; j < nb_cbk_search; j++ ) { CC[ j ] = 0; for( i = 0; i < nb_subfr; i++ ) { + opus_int d_subfr; /* Try all codebooks */ - CC[ j ] = CC[ j ] + (opus_int32)C[ i ][ d + matrix_ptr( Lag_CB_ptr, i, j, cbk_size )]; + d_subfr = d + matrix_ptr( Lag_CB_ptr, i, j, cbk_size ); + CC[ j ] = CC[ j ] + + (opus_int32)matrix_ptr( C, i, + d_subfr - ( MIN_LAG_8KHZ - 2 ), + CSTRIDE_8KHZ ); } } /* Find best codebook */ @@ -413,25 +419,25 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 } /* Bias towards shorter lags */ - lag_log2_Q7 = silk_lin2log( (opus_int32)d ); /* Q7 */ + lag_log2_Q7 = silk_lin2log( d ); /* Q7 */ silk_assert( lag_log2_Q7 == silk_SAT16( lag_log2_Q7 ) ); - silk_assert( nb_subfr * SILK_FIX_CONST( PE_SHORTLAG_BIAS, 15 ) == silk_SAT16( nb_subfr * SILK_FIX_CONST( PE_SHORTLAG_BIAS, 15 ) ) ); - CCmax_new_b = CCmax_new - silk_RSHIFT( silk_SMULBB( nb_subfr * SILK_FIX_CONST( PE_SHORTLAG_BIAS, 15 ), lag_log2_Q7 ), 7 ); /* Q15 */ + silk_assert( nb_subfr * SILK_FIX_CONST( PE_SHORTLAG_BIAS, 13 ) == silk_SAT16( nb_subfr * SILK_FIX_CONST( PE_SHORTLAG_BIAS, 13 ) ) ); + CCmax_new_b = CCmax_new - silk_RSHIFT( silk_SMULBB( nb_subfr * SILK_FIX_CONST( PE_SHORTLAG_BIAS, 13 ), lag_log2_Q7 ), 7 ); /* Q13 */ /* Bias towards previous lag */ - silk_assert( nb_subfr * SILK_FIX_CONST( PE_PREVLAG_BIAS, 15 ) == silk_SAT16( nb_subfr * SILK_FIX_CONST( PE_PREVLAG_BIAS, 15 ) ) ); + silk_assert( nb_subfr * SILK_FIX_CONST( PE_PREVLAG_BIAS, 13 ) == silk_SAT16( nb_subfr * SILK_FIX_CONST( PE_PREVLAG_BIAS, 13 ) ) ); if( prevLag > 0 ) { delta_lag_log2_sqr_Q7 = lag_log2_Q7 - prevLag_log2_Q7; silk_assert( delta_lag_log2_sqr_Q7 == silk_SAT16( delta_lag_log2_sqr_Q7 ) ); delta_lag_log2_sqr_Q7 = silk_RSHIFT( silk_SMULBB( delta_lag_log2_sqr_Q7, delta_lag_log2_sqr_Q7 ), 7 ); - prev_lag_bias_Q15 = silk_RSHIFT( silk_SMULBB( nb_subfr * SILK_FIX_CONST( PE_PREVLAG_BIAS, 15 ), *LTPCorr_Q15 ), 15 ); /* Q15 */ - prev_lag_bias_Q15 = silk_DIV32( silk_MUL( prev_lag_bias_Q15, delta_lag_log2_sqr_Q7 ), delta_lag_log2_sqr_Q7 + ( 1 << 6 ) ); - CCmax_new_b -= prev_lag_bias_Q15; /* Q15 */ + prev_lag_bias_Q13 = silk_RSHIFT( silk_SMULBB( nb_subfr * SILK_FIX_CONST( PE_PREVLAG_BIAS, 13 ), *LTPCorr_Q15 ), 15 ); /* Q13 */ + prev_lag_bias_Q13 = silk_DIV32( silk_MUL( prev_lag_bias_Q13, delta_lag_log2_sqr_Q7 ), delta_lag_log2_sqr_Q7 + SILK_FIX_CONST( 0.5, 7 ) ); + CCmax_new_b -= prev_lag_bias_Q13; /* Q13 */ } if( CCmax_new_b > CCmax_b && /* Find maximum biased correlation */ - CCmax_new > corr_thres_Q15 && /* Correlation needs to be high enough to be voiced */ - silk_CB_lags_stage2[ 0 ][ CBimax_new ] <= min_lag_8kHz /* Lag must be in range */ + CCmax_new > silk_SMULBB( nb_subfr, search_thres2_Q13 ) && /* Correlation needs to be high enough to be voiced */ + silk_CB_lags_stage2[ 0 ][ CBimax_new ] <= MIN_LAG_8KHZ /* Lag must be in range */ ) { CCmax_b = CCmax_new_b; CCmax = CCmax_new; @@ -446,24 +452,31 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 *LTPCorr_Q15 = 0; *lagIndex = 0; *contourIndex = 0; + RESTORE_STACK; return 1; } + /* Output normalized correlation */ + *LTPCorr_Q15 = (opus_int)silk_LSHIFT( silk_DIV32_16( CCmax, nb_subfr ), 2 ); + silk_assert( *LTPCorr_Q15 >= 0 ); + if( Fs_kHz > 8 ) { + VARDECL( opus_int16, scratch_mem ); /***************************************************************************/ /* Scale input signal down to avoid correlations measures from overflowing */ /***************************************************************************/ /* find scaling as max scaling for each subframe */ - shift = silk_P_Ana_find_scaling( frame, frame_length, sf_length ); + silk_sum_sqr_shift( &energy, &shift, frame, frame_length ); + ALLOC( scratch_mem, shift > 0 ? frame_length : ALLOC_NONE, opus_int16 ); if( shift > 0 ) { /* Move signal to scratch mem because the input signal should be unchanged */ - /* Reuse the 32 bit scratch mem vector, use a 16 bit pointer from now */ - input_frame_ptr = (opus_int16*)scratch_mem; + shift = silk_RSHIFT( shift, 1 ); for( i = 0; i < frame_length; i++ ) { - input_frame_ptr[ i ] = silk_RSHIFT( frame[ i ], shift ); + scratch_mem[ i ] = silk_RSHIFT( frame[ i ], shift ); } + input_frame_ptr = scratch_mem; } else { - input_frame_ptr = (opus_int16*)frame; + input_frame_ptr = frame; } /* Search in original signal */ @@ -483,22 +496,13 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 start_lag = silk_max_int( lag - 2, min_lag ); end_lag = silk_min_int( lag + 2, max_lag ); lag_new = lag; /* to avoid undefined lag */ - CBimax = 0; /* to avoid undefined lag */ - silk_assert( silk_LSHIFT( CCmax, 13 ) >= 0 ); - *LTPCorr_Q15 = (opus_int)silk_SQRT_APPROX( silk_LSHIFT( CCmax, 13 ) ); /* Output normalized correlation */ + CBimax = 0; /* to avoid undefined lag */ CCmax = silk_int32_MIN; /* pitch lags according to second stage */ for( k = 0; k < nb_subfr; k++ ) { pitch_out[ k ] = lag + 2 * silk_CB_lags_stage2[ k ][ CBimax_old ]; } - /* Calculate the correlations and energies needed in stage 3 */ - silk_P_Ana_calc_corr_st3( crosscorr_st3, input_frame_ptr, start_lag, sf_length, nb_subfr, complexity ); - silk_P_Ana_calc_energy_st3( energies_st3, input_frame_ptr, start_lag, sf_length, nb_subfr, complexity ); - - lag_counter = 0; - silk_assert( lag == silk_SAT16( lag ) ); - contour_bias_Q20 = silk_DIV32_16( SILK_FIX_CONST( PE_FLATCONTOUR_BIAS, 20 ), lag ); /* Set up codebook parameters according to complexity setting and frame length */ if( nb_subfr == PE_MAX_NB_SUBFR ) { @@ -510,41 +514,43 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 cbk_size = PE_NB_CBKS_STAGE3_10MS; Lag_CB_ptr = &silk_CB_lags_stage3_10_ms[ 0 ][ 0 ]; } + + /* Calculate the correlations and energies needed in stage 3 */ + ALLOC( energies_st3, nb_subfr * nb_cbk_search, silk_pe_stage3_vals ); + ALLOC( cross_corr_st3, nb_subfr * nb_cbk_search, silk_pe_stage3_vals ); + silk_P_Ana_calc_corr_st3( cross_corr_st3, input_frame_ptr, start_lag, sf_length, nb_subfr, complexity, arch ); + silk_P_Ana_calc_energy_st3( energies_st3, input_frame_ptr, start_lag, sf_length, nb_subfr, complexity ); + + lag_counter = 0; + silk_assert( lag == silk_SAT16( lag ) ); + contour_bias_Q15 = silk_DIV32_16( SILK_FIX_CONST( PE_FLATCONTOUR_BIAS, 15 ), lag ); + + target_ptr = &input_frame_ptr[ PE_LTP_MEM_LENGTH_MS * Fs_kHz ]; + energy_target = silk_ADD32( silk_inner_prod_aligned( target_ptr, target_ptr, nb_subfr * sf_length ), 1 ); for( d = start_lag; d <= end_lag; d++ ) { for( j = 0; j < nb_cbk_search; j++ ) { cross_corr = 0; - energy = 0; + energy = energy_target; for( k = 0; k < nb_subfr; k++ ) { - silk_assert( PE_MAX_NB_SUBFR == 4 ); - energy += silk_RSHIFT( energies_st3[ k ][ j ][ lag_counter ], 2 ); /* use mean, to avoid overflow */ + cross_corr = silk_ADD32( cross_corr, + matrix_ptr( cross_corr_st3, k, j, + nb_cbk_search )[ lag_counter ] ); + energy = silk_ADD32( energy, + matrix_ptr( energies_st3, k, j, + nb_cbk_search )[ lag_counter ] ); silk_assert( energy >= 0 ); - cross_corr += silk_RSHIFT( crosscorr_st3[ k ][ j ][ lag_counter ], 2 ); /* use mean, to avoid overflow */ } if( cross_corr > 0 ) { - /* Divide cross_corr / energy and get result in Q15 */ - lz = silk_CLZ32( cross_corr ); - /* Divide with result in Q13, cross_corr could be larger than energy */ - lshift = silk_LIMIT_32( lz - 1, 0, 13 ); - CCmax_new = silk_DIV32( silk_LSHIFT( cross_corr, lshift ), silk_RSHIFT( energy, 13 - lshift ) + 1 ); - CCmax_new = silk_SAT16( CCmax_new ); - CCmax_new = silk_SMULWB( cross_corr, CCmax_new ); - /* Saturate */ - if( CCmax_new > silk_RSHIFT( silk_int32_MAX, 3 ) ) { - CCmax_new = silk_int32_MAX; - } else { - CCmax_new = silk_LSHIFT( CCmax_new, 3 ); - } + CCmax_new = silk_DIV32_varQ( cross_corr, energy, 13 + 1 ); /* Q13 */ /* Reduce depending on flatness of contour */ - diff = silk_int16_MAX - silk_RSHIFT( silk_MUL( contour_bias_Q20, j ), 5 ); /* Q20 -> Q15 */ + diff = silk_int16_MAX - silk_MUL( contour_bias_Q15, j ); /* Q15 */ silk_assert( diff == silk_SAT16( diff ) ); - CCmax_new = silk_LSHIFT( silk_SMULWB( CCmax_new, diff ), 1 ); + CCmax_new = silk_SMULWB( CCmax_new, diff ); /* Q14 */ } else { CCmax_new = 0; } - if( CCmax_new > CCmax && - ( d + silk_CB_lags_stage3[ 0 ][ j ] ) <= max_lag - ) { + if( CCmax_new > CCmax && ( d + silk_CB_lags_stage3[ 0 ][ j ] ) <= max_lag ) { CCmax = CCmax_new; lag_new = d; CBimax = j; @@ -560,40 +566,50 @@ opus_int silk_pitch_analysis_core( /* O Voicing estimate: 0 *lagIndex = (opus_int16)( lag_new - min_lag); *contourIndex = (opus_int8)CBimax; } else { /* Fs_kHz == 8 */ - /* Save Lags and correlation */ - CCmax = silk_max( CCmax, 0 ); - *LTPCorr_Q15 = (opus_int)silk_SQRT_APPROX( silk_LSHIFT( CCmax, 13 ) ); /* Output normalized correlation */ + /* Save Lags */ for( k = 0; k < nb_subfr; k++ ) { pitch_out[ k ] = lag + matrix_ptr( Lag_CB_ptr, k, CBimax, cbk_size ); - pitch_out[ k ] = silk_LIMIT( pitch_out[ k ], min_lag_8kHz, PE_MAX_LAG_MS * Fs_kHz ); + pitch_out[ k ] = silk_LIMIT( pitch_out[ k ], MIN_LAG_8KHZ, PE_MAX_LAG_MS * 8 ); } - *lagIndex = (opus_int16)( lag - min_lag_8kHz ); + *lagIndex = (opus_int16)( lag - MIN_LAG_8KHZ ); *contourIndex = (opus_int8)CBimax; } silk_assert( *lagIndex >= 0 ); /* return as voiced */ + RESTORE_STACK; return 0; } -/*************************************************************************/ -/* Calculates the correlations used in stage 3 search. In order to cover */ -/* the whole lag codebook for all the searched offset lags (lag +- 2), */ -/*************************************************************************/ -void silk_P_Ana_calc_corr_st3( - opus_int32 cross_corr_st3[ PE_MAX_NB_SUBFR ][ PE_NB_CBKS_STAGE3_MAX ][ PE_NB_STAGE3_LAGS ],/* (O) 3 DIM correlation array */ +/*********************************************************************** + * Calculates the correlations used in stage 3 search. In order to cover + * the whole lag codebook for all the searched offset lags (lag +- 2), + * the following correlations are needed in each sub frame: + * + * sf1: lag range [-8,...,7] total 16 correlations + * sf2: lag range [-4,...,4] total 9 correlations + * sf3: lag range [-3,....4] total 8 correltions + * sf4: lag range [-6,....8] total 15 correlations + * + * In total 48 correlations. The direct implementation computed in worst + * case 4*12*5 = 240 correlations, but more likely around 120. + ***********************************************************************/ +static void silk_P_Ana_calc_corr_st3( + silk_pe_stage3_vals cross_corr_st3[], /* O 3 DIM correlation array */ const opus_int16 frame[], /* I vector to correlate */ opus_int start_lag, /* I lag offset to search around */ opus_int sf_length, /* I length of a 5 ms subframe */ opus_int nb_subfr, /* I number of subframes */ - opus_int complexity /* I Complexity setting */ + opus_int complexity, /* I Complexity setting */ + int arch /* I Run-time architecture */ ) { - const opus_int16 *target_ptr, *basis_ptr; - opus_int32 cross_corr; + const opus_int16 *target_ptr; opus_int i, j, k, lag_counter, lag_low, lag_high; opus_int nb_cbk_search, delta, idx, cbk_size; - opus_int32 scratch_mem[ SCRATCH_SIZE ]; + VARDECL( opus_int32, scratch_mem ); + VARDECL( opus_int32, xcorr32 ); const opus_int8 *Lag_range_ptr, *Lag_CB_ptr; + SAVE_STACK; silk_assert( complexity >= SILK_PE_MIN_COMPLEX ); silk_assert( complexity <= SILK_PE_MAX_COMPLEX ); @@ -610,6 +626,8 @@ void silk_P_Ana_calc_corr_st3( nb_cbk_search = PE_NB_CBKS_STAGE3_10MS; cbk_size = PE_NB_CBKS_STAGE3_10MS; } + ALLOC( scratch_mem, SCRATCH_SIZE, opus_int32 ); + ALLOC( xcorr32, SCRATCH_SIZE, opus_int32 ); target_ptr = &frame[ silk_LSHIFT( sf_length, 2 ) ]; /* Pointer to middle of frame */ for( k = 0; k < nb_subfr; k++ ) { @@ -618,11 +636,11 @@ void silk_P_Ana_calc_corr_st3( /* Calculate the correlations for each subframe */ lag_low = matrix_ptr( Lag_range_ptr, k, 0, 2 ); lag_high = matrix_ptr( Lag_range_ptr, k, 1, 2 ); + silk_assert(lag_high-lag_low+1 <= SCRATCH_SIZE); + celt_pitch_xcorr( target_ptr, target_ptr - start_lag - lag_high, xcorr32, sf_length, lag_high - lag_low + 1, arch ); for( j = lag_low; j <= lag_high; j++ ) { - basis_ptr = target_ptr - ( start_lag + j ); - cross_corr = silk_inner_prod_aligned( (opus_int16*)target_ptr, (opus_int16*)basis_ptr, sf_length ); silk_assert( lag_counter < SCRATCH_SIZE ); - scratch_mem[ lag_counter ] = cross_corr; + scratch_mem[ lag_counter ] = xcorr32[ lag_high - j ]; lag_counter++; } @@ -634,32 +652,35 @@ void silk_P_Ana_calc_corr_st3( for( j = 0; j < PE_NB_STAGE3_LAGS; j++ ) { silk_assert( idx + j < SCRATCH_SIZE ); silk_assert( idx + j < lag_counter ); - cross_corr_st3[ k ][ i ][ j ] = scratch_mem[ idx + j ]; + matrix_ptr( cross_corr_st3, k, i, nb_cbk_search )[ j ] = + scratch_mem[ idx + j ]; } } target_ptr += sf_length; } + RESTORE_STACK; } /********************************************************************/ /* Calculate the energies for first two subframes. The energies are */ /* calculated recursively. */ /********************************************************************/ -void silk_P_Ana_calc_energy_st3( - opus_int32 energies_st3[ PE_MAX_NB_SUBFR ][ PE_NB_CBKS_STAGE3_MAX ][ PE_NB_STAGE3_LAGS ],/* (O) 3 DIM energy array */ - const opus_int16 frame[], /* I vector to calc energy in */ - opus_int start_lag, /* I lag offset to search around */ - opus_int sf_length, /* I length of one 5 ms subframe */ - opus_int nb_subfr, /* I number of subframes */ - opus_int complexity /* I Complexity setting */ +static void silk_P_Ana_calc_energy_st3( + silk_pe_stage3_vals energies_st3[], /* O 3 DIM energy array */ + const opus_int16 frame[], /* I vector to calc energy in */ + opus_int start_lag, /* I lag offset to search around */ + opus_int sf_length, /* I length of one 5 ms subframe */ + opus_int nb_subfr, /* I number of subframes */ + opus_int complexity /* I Complexity setting */ ) { const opus_int16 *target_ptr, *basis_ptr; opus_int32 energy; opus_int k, i, j, lag_counter; opus_int nb_cbk_search, delta, idx, cbk_size, lag_diff; - opus_int32 scratch_mem[ SCRATCH_SIZE ]; + VARDECL( opus_int32, scratch_mem ); const opus_int8 *Lag_range_ptr, *Lag_CB_ptr; + SAVE_STACK; silk_assert( complexity >= SILK_PE_MIN_COMPLEX ); silk_assert( complexity <= SILK_PE_MAX_COMPLEX ); @@ -676,6 +697,8 @@ void silk_P_Ana_calc_energy_st3( nb_cbk_search = PE_NB_CBKS_STAGE3_10MS; cbk_size = PE_NB_CBKS_STAGE3_10MS; } + ALLOC( scratch_mem, SCRATCH_SIZE, opus_int32 ); + target_ptr = &frame[ silk_LSHIFT( sf_length, 2 ) ]; for( k = 0; k < nb_subfr; k++ ) { lag_counter = 0; @@ -709,37 +732,13 @@ void silk_P_Ana_calc_energy_st3( for( j = 0; j < PE_NB_STAGE3_LAGS; j++ ) { silk_assert( idx + j < SCRATCH_SIZE ); silk_assert( idx + j < lag_counter ); - energies_st3[ k ][ i ][ j ] = scratch_mem[ idx + j ]; - silk_assert( energies_st3[ k ][ i ][ j ] >= 0 ); + matrix_ptr( energies_st3, k, i, nb_cbk_search )[ j ] = + scratch_mem[ idx + j ]; + silk_assert( + matrix_ptr( energies_st3, k, i, nb_cbk_search )[ j ] >= 0 ); } } target_ptr += sf_length; } -} - -opus_int32 silk_P_Ana_find_scaling( - const opus_int16 *frame, - const opus_int frame_length, - const opus_int sum_sqr_len -) -{ - opus_int32 nbits, x_max; - - x_max = silk_int16_array_maxabs( frame, frame_length ); - - if( x_max < silk_int16_MAX ) { - /* Number of bits needed for the sum of the squares */ - nbits = 32 - silk_CLZ32( silk_SMULBB( x_max, x_max ) ); - } else { - /* Here we don't know if x_max should have been silk_int16_MAX + 1, so we expect the worst case */ - nbits = 30; - } - nbits += 17 - silk_CLZ16( sum_sqr_len ); - - /* Without a guarantee of saturation, we need to keep the 31st bit free */ - if( nbits < 31 ) { - return 0; - } else { - return( nbits - 30 ); - } + RESTORE_STACK; } diff --git a/code/opus-1.0.2/silk/fixed/prefilter_FIX.c b/code/opus-1.1/silk/fixed/prefilter_FIX.c similarity index 96% rename from code/opus-1.0.2/silk/fixed/prefilter_FIX.c rename to code/opus-1.1/silk/fixed/prefilter_FIX.c index a96f5118..d381730c 100644 --- a/code/opus-1.0.2/silk/fixed/prefilter_FIX.c +++ b/code/opus-1.1/silk/fixed/prefilter_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,10 +30,11 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "main_FIX.h" +#include "stack_alloc.h" #include "tuning_parameters.h" /* Prefilter for finding Quantizer input signal */ -static inline void silk_prefilt_FIX( +static OPUS_INLINE void silk_prefilt_FIX( silk_prefilter_state_FIX *P, /* I/O state */ opus_int32 st_res_Q12[], /* I short term residual signal */ opus_int32 xw_Q3[], /* O prefiltered signal */ @@ -101,14 +102,17 @@ void silk_prefilter_FIX( opus_int32 *pxw_Q3; opus_int HarmShapeGain_Q12, Tilt_Q14; opus_int32 HarmShapeFIRPacked_Q12, LF_shp_Q14; - opus_int32 x_filt_Q12[ MAX_SUB_FRAME_LENGTH ]; - opus_int32 st_res_Q2[ MAX_SUB_FRAME_LENGTH + MAX_LPC_ORDER ]; + VARDECL( opus_int32, x_filt_Q12 ); + VARDECL( opus_int32, st_res_Q2 ); opus_int16 B_Q10[ 2 ]; + SAVE_STACK; /* Set up pointers */ px = x; pxw_Q3 = xw_Q3; lag = P->lagPrev; + ALLOC( x_filt_Q12, psEnc->sCmn.subfr_length, opus_int32 ); + ALLOC( st_res_Q2, psEnc->sCmn.subfr_length, opus_int32 ); for( k = 0; k < psEnc->sCmn.nb_subfr; k++ ) { /* Update Variables that change per sub frame */ if( psEnc->sCmn.indices.signalType == TYPE_VOICED ) { @@ -148,10 +152,11 @@ void silk_prefilter_FIX( } P->lagPrev = psEncCtrl->pitchL[ psEnc->sCmn.nb_subfr - 1 ]; + RESTORE_STACK; } /* Prefilter for finding Quantizer input signal */ -static inline void silk_prefilt_FIX( +static OPUS_INLINE void silk_prefilt_FIX( silk_prefilter_state_FIX *P, /* I/O state */ opus_int32 st_res_Q12[], /* I short term residual signal */ opus_int32 xw_Q3[], /* O prefiltered signal */ diff --git a/code/opus-1.0.2/silk/fixed/process_gains_FIX.c b/code/opus-1.1/silk/fixed/process_gains_FIX.c similarity index 99% rename from code/opus-1.0.2/silk/fixed/process_gains_FIX.c rename to code/opus-1.1/silk/fixed/process_gains_FIX.c index 22d3a71a..05aba317 100644 --- a/code/opus-1.0.2/silk/fixed/process_gains_FIX.c +++ b/code/opus-1.1/silk/fixed/process_gains_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/fixed/regularize_correlations_FIX.c b/code/opus-1.1/silk/fixed/regularize_correlations_FIX.c similarity index 99% rename from code/opus-1.0.2/silk/fixed/regularize_correlations_FIX.c rename to code/opus-1.1/silk/fixed/regularize_correlations_FIX.c index 098c1509..a2836b05 100644 --- a/code/opus-1.0.2/silk/fixed/regularize_correlations_FIX.c +++ b/code/opus-1.1/silk/fixed/regularize_correlations_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/fixed/residual_energy16_FIX.c b/code/opus-1.1/silk/fixed/residual_energy16_FIX.c similarity index 99% rename from code/opus-1.0.2/silk/fixed/residual_energy16_FIX.c rename to code/opus-1.1/silk/fixed/residual_energy16_FIX.c index d61e8493..ebffb2a6 100644 --- a/code/opus-1.0.2/silk/fixed/residual_energy16_FIX.c +++ b/code/opus-1.1/silk/fixed/residual_energy16_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/fixed/residual_energy_FIX.c b/code/opus-1.1/silk/fixed/residual_energy_FIX.c similarity index 94% rename from code/opus-1.0.2/silk/fixed/residual_energy_FIX.c rename to code/opus-1.1/silk/fixed/residual_energy_FIX.c index f284e51f..105ae318 100644 --- a/code/opus-1.0.2/silk/fixed/residual_energy_FIX.c +++ b/code/opus-1.1/silk/fixed/residual_energy_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "main_FIX.h" +#include "stack_alloc.h" /* Calculates residual energies of input subframes where all subframes have LPC_order */ /* of preceding samples */ @@ -45,14 +46,18 @@ void silk_residual_energy_FIX( ) { opus_int offset, i, j, rshift, lz1, lz2; - opus_int16 *LPC_res_ptr, LPC_res[ ( MAX_FRAME_LENGTH + MAX_NB_SUBFR * MAX_LPC_ORDER ) / 2 ]; + opus_int16 *LPC_res_ptr; + VARDECL( opus_int16, LPC_res ); const opus_int16 *x_ptr; opus_int32 tmp32; + SAVE_STACK; x_ptr = x; offset = LPC_order + subfr_length; /* Filter input to create the LPC residual for each frame half, and measure subframe energies */ + ALLOC( LPC_res, ( MAX_NB_SUBFR >> 1 ) * offset, opus_int16 ); + silk_assert( ( nb_subfr >> 1 ) * ( MAX_NB_SUBFR >> 1 ) == nb_subfr ); for( i = 0; i < nb_subfr >> 1; i++ ) { /* Calculate half frame LPC residual signal including preceding samples */ silk_LPC_analysis_filter( LPC_res, x_ptr, a_Q12[ i ], ( MAX_NB_SUBFR >> 1 ) * offset, LPC_order ); @@ -88,4 +93,5 @@ void silk_residual_energy_FIX( nrgs[ i ] = silk_SMMUL( tmp32, silk_LSHIFT32( nrgs[ i ], lz1 ) ); /* Q( nrgsQ[ i ] + lz1 + 2 * lz2 - 32 - 32 )*/ nrgsQ[ i ] += lz1 + 2 * lz2 - 32 - 32; } + RESTORE_STACK; } diff --git a/code/opus-1.0.2/silk/fixed/schur64_FIX.c b/code/opus-1.1/silk/fixed/schur64_FIX.c similarity index 87% rename from code/opus-1.0.2/silk/fixed/schur64_FIX.c rename to code/opus-1.1/silk/fixed/schur64_FIX.c index 5ff27567..764a10ef 100644 --- a/code/opus-1.0.2/silk/fixed/schur64_FIX.c +++ b/code/opus-1.1/silk/fixed/schur64_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -56,6 +56,17 @@ opus_int32 silk_schur64( /* O returns residual ene } for( k = 0; k < order; k++ ) { + /* Check that we won't be getting an unstable rc, otherwise stop here. */ + if (silk_abs_int32(C[ k + 1 ][ 0 ]) >= C[ 0 ][ 1 ]) { + if ( C[ k + 1 ][ 0 ] > 0 ) { + rc_Q16[ k ] = -SILK_FIX_CONST( .99f, 16 ); + } else { + rc_Q16[ k ] = SILK_FIX_CONST( .99f, 16 ); + } + k++; + break; + } + /* Get reflection coefficient: divide two Q30 values and get result in Q31 */ rc_tmp_Q31 = silk_DIV32_varQ( -C[ k + 1 ][ 0 ], C[ 0 ][ 1 ], 31 ); @@ -73,5 +84,9 @@ opus_int32 silk_schur64( /* O returns residual ene } } - return( C[ 0 ][ 1 ] ); + for(; k < order; k++ ) { + rc_Q16[ k ] = 0; + } + + return silk_max_32( 1, C[ 0 ][ 1 ] ); } diff --git a/code/opus-1.0.2/silk/fixed/schur_FIX.c b/code/opus-1.1/silk/fixed/schur_FIX.c similarity index 89% rename from code/opus-1.0.2/silk/fixed/schur_FIX.c rename to code/opus-1.1/silk/fixed/schur_FIX.c index 43db5018..c4c0ef23 100644 --- a/code/opus-1.0.2/silk/fixed/schur_FIX.c +++ b/code/opus-1.1/silk/fixed/schur_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -68,6 +68,16 @@ opus_int32 silk_schur( /* O Returns residual ene } for( k = 0; k < order; k++ ) { + /* Check that we won't be getting an unstable rc, otherwise stop here. */ + if (silk_abs_int32(C[ k + 1 ][ 0 ]) >= C[ 0 ][ 1 ]) { + if ( C[ k + 1 ][ 0 ] > 0 ) { + rc_Q15[ k ] = -SILK_FIX_CONST( .99f, 15 ); + } else { + rc_Q15[ k ] = SILK_FIX_CONST( .99f, 15 ); + } + k++; + break; + } /* Get reflection coefficient */ rc_tmp_Q15 = -silk_DIV32_16( C[ k + 1 ][ 0 ], silk_max_32( silk_RSHIFT( C[ 0 ][ 1 ], 15 ), 1 ) ); @@ -87,6 +97,10 @@ opus_int32 silk_schur( /* O Returns residual ene } } + for(; k < order; k++ ) { + rc_Q15[ k ] = 0; + } + /* return residual energy */ - return C[ 0 ][ 1 ]; + return silk_max_32( 1, C[ 0 ][ 1 ] ); } diff --git a/code/opus-1.0.2/silk/fixed/solve_LS_FIX.c b/code/opus-1.1/silk/fixed/solve_LS_FIX.c similarity index 95% rename from code/opus-1.0.2/silk/fixed/solve_LS_FIX.c rename to code/opus-1.1/silk/fixed/solve_LS_FIX.c index fb913abe..51d7d49d 100644 --- a/code/opus-1.0.2/silk/fixed/solve_LS_FIX.c +++ b/code/opus-1.1/silk/fixed/solve_LS_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "main_FIX.h" +#include "stack_alloc.h" #include "tuning_parameters.h" /*****************************/ @@ -42,7 +43,7 @@ typedef struct { } inv_D_t; /* Factorize square matrix A into LDL form */ -static inline void silk_LDL_factorize_FIX( +static OPUS_INLINE void silk_LDL_factorize_FIX( opus_int32 *A, /* I/O Pointer to Symetric Square Matrix */ opus_int M, /* I Size of Matrix */ opus_int32 *L_Q16, /* I/O Pointer to Square Upper triangular Matrix */ @@ -50,7 +51,7 @@ static inline void silk_LDL_factorize_FIX( ); /* Solve Lx = b, when L is lower triangular and has ones on the diagonal */ -static inline void silk_LS_SolveFirst_FIX( +static OPUS_INLINE void silk_LS_SolveFirst_FIX( const opus_int32 *L_Q16, /* I Pointer to Lower Triangular Matrix */ opus_int M, /* I Dim of Matrix equation */ const opus_int32 *b, /* I b Vector */ @@ -58,14 +59,14 @@ static inline void silk_LS_SolveFirst_FIX( ); /* Solve L^t*x = b, where L is lower triangular with ones on the diagonal */ -static inline void silk_LS_SolveLast_FIX( +static OPUS_INLINE void silk_LS_SolveLast_FIX( const opus_int32 *L_Q16, /* I Pointer to Lower Triangular Matrix */ const opus_int M, /* I Dim of Matrix equation */ const opus_int32 *b, /* I b Vector */ opus_int32 *x_Q16 /* O x Vector */ ); -static inline void silk_LS_divide_Q16_FIX( +static OPUS_INLINE void silk_LS_divide_Q16_FIX( opus_int32 T[], /* I/O Numenator vector */ inv_D_t *inv_D, /* I 1 / D vector */ opus_int M /* I dimension */ @@ -79,11 +80,13 @@ void silk_solve_LDL_FIX( opus_int32 *x_Q16 /* O Pointer to x solution vector */ ) { - opus_int32 L_Q16[ MAX_MATRIX_SIZE * MAX_MATRIX_SIZE ]; + VARDECL( opus_int32, L_Q16 ); opus_int32 Y[ MAX_MATRIX_SIZE ]; inv_D_t inv_D[ MAX_MATRIX_SIZE ]; + SAVE_STACK; silk_assert( M <= MAX_MATRIX_SIZE ); + ALLOC( L_Q16, M * M, opus_int32 ); /*************************************************** Factorize A by LDL such that A = L*D*L', @@ -107,9 +110,10 @@ void silk_solve_LDL_FIX( x = inv(L') * inv(D) * Y *****************************************************/ silk_LS_SolveLast_FIX( L_Q16, M, Y, x_Q16 ); + RESTORE_STACK; } -static inline void silk_LDL_factorize_FIX( +static OPUS_INLINE void silk_LDL_factorize_FIX( opus_int32 *A, /* I/O Pointer to Symetric Square Matrix */ opus_int M, /* I Size of Matrix */ opus_int32 *L_Q16, /* I/O Pointer to Square Upper triangular Matrix */ @@ -181,7 +185,7 @@ static inline void silk_LDL_factorize_FIX( silk_assert( status == 0 ); } -static inline void silk_LS_divide_Q16_FIX( +static OPUS_INLINE void silk_LS_divide_Q16_FIX( opus_int32 T[], /* I/O Numenator vector */ inv_D_t *inv_D, /* I 1 / D vector */ opus_int M /* I dimension */ @@ -201,7 +205,7 @@ static inline void silk_LS_divide_Q16_FIX( } /* Solve Lx = b, when L is lower triangular and has ones on the diagonal */ -static inline void silk_LS_SolveFirst_FIX( +static OPUS_INLINE void silk_LS_SolveFirst_FIX( const opus_int32 *L_Q16, /* I Pointer to Lower Triangular Matrix */ opus_int M, /* I Dim of Matrix equation */ const opus_int32 *b, /* I b Vector */ @@ -223,7 +227,7 @@ static inline void silk_LS_SolveFirst_FIX( } /* Solve L^t*x = b, where L is lower triangular with ones on the diagonal */ -static inline void silk_LS_SolveLast_FIX( +static OPUS_INLINE void silk_LS_SolveLast_FIX( const opus_int32 *L_Q16, /* I Pointer to Lower Triangular Matrix */ const opus_int M, /* I Dim of Matrix equation */ const opus_int32 *b, /* I b Vector */ diff --git a/code/opus-1.0.2/silk/fixed/structs_FIX.h b/code/opus-1.1/silk/fixed/structs_FIX.h similarity index 99% rename from code/opus-1.0.2/silk/fixed/structs_FIX.h rename to code/opus-1.1/silk/fixed/structs_FIX.h index 4162608b..244b4793 100644 --- a/code/opus-1.0.2/silk/fixed/structs_FIX.h +++ b/code/opus-1.1/silk/fixed/structs_FIX.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/fixed/vector_ops_FIX.c b/code/opus-1.1/silk/fixed/vector_ops_FIX.c similarity index 80% rename from code/opus-1.0.2/silk/fixed/vector_ops_FIX.c rename to code/opus-1.1/silk/fixed/vector_ops_FIX.c index d6206024..509c8b35 100644 --- a/code/opus-1.0.2/silk/fixed/vector_ops_FIX.c +++ b/code/opus-1.1/silk/fixed/vector_ops_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -94,34 +94,3 @@ opus_int64 silk_inner_prod16_aligned_64( } return sum; } - -/* Function that returns the maximum absolut value of the input vector */ -opus_int16 silk_int16_array_maxabs( /* O Maximum absolute value, max: 2^15-1 */ - const opus_int16 *vec, /* I Input vector [len] */ - const opus_int32 len /* I Length of input vector */ -) -{ - opus_int32 max = 0, i, lvl = 0, ind; - if( len == 0 ) return 0; - - ind = len - 1; - max = silk_SMULBB( vec[ ind ], vec[ ind ] ); - for( i = len - 2; i >= 0; i-- ) { - lvl = silk_SMULBB( vec[ i ], vec[ i ] ); - if( lvl > max ) { - max = lvl; - ind = i; - } - } - - /* Do not return 32768, as it will not fit in an int16 so may lead to problems later on */ - if( max >= 1073676289 ) { /* (2^15-1)^2 = 1073676289 */ - return( silk_int16_MAX ); - } else { - if( vec[ ind ] < 0 ) { - return( -vec[ ind ] ); - } else { - return( vec[ ind ] ); - } - } -} diff --git a/code/opus-1.0.2/silk/fixed/warped_autocorrelation_FIX.c b/code/opus-1.1/silk/fixed/warped_autocorrelation_FIX.c similarity index 99% rename from code/opus-1.0.2/silk/fixed/warped_autocorrelation_FIX.c rename to code/opus-1.1/silk/fixed/warped_autocorrelation_FIX.c index d7a3944b..a4a579b1 100644 --- a/code/opus-1.0.2/silk/fixed/warped_autocorrelation_FIX.c +++ b/code/opus-1.1/silk/fixed/warped_autocorrelation_FIX.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/LPC_analysis_filter_FLP.c b/code/opus-1.1/silk/float/LPC_analysis_filter_FLP.c similarity index 97% rename from code/opus-1.0.2/silk/float/LPC_analysis_filter_FLP.c rename to code/opus-1.1/silk/float/LPC_analysis_filter_FLP.c index 9845655b..cae89a0a 100644 --- a/code/opus-1.0.2/silk/float/LPC_analysis_filter_FLP.c +++ b/code/opus-1.1/silk/float/LPC_analysis_filter_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -40,7 +40,7 @@ POSSIBILITY OF SUCH DAMAGE. /************************************************/ /* 16th order LPC analysis filter, does not write first 16 samples */ -static inline void silk_LPC_analysis_filter16_FLP( +static OPUS_INLINE void silk_LPC_analysis_filter16_FLP( silk_float r_LPC[], /* O LPC residual signal */ const silk_float PredCoef[], /* I LPC coefficients */ const silk_float s[], /* I Input signal */ @@ -78,7 +78,7 @@ static inline void silk_LPC_analysis_filter16_FLP( } /* 12th order LPC analysis filter, does not write first 12 samples */ -static inline void silk_LPC_analysis_filter12_FLP( +static OPUS_INLINE void silk_LPC_analysis_filter12_FLP( silk_float r_LPC[], /* O LPC residual signal */ const silk_float PredCoef[], /* I LPC coefficients */ const silk_float s[], /* I Input signal */ @@ -112,7 +112,7 @@ static inline void silk_LPC_analysis_filter12_FLP( } /* 10th order LPC analysis filter, does not write first 10 samples */ -static inline void silk_LPC_analysis_filter10_FLP( +static OPUS_INLINE void silk_LPC_analysis_filter10_FLP( silk_float r_LPC[], /* O LPC residual signal */ const silk_float PredCoef[], /* I LPC coefficients */ const silk_float s[], /* I Input signal */ @@ -144,7 +144,7 @@ static inline void silk_LPC_analysis_filter10_FLP( } /* 8th order LPC analysis filter, does not write first 8 samples */ -static inline void silk_LPC_analysis_filter8_FLP( +static OPUS_INLINE void silk_LPC_analysis_filter8_FLP( silk_float r_LPC[], /* O LPC residual signal */ const silk_float PredCoef[], /* I LPC coefficients */ const silk_float s[], /* I Input signal */ @@ -174,7 +174,7 @@ static inline void silk_LPC_analysis_filter8_FLP( } /* 6th order LPC analysis filter, does not write first 6 samples */ -static inline void silk_LPC_analysis_filter6_FLP( +static OPUS_INLINE void silk_LPC_analysis_filter6_FLP( silk_float r_LPC[], /* O LPC residual signal */ const silk_float PredCoef[], /* I LPC coefficients */ const silk_float s[], /* I Input signal */ diff --git a/code/opus-1.0.2/silk/float/LPC_inv_pred_gain_FLP.c b/code/opus-1.1/silk/float/LPC_inv_pred_gain_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/LPC_inv_pred_gain_FLP.c rename to code/opus-1.1/silk/float/LPC_inv_pred_gain_FLP.c index 8645f77f..25178bac 100644 --- a/code/opus-1.0.2/silk/float/LPC_inv_pred_gain_FLP.c +++ b/code/opus-1.1/silk/float/LPC_inv_pred_gain_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/LTP_analysis_filter_FLP.c b/code/opus-1.1/silk/float/LTP_analysis_filter_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/LTP_analysis_filter_FLP.c rename to code/opus-1.1/silk/float/LTP_analysis_filter_FLP.c index d3a6a5ae..849b7c1c 100644 --- a/code/opus-1.0.2/silk/float/LTP_analysis_filter_FLP.c +++ b/code/opus-1.1/silk/float/LTP_analysis_filter_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/LTP_scale_ctrl_FLP.c b/code/opus-1.1/silk/float/LTP_scale_ctrl_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/LTP_scale_ctrl_FLP.c rename to code/opus-1.1/silk/float/LTP_scale_ctrl_FLP.c index f3f0c572..8dbe29d0 100644 --- a/code/opus-1.0.2/silk/float/LTP_scale_ctrl_FLP.c +++ b/code/opus-1.1/silk/float/LTP_scale_ctrl_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/SigProc_FLP.h b/code/opus-1.1/silk/float/SigProc_FLP.h similarity index 95% rename from code/opus-1.0.2/silk/float/SigProc_FLP.h rename to code/opus-1.1/silk/float/SigProc_FLP.h index 036b46da..f0cb3733 100644 --- a/code/opus-1.0.2/silk/float/SigProc_FLP.h +++ b/code/opus-1.1/silk/float/SigProc_FLP.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -94,7 +94,8 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced, const silk_float search_thres2, /* I Final threshold for lag candidates 0 - 1 */ const opus_int Fs_kHz, /* I sample frequency (kHz) */ const opus_int complexity, /* I Complexity setting, 0-2, where 2 is highest */ - const opus_int nb_subfr /* I Number of 5 ms subframes */ + const opus_int nb_subfr, /* I Number of 5 ms subframes */ + int arch /* I Run-time architecture */ ); void silk_insertion_sort_decreasing_FLP( @@ -153,19 +154,19 @@ double silk_energy_FLP( #define silk_abs_float( a ) ((silk_float)fabs(a)) /* sigmoid function */ -static inline silk_float silk_sigmoid( silk_float x ) +static OPUS_INLINE silk_float silk_sigmoid( silk_float x ) { return (silk_float)(1.0 / (1.0 + exp(-x))); } /* floating-point to integer conversion (rounding) */ -static inline opus_int32 silk_float2int( silk_float x ) +static OPUS_INLINE opus_int32 silk_float2int( silk_float x ) { return (opus_int32)float2int( x ); } /* floating-point to integer conversion (rounding) */ -static inline void silk_float2short_array( +static OPUS_INLINE void silk_float2short_array( opus_int16 *out, const silk_float *in, opus_int32 length @@ -178,7 +179,7 @@ static inline void silk_float2short_array( } /* integer to floating-point conversion */ -static inline void silk_short2float_array( +static OPUS_INLINE void silk_short2float_array( silk_float *out, const opus_int16 *in, opus_int32 length @@ -191,7 +192,7 @@ static inline void silk_short2float_array( } /* using log2() helps the fixed-point conversion */ -static inline silk_float silk_log2( double x ) +static OPUS_INLINE silk_float silk_log2( double x ) { return ( silk_float )( 3.32192809488736 * log10( x ) ); } diff --git a/code/opus-1.0.2/silk/float/apply_sine_window_FLP.c b/code/opus-1.1/silk/float/apply_sine_window_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/apply_sine_window_FLP.c rename to code/opus-1.1/silk/float/apply_sine_window_FLP.c index e06333f7..6aae57c0 100644 --- a/code/opus-1.0.2/silk/float/apply_sine_window_FLP.c +++ b/code/opus-1.1/silk/float/apply_sine_window_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/autocorrelation_FLP.c b/code/opus-1.1/silk/float/autocorrelation_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/autocorrelation_FLP.c rename to code/opus-1.1/silk/float/autocorrelation_FLP.c index 9ce709e2..8b8a9e65 100644 --- a/code/opus-1.0.2/silk/float/autocorrelation_FLP.c +++ b/code/opus-1.1/silk/float/autocorrelation_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/burg_modified_FLP.c b/code/opus-1.1/silk/float/burg_modified_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/burg_modified_FLP.c rename to code/opus-1.1/silk/float/burg_modified_FLP.c index 31c9b228..ea5dc25a 100644 --- a/code/opus-1.0.2/silk/float/burg_modified_FLP.c +++ b/code/opus-1.1/silk/float/burg_modified_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/bwexpander_FLP.c b/code/opus-1.1/silk/float/bwexpander_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/bwexpander_FLP.c rename to code/opus-1.1/silk/float/bwexpander_FLP.c index 59ca4eaf..d55a4d79 100644 --- a/code/opus-1.0.2/silk/float/bwexpander_FLP.c +++ b/code/opus-1.1/silk/float/bwexpander_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/corrMatrix_FLP.c b/code/opus-1.1/silk/float/corrMatrix_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/corrMatrix_FLP.c rename to code/opus-1.1/silk/float/corrMatrix_FLP.c index c59f73c3..eae6a1cf 100644 --- a/code/opus-1.0.2/silk/float/corrMatrix_FLP.c +++ b/code/opus-1.1/silk/float/corrMatrix_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/encode_frame_FLP.c b/code/opus-1.1/silk/float/encode_frame_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/encode_frame_FLP.c rename to code/opus-1.1/silk/float/encode_frame_FLP.c index 23260bc7..d54e2686 100644 --- a/code/opus-1.0.2/silk/float/encode_frame_FLP.c +++ b/code/opus-1.1/silk/float/encode_frame_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "tuning_parameters.h" /* Low Bitrate Redundancy (LBRR) encoding. Reuse all parameters but encode with lower bitrate */ -static inline void silk_LBRR_encode_FLP( +static OPUS_INLINE void silk_LBRR_encode_FLP( silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP */ silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP */ const silk_float xfw[], /* I Input signal */ @@ -129,7 +129,7 @@ opus_int silk_encode_frame_FLP( /*****************************************/ /* Find pitch lags, initial LPC analysis */ /*****************************************/ - silk_find_pitch_lags_FLP( psEnc, &sEncCtrl, res_pitch, x_frame ); + silk_find_pitch_lags_FLP( psEnc, &sEncCtrl, res_pitch, x_frame, psEnc->sCmn.arch ); /************************/ /* Noise shape analysis */ @@ -294,10 +294,6 @@ opus_int silk_encode_frame_FLP( silk_memmove( psEnc->x_buf, &psEnc->x_buf[ psEnc->sCmn.frame_length ], ( psEnc->sCmn.ltp_mem_length + LA_SHAPE_MS * psEnc->sCmn.fs_kHz ) * sizeof( silk_float ) ); - /* Parameters needed for next frame */ - psEnc->sCmn.prevLag = sEncCtrl.pitchL[ psEnc->sCmn.nb_subfr - 1 ]; - psEnc->sCmn.prevSignalType = psEnc->sCmn.indices.signalType; - /* Exit without entropy coding */ if( psEnc->sCmn.prefillFlag ) { /* No payload */ @@ -305,6 +301,10 @@ opus_int silk_encode_frame_FLP( return ret; } + /* Parameters needed for next frame */ + psEnc->sCmn.prevLag = sEncCtrl.pitchL[ psEnc->sCmn.nb_subfr - 1 ]; + psEnc->sCmn.prevSignalType = psEnc->sCmn.indices.signalType; + /****************************************/ /* Finalize payload */ /****************************************/ @@ -316,7 +316,7 @@ opus_int silk_encode_frame_FLP( } /* Low-Bitrate Redundancy (LBRR) encoding. Reuse all parameters but encode excitation at lower bitrate */ -static inline void silk_LBRR_encode_FLP( +static OPUS_INLINE void silk_LBRR_encode_FLP( silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP */ silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP */ const silk_float xfw[], /* I Input signal */ diff --git a/code/opus-1.0.2/silk/float/energy_FLP.c b/code/opus-1.1/silk/float/energy_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/energy_FLP.c rename to code/opus-1.1/silk/float/energy_FLP.c index e3eedf97..24b8179f 100644 --- a/code/opus-1.0.2/silk/float/energy_FLP.c +++ b/code/opus-1.1/silk/float/energy_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/find_LPC_FLP.c b/code/opus-1.1/silk/float/find_LPC_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/find_LPC_FLP.c rename to code/opus-1.1/silk/float/find_LPC_FLP.c index 66fa7dd4..61c1ad95 100644 --- a/code/opus-1.0.2/silk/float/find_LPC_FLP.c +++ b/code/opus-1.1/silk/float/find_LPC_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/find_LTP_FLP.c b/code/opus-1.1/silk/float/find_LTP_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/find_LTP_FLP.c rename to code/opus-1.1/silk/float/find_LTP_FLP.c index 0a3c71bb..72299960 100644 --- a/code/opus-1.0.2/silk/float/find_LTP_FLP.c +++ b/code/opus-1.1/silk/float/find_LTP_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/find_pitch_lags_FLP.c b/code/opus-1.1/silk/float/find_pitch_lags_FLP.c similarity index 96% rename from code/opus-1.0.2/silk/float/find_pitch_lags_FLP.c rename to code/opus-1.1/silk/float/find_pitch_lags_FLP.c index 00862a6d..f3b22d25 100644 --- a/code/opus-1.0.2/silk/float/find_pitch_lags_FLP.c +++ b/code/opus-1.1/silk/float/find_pitch_lags_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -37,7 +37,8 @@ void silk_find_pitch_lags_FLP( silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP */ silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP */ silk_float res[], /* O Residual */ - const silk_float x[] /* I Speech signal */ + const silk_float x[], /* I Speech signal */ + int arch /* I Run-time architecture */ ) { opus_int buf_len; @@ -116,7 +117,7 @@ void silk_find_pitch_lags_FLP( /*****************************************/ if( silk_pitch_analysis_core_FLP( res, psEncCtrl->pitchL, &psEnc->sCmn.indices.lagIndex, &psEnc->sCmn.indices.contourIndex, &psEnc->LTPCorr, psEnc->sCmn.prevLag, psEnc->sCmn.pitchEstimationThreshold_Q16 / 65536.0f, - thrhld, psEnc->sCmn.fs_kHz, psEnc->sCmn.pitchEstimationComplexity, psEnc->sCmn.nb_subfr ) == 0 ) + thrhld, psEnc->sCmn.fs_kHz, psEnc->sCmn.pitchEstimationComplexity, psEnc->sCmn.nb_subfr, arch ) == 0 ) { psEnc->sCmn.indices.signalType = TYPE_VOICED; } else { diff --git a/code/opus-1.0.2/silk/float/find_pred_coefs_FLP.c b/code/opus-1.1/silk/float/find_pred_coefs_FLP.c similarity index 97% rename from code/opus-1.0.2/silk/float/find_pred_coefs_FLP.c rename to code/opus-1.1/silk/float/find_pred_coefs_FLP.c index 2156893a..ea2c6c43 100644 --- a/code/opus-1.0.2/silk/float/find_pred_coefs_FLP.c +++ b/code/opus-1.1/silk/float/find_pred_coefs_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -67,7 +67,7 @@ void silk_find_pred_coefs_FLP( /* Quantize LTP gain parameters */ silk_quant_LTP_gains_FLP( psEncCtrl->LTPCoef, psEnc->sCmn.indices.LTPIndex, &psEnc->sCmn.indices.PERIndex, - WLTP, psEnc->sCmn.mu_LTP_Q9, psEnc->sCmn.LTPQuantLowComplexity, psEnc->sCmn.nb_subfr ); + &psEnc->sCmn.sum_log_gain_Q7, WLTP, psEnc->sCmn.mu_LTP_Q9, psEnc->sCmn.LTPQuantLowComplexity, psEnc->sCmn.nb_subfr ); /* Control LTP scaling */ silk_LTP_scale_ctrl_FLP( psEnc, psEncCtrl, condCoding ); @@ -90,6 +90,7 @@ void silk_find_pred_coefs_FLP( } silk_memset( psEncCtrl->LTPCoef, 0, psEnc->sCmn.nb_subfr * LTP_ORDER * sizeof( silk_float ) ); psEncCtrl->LTPredCodGain = 0.0f; + psEnc->sCmn.sum_log_gain_Q7 = 0; } /* Limit on total predictive coding gain */ diff --git a/code/opus-1.0.2/silk/float/inner_product_FLP.c b/code/opus-1.1/silk/float/inner_product_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/inner_product_FLP.c rename to code/opus-1.1/silk/float/inner_product_FLP.c index 60823d6e..029c0129 100644 --- a/code/opus-1.0.2/silk/float/inner_product_FLP.c +++ b/code/opus-1.1/silk/float/inner_product_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/k2a_FLP.c b/code/opus-1.1/silk/float/k2a_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/k2a_FLP.c rename to code/opus-1.1/silk/float/k2a_FLP.c index 6f05d4b9..12af4e76 100644 --- a/code/opus-1.0.2/silk/float/k2a_FLP.c +++ b/code/opus-1.1/silk/float/k2a_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/levinsondurbin_FLP.c b/code/opus-1.1/silk/float/levinsondurbin_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/levinsondurbin_FLP.c rename to code/opus-1.1/silk/float/levinsondurbin_FLP.c index b4cd34e2..f0ba6069 100644 --- a/code/opus-1.0.2/silk/float/levinsondurbin_FLP.c +++ b/code/opus-1.1/silk/float/levinsondurbin_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/main_FLP.h b/code/opus-1.1/silk/float/main_FLP.h similarity index 97% rename from code/opus-1.0.2/silk/float/main_FLP.h rename to code/opus-1.1/silk/float/main_FLP.h index 93455d4d..fb553b61 100644 --- a/code/opus-1.0.2/silk/float/main_FLP.h +++ b/code/opus-1.1/silk/float/main_FLP.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -71,7 +71,8 @@ opus_int silk_encode_frame_FLP( /* Initializes the Silk encoder state */ opus_int silk_init_encoder( - silk_encoder_state_FLP *psEnc /* I/O Encoder state FLP */ + silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP */ + int arch /* I Run-tim architecture */ ); /* Control the Silk encoder */ @@ -129,7 +130,8 @@ void silk_find_pitch_lags_FLP( silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP */ silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP */ silk_float res[], /* O Residual */ - const silk_float x[] /* I Speech signal */ + const silk_float x[], /* I Speech signal */ + int arch /* I Run-time architecture */ ); /* Find LPC and LTP coefficients */ @@ -199,6 +201,7 @@ void silk_quant_LTP_gains_FLP( silk_float B[ MAX_NB_SUBFR * LTP_ORDER ], /* I/O (Un-)quantized LTP gains */ opus_int8 cbk_index[ MAX_NB_SUBFR ], /* O Codebook index */ opus_int8 *periodicity_index, /* O Periodicity index */ + opus_int32 *sum_log_gain_Q7, /* I/O Cumulative max prediction gain */ const silk_float W[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* I Error weights */ const opus_int mu_Q10, /* I Mu value (R/D tradeoff) */ const opus_int lowComplexity, /* I Flag for low complexity */ diff --git a/code/opus-1.0.2/silk/float/noise_shape_analysis_FLP.c b/code/opus-1.1/silk/float/noise_shape_analysis_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/noise_shape_analysis_FLP.c rename to code/opus-1.1/silk/float/noise_shape_analysis_FLP.c index 33bfd20d..65f6ea58 100644 --- a/code/opus-1.0.2/silk/float/noise_shape_analysis_FLP.c +++ b/code/opus-1.1/silk/float/noise_shape_analysis_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE. /* non-warped frequency scale. (So that it can be implemented with a minimum-phase monic filter.) */ /* Note: A monic filter is one with the first coefficient equal to 1.0. In Silk we omit the first */ /* coefficient in an array of coefficients, for monic filters. */ -static inline silk_float warped_gain( +static OPUS_INLINE silk_float warped_gain( const silk_float *coefs, silk_float lambda, opus_int order @@ -54,7 +54,7 @@ static inline silk_float warped_gain( /* Convert warped filter coefficients to monic pseudo-warped coefficients and limit maximum */ /* amplitude of monic warped coefficients by using bandwidth expansion on the true coefficients */ -static inline void warped_true2monic_coefs( +static OPUS_INLINE void warped_true2monic_coefs( silk_float *coefs_syn, silk_float *coefs_ana, silk_float lambda, diff --git a/code/opus-1.0.2/silk/float/pitch_analysis_core_FLP.c b/code/opus-1.1/silk/float/pitch_analysis_core_FLP.c similarity index 87% rename from code/opus-1.0.2/silk/float/pitch_analysis_core_FLP.c rename to code/opus-1.1/silk/float/pitch_analysis_core_FLP.c index fbff90c3..e58f041b 100644 --- a/code/opus-1.0.2/silk/float/pitch_analysis_core_FLP.c +++ b/code/opus-1.1/silk/float/pitch_analysis_core_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -35,9 +35,9 @@ POSSIBILITY OF SUCH DAMAGE. #include "SigProc_FLP.h" #include "SigProc_FIX.h" #include "pitch_est_defines.h" +#include "pitch.h" #define SCRATCH_SIZE 22 -#define eps 1.192092896e-07f /************************************************************/ /* Internally used functions */ @@ -48,7 +48,8 @@ static void silk_P_Ana_calc_corr_st3( opus_int start_lag, /* I start lag */ opus_int sf_length, /* I sub frame length */ opus_int nb_subfr, /* I number of subframes */ - opus_int complexity /* I Complexity setting */ + opus_int complexity, /* I Complexity setting */ + int arch /* I Run-time architecture */ ); static void silk_P_Ana_calc_energy_st3( @@ -74,7 +75,8 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced, const silk_float search_thres2, /* I Final threshold for lag candidates 0 - 1 */ const opus_int Fs_kHz, /* I sample frequency (kHz) */ const opus_int complexity, /* I Complexity setting, 0-2, where 2 is highest */ - const opus_int nb_subfr /* I Number of 5 ms subframes */ + const opus_int nb_subfr, /* I Number of 5 ms subframes */ + int arch /* I Run-time architecture */ ) { opus_int i, k, d, j; @@ -85,6 +87,7 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced, opus_int32 filt_state[ 6 ]; silk_float threshold, contour_bias; silk_float C[ PE_MAX_NB_SUBFR][ (PE_MAX_LAG >> 1) + 5 ]; + opus_val32 xcorr[ PE_MAX_LAG_MS * 4 - PE_MIN_LAG_MS * 4 + 1 ]; silk_float CC[ PE_NB_CBKS_STAGE2_EXT ]; const silk_float *target_ptr, *basis_ptr; double cross_corr, normalizer, energy, energy_tmp; @@ -129,8 +132,6 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced, max_lag_4kHz = PE_MAX_LAG_MS * 4; max_lag_8kHz = PE_MAX_LAG_MS * 8 - 1; - silk_memset(C, 0, sizeof(silk_float) * nb_subfr * ((PE_MAX_LAG >> 1) + 5)); - /* Resample from input sampled at Fs_kHz to 8 kHz */ if( Fs_kHz == 16 ) { /* Resample to 16 -> 8 khz */ @@ -164,6 +165,7 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced, /****************************************************************************** * FIRST STAGE, operating in 4 khz ******************************************************************************/ + silk_memset(C, 0, sizeof(silk_float) * nb_subfr * ((PE_MAX_LAG >> 1) + 5)); target_ptr = &frame_4kHz[ silk_LSHIFT( sf_length_4kHz, 2 ) ]; for( k = 0; k < nb_subfr >> 1; k++ ) { /* Check that we are within range of the array */ @@ -176,27 +178,31 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced, silk_assert( basis_ptr >= frame_4kHz ); silk_assert( basis_ptr + sf_length_8kHz <= frame_4kHz + frame_length_4kHz ); - /* Calculate first vector products before loop */ - cross_corr = silk_inner_product_FLP( target_ptr, basis_ptr, sf_length_8kHz ); - normalizer = silk_energy_FLP( basis_ptr, sf_length_8kHz ) + sf_length_8kHz * 4000.0f; + celt_pitch_xcorr( target_ptr, target_ptr-max_lag_4kHz, xcorr, sf_length_8kHz, max_lag_4kHz - min_lag_4kHz + 1, arch ); - C[ 0 ][ min_lag_4kHz ] += (silk_float)(cross_corr / sqrt(normalizer)); + /* Calculate first vector products before loop */ + cross_corr = xcorr[ max_lag_4kHz - min_lag_4kHz ]; + normalizer = silk_energy_FLP( target_ptr, sf_length_8kHz ) + + silk_energy_FLP( basis_ptr, sf_length_8kHz ) + + sf_length_8kHz * 4000.0f; + + C[ 0 ][ min_lag_4kHz ] += (silk_float)( 2 * cross_corr / normalizer ); /* From now on normalizer is computed recursively */ - for(d = min_lag_4kHz + 1; d <= max_lag_4kHz; d++) { + for( d = min_lag_4kHz + 1; d <= max_lag_4kHz; d++ ) { basis_ptr--; /* Check that we are within range of the array */ silk_assert( basis_ptr >= frame_4kHz ); silk_assert( basis_ptr + sf_length_8kHz <= frame_4kHz + frame_length_4kHz ); - cross_corr = silk_inner_product_FLP(target_ptr, basis_ptr, sf_length_8kHz); + cross_corr = xcorr[ max_lag_4kHz - d ]; /* Add contribution of new sample and remove contribution from oldest sample */ normalizer += basis_ptr[ 0 ] * (double)basis_ptr[ 0 ] - basis_ptr[ sf_length_8kHz ] * (double)basis_ptr[ sf_length_8kHz ]; - C[ 0 ][ d ] += (silk_float)(cross_corr / sqrt( normalizer )); + C[ 0 ][ d ] += (silk_float)( 2 * cross_corr / normalizer ); } /* Update target pointer */ target_ptr += sf_length_8kHz; @@ -214,13 +220,7 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced, /* Escape if correlation is very low already here */ Cmax = C[ 0 ][ min_lag_4kHz ]; - target_ptr = &frame_4kHz[ silk_SMULBB( sf_length_4kHz, nb_subfr ) ]; - energy = 1000.0f; - for( i = 0; i < silk_LSHIFT( sf_length_4kHz, 2 ); i++ ) { - energy += target_ptr[i] * (double)target_ptr[i]; - } - threshold = Cmax * Cmax; - if( energy / 16.0f > threshold ) { + if( Cmax < 0.2f ) { silk_memset( pitch_out, 0, nb_subfr * sizeof( opus_int ) ); *LTPCorr = 0.0f; *lagIndex = 0; @@ -287,14 +287,14 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced, target_ptr = &frame_8kHz[ PE_LTP_MEM_LENGTH_MS * 8 ]; } for( k = 0; k < nb_subfr; k++ ) { - energy_tmp = silk_energy_FLP( target_ptr, sf_length_8kHz ); + energy_tmp = silk_energy_FLP( target_ptr, sf_length_8kHz ) + 1.0; for( j = 0; j < length_d_comp; j++ ) { d = d_comp[ j ]; basis_ptr = target_ptr - d; cross_corr = silk_inner_product_FLP( basis_ptr, target_ptr, sf_length_8kHz ); - energy = silk_energy_FLP( basis_ptr, sf_length_8kHz ); if( cross_corr > 0.0f ) { - C[ k ][ d ] = (silk_float)(cross_corr * cross_corr / (energy * energy_tmp + eps)); + energy = silk_energy_FLP( basis_ptr, sf_length_8kHz ); + C[ k ][ d ] = (silk_float)( 2 * cross_corr / ( energy + energy_tmp ) ); } else { C[ k ][ d ] = 0.0f; } @@ -317,7 +317,7 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced, } else if( Fs_kHz == 16 ) { prevLag = silk_RSHIFT( prevLag, 1 ); } - prevLag_log2 = silk_log2((silk_float)prevLag); + prevLag_log2 = silk_log2( (silk_float)prevLag ); } else { prevLag_log2 = 0; } @@ -356,23 +356,20 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced, CBimax_new = i; } } - CCmax_new = silk_max_float(CCmax_new, 0.0f); /* To avoid taking square root of negative number later */ - CCmax_new_b = CCmax_new; /* Bias towards shorter lags */ - lag_log2 = silk_log2((silk_float)d); - CCmax_new_b -= PE_SHORTLAG_BIAS * nb_subfr * lag_log2; + lag_log2 = silk_log2( (silk_float)d ); + CCmax_new_b = CCmax_new - PE_SHORTLAG_BIAS * nb_subfr * lag_log2; /* Bias towards previous lag */ if( prevLag > 0 ) { delta_lag_log2_sqr = lag_log2 - prevLag_log2; delta_lag_log2_sqr *= delta_lag_log2_sqr; - CCmax_new_b -= PE_PREVLAG_BIAS * nb_subfr * (*LTPCorr) * delta_lag_log2_sqr / (delta_lag_log2_sqr + 0.5f); + CCmax_new_b -= PE_PREVLAG_BIAS * nb_subfr * (*LTPCorr) * delta_lag_log2_sqr / ( delta_lag_log2_sqr + 0.5f ); } - if( CCmax_new_b > CCmax_b && /* Find maximum biased correlation */ - CCmax_new > nb_subfr * search_thres2 * search_thres2 && /* Correlation needs to be high enough to be voiced */ - silk_CB_lags_stage2[ 0 ][ CBimax_new ] <= min_lag_8kHz /* Lag must be in range */ + if( CCmax_new_b > CCmax_b && /* Find maximum biased correlation */ + CCmax_new > nb_subfr * search_thres2 /* Correlation needs to be high enough to be voiced */ ) { CCmax_b = CCmax_new_b; CCmax = CCmax_new; @@ -390,6 +387,10 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced, return 1; } + /* Output normalized correlation */ + *LTPCorr = (silk_float)( CCmax / nb_subfr ); + silk_assert( *LTPCorr >= 0.0f ); + if( Fs_kHz > 8 ) { /* Search in original signal */ @@ -406,13 +407,11 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced, end_lag = silk_min_int( lag + 2, max_lag ); lag_new = lag; /* to avoid undefined lag */ CBimax = 0; /* to avoid undefined lag */ - silk_assert( CCmax >= 0.0f ); - *LTPCorr = (silk_float)sqrt( CCmax / nb_subfr ); /* Output normalized correlation */ CCmax = -1000.0f; /* Calculate the correlations and energies needed in stage 3 */ - silk_P_Ana_calc_corr_st3( cross_corr_st3, frame, start_lag, sf_length, nb_subfr, complexity ); + silk_P_Ana_calc_corr_st3( cross_corr_st3, frame, start_lag, sf_length, nb_subfr, complexity, arch ); silk_P_Ana_calc_energy_st3( energies_st3, frame, start_lag, sf_length, nb_subfr, complexity ); lag_counter = 0; @@ -430,25 +429,25 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced, Lag_CB_ptr = &silk_CB_lags_stage3_10_ms[ 0 ][ 0 ]; } + target_ptr = &frame[ PE_LTP_MEM_LENGTH_MS * Fs_kHz ]; + energy_tmp = silk_energy_FLP( target_ptr, nb_subfr * sf_length ) + 1.0; for( d = start_lag; d <= end_lag; d++ ) { for( j = 0; j < nb_cbk_search; j++ ) { cross_corr = 0.0; - energy = eps; + energy = energy_tmp; for( k = 0; k < nb_subfr; k++ ) { - energy += energies_st3[ k ][ j ][ lag_counter ]; cross_corr += cross_corr_st3[ k ][ j ][ lag_counter ]; + energy += energies_st3[ k ][ j ][ lag_counter ]; } if( cross_corr > 0.0 ) { - CCmax_new = (silk_float)(cross_corr * cross_corr / energy); + CCmax_new = (silk_float)( 2 * cross_corr / energy ); /* Reduce depending on flatness of contour */ CCmax_new *= 1.0f - contour_bias * j; } else { CCmax_new = 0.0f; } - if( CCmax_new > CCmax && - ( d + (opus_int)silk_CB_lags_stage3[ 0 ][ j ] ) <= max_lag - ) { + if( CCmax_new > CCmax && ( d + (opus_int)silk_CB_lags_stage3[ 0 ][ j ] ) <= max_lag ) { CCmax = CCmax_new; lag_new = d; CBimax = j; @@ -464,12 +463,10 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced, *lagIndex = (opus_int16)( lag_new - min_lag ); *contourIndex = (opus_int8)CBimax; } else { /* Fs_kHz == 8 */ - /* Save Lags and correlation */ - silk_assert( CCmax >= 0.0f ); - *LTPCorr = (silk_float)sqrt( CCmax / nb_subfr ); /* Output normalized correlation */ + /* Save Lags */ for( k = 0; k < nb_subfr; k++ ) { pitch_out[ k ] = lag + matrix_ptr( Lag_CB_ptr, k, CBimax, cbk_size ); - pitch_out[ k ] = silk_LIMIT( pitch_out[ k ], min_lag_8kHz, PE_MAX_LAG_MS * Fs_kHz ); + pitch_out[ k ] = silk_LIMIT( pitch_out[ k ], min_lag_8kHz, PE_MAX_LAG_MS * 8 ); } *lagIndex = (opus_int16)( lag - min_lag_8kHz ); *contourIndex = (opus_int8)CBimax; @@ -479,32 +476,34 @@ opus_int silk_pitch_analysis_core_FLP( /* O Voicing estimate: 0 voiced, return 0; } +/*********************************************************************** + * Calculates the correlations used in stage 3 search. In order to cover + * the whole lag codebook for all the searched offset lags (lag +- 2), + * the following correlations are needed in each sub frame: + * + * sf1: lag range [-8,...,7] total 16 correlations + * sf2: lag range [-4,...,4] total 9 correlations + * sf3: lag range [-3,....4] total 8 correltions + * sf4: lag range [-6,....8] total 15 correlations + * + * In total 48 correlations. The direct implementation computed in worst + * case 4*12*5 = 240 correlations, but more likely around 120. + ***********************************************************************/ static void silk_P_Ana_calc_corr_st3( silk_float cross_corr_st3[ PE_MAX_NB_SUBFR ][ PE_NB_CBKS_STAGE3_MAX ][ PE_NB_STAGE3_LAGS ], /* O 3 DIM correlation array */ const silk_float frame[], /* I vector to correlate */ opus_int start_lag, /* I start lag */ opus_int sf_length, /* I sub frame length */ opus_int nb_subfr, /* I number of subframes */ - opus_int complexity /* I Complexity setting */ + opus_int complexity, /* I Complexity setting */ + int arch /* I Run-time architecture */ ) - /*********************************************************************** - Calculates the correlations used in stage 3 search. In order to cover - the whole lag codebook for all the searched offset lags (lag +- 2), - the following correlations are needed in each sub frame: - - sf1: lag range [-8,...,7] total 16 correlations - sf2: lag range [-4,...,4] total 9 correlations - sf3: lag range [-3,....4] total 8 correltions - sf4: lag range [-6,....8] total 15 correlations - - In total 48 correlations. The direct implementation computed in worst case - 4*12*5 = 240 correlations, but more likely around 120. - **********************************************************************/ { - const silk_float *target_ptr, *basis_ptr; + const silk_float *target_ptr; opus_int i, j, k, lag_counter, lag_low, lag_high; opus_int nb_cbk_search, delta, idx, cbk_size; silk_float scratch_mem[ SCRATCH_SIZE ]; + opus_val32 xcorr[ SCRATCH_SIZE ]; const opus_int8 *Lag_range_ptr, *Lag_CB_ptr; silk_assert( complexity >= SILK_PE_MIN_COMPLEX ); @@ -530,10 +529,11 @@ static void silk_P_Ana_calc_corr_st3( /* Calculate the correlations for each subframe */ lag_low = matrix_ptr( Lag_range_ptr, k, 0, 2 ); lag_high = matrix_ptr( Lag_range_ptr, k, 1, 2 ); + silk_assert(lag_high-lag_low+1 <= SCRATCH_SIZE); + celt_pitch_xcorr( target_ptr, target_ptr - start_lag - lag_high, xcorr, sf_length, lag_high - lag_low + 1, arch ); for( j = lag_low; j <= lag_high; j++ ) { - basis_ptr = target_ptr - ( start_lag + j ); silk_assert( lag_counter < SCRATCH_SIZE ); - scratch_mem[ lag_counter ] = (silk_float)silk_inner_product_FLP( target_ptr, basis_ptr, sf_length ); + scratch_mem[ lag_counter ] = xcorr[ lag_high - j ]; lag_counter++; } @@ -552,6 +552,10 @@ static void silk_P_Ana_calc_corr_st3( } } +/********************************************************************/ +/* Calculate the energies for first two subframes. The energies are */ +/* calculated recursively. */ +/********************************************************************/ static void silk_P_Ana_calc_energy_st3( silk_float energies_st3[ PE_MAX_NB_SUBFR ][ PE_NB_CBKS_STAGE3_MAX ][ PE_NB_STAGE3_LAGS ], /* O 3 DIM correlation array */ const silk_float frame[], /* I vector to correlate */ @@ -560,10 +564,6 @@ static void silk_P_Ana_calc_energy_st3( opus_int nb_subfr, /* I number of subframes */ opus_int complexity /* I Complexity setting */ ) -/**************************************************************** -Calculate the energies for first two subframes. The energies are -calculated recursively. -****************************************************************/ { const silk_float *target_ptr, *basis_ptr; double energy; diff --git a/code/opus-1.0.2/silk/float/prefilter_FLP.c b/code/opus-1.1/silk/float/prefilter_FLP.c similarity index 98% rename from code/opus-1.0.2/silk/float/prefilter_FLP.c rename to code/opus-1.1/silk/float/prefilter_FLP.c index d6c84398..8bc32fb4 100644 --- a/code/opus-1.0.2/silk/float/prefilter_FLP.c +++ b/code/opus-1.1/silk/float/prefilter_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -35,7 +35,7 @@ POSSIBILITY OF SUCH DAMAGE. /* * Prefilter for finding Quantizer input signal */ -static inline void silk_prefilt_FLP( +static OPUS_INLINE void silk_prefilt_FLP( silk_prefilter_state_FLP *P, /* I/O state */ silk_float st_res[], /* I */ silk_float xw[], /* O */ @@ -153,7 +153,7 @@ void silk_prefilter_FLP( /* * Prefilter for finding Quantizer input signal */ -static inline void silk_prefilt_FLP( +static OPUS_INLINE void silk_prefilt_FLP( silk_prefilter_state_FLP *P, /* I/O state */ silk_float st_res[], /* I */ silk_float xw[], /* O */ diff --git a/code/opus-1.0.2/silk/float/process_gains_FLP.c b/code/opus-1.1/silk/float/process_gains_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/process_gains_FLP.c rename to code/opus-1.1/silk/float/process_gains_FLP.c index d572a4cd..c0da0dae 100644 --- a/code/opus-1.0.2/silk/float/process_gains_FLP.c +++ b/code/opus-1.1/silk/float/process_gains_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/regularize_correlations_FLP.c b/code/opus-1.1/silk/float/regularize_correlations_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/regularize_correlations_FLP.c rename to code/opus-1.1/silk/float/regularize_correlations_FLP.c index f5684637..df461260 100644 --- a/code/opus-1.0.2/silk/float/regularize_correlations_FLP.c +++ b/code/opus-1.1/silk/float/regularize_correlations_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/residual_energy_FLP.c b/code/opus-1.1/silk/float/residual_energy_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/residual_energy_FLP.c rename to code/opus-1.1/silk/float/residual_energy_FLP.c index e65457ab..b2e03a86 100644 --- a/code/opus-1.0.2/silk/float/residual_energy_FLP.c +++ b/code/opus-1.1/silk/float/residual_energy_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/scale_copy_vector_FLP.c b/code/opus-1.1/silk/float/scale_copy_vector_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/scale_copy_vector_FLP.c rename to code/opus-1.1/silk/float/scale_copy_vector_FLP.c index 988795a6..20db32b3 100644 --- a/code/opus-1.0.2/silk/float/scale_copy_vector_FLP.c +++ b/code/opus-1.1/silk/float/scale_copy_vector_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/scale_vector_FLP.c b/code/opus-1.1/silk/float/scale_vector_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/scale_vector_FLP.c rename to code/opus-1.1/silk/float/scale_vector_FLP.c index 387eb4ba..108fdcbe 100644 --- a/code/opus-1.0.2/silk/float/scale_vector_FLP.c +++ b/code/opus-1.1/silk/float/scale_vector_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/schur_FLP.c b/code/opus-1.1/silk/float/schur_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/schur_FLP.c rename to code/opus-1.1/silk/float/schur_FLP.c index 90c3a18b..ee436f83 100644 --- a/code/opus-1.0.2/silk/float/schur_FLP.c +++ b/code/opus-1.1/silk/float/schur_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/solve_LS_FLP.c b/code/opus-1.1/silk/float/solve_LS_FLP.c similarity index 96% rename from code/opus-1.0.2/silk/float/solve_LS_FLP.c rename to code/opus-1.1/silk/float/solve_LS_FLP.c index a4bb0525..7c90d665 100644 --- a/code/opus-1.0.2/silk/float/solve_LS_FLP.c +++ b/code/opus-1.1/silk/float/solve_LS_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -37,7 +37,7 @@ POSSIBILITY OF SUCH DAMAGE. * Matrix D (only the diagonal elements returned in a vector)such that * the symmetric matric A is given by A = L*D*L'. **********************************************************************/ -static inline void silk_LDL_FLP( +static OPUS_INLINE void silk_LDL_FLP( silk_float *A, /* I/O Pointer to Symetric Square Matrix */ opus_int M, /* I Size of Matrix */ silk_float *L, /* I/O Pointer to Square Upper triangular Matrix */ @@ -48,7 +48,7 @@ static inline void silk_LDL_FLP( * Function to solve linear equation Ax = b, when A is a MxM lower * triangular matrix, with ones on the diagonal. **********************************************************************/ -static inline void silk_SolveWithLowerTriangularWdiagOnes_FLP( +static OPUS_INLINE void silk_SolveWithLowerTriangularWdiagOnes_FLP( const silk_float *L, /* I Pointer to Lower Triangular Matrix */ opus_int M, /* I Dim of Matrix equation */ const silk_float *b, /* I b Vector */ @@ -59,7 +59,7 @@ static inline void silk_SolveWithLowerTriangularWdiagOnes_FLP( * Function to solve linear equation (A^T)x = b, when A is a MxM lower * triangular, with ones on the diagonal. (ie then A^T is upper triangular) **********************************************************************/ -static inline void silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP( +static OPUS_INLINE void silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP( const silk_float *L, /* I Pointer to Lower Triangular Matrix */ opus_int M, /* I Dim of Matrix equation */ const silk_float *b, /* I b Vector */ @@ -109,7 +109,7 @@ void silk_solve_LDL_FLP( silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP( &L[ 0 ][ 0 ], M, T, x ); } -static inline void silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP( +static OPUS_INLINE void silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP( const silk_float *L, /* I Pointer to Lower Triangular Matrix */ opus_int M, /* I Dim of Matrix equation */ const silk_float *b, /* I b Vector */ @@ -131,7 +131,7 @@ static inline void silk_SolveWithUpperTriangularFromLowerWdiagOnes_FLP( } } -static inline void silk_SolveWithLowerTriangularWdiagOnes_FLP( +static OPUS_INLINE void silk_SolveWithLowerTriangularWdiagOnes_FLP( const silk_float *L, /* I Pointer to Lower Triangular Matrix */ opus_int M, /* I Dim of Matrix equation */ const silk_float *b, /* I b Vector */ @@ -153,7 +153,7 @@ static inline void silk_SolveWithLowerTriangularWdiagOnes_FLP( } } -static inline void silk_LDL_FLP( +static OPUS_INLINE void silk_LDL_FLP( silk_float *A, /* I/O Pointer to Symetric Square Matrix */ opus_int M, /* I Size of Matrix */ silk_float *L, /* I/O Pointer to Square Upper triangular Matrix */ diff --git a/code/opus-1.0.2/silk/float/sort_FLP.c b/code/opus-1.1/silk/float/sort_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/sort_FLP.c rename to code/opus-1.1/silk/float/sort_FLP.c index e290c380..f08d7592 100644 --- a/code/opus-1.0.2/silk/float/sort_FLP.c +++ b/code/opus-1.1/silk/float/sort_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/structs_FLP.h b/code/opus-1.1/silk/float/structs_FLP.h similarity index 99% rename from code/opus-1.0.2/silk/float/structs_FLP.h rename to code/opus-1.1/silk/float/structs_FLP.h index c71e7bc3..bb529e71 100644 --- a/code/opus-1.0.2/silk/float/structs_FLP.h +++ b/code/opus-1.1/silk/float/structs_FLP.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/warped_autocorrelation_FLP.c b/code/opus-1.1/silk/float/warped_autocorrelation_FLP.c similarity index 99% rename from code/opus-1.0.2/silk/float/warped_autocorrelation_FLP.c rename to code/opus-1.1/silk/float/warped_autocorrelation_FLP.c index e9ecc2a3..542414f4 100644 --- a/code/opus-1.0.2/silk/float/warped_autocorrelation_FLP.c +++ b/code/opus-1.1/silk/float/warped_autocorrelation_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/float/wrappers_FLP.c b/code/opus-1.1/silk/float/wrappers_FLP.c similarity index 97% rename from code/opus-1.0.2/silk/float/wrappers_FLP.c rename to code/opus-1.1/silk/float/wrappers_FLP.c index 4259e90e..350599b2 100644 --- a/code/opus-1.0.2/silk/float/wrappers_FLP.c +++ b/code/opus-1.1/silk/float/wrappers_FLP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -175,6 +175,7 @@ void silk_quant_LTP_gains_FLP( silk_float B[ MAX_NB_SUBFR * LTP_ORDER ], /* I/O (Un-)quantized LTP gains */ opus_int8 cbk_index[ MAX_NB_SUBFR ], /* O Codebook index */ opus_int8 *periodicity_index, /* O Periodicity index */ + opus_int32 *sum_log_gain_Q7, /* I/O Cumulative max prediction gain */ const silk_float W[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ], /* I Error weights */ const opus_int mu_Q10, /* I Mu value (R/D tradeoff) */ const opus_int lowComplexity, /* I Flag for low complexity */ @@ -192,7 +193,7 @@ void silk_quant_LTP_gains_FLP( W_Q18[ i ] = (opus_int32)silk_float2int( W[ i ] * 262144.0f ); } - silk_quant_LTP_gains( B_Q14, cbk_index, periodicity_index, W_Q18, mu_Q10, lowComplexity, nb_subfr ); + silk_quant_LTP_gains( B_Q14, cbk_index, periodicity_index, sum_log_gain_Q7, W_Q18, mu_Q10, lowComplexity, nb_subfr ); for( i = 0; i < nb_subfr * LTP_ORDER; i++ ) { B[ i ] = (silk_float)B_Q14[ i ] * ( 1.0f / 16384.0f ); diff --git a/code/opus-1.0.2/silk/gain_quant.c b/code/opus-1.1/silk/gain_quant.c similarity index 99% rename from code/opus-1.0.2/silk/gain_quant.c rename to code/opus-1.1/silk/gain_quant.c index b2f73735..64ccd061 100644 --- a/code/opus-1.0.2/silk/gain_quant.c +++ b/code/opus-1.1/silk/gain_quant.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/init_decoder.c b/code/opus-1.1/silk/init_decoder.c similarity index 99% rename from code/opus-1.0.2/silk/init_decoder.c rename to code/opus-1.1/silk/init_decoder.c index 47834890..f887c678 100644 --- a/code/opus-1.0.2/silk/init_decoder.c +++ b/code/opus-1.1/silk/init_decoder.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/init_encoder.c b/code/opus-1.1/silk/init_encoder.c similarity index 89% rename from code/opus-1.0.2/silk/init_encoder.c rename to code/opus-1.1/silk/init_encoder.c index fe3fe968..65995c33 100644 --- a/code/opus-1.0.2/silk/init_encoder.c +++ b/code/opus-1.1/silk/init_encoder.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -34,12 +34,14 @@ POSSIBILITY OF SUCH DAMAGE. #include "main_FLP.h" #endif #include "tuning_parameters.h" +#include "cpu_support.h" /*********************************/ /* Initialize Silk Encoder state */ /*********************************/ opus_int silk_init_encoder( - silk_encoder_state_Fxx *psEnc /* I/O Pointer to Silk FIX encoder state */ + silk_encoder_state_Fxx *psEnc, /* I/O Pointer to Silk FIX encoder state */ + int arch /* I Run-time architecture */ ) { opus_int ret = 0; @@ -47,6 +49,8 @@ opus_int silk_init_encoder( /* Clear the entire encoder state */ silk_memset( psEnc, 0, sizeof( silk_encoder_state_Fxx ) ); + psEnc->sCmn.arch = arch; + psEnc->sCmn.variable_HP_smth1_Q15 = silk_LSHIFT( silk_lin2log( SILK_FIX_CONST( VARIABLE_HP_MIN_CUTOFF_HZ, 16 ) ) - ( 16 << 7 ), 8 ); psEnc->sCmn.variable_HP_smth2_Q15 = psEnc->sCmn.variable_HP_smth1_Q15; diff --git a/code/opus-1.0.2/silk/inner_prod_aligned.c b/code/opus-1.1/silk/inner_prod_aligned.c similarity index 99% rename from code/opus-1.0.2/silk/inner_prod_aligned.c rename to code/opus-1.1/silk/inner_prod_aligned.c index fe20a2b1..257ae9e0 100644 --- a/code/opus-1.0.2/silk/inner_prod_aligned.c +++ b/code/opus-1.1/silk/inner_prod_aligned.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/interpolate.c b/code/opus-1.1/silk/interpolate.c similarity index 99% rename from code/opus-1.0.2/silk/interpolate.c rename to code/opus-1.1/silk/interpolate.c index 226488b9..1bd8ca4d 100644 --- a/code/opus-1.0.2/silk/interpolate.c +++ b/code/opus-1.1/silk/interpolate.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/lin2log.c b/code/opus-1.1/silk/lin2log.c similarity index 99% rename from code/opus-1.0.2/silk/lin2log.c rename to code/opus-1.1/silk/lin2log.c index 212b670d..d4fe5153 100644 --- a/code/opus-1.0.2/silk/lin2log.c +++ b/code/opus-1.1/silk/lin2log.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/log2lin.c b/code/opus-1.1/silk/log2lin.c similarity index 96% rename from code/opus-1.0.2/silk/log2lin.c rename to code/opus-1.1/silk/log2lin.c index 33a19ad1..a692e009 100644 --- a/code/opus-1.0.2/silk/log2lin.c +++ b/code/opus-1.1/silk/log2lin.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -41,7 +41,9 @@ opus_int32 silk_log2lin( if( inLog_Q7 < 0 ) { return 0; - } + } else if ( inLog_Q7 >= 3967 ) { + return silk_int32_MAX; + } out = silk_LSHIFT( 1, silk_RSHIFT( inLog_Q7, 7 ) ); frac_Q7 = inLog_Q7 & 0x7F; diff --git a/code/opus-1.0.2/silk/macros.h b/code/opus-1.1/silk/macros.h similarity index 76% rename from code/opus-1.0.2/silk/macros.h rename to code/opus-1.1/silk/macros.h index 2612fc7a..a84e5a5d 100644 --- a/code/opus-1.0.2/silk/macros.h +++ b/code/opus-1.1/silk/macros.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -32,7 +32,10 @@ POSSIBILITY OF SUCH DAMAGE. #include "config.h" #endif -/* This is an inline header file for general platform. */ +#include "opus_types.h" +#include "opus_defines.h" + +/* This is an OPUS_INLINE header file for general platform. */ /* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */ #define silk_SMULWB(a32, b32) ((((a32) >> 16) * (opus_int32)((opus_int16)(b32))) + ((((a32) & 0x0000FFFF) * (opus_int32)((opus_int16)(b32))) >> 16)) @@ -76,59 +79,36 @@ POSSIBILITY OF SUCH DAMAGE. (( (a) & ((b)^0x80000000) & 0x80000000) ? silk_int32_MIN : (a)-(b)) : \ ((((a)^0x80000000) & (b) & 0x80000000) ? silk_int32_MAX : (a)-(b)) ) -static inline opus_int32 silk_CLZ16(opus_int16 in16) +#include "ecintrin.h" + +static OPUS_INLINE opus_int32 silk_CLZ16(opus_int16 in16) { - opus_int32 out32 = 0; - if( in16 == 0 ) { - return 16; - } - /* test nibbles */ - if( in16 & 0xFF00 ) { - if( in16 & 0xF000 ) { - in16 >>= 12; - } else { - out32 += 4; - in16 >>= 8; - } - } else { - if( in16 & 0xFFF0 ) { - out32 += 8; - in16 >>= 4; - } else { - out32 += 12; - } - } - /* test bits and return */ - if( in16 & 0xC ) { - if( in16 & 0x8 ) - return out32 + 0; - else - return out32 + 1; - } else { - if( in16 & 0xE ) - return out32 + 2; - else - return out32 + 3; - } + return 32 - EC_ILOG(in16<<16|0x8000); } -static inline opus_int32 silk_CLZ32(opus_int32 in32) +static OPUS_INLINE opus_int32 silk_CLZ32(opus_int32 in32) { - /* test highest 16 bits and convert to opus_int16 */ - if( in32 & 0xFFFF0000 ) { - return silk_CLZ16((opus_int16)(in32 >> 16)); - } else { - return silk_CLZ16((opus_int16)in32) + 16; - } + return in32 ? 32 - EC_ILOG(in32) : 32; } /* Row based */ -#define matrix_ptr(Matrix_base_adr, row, column, N) *(Matrix_base_adr + ((row)*(N)+(column))) -#define matrix_adr(Matrix_base_adr, row, column, N) (Matrix_base_adr + ((row)*(N)+(column))) +#define matrix_ptr(Matrix_base_adr, row, column, N) \ + (*((Matrix_base_adr) + ((row)*(N)+(column)))) +#define matrix_adr(Matrix_base_adr, row, column, N) \ + ((Matrix_base_adr) + ((row)*(N)+(column))) /* Column based */ #ifndef matrix_c_ptr -# define matrix_c_ptr(Matrix_base_adr, row, column, M) *(Matrix_base_adr + ((row)+(M)*(column))) +# define matrix_c_ptr(Matrix_base_adr, row, column, M) \ + (*((Matrix_base_adr) + ((row)+(M)*(column)))) +#endif + +#ifdef OPUS_ARM_INLINE_ASM +#include "arm/macros_armv4.h" +#endif + +#ifdef OPUS_ARM_INLINE_EDSP +#include "arm/macros_armv5e.h" #endif #endif /* SILK_MACROS_H */ diff --git a/code/opus-1.0.2/silk/main.h b/code/opus-1.1/silk/main.h similarity index 98% rename from code/opus-1.0.2/silk/main.h rename to code/opus-1.1/silk/main.h index 32675f69..2bdf8978 100644 --- a/code/opus-1.0.2/silk/main.h +++ b/code/opus-1.1/silk/main.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -204,6 +204,7 @@ void silk_quant_LTP_gains( opus_int16 B_Q14[ MAX_NB_SUBFR * LTP_ORDER ], /* I/O (un)quantized LTP gains */ opus_int8 cbk_index[ MAX_NB_SUBFR ], /* O Codebook Index */ opus_int8 *periodicity_index, /* O Periodicity Index */ + opus_int32 *sum_gain_dB_Q7, /* I/O Cumulative max prediction gain */ const opus_int32 W_Q18[ MAX_NB_SUBFR*LTP_ORDER*LTP_ORDER ], /* I Error Weights in Q18 */ opus_int mu_Q9, /* I Mu value (R/D tradeoff) */ opus_int lowComplexity, /* I Flag for low complexity */ @@ -214,11 +215,14 @@ void silk_quant_LTP_gains( void silk_VQ_WMat_EC( opus_int8 *ind, /* O index of best codebook vector */ opus_int32 *rate_dist_Q14, /* O best weighted quant error + mu * rate */ + opus_int *gain_Q7, /* O sum of absolute LTP coefficients */ const opus_int16 *in_Q14, /* I input vector to be quantized */ const opus_int32 *W_Q18, /* I weighting matrix */ const opus_int8 *cb_Q7, /* I codebook */ + const opus_uint8 *cb_gain_Q7, /* I codebook effective gain */ const opus_uint8 *cl_Q5, /* I code length for each codebook vector */ const opus_int mu_Q9, /* I tradeoff betw. weighted error and rate */ + const opus_int32 max_gain_Q7, /* I maximum sum of absolute LTP coefficients */ opus_int L /* I number of vectors in codebook */ ); diff --git a/code/opus-1.0.2/silk/pitch_est_defines.h b/code/opus-1.1/silk/pitch_est_defines.h similarity index 99% rename from code/opus-1.0.2/silk/pitch_est_defines.h rename to code/opus-1.1/silk/pitch_est_defines.h index 0b6770eb..e1e4b5d7 100644 --- a/code/opus-1.0.2/silk/pitch_est_defines.h +++ b/code/opus-1.1/silk/pitch_est_defines.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/pitch_est_tables.c b/code/opus-1.1/silk/pitch_est_tables.c similarity index 99% rename from code/opus-1.0.2/silk/pitch_est_tables.c rename to code/opus-1.1/silk/pitch_est_tables.c index 7b139ed2..81a8baca 100644 --- a/code/opus-1.0.2/silk/pitch_est_tables.c +++ b/code/opus-1.1/silk/pitch_est_tables.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/process_NLSFs.c b/code/opus-1.1/silk/process_NLSFs.c similarity index 99% rename from code/opus-1.0.2/silk/process_NLSFs.c rename to code/opus-1.1/silk/process_NLSFs.c index 34ce7914..c27cf030 100644 --- a/code/opus-1.0.2/silk/process_NLSFs.c +++ b/code/opus-1.1/silk/process_NLSFs.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/quant_LTP_gains.c b/code/opus-1.1/silk/quant_LTP_gains.c similarity index 80% rename from code/opus-1.0.2/silk/quant_LTP_gains.c rename to code/opus-1.1/silk/quant_LTP_gains.c index f73c0f50..fd0870da 100644 --- a/code/opus-1.0.2/silk/quant_LTP_gains.c +++ b/code/opus-1.1/silk/quant_LTP_gains.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,11 +30,13 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "main.h" +#include "tuning_parameters.h" void silk_quant_LTP_gains( opus_int16 B_Q14[ MAX_NB_SUBFR * LTP_ORDER ], /* I/O (un)quantized LTP gains */ opus_int8 cbk_index[ MAX_NB_SUBFR ], /* O Codebook Index */ opus_int8 *periodicity_index, /* O Periodicity Index */ + opus_int32 *sum_log_gain_Q7, /* I/O Cumulative max prediction gain */ const opus_int32 W_Q18[ MAX_NB_SUBFR*LTP_ORDER*LTP_ORDER ], /* I Error Weights in Q18 */ opus_int mu_Q9, /* I Mu value (R/D tradeoff) */ opus_int lowComplexity, /* I Flag for low complexity */ @@ -45,18 +47,26 @@ void silk_quant_LTP_gains( opus_int8 temp_idx[ MAX_NB_SUBFR ]; const opus_uint8 *cl_ptr_Q5; const opus_int8 *cbk_ptr_Q7; + const opus_uint8 *cbk_gain_ptr_Q7; const opus_int16 *b_Q14_ptr; const opus_int32 *W_Q18_ptr; opus_int32 rate_dist_Q14_subfr, rate_dist_Q14, min_rate_dist_Q14; + opus_int32 sum_log_gain_tmp_Q7, best_sum_log_gain_Q7, max_gain_Q7, gain_Q7; /***************************************************/ /* iterate over different codebooks with different */ /* rates/distortions, and choose best */ /***************************************************/ min_rate_dist_Q14 = silk_int32_MAX; + best_sum_log_gain_Q7 = 0; for( k = 0; k < 3; k++ ) { + /* Safety margin for pitch gain control, to take into account factors + such as state rescaling/rewhitening. */ + opus_int32 gain_safety = SILK_FIX_CONST( 0.4, 7 ); + cl_ptr_Q5 = silk_LTP_gain_BITS_Q5_ptrs[ k ]; cbk_ptr_Q7 = silk_LTP_vq_ptrs_Q7[ k ]; + cbk_gain_ptr_Q7 = silk_LTP_vq_gain_ptrs_Q7[ k ]; cbk_size = silk_LTP_vq_sizes[ k ]; /* Set up pointer to first subframe */ @@ -64,19 +74,28 @@ void silk_quant_LTP_gains( b_Q14_ptr = B_Q14; rate_dist_Q14 = 0; + sum_log_gain_tmp_Q7 = *sum_log_gain_Q7; for( j = 0; j < nb_subfr; j++ ) { + max_gain_Q7 = silk_log2lin( ( SILK_FIX_CONST( MAX_SUM_LOG_GAIN_DB / 6.0, 7 ) - sum_log_gain_tmp_Q7 ) + + SILK_FIX_CONST( 7, 7 ) ) - gain_safety; + silk_VQ_WMat_EC( &temp_idx[ j ], /* O index of best codebook vector */ &rate_dist_Q14_subfr, /* O best weighted quantization error + mu * rate */ + &gain_Q7, /* O sum of absolute LTP coefficients */ b_Q14_ptr, /* I input vector to be quantized */ W_Q18_ptr, /* I weighting matrix */ cbk_ptr_Q7, /* I codebook */ + cbk_gain_ptr_Q7, /* I codebook effective gains */ cl_ptr_Q5, /* I code length for each codebook vector */ mu_Q9, /* I tradeoff between weighted error and rate */ + max_gain_Q7, /* I maximum sum of absolute LTP coefficients */ cbk_size /* I number of vectors in codebook */ ); rate_dist_Q14 = silk_ADD_POS_SAT32( rate_dist_Q14, rate_dist_Q14_subfr ); + sum_log_gain_tmp_Q7 = silk_max(0, sum_log_gain_tmp_Q7 + + silk_lin2log( gain_safety + gain_Q7 ) - SILK_FIX_CONST( 7, 7 )); b_Q14_ptr += LTP_ORDER; W_Q18_ptr += LTP_ORDER * LTP_ORDER; @@ -89,6 +108,7 @@ void silk_quant_LTP_gains( min_rate_dist_Q14 = rate_dist_Q14; *periodicity_index = (opus_int8)k; silk_memcpy( cbk_index, temp_idx, nb_subfr * sizeof( opus_int8 ) ); + best_sum_log_gain_Q7 = sum_log_gain_tmp_Q7; } /* Break early in low-complexity mode if rate distortion is below threshold */ @@ -103,5 +123,6 @@ void silk_quant_LTP_gains( B_Q14[ j * LTP_ORDER + k ] = silk_LSHIFT( cbk_ptr_Q7[ cbk_index[ j ] * LTP_ORDER + k ], 7 ); } } + *sum_log_gain_Q7 = best_sum_log_gain_Q7; } diff --git a/code/opus-1.0.2/silk/resampler.c b/code/opus-1.1/silk/resampler.c similarity index 99% rename from code/opus-1.0.2/silk/resampler.c rename to code/opus-1.1/silk/resampler.c index 7e58332f..374fbb37 100644 --- a/code/opus-1.0.2/silk/resampler.c +++ b/code/opus-1.1/silk/resampler.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/resampler_down2.c b/code/opus-1.1/silk/resampler_down2.c similarity index 96% rename from code/opus-1.0.2/silk/resampler_down2.c rename to code/opus-1.1/silk/resampler_down2.c index 21d11992..cec36346 100644 --- a/code/opus-1.0.2/silk/resampler_down2.c +++ b/code/opus-1.1/silk/resampler_down2.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -35,8 +35,8 @@ POSSIBILITY OF SUCH DAMAGE. /* Downsample by a factor 2 */ void silk_resampler_down2( opus_int32 *S, /* I/O State vector [ 2 ] */ - opus_int16 *out, /* O Output signal [ len ] */ - const opus_int16 *in, /* I Input signal [ floor(len/2) ] */ + opus_int16 *out, /* O Output signal [ floor(len/2) ] */ + const opus_int16 *in, /* I Input signal [ len ] */ opus_int32 inLen /* I Number of input samples */ ) { diff --git a/code/opus-1.0.2/silk/resampler_down2_3.c b/code/opus-1.1/silk/resampler_down2_3.c similarity index 96% rename from code/opus-1.0.2/silk/resampler_down2_3.c rename to code/opus-1.1/silk/resampler_down2_3.c index fe5b671d..4342614d 100644 --- a/code/opus-1.0.2/silk/resampler_down2_3.c +++ b/code/opus-1.1/silk/resampler_down2_3.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -31,6 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "SigProc_FIX.h" #include "resampler_private.h" +#include "stack_alloc.h" #define ORDER_FIR 4 @@ -43,8 +44,11 @@ void silk_resampler_down2_3( ) { opus_int32 nSamplesIn, counter, res_Q6; - opus_int32 buf[ RESAMPLER_MAX_BATCH_SIZE_IN + ORDER_FIR ]; + VARDECL( opus_int32, buf ); opus_int32 *buf_ptr; + SAVE_STACK; + + ALLOC( buf, RESAMPLER_MAX_BATCH_SIZE_IN + ORDER_FIR, opus_int32 ); /* Copy buffered samples to start of buffer */ silk_memcpy( buf, S, ORDER_FIR * sizeof( opus_int32 ) ); @@ -95,4 +99,5 @@ void silk_resampler_down2_3( /* Copy last part of filtered signal to the state for the next call */ silk_memcpy( S, &buf[ nSamplesIn ], ORDER_FIR * sizeof( opus_int32 ) ); + RESTORE_STACK; } diff --git a/code/opus-1.0.2/silk/resampler_private.h b/code/opus-1.1/silk/resampler_private.h similarity index 99% rename from code/opus-1.0.2/silk/resampler_private.h rename to code/opus-1.1/silk/resampler_private.h index 45d342c7..422a7d9d 100644 --- a/code/opus-1.0.2/silk/resampler_private.h +++ b/code/opus-1.1/silk/resampler_private.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/resampler_private_AR2.c b/code/opus-1.1/silk/resampler_private_AR2.c similarity index 99% rename from code/opus-1.0.2/silk/resampler_private_AR2.c rename to code/opus-1.1/silk/resampler_private_AR2.c index d069f2d8..5fff2371 100644 --- a/code/opus-1.0.2/silk/resampler_private_AR2.c +++ b/code/opus-1.1/silk/resampler_private_AR2.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/resampler_private_IIR_FIR.c b/code/opus-1.1/silk/resampler_private_IIR_FIR.c similarity index 90% rename from code/opus-1.0.2/silk/resampler_private_IIR_FIR.c rename to code/opus-1.1/silk/resampler_private_IIR_FIR.c index d9e42ca0..6b2b3a2e 100644 --- a/code/opus-1.0.2/silk/resampler_private_IIR_FIR.c +++ b/code/opus-1.1/silk/resampler_private_IIR_FIR.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -31,8 +31,9 @@ POSSIBILITY OF SUCH DAMAGE. #include "SigProc_FIX.h" #include "resampler_private.h" +#include "stack_alloc.h" -static inline opus_int16 *silk_resampler_private_IIR_FIR_INTERPOL( +static OPUS_INLINE opus_int16 *silk_resampler_private_IIR_FIR_INTERPOL( opus_int16 *out, opus_int16 *buf, opus_int32 max_index_Q16, @@ -71,10 +72,13 @@ void silk_resampler_private_IIR_FIR( silk_resampler_state_struct *S = (silk_resampler_state_struct *)SS; opus_int32 nSamplesIn; opus_int32 max_index_Q16, index_increment_Q16; - opus_int16 buf[ RESAMPLER_MAX_BATCH_SIZE_IN + RESAMPLER_ORDER_FIR_12 ]; + VARDECL( opus_int16, buf ); + SAVE_STACK; + + ALLOC( buf, 2 * S->batchSize + RESAMPLER_ORDER_FIR_12, opus_int16 ); /* Copy buffered samples to start of buffer */ - silk_memcpy( buf, S->sFIR, RESAMPLER_ORDER_FIR_12 * sizeof( opus_int32 ) ); + silk_memcpy( buf, S->sFIR.i16, RESAMPLER_ORDER_FIR_12 * sizeof( opus_int16 ) ); /* Iterate over blocks of frameSizeIn input samples */ index_increment_Q16 = S->invRatio_Q16; @@ -91,13 +95,13 @@ void silk_resampler_private_IIR_FIR( if( inLen > 0 ) { /* More iterations to do; copy last part of filtered signal to beginning of buffer */ - silk_memcpy( buf, &buf[ nSamplesIn << 1 ], RESAMPLER_ORDER_FIR_12 * sizeof( opus_int32 ) ); + silk_memcpy( buf, &buf[ nSamplesIn << 1 ], RESAMPLER_ORDER_FIR_12 * sizeof( opus_int16 ) ); } else { break; } } /* Copy last part of filtered signal to the state for the next call */ - silk_memcpy( S->sFIR, &buf[ nSamplesIn << 1 ], RESAMPLER_ORDER_FIR_12 * sizeof( opus_int32 ) ); + silk_memcpy( S->sFIR.i16, &buf[ nSamplesIn << 1 ], RESAMPLER_ORDER_FIR_12 * sizeof( opus_int16 ) ); + RESTORE_STACK; } - diff --git a/code/opus-1.0.2/silk/resampler_private_down_FIR.c b/code/opus-1.1/silk/resampler_private_down_FIR.c similarity index 96% rename from code/opus-1.0.2/silk/resampler_private_down_FIR.c rename to code/opus-1.1/silk/resampler_private_down_FIR.c index 5d24564c..783e42b3 100644 --- a/code/opus-1.0.2/silk/resampler_private_down_FIR.c +++ b/code/opus-1.1/silk/resampler_private_down_FIR.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -31,8 +31,9 @@ POSSIBILITY OF SUCH DAMAGE. #include "SigProc_FIX.h" #include "resampler_private.h" +#include "stack_alloc.h" -static inline opus_int16 *silk_resampler_private_down_FIR_INTERPOL( +static OPUS_INLINE opus_int16 *silk_resampler_private_down_FIR_INTERPOL( opus_int16 *out, opus_int32 *buf, const opus_int16 *FIR_Coefs, @@ -151,11 +152,14 @@ void silk_resampler_private_down_FIR( silk_resampler_state_struct *S = (silk_resampler_state_struct *)SS; opus_int32 nSamplesIn; opus_int32 max_index_Q16, index_increment_Q16; - opus_int32 buf[ RESAMPLER_MAX_BATCH_SIZE_IN + SILK_RESAMPLER_MAX_FIR_ORDER ]; + VARDECL( opus_int32, buf ); const opus_int16 *FIR_Coefs; + SAVE_STACK; + + ALLOC( buf, S->batchSize + S->FIR_Order, opus_int32 ); /* Copy buffered samples to start of buffer */ - silk_memcpy( buf, S->sFIR, S->FIR_Order * sizeof( opus_int32 ) ); + silk_memcpy( buf, S->sFIR.i32, S->FIR_Order * sizeof( opus_int32 ) ); FIR_Coefs = &S->Coefs[ 2 ]; @@ -185,5 +189,6 @@ void silk_resampler_private_down_FIR( } /* Copy last part of filtered signal to the state for the next call */ - silk_memcpy( S->sFIR, &buf[ nSamplesIn ], S->FIR_Order * sizeof( opus_int32 ) ); + silk_memcpy( S->sFIR.i32, &buf[ nSamplesIn ], S->FIR_Order * sizeof( opus_int32 ) ); + RESTORE_STACK; } diff --git a/code/opus-1.0.2/silk/resampler_private_up2_HQ.c b/code/opus-1.1/silk/resampler_private_up2_HQ.c similarity index 99% rename from code/opus-1.0.2/silk/resampler_private_up2_HQ.c rename to code/opus-1.1/silk/resampler_private_up2_HQ.c index 9e6dfc9e..c7ec8de3 100644 --- a/code/opus-1.0.2/silk/resampler_private_up2_HQ.c +++ b/code/opus-1.1/silk/resampler_private_up2_HQ.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/resampler_rom.c b/code/opus-1.1/silk/resampler_rom.c similarity index 99% rename from code/opus-1.0.2/silk/resampler_rom.c rename to code/opus-1.1/silk/resampler_rom.c index b50af2e2..2d502706 100644 --- a/code/opus-1.0.2/silk/resampler_rom.c +++ b/code/opus-1.1/silk/resampler_rom.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/resampler_rom.h b/code/opus-1.1/silk/resampler_rom.h similarity index 99% rename from code/opus-1.0.2/silk/resampler_rom.h rename to code/opus-1.1/silk/resampler_rom.h index 473b24a2..490b3388 100644 --- a/code/opus-1.0.2/silk/resampler_rom.h +++ b/code/opus-1.1/silk/resampler_rom.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/resampler_structs.h b/code/opus-1.1/silk/resampler_structs.h similarity index 93% rename from code/opus-1.0.2/silk/resampler_structs.h rename to code/opus-1.1/silk/resampler_structs.h index 4c28bd0a..9e9457d1 100644 --- a/code/opus-1.0.2/silk/resampler_structs.h +++ b/code/opus-1.1/silk/resampler_structs.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -37,7 +37,10 @@ extern "C" { typedef struct _silk_resampler_state_struct{ opus_int32 sIIR[ SILK_RESAMPLER_MAX_IIR_ORDER ]; /* this must be the first element of this struct */ - opus_int32 sFIR[ SILK_RESAMPLER_MAX_FIR_ORDER ]; + union{ + opus_int32 i32[ SILK_RESAMPLER_MAX_FIR_ORDER ]; + opus_int16 i16[ SILK_RESAMPLER_MAX_FIR_ORDER ]; + } sFIR; opus_int16 delayBuf[ 48 ]; opus_int resampler_function; opus_int batchSize; diff --git a/code/opus-1.0.2/silk/shell_coder.c b/code/opus-1.1/silk/shell_coder.c similarity index 98% rename from code/opus-1.0.2/silk/shell_coder.c rename to code/opus-1.1/silk/shell_coder.c index 32d00129..796f57d6 100644 --- a/code/opus-1.0.2/silk/shell_coder.c +++ b/code/opus-1.1/silk/shell_coder.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -33,7 +33,7 @@ POSSIBILITY OF SUCH DAMAGE. /* shell coder; pulse-subframe length is hardcoded */ -static inline void combine_pulses( +static OPUS_INLINE void combine_pulses( opus_int *out, /* O combined pulses vector [len] */ const opus_int *in, /* I input vector [2 * len] */ const opus_int len /* I number of OUTPUT samples */ @@ -45,7 +45,7 @@ static inline void combine_pulses( } } -static inline void encode_split( +static OPUS_INLINE void encode_split( ec_enc *psRangeEnc, /* I/O compressor data structure */ const opus_int p_child1, /* I pulse amplitude of first child subframe */ const opus_int p, /* I pulse amplitude of current subframe */ @@ -57,7 +57,7 @@ static inline void encode_split( } } -static inline void decode_split( +static OPUS_INLINE void decode_split( opus_int *p_child1, /* O pulse amplitude of first child subframe */ opus_int *p_child2, /* O pulse amplitude of second child subframe */ ec_dec *psRangeDec, /* I/O Compressor data structure */ diff --git a/code/opus-1.0.2/silk/sigm_Q15.c b/code/opus-1.1/silk/sigm_Q15.c similarity index 99% rename from code/opus-1.0.2/silk/sigm_Q15.c rename to code/opus-1.1/silk/sigm_Q15.c index cf5af6bc..3c507d25 100644 --- a/code/opus-1.0.2/silk/sigm_Q15.c +++ b/code/opus-1.1/silk/sigm_Q15.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/sort.c b/code/opus-1.1/silk/sort.c similarity index 99% rename from code/opus-1.0.2/silk/sort.c rename to code/opus-1.1/silk/sort.c index a4072ec4..8670dbdd 100644 --- a/code/opus-1.0.2/silk/sort.c +++ b/code/opus-1.1/silk/sort.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/stereo_LR_to_MS.c b/code/opus-1.1/silk/stereo_LR_to_MS.c similarity index 96% rename from code/opus-1.0.2/silk/stereo_LR_to_MS.c rename to code/opus-1.1/silk/stereo_LR_to_MS.c index 6a680e09..42906e6f 100644 --- a/code/opus-1.0.2/silk/stereo_LR_to_MS.c +++ b/code/opus-1.1/silk/stereo_LR_to_MS.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE. #endif #include "main.h" +#include "stack_alloc.h" /* Convert Left/Right stereo signal to adaptive Mid/Side representation */ void silk_stereo_LR_to_MS( @@ -49,11 +50,15 @@ void silk_stereo_LR_to_MS( opus_int n, is10msFrame, denom_Q16, delta0_Q13, delta1_Q13; opus_int32 sum, diff, smooth_coef_Q16, pred_Q13[ 2 ], pred0_Q13, pred1_Q13; opus_int32 LP_ratio_Q14, HP_ratio_Q14, frac_Q16, frac_3_Q16, min_mid_rate_bps, width_Q14, w_Q24, deltaw_Q24; - opus_int16 side[ MAX_FRAME_LENGTH + 2 ]; - opus_int16 LP_mid[ MAX_FRAME_LENGTH ], HP_mid[ MAX_FRAME_LENGTH ]; - opus_int16 LP_side[ MAX_FRAME_LENGTH ], HP_side[ MAX_FRAME_LENGTH ]; + VARDECL( opus_int16, side ); + VARDECL( opus_int16, LP_mid ); + VARDECL( opus_int16, HP_mid ); + VARDECL( opus_int16, LP_side ); + VARDECL( opus_int16, HP_side ); opus_int16 *mid = &x1[ -2 ]; + SAVE_STACK; + ALLOC( side, frame_length + 2, opus_int16 ); /* Convert to basic mid/side signals */ for( n = 0; n < frame_length + 2; n++ ) { sum = x1[ n - 2 ] + (opus_int32)x2[ n - 2 ]; @@ -69,6 +74,8 @@ void silk_stereo_LR_to_MS( silk_memcpy( state->sSide, &side[ frame_length ], 2 * sizeof( opus_int16 ) ); /* LP and HP filter mid signal */ + ALLOC( LP_mid, frame_length, opus_int16 ); + ALLOC( HP_mid, frame_length, opus_int16 ); for( n = 0; n < frame_length; n++ ) { sum = silk_RSHIFT_ROUND( silk_ADD_LSHIFT( mid[ n ] + mid[ n + 2 ], mid[ n + 1 ], 1 ), 2 ); LP_mid[ n ] = sum; @@ -76,6 +83,8 @@ void silk_stereo_LR_to_MS( } /* LP and HP filter side signal */ + ALLOC( LP_side, frame_length, opus_int16 ); + ALLOC( HP_side, frame_length, opus_int16 ); for( n = 0; n < frame_length; n++ ) { sum = silk_RSHIFT_ROUND( silk_ADD_LSHIFT( side[ n ] + side[ n + 2 ], side[ n + 1 ], 1 ), 2 ); LP_side[ n ] = sum; @@ -216,4 +225,5 @@ void silk_stereo_LR_to_MS( state->pred_prev_Q13[ 0 ] = (opus_int16)pred_Q13[ 0 ]; state->pred_prev_Q13[ 1 ] = (opus_int16)pred_Q13[ 1 ]; state->width_prev_Q14 = (opus_int16)width_Q14; + RESTORE_STACK; } diff --git a/code/opus-1.0.2/silk/stereo_MS_to_LR.c b/code/opus-1.1/silk/stereo_MS_to_LR.c similarity index 99% rename from code/opus-1.0.2/silk/stereo_MS_to_LR.c rename to code/opus-1.1/silk/stereo_MS_to_LR.c index 23515870..62521a4f 100644 --- a/code/opus-1.0.2/silk/stereo_MS_to_LR.c +++ b/code/opus-1.1/silk/stereo_MS_to_LR.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/stereo_decode_pred.c b/code/opus-1.1/silk/stereo_decode_pred.c similarity index 99% rename from code/opus-1.0.2/silk/stereo_decode_pred.c rename to code/opus-1.1/silk/stereo_decode_pred.c index 026aa7a0..56ba3925 100644 --- a/code/opus-1.0.2/silk/stereo_decode_pred.c +++ b/code/opus-1.1/silk/stereo_decode_pred.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/stereo_encode_pred.c b/code/opus-1.1/silk/stereo_encode_pred.c similarity index 99% rename from code/opus-1.0.2/silk/stereo_encode_pred.c rename to code/opus-1.1/silk/stereo_encode_pred.c index 3cffd367..e6dd1950 100644 --- a/code/opus-1.0.2/silk/stereo_encode_pred.c +++ b/code/opus-1.1/silk/stereo_encode_pred.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/stereo_find_predictor.c b/code/opus-1.1/silk/stereo_find_predictor.c similarity index 99% rename from code/opus-1.0.2/silk/stereo_find_predictor.c rename to code/opus-1.1/silk/stereo_find_predictor.c index aec58dab..e30e90bd 100644 --- a/code/opus-1.0.2/silk/stereo_find_predictor.c +++ b/code/opus-1.1/silk/stereo_find_predictor.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/stereo_quant_pred.c b/code/opus-1.1/silk/stereo_quant_pred.c similarity index 99% rename from code/opus-1.0.2/silk/stereo_quant_pred.c rename to code/opus-1.1/silk/stereo_quant_pred.c index df97c9f6..d4ced6c3 100644 --- a/code/opus-1.0.2/silk/stereo_quant_pred.c +++ b/code/opus-1.1/silk/stereo_quant_pred.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/structs.h b/code/opus-1.1/silk/structs.h similarity index 99% rename from code/opus-1.0.2/silk/structs.h rename to code/opus-1.1/silk/structs.h index 5d37f660..1826b36a 100644 --- a/code/opus-1.0.2/silk/structs.h +++ b/code/opus-1.1/silk/structs.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -171,6 +171,7 @@ typedef struct { opus_int32 pitchEstimationThreshold_Q16; /* Threshold for pitch estimator */ opus_int LTPQuantLowComplexity; /* Flag for low complexity LTP quantization */ opus_int mu_LTP_Q9; /* Rate-distortion tradeoff in LTP quantization */ + opus_int32 sum_log_gain_Q7; /* Cumulative max prediction gain */ opus_int NLSF_MSVQ_Survivors; /* Number of survivors in NLSF MSVQ */ opus_int first_frame_after_reset; /* Flag for deactivating NLSF interpolation, pitch prediction */ opus_int controlled_since_last_payload; /* Flag for ensuring codec_control only runs once per packet */ @@ -191,6 +192,8 @@ typedef struct { SideInfoIndices indices; opus_int8 pulses[ MAX_FRAME_LENGTH ]; + int arch; + /* Input/output buffering */ opus_int16 inputBuf[ MAX_FRAME_LENGTH + 2 ]; /* Buffer containing input signal */ opus_int inputBufIx; diff --git a/code/opus-1.0.2/silk/sum_sqr_shift.c b/code/opus-1.1/silk/sum_sqr_shift.c similarity index 99% rename from code/opus-1.0.2/silk/sum_sqr_shift.c rename to code/opus-1.1/silk/sum_sqr_shift.c index 2eaf77b6..12514c99 100644 --- a/code/opus-1.0.2/silk/sum_sqr_shift.c +++ b/code/opus-1.1/silk/sum_sqr_shift.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/table_LSF_cos.c b/code/opus-1.1/silk/table_LSF_cos.c similarity index 99% rename from code/opus-1.0.2/silk/table_LSF_cos.c rename to code/opus-1.1/silk/table_LSF_cos.c index 710537fb..ec9dc639 100644 --- a/code/opus-1.0.2/silk/table_LSF_cos.c +++ b/code/opus-1.1/silk/table_LSF_cos.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/tables.h b/code/opus-1.1/silk/tables.h similarity index 98% rename from code/opus-1.0.2/silk/tables.h rename to code/opus-1.1/silk/tables.h index 072b7929..a91431e8 100644 --- a/code/opus-1.0.2/silk/tables.h +++ b/code/opus-1.1/silk/tables.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -78,6 +78,8 @@ extern const opus_uint8 * const silk_LTP_gain_iCDF_ptrs[ NB_LTP_CBKS ]; extern const opus_uint8 * const silk_LTP_gain_BITS_Q5_ptrs[ NB_LTP_CBKS ]; /* 3 */ extern const opus_int16 silk_LTP_gain_middle_avg_RD_Q14; extern const opus_int8 * const silk_LTP_vq_ptrs_Q7[ NB_LTP_CBKS ]; /* 168 */ +extern const opus_uint8 * const silk_LTP_vq_gain_ptrs_Q7[NB_LTP_CBKS]; + extern const opus_int8 silk_LTP_vq_sizes[ NB_LTP_CBKS ]; /* 3 */ extern const opus_uint8 silk_LTPscale_iCDF[ 3 ]; /* 4 */ diff --git a/code/opus-1.0.2/silk/tables_LTP.c b/code/opus-1.1/silk/tables_LTP.c similarity index 87% rename from code/opus-1.0.2/silk/tables_LTP.c rename to code/opus-1.1/silk/tables_LTP.c index dd1fb556..0e6a0254 100644 --- a/code/opus-1.0.2/silk/tables_LTP.c +++ b/code/opus-1.1/silk/tables_LTP.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -267,6 +267,30 @@ const opus_int8 * const silk_LTP_vq_ptrs_Q7[NB_LTP_CBKS] = { (opus_int8 *)&silk_LTP_gain_vq_2[0][0] }; +/* Maximum frequency-dependent response of the pitch taps above, + computed as max(abs(freqz(taps))) */ +static const opus_uint8 silk_LTP_gain_vq_0_gain[8] = { + 46, 2, 90, 87, 93, 91, 82, 98 +}; + +static const opus_uint8 silk_LTP_gain_vq_1_gain[16] = { + 109, 120, 118, 12, 113, 115, 117, 119, + 99, 59, 87, 111, 63, 111, 112, 80 +}; + +static const opus_uint8 silk_LTP_gain_vq_2_gain[32] = { + 126, 124, 125, 124, 129, 121, 126, 23, + 132, 127, 127, 127, 126, 127, 122, 133, + 130, 134, 101, 118, 119, 145, 126, 86, + 124, 120, 123, 119, 170, 173, 107, 109 +}; + +const opus_uint8 * const silk_LTP_vq_gain_ptrs_Q7[NB_LTP_CBKS] = { + &silk_LTP_gain_vq_0_gain[0], + &silk_LTP_gain_vq_1_gain[0], + &silk_LTP_gain_vq_2_gain[0] +}; + const opus_int8 silk_LTP_vq_sizes[NB_LTP_CBKS] = { 8, 16, 32 }; diff --git a/code/opus-1.0.2/silk/tables_NLSF_CB_NB_MB.c b/code/opus-1.1/silk/tables_NLSF_CB_NB_MB.c similarity index 99% rename from code/opus-1.0.2/silk/tables_NLSF_CB_NB_MB.c rename to code/opus-1.1/silk/tables_NLSF_CB_NB_MB.c index 75480526..8c59d207 100644 --- a/code/opus-1.0.2/silk/tables_NLSF_CB_NB_MB.c +++ b/code/opus-1.1/silk/tables_NLSF_CB_NB_MB.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/tables_NLSF_CB_WB.c b/code/opus-1.1/silk/tables_NLSF_CB_WB.c similarity index 99% rename from code/opus-1.0.2/silk/tables_NLSF_CB_WB.c rename to code/opus-1.1/silk/tables_NLSF_CB_WB.c index 3d6052e4..50af87eb 100644 --- a/code/opus-1.0.2/silk/tables_NLSF_CB_WB.c +++ b/code/opus-1.1/silk/tables_NLSF_CB_WB.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/tables_gain.c b/code/opus-1.1/silk/tables_gain.c similarity index 99% rename from code/opus-1.0.2/silk/tables_gain.c rename to code/opus-1.1/silk/tables_gain.c index fccef821..37e41d89 100644 --- a/code/opus-1.0.2/silk/tables_gain.c +++ b/code/opus-1.1/silk/tables_gain.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/tables_other.c b/code/opus-1.1/silk/tables_other.c similarity index 99% rename from code/opus-1.0.2/silk/tables_other.c rename to code/opus-1.1/silk/tables_other.c index 3dc68d47..398686bf 100644 --- a/code/opus-1.0.2/silk/tables_other.c +++ b/code/opus-1.1/silk/tables_other.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/tables_pitch_lag.c b/code/opus-1.1/silk/tables_pitch_lag.c similarity index 99% rename from code/opus-1.0.2/silk/tables_pitch_lag.c rename to code/opus-1.1/silk/tables_pitch_lag.c index 819b0ab3..e80cc59a 100644 --- a/code/opus-1.0.2/silk/tables_pitch_lag.c +++ b/code/opus-1.1/silk/tables_pitch_lag.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/tables_pulses_per_block.c b/code/opus-1.1/silk/tables_pulses_per_block.c similarity index 99% rename from code/opus-1.0.2/silk/tables_pulses_per_block.c rename to code/opus-1.1/silk/tables_pulses_per_block.c index 521e6ff6..c7c01c88 100644 --- a/code/opus-1.0.2/silk/tables_pulses_per_block.c +++ b/code/opus-1.1/silk/tables_pulses_per_block.c @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 diff --git a/code/opus-1.0.2/silk/tuning_parameters.h b/code/opus-1.1/silk/tuning_parameters.h similarity index 98% rename from code/opus-1.0.2/silk/tuning_parameters.h rename to code/opus-1.1/silk/tuning_parameters.h index a26de4d2..e1057bba 100644 --- a/code/opus-1.0.2/silk/tuning_parameters.h +++ b/code/opus-1.1/silk/tuning_parameters.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -50,7 +50,7 @@ extern "C" /* Linear prediction */ /*********************/ -/* LPC analysis defines: regularization and bandwidth expansion */ +/* LPC analysis regularization */ #define FIND_LPC_COND_FAC 1e-5f /* LTP analysis defines */ @@ -63,6 +63,9 @@ extern "C" #define MU_LTP_QUANT_MB 0.025f #define MU_LTP_QUANT_WB 0.02f +/* Max cumulative LTP gain */ +#define MAX_SUM_LOG_GAIN_DB 250.0f + /***********************/ /* High pass filtering */ /***********************/ diff --git a/code/opus-1.0.2/silk/typedef.h b/code/opus-1.1/silk/typedef.h similarity index 96% rename from code/opus-1.0.2/silk/typedef.h rename to code/opus-1.1/silk/typedef.h index da981237..97b7e709 100644 --- a/code/opus-1.0.2/silk/typedef.h +++ b/code/opus-1.1/silk/typedef.h @@ -8,11 +8,11 @@ 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. -- Neither the name of Internet Society, IETF or IETF Trust, nor the +- Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” +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 @@ -29,6 +29,7 @@ POSSIBILITY OF SUCH DAMAGE. #define SILK_TYPEDEF_H #include "opus_types.h" +#include "opus_defines.h" #ifndef FIXED_POINT # include @@ -63,7 +64,7 @@ POSSIBILITY OF SUCH DAMAGE. #ifdef __GNUC__ __attribute__((noreturn)) #endif -static inline void _silk_fatal(const char *str, const char *file, int line) +static OPUS_INLINE void _silk_fatal(const char *str, const char *file, int line) { fprintf (stderr, "Fatal (internal) error in %s, line %d: %s\n", file, line, str); abort(); diff --git a/code/opus-1.1/src/analysis.c b/code/opus-1.1/src/analysis.c new file mode 100644 index 00000000..778a62aa --- /dev/null +++ b/code/opus-1.1/src/analysis.c @@ -0,0 +1,645 @@ +/* Copyright (c) 2011 Xiph.Org Foundation + Written 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 FOUNDATION 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. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "kiss_fft.h" +#include "celt.h" +#include "modes.h" +#include "arch.h" +#include "quant_bands.h" +#include +#include "analysis.h" +#include "mlp.h" +#include "stack_alloc.h" + +extern const MLP net; + +#ifndef M_PI +#define M_PI 3.141592653 +#endif + +static const float dct_table[128] = { + 0.250000f, 0.250000f, 0.250000f, 0.250000f, 0.250000f, 0.250000f, 0.250000f, 0.250000f, + 0.250000f, 0.250000f, 0.250000f, 0.250000f, 0.250000f, 0.250000f, 0.250000f, 0.250000f, + 0.351851f, 0.338330f, 0.311806f, 0.273300f, 0.224292f, 0.166664f, 0.102631f, 0.034654f, + -0.034654f,-0.102631f,-0.166664f,-0.224292f,-0.273300f,-0.311806f,-0.338330f,-0.351851f, + 0.346760f, 0.293969f, 0.196424f, 0.068975f,-0.068975f,-0.196424f,-0.293969f,-0.346760f, + -0.346760f,-0.293969f,-0.196424f,-0.068975f, 0.068975f, 0.196424f, 0.293969f, 0.346760f, + 0.338330f, 0.224292f, 0.034654f,-0.166664f,-0.311806f,-0.351851f,-0.273300f,-0.102631f, + 0.102631f, 0.273300f, 0.351851f, 0.311806f, 0.166664f,-0.034654f,-0.224292f,-0.338330f, + 0.326641f, 0.135299f,-0.135299f,-0.326641f,-0.326641f,-0.135299f, 0.135299f, 0.326641f, + 0.326641f, 0.135299f,-0.135299f,-0.326641f,-0.326641f,-0.135299f, 0.135299f, 0.326641f, + 0.311806f, 0.034654f,-0.273300f,-0.338330f,-0.102631f, 0.224292f, 0.351851f, 0.166664f, + -0.166664f,-0.351851f,-0.224292f, 0.102631f, 0.338330f, 0.273300f,-0.034654f,-0.311806f, + 0.293969f,-0.068975f,-0.346760f,-0.196424f, 0.196424f, 0.346760f, 0.068975f,-0.293969f, + -0.293969f, 0.068975f, 0.346760f, 0.196424f,-0.196424f,-0.346760f,-0.068975f, 0.293969f, + 0.273300f,-0.166664f,-0.338330f, 0.034654f, 0.351851f, 0.102631f,-0.311806f,-0.224292f, + 0.224292f, 0.311806f,-0.102631f,-0.351851f,-0.034654f, 0.338330f, 0.166664f,-0.273300f, +}; + +static const float analysis_window[240] = { + 0.000043f, 0.000171f, 0.000385f, 0.000685f, 0.001071f, 0.001541f, 0.002098f, 0.002739f, + 0.003466f, 0.004278f, 0.005174f, 0.006156f, 0.007222f, 0.008373f, 0.009607f, 0.010926f, + 0.012329f, 0.013815f, 0.015385f, 0.017037f, 0.018772f, 0.020590f, 0.022490f, 0.024472f, + 0.026535f, 0.028679f, 0.030904f, 0.033210f, 0.035595f, 0.038060f, 0.040604f, 0.043227f, + 0.045928f, 0.048707f, 0.051564f, 0.054497f, 0.057506f, 0.060591f, 0.063752f, 0.066987f, + 0.070297f, 0.073680f, 0.077136f, 0.080665f, 0.084265f, 0.087937f, 0.091679f, 0.095492f, + 0.099373f, 0.103323f, 0.107342f, 0.111427f, 0.115579f, 0.119797f, 0.124080f, 0.128428f, + 0.132839f, 0.137313f, 0.141849f, 0.146447f, 0.151105f, 0.155823f, 0.160600f, 0.165435f, + 0.170327f, 0.175276f, 0.180280f, 0.185340f, 0.190453f, 0.195619f, 0.200838f, 0.206107f, + 0.211427f, 0.216797f, 0.222215f, 0.227680f, 0.233193f, 0.238751f, 0.244353f, 0.250000f, + 0.255689f, 0.261421f, 0.267193f, 0.273005f, 0.278856f, 0.284744f, 0.290670f, 0.296632f, + 0.302628f, 0.308658f, 0.314721f, 0.320816f, 0.326941f, 0.333097f, 0.339280f, 0.345492f, + 0.351729f, 0.357992f, 0.364280f, 0.370590f, 0.376923f, 0.383277f, 0.389651f, 0.396044f, + 0.402455f, 0.408882f, 0.415325f, 0.421783f, 0.428254f, 0.434737f, 0.441231f, 0.447736f, + 0.454249f, 0.460770f, 0.467298f, 0.473832f, 0.480370f, 0.486912f, 0.493455f, 0.500000f, + 0.506545f, 0.513088f, 0.519630f, 0.526168f, 0.532702f, 0.539230f, 0.545751f, 0.552264f, + 0.558769f, 0.565263f, 0.571746f, 0.578217f, 0.584675f, 0.591118f, 0.597545f, 0.603956f, + 0.610349f, 0.616723f, 0.623077f, 0.629410f, 0.635720f, 0.642008f, 0.648271f, 0.654508f, + 0.660720f, 0.666903f, 0.673059f, 0.679184f, 0.685279f, 0.691342f, 0.697372f, 0.703368f, + 0.709330f, 0.715256f, 0.721144f, 0.726995f, 0.732807f, 0.738579f, 0.744311f, 0.750000f, + 0.755647f, 0.761249f, 0.766807f, 0.772320f, 0.777785f, 0.783203f, 0.788573f, 0.793893f, + 0.799162f, 0.804381f, 0.809547f, 0.814660f, 0.819720f, 0.824724f, 0.829673f, 0.834565f, + 0.839400f, 0.844177f, 0.848895f, 0.853553f, 0.858151f, 0.862687f, 0.867161f, 0.871572f, + 0.875920f, 0.880203f, 0.884421f, 0.888573f, 0.892658f, 0.896677f, 0.900627f, 0.904508f, + 0.908321f, 0.912063f, 0.915735f, 0.919335f, 0.922864f, 0.926320f, 0.929703f, 0.933013f, + 0.936248f, 0.939409f, 0.942494f, 0.945503f, 0.948436f, 0.951293f, 0.954072f, 0.956773f, + 0.959396f, 0.961940f, 0.964405f, 0.966790f, 0.969096f, 0.971321f, 0.973465f, 0.975528f, + 0.977510f, 0.979410f, 0.981228f, 0.982963f, 0.984615f, 0.986185f, 0.987671f, 0.989074f, + 0.990393f, 0.991627f, 0.992778f, 0.993844f, 0.994826f, 0.995722f, 0.996534f, 0.997261f, + 0.997902f, 0.998459f, 0.998929f, 0.999315f, 0.999615f, 0.999829f, 0.999957f, 1.000000f, +}; + +static const int tbands[NB_TBANDS+1] = { + 2, 4, 6, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 68, 80, 96, 120 +}; + +static const int extra_bands[NB_TOT_BANDS+1] = { + 1, 2, 4, 6, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 68, 80, 96, 120, 160, 200 +}; + +/*static const float tweight[NB_TBANDS+1] = { + .3, .4, .5, .6, .7, .8, .9, 1., 1., 1., 1., 1., 1., 1., .8, .7, .6, .5 +};*/ + +#define NB_TONAL_SKIP_BANDS 9 + +#define cA 0.43157974f +#define cB 0.67848403f +#define cC 0.08595542f +#define cE ((float)M_PI/2) +static OPUS_INLINE float fast_atan2f(float y, float x) { + float x2, y2; + /* Should avoid underflow on the values we'll get */ + if (ABS16(x)+ABS16(y)<1e-9f) + { + x*=1e12f; + y*=1e12f; + } + x2 = x*x; + y2 = y*y; + if(x2read_pos; + curr_lookahead = tonal->write_pos-tonal->read_pos; + if (curr_lookahead<0) + curr_lookahead += DETECT_SIZE; + + if (len > 480 && pos != tonal->write_pos) + { + pos++; + if (pos==DETECT_SIZE) + pos=0; + } + if (pos == tonal->write_pos) + pos--; + if (pos<0) + pos = DETECT_SIZE-1; + OPUS_COPY(info_out, &tonal->info[pos], 1); + tonal->read_subframe += len/120; + while (tonal->read_subframe>=4) + { + tonal->read_subframe -= 4; + tonal->read_pos++; + } + if (tonal->read_pos>=DETECT_SIZE) + tonal->read_pos-=DETECT_SIZE; + + /* Compensate for the delay in the features themselves. + FIXME: Need a better estimate the 10 I just made up */ + curr_lookahead = IMAX(curr_lookahead-10, 0); + + psum=0; + /* Summing the probability of transition patterns that involve music at + time (DETECT_SIZE-curr_lookahead-1) */ + for (i=0;ipmusic[i]; + for (;ipspeech[i]; + psum = psum*tonal->music_confidence + (1-psum)*tonal->speech_confidence; + /*printf("%f %f %f\n", psum, info_out->music_prob, info_out->tonality);*/ + + info_out->music_prob = psum; +} + +void tonality_analysis(TonalityAnalysisState *tonal, AnalysisInfo *info_out, const CELTMode *celt_mode, const void *x, int len, int offset, int c1, int c2, int C, int lsb_depth, downmix_func downmix) +{ + int i, b; + const kiss_fft_state *kfft; + VARDECL(kiss_fft_cpx, in); + VARDECL(kiss_fft_cpx, out); + int N = 480, N2=240; + float * OPUS_RESTRICT A = tonal->angle; + float * OPUS_RESTRICT dA = tonal->d_angle; + float * OPUS_RESTRICT d2A = tonal->d2_angle; + VARDECL(float, tonality); + VARDECL(float, noisiness); + float band_tonality[NB_TBANDS]; + float logE[NB_TBANDS]; + float BFCC[8]; + float features[25]; + float frame_tonality; + float max_frame_tonality; + /*float tw_sum=0;*/ + float frame_noisiness; + const float pi4 = (float)(M_PI*M_PI*M_PI*M_PI); + float slope=0; + float frame_stationarity; + float relativeE; + float frame_probs[2]; + float alpha, alphaE, alphaE2; + float frame_loudness; + float bandwidth_mask; + int bandwidth=0; + float maxE = 0; + float noise_floor; + int remaining; + AnalysisInfo *info; + SAVE_STACK; + + tonal->last_transition++; + alpha = 1.f/IMIN(20, 1+tonal->count); + alphaE = 1.f/IMIN(50, 1+tonal->count); + alphaE2 = 1.f/IMIN(1000, 1+tonal->count); + + if (tonal->count<4) + tonal->music_prob = .5; + kfft = celt_mode->mdct.kfft[0]; + if (tonal->count==0) + tonal->mem_fill = 240; + downmix(x, &tonal->inmem[tonal->mem_fill], IMIN(len, ANALYSIS_BUF_SIZE-tonal->mem_fill), offset, c1, c2, C); + if (tonal->mem_fill+len < ANALYSIS_BUF_SIZE) + { + tonal->mem_fill += len; + /* Don't have enough to update the analysis */ + RESTORE_STACK; + return; + } + info = &tonal->info[tonal->write_pos++]; + if (tonal->write_pos>=DETECT_SIZE) + tonal->write_pos-=DETECT_SIZE; + + ALLOC(in, 480, kiss_fft_cpx); + ALLOC(out, 480, kiss_fft_cpx); + ALLOC(tonality, 240, float); + ALLOC(noisiness, 240, float); + for (i=0;iinmem[i]); + in[i].i = (kiss_fft_scalar)(w*tonal->inmem[N2+i]); + in[N-i-1].r = (kiss_fft_scalar)(w*tonal->inmem[N-i-1]); + in[N-i-1].i = (kiss_fft_scalar)(w*tonal->inmem[N+N2-i-1]); + } + OPUS_MOVE(tonal->inmem, tonal->inmem+ANALYSIS_BUF_SIZE-240, 240); + remaining = len - (ANALYSIS_BUF_SIZE-tonal->mem_fill); + downmix(x, &tonal->inmem[240], remaining, offset+ANALYSIS_BUF_SIZE-tonal->mem_fill, c1, c2, C); + tonal->mem_fill = 240 + remaining; + opus_fft(kfft, in, out); + + for (i=1;iactivity = 0; + frame_noisiness = 0; + frame_stationarity = 0; + if (!tonal->count) + { + for (b=0;blowE[b] = 1e10; + tonal->highE[b] = -1e10; + } + } + relativeE = 0; + frame_loudness = 0; + for (b=0;bE[tonal->E_count][b] = E; + frame_noisiness += nE/(1e-15f+E); + + frame_loudness += (float)sqrt(E+1e-10f); + logE[b] = (float)log(E+1e-10f); + tonal->lowE[b] = MIN32(logE[b], tonal->lowE[b]+.01f); + tonal->highE[b] = MAX32(logE[b], tonal->highE[b]-.1f); + if (tonal->highE[b] < tonal->lowE[b]+1.f) + { + tonal->highE[b]+=.5f; + tonal->lowE[b]-=.5f; + } + relativeE += (logE[b]-tonal->lowE[b])/(1e-15f+tonal->highE[b]-tonal->lowE[b]); + + L1=L2=0; + for (i=0;iE[i][b]); + L2 += tonal->E[i][b]; + } + + stationarity = MIN16(0.99f,L1/(float)sqrt(1e-15+NB_FRAMES*L2)); + stationarity *= stationarity; + stationarity *= stationarity; + frame_stationarity += stationarity; + /*band_tonality[b] = tE/(1e-15+E)*/; + band_tonality[b] = MAX16(tE/(1e-15f+E), stationarity*tonal->prev_band_tonality[b]); +#if 0 + if (b>=NB_TONAL_SKIP_BANDS) + { + frame_tonality += tweight[b]*band_tonality[b]; + tw_sum += tweight[b]; + } +#else + frame_tonality += band_tonality[b]; + if (b>=NB_TBANDS-NB_TONAL_SKIP_BANDS) + frame_tonality -= band_tonality[b-NB_TBANDS+NB_TONAL_SKIP_BANDS]; +#endif + max_frame_tonality = MAX16(max_frame_tonality, (1.f+.03f*(b-NB_TBANDS))*frame_tonality); + slope += band_tonality[b]*(b-8); + /*printf("%f %f ", band_tonality[b], stationarity);*/ + tonal->prev_band_tonality[b] = band_tonality[b]; + } + + bandwidth_mask = 0; + bandwidth = 0; + maxE = 0; + noise_floor = 5.7e-4f/(1<<(IMAX(0,lsb_depth-8))); +#ifdef FIXED_POINT + noise_floor *= 1<<(15+SIG_SHIFT); +#endif + noise_floor *= noise_floor; + for (b=0;bmeanE[b] = MAX32((1-alphaE2)*tonal->meanE[b], E); + E = MAX32(E, tonal->meanE[b]); + /* Use a simple follower with 13 dB/Bark slope for spreading function */ + bandwidth_mask = MAX32(.05f*bandwidth_mask, E); + /* Consider the band "active" only if all these conditions are met: + 1) less than 10 dB below the simple follower + 2) less than 90 dB below the peak band (maximal masking possible considering + both the ATH and the loudness-dependent slope of the spreading function) + 3) above the PCM quantization noise floor + */ + if (E>.1*bandwidth_mask && E*1e9f > maxE && E > noise_floor*(band_end-band_start)) + bandwidth = b; + } + if (tonal->count<=2) + bandwidth = 20; + frame_loudness = 20*(float)log10(frame_loudness); + tonal->Etracker = MAX32(tonal->Etracker-.03f, frame_loudness); + tonal->lowECount *= (1-alphaE); + if (frame_loudness < tonal->Etracker-30) + tonal->lowECount += alphaE; + + for (i=0;i<8;i++) + { + float sum=0; + for (b=0;b<16;b++) + sum += dct_table[i*16+b]*logE[b]; + BFCC[i] = sum; + } + + frame_stationarity /= NB_TBANDS; + relativeE /= NB_TBANDS; + if (tonal->count<10) + relativeE = .5; + frame_noisiness /= NB_TBANDS; +#if 1 + info->activity = frame_noisiness + (1-frame_noisiness)*relativeE; +#else + info->activity = .5*(1+frame_noisiness-frame_stationarity); +#endif + frame_tonality = (max_frame_tonality/(NB_TBANDS-NB_TONAL_SKIP_BANDS)); + frame_tonality = MAX16(frame_tonality, tonal->prev_tonality*.8f); + tonal->prev_tonality = frame_tonality; + + slope /= 8*8; + info->tonality_slope = slope; + + tonal->E_count = (tonal->E_count+1)%NB_FRAMES; + tonal->count++; + info->tonality = frame_tonality; + + for (i=0;i<4;i++) + features[i] = -0.12299f*(BFCC[i]+tonal->mem[i+24]) + 0.49195f*(tonal->mem[i]+tonal->mem[i+16]) + 0.69693f*tonal->mem[i+8] - 1.4349f*tonal->cmean[i]; + + for (i=0;i<4;i++) + tonal->cmean[i] = (1-alpha)*tonal->cmean[i] + alpha*BFCC[i]; + + for (i=0;i<4;i++) + features[4+i] = 0.63246f*(BFCC[i]-tonal->mem[i+24]) + 0.31623f*(tonal->mem[i]-tonal->mem[i+16]); + for (i=0;i<3;i++) + features[8+i] = 0.53452f*(BFCC[i]+tonal->mem[i+24]) - 0.26726f*(tonal->mem[i]+tonal->mem[i+16]) -0.53452f*tonal->mem[i+8]; + + if (tonal->count > 5) + { + for (i=0;i<9;i++) + tonal->std[i] = (1-alpha)*tonal->std[i] + alpha*features[i]*features[i]; + } + + for (i=0;i<8;i++) + { + tonal->mem[i+24] = tonal->mem[i+16]; + tonal->mem[i+16] = tonal->mem[i+8]; + tonal->mem[i+8] = tonal->mem[i]; + tonal->mem[i] = BFCC[i]; + } + for (i=0;i<9;i++) + features[11+i] = (float)sqrt(tonal->std[i]); + features[20] = info->tonality; + features[21] = info->activity; + features[22] = frame_stationarity; + features[23] = info->tonality_slope; + features[24] = tonal->lowECount; + +#ifndef DISABLE_FLOAT_API + mlp_process(&net, features, frame_probs); + frame_probs[0] = .5f*(frame_probs[0]+1); + /* Curve fitting between the MLP probability and the actual probability */ + frame_probs[0] = .01f + 1.21f*frame_probs[0]*frame_probs[0] - .23f*(float)pow(frame_probs[0], 10); + /* Probability of active audio (as opposed to silence) */ + frame_probs[1] = .5f*frame_probs[1]+.5f; + /* Consider that silence has a 50-50 probability. */ + frame_probs[0] = frame_probs[1]*frame_probs[0] + (1-frame_probs[1])*.5f; + + /*printf("%f %f ", frame_probs[0], frame_probs[1]);*/ + { + /* Probability of state transition */ + float tau; + /* Represents independence of the MLP probabilities, where + beta=1 means fully independent. */ + float beta; + /* Denormalized probability of speech (p0) and music (p1) after update */ + float p0, p1; + /* Probabilities for "all speech" and "all music" */ + float s0, m0; + /* Probability sum for renormalisation */ + float psum; + /* Instantaneous probability of speech and music, with beta pre-applied. */ + float speech0; + float music0; + + /* One transition every 3 minutes of active audio */ + tau = .00005f*frame_probs[1]; + beta = .05f; + if (1) { + /* Adapt beta based on how "unexpected" the new prob is */ + float p, q; + p = MAX16(.05f,MIN16(.95f,frame_probs[0])); + q = MAX16(.05f,MIN16(.95f,tonal->music_prob)); + beta = .01f+.05f*ABS16(p-q)/(p*(1-q)+q*(1-p)); + } + /* p0 and p1 are the probabilities of speech and music at this frame + using only information from previous frame and applying the + state transition model */ + p0 = (1-tonal->music_prob)*(1-tau) + tonal->music_prob *tau; + p1 = tonal->music_prob *(1-tau) + (1-tonal->music_prob)*tau; + /* We apply the current probability with exponent beta to work around + the fact that the probability estimates aren't independent. */ + p0 *= (float)pow(1-frame_probs[0], beta); + p1 *= (float)pow(frame_probs[0], beta); + /* Normalise the probabilities to get the Marokv probability of music. */ + tonal->music_prob = p1/(p0+p1); + info->music_prob = tonal->music_prob; + + /* This chunk of code deals with delayed decision. */ + psum=1e-20f; + /* Instantaneous probability of speech and music, with beta pre-applied. */ + speech0 = (float)pow(1-frame_probs[0], beta); + music0 = (float)pow(frame_probs[0], beta); + if (tonal->count==1) + { + tonal->pspeech[0]=.5; + tonal->pmusic [0]=.5; + } + /* Updated probability of having only speech (s0) or only music (m0), + before considering the new observation. */ + s0 = tonal->pspeech[0] + tonal->pspeech[1]; + m0 = tonal->pmusic [0] + tonal->pmusic [1]; + /* Updates s0 and m0 with instantaneous probability. */ + tonal->pspeech[0] = s0*(1-tau)*speech0; + tonal->pmusic [0] = m0*(1-tau)*music0; + /* Propagate the transition probabilities */ + for (i=1;ipspeech[i] = tonal->pspeech[i+1]*speech0; + tonal->pmusic [i] = tonal->pmusic [i+1]*music0; + } + /* Probability that the latest frame is speech, when all the previous ones were music. */ + tonal->pspeech[DETECT_SIZE-1] = m0*tau*speech0; + /* Probability that the latest frame is music, when all the previous ones were speech. */ + tonal->pmusic [DETECT_SIZE-1] = s0*tau*music0; + + /* Renormalise probabilities to 1 */ + for (i=0;ipspeech[i] + tonal->pmusic[i]; + psum = 1.f/psum; + for (i=0;ipspeech[i] *= psum; + tonal->pmusic [i] *= psum; + } + psum = tonal->pmusic[0]; + for (i=1;ipspeech[i]; + + /* Estimate our confidence in the speech/music decisions */ + if (frame_probs[1]>.75) + { + if (tonal->music_prob>.9) + { + float adapt; + adapt = 1.f/(++tonal->music_confidence_count); + tonal->music_confidence_count = IMIN(tonal->music_confidence_count, 500); + tonal->music_confidence += adapt*MAX16(-.2f,frame_probs[0]-tonal->music_confidence); + } + if (tonal->music_prob<.1) + { + float adapt; + adapt = 1.f/(++tonal->speech_confidence_count); + tonal->speech_confidence_count = IMIN(tonal->speech_confidence_count, 500); + tonal->speech_confidence += adapt*MIN16(.2f,frame_probs[0]-tonal->speech_confidence); + } + } else { + if (tonal->music_confidence_count==0) + tonal->music_confidence = .9f; + if (tonal->speech_confidence_count==0) + tonal->speech_confidence = .1f; + } + } + if (tonal->last_music != (tonal->music_prob>.5f)) + tonal->last_transition=0; + tonal->last_music = tonal->music_prob>.5f; +#else + info->music_prob = 0; +#endif + /*for (i=0;i<25;i++) + printf("%f ", features[i]); + printf("\n");*/ + + info->bandwidth = bandwidth; + /*printf("%d %d\n", info->bandwidth, info->opus_bandwidth);*/ + info->noisiness = frame_noisiness; + info->valid = 1; + if (info_out!=NULL) + OPUS_COPY(info_out, info, 1); + RESTORE_STACK; +} + +void run_analysis(TonalityAnalysisState *analysis, const CELTMode *celt_mode, const void *analysis_pcm, + int analysis_frame_size, int frame_size, int c1, int c2, int C, opus_int32 Fs, + int lsb_depth, downmix_func downmix, AnalysisInfo *analysis_info) +{ + int offset; + int pcm_len; + + if (analysis_pcm != NULL) + { + /* Avoid overflow/wrap-around of the analysis buffer */ + analysis_frame_size = IMIN((DETECT_SIZE-5)*Fs/100, analysis_frame_size); + + pcm_len = analysis_frame_size - analysis->analysis_offset; + offset = analysis->analysis_offset; + do { + tonality_analysis(analysis, NULL, celt_mode, analysis_pcm, IMIN(480, pcm_len), offset, c1, c2, C, lsb_depth, downmix); + offset += 480; + pcm_len -= 480; + } while (pcm_len>0); + analysis->analysis_offset = analysis_frame_size; + + analysis->analysis_offset -= frame_size; + } + + analysis_info->valid = 0; + tonality_get_info(analysis, analysis_info, frame_size); +} diff --git a/code/opus-1.1/src/analysis.h b/code/opus-1.1/src/analysis.h new file mode 100644 index 00000000..be0388fa --- /dev/null +++ b/code/opus-1.1/src/analysis.h @@ -0,0 +1,90 @@ +/* Copyright (c) 2011 Xiph.Org Foundation + Written 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 FOUNDATION 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. +*/ + +#ifndef ANALYSIS_H +#define ANALYSIS_H + +#include "celt.h" +#include "opus_private.h" + +#define NB_FRAMES 8 +#define NB_TBANDS 18 +#define NB_TOT_BANDS 21 +#define ANALYSIS_BUF_SIZE 720 /* 15 ms at 48 kHz */ + +#define DETECT_SIZE 200 + +typedef struct { + float angle[240]; + float d_angle[240]; + float d2_angle[240]; + opus_val32 inmem[ANALYSIS_BUF_SIZE]; + int mem_fill; /* number of usable samples in the buffer */ + float prev_band_tonality[NB_TBANDS]; + float prev_tonality; + float E[NB_FRAMES][NB_TBANDS]; + float lowE[NB_TBANDS]; + float highE[NB_TBANDS]; + float meanE[NB_TOT_BANDS]; + float mem[32]; + float cmean[8]; + float std[9]; + float music_prob; + float Etracker; + float lowECount; + int E_count; + int last_music; + int last_transition; + int count; + float subframe_mem[3]; + int analysis_offset; + /** Probability of having speech for time i to DETECT_SIZE-1 (and music before). + pspeech[0] is the probability that all frames in the window are speech. */ + float pspeech[DETECT_SIZE]; + /** Probability of having music for time i to DETECT_SIZE-1 (and speech before). + pmusic[0] is the probability that all frames in the window are music. */ + float pmusic[DETECT_SIZE]; + float speech_confidence; + float music_confidence; + int speech_confidence_count; + int music_confidence_count; + int write_pos; + int read_pos; + int read_subframe; + AnalysisInfo info[DETECT_SIZE]; +} TonalityAnalysisState; + +void tonality_analysis(TonalityAnalysisState *tonal, AnalysisInfo *info, + const CELTMode *celt_mode, const void *x, int len, int offset, int c1, int c2, int C, int lsb_depth, downmix_func downmix); + +void tonality_get_info(TonalityAnalysisState *tonal, AnalysisInfo *info_out, int len); + +void run_analysis(TonalityAnalysisState *analysis, const CELTMode *celt_mode, const void *analysis_pcm, + int analysis_frame_size, int frame_size, int c1, int c2, int C, opus_int32 Fs, + int lsb_depth, downmix_func downmix, AnalysisInfo *analysis_info); + +#endif diff --git a/code/opus-1.1/src/mlp.c b/code/opus-1.1/src/mlp.c new file mode 100644 index 00000000..46386026 --- /dev/null +++ b/code/opus-1.1/src/mlp.c @@ -0,0 +1,140 @@ +/* Copyright (c) 2008-2011 Octasic Inc. + Written 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 FOUNDATION 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. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_types.h" +#include "opus_defines.h" + +#include +#include "mlp.h" +#include "arch.h" +#include "tansig_table.h" +#define MAX_NEURONS 100 + +#if 0 +static OPUS_INLINE opus_val16 tansig_approx(opus_val32 _x) /* Q19 */ +{ + int i; + opus_val16 xx; /* Q11 */ + /*double x, y;*/ + opus_val16 dy, yy; /* Q14 */ + /*x = 1.9073e-06*_x;*/ + if (_x>=QCONST32(8,19)) + return QCONST32(1.,14); + if (_x<=-QCONST32(8,19)) + return -QCONST32(1.,14); + xx = EXTRACT16(SHR32(_x, 8)); + /*i = lrint(25*x);*/ + i = SHR32(ADD32(1024,MULT16_16(25, xx)),11); + /*x -= .04*i;*/ + xx -= EXTRACT16(SHR32(MULT16_16(20972,i),8)); + /*x = xx*(1./2048);*/ + /*y = tansig_table[250+i];*/ + yy = tansig_table[250+i]; + /*y = yy*(1./16384);*/ + dy = 16384-MULT16_16_Q14(yy,yy); + yy = yy + MULT16_16_Q14(MULT16_16_Q11(xx,dy),(16384 - MULT16_16_Q11(yy,xx))); + return yy; +} +#else +/*extern const float tansig_table[501];*/ +static OPUS_INLINE float tansig_approx(float x) +{ + int i; + float y, dy; + float sign=1; + /* Tests are reversed to catch NaNs */ + if (!(x<8)) + return 1; + if (!(x>-8)) + return -1; + if (x<0) + { + x=-x; + sign=-1; + } + i = (int)floor(.5f+25*x); + x -= .04f*i; + y = tansig_table[i]; + dy = 1-y*y; + y = y + x*dy*(1 - y*x); + return sign*y; +} +#endif + +#if 0 +void mlp_process(const MLP *m, const opus_val16 *in, opus_val16 *out) +{ + int j; + opus_val16 hidden[MAX_NEURONS]; + const opus_val16 *W = m->weights; + /* Copy to tmp_in */ + for (j=0;jtopo[1];j++) + { + int k; + opus_val32 sum = SHL32(EXTEND32(*W++),8); + for (k=0;ktopo[0];k++) + sum = MAC16_16(sum, in[k],*W++); + hidden[j] = tansig_approx(sum); + } + for (j=0;jtopo[2];j++) + { + int k; + opus_val32 sum = SHL32(EXTEND32(*W++),14); + for (k=0;ktopo[1];k++) + sum = MAC16_16(sum, hidden[k], *W++); + out[j] = tansig_approx(EXTRACT16(PSHR32(sum,17))); + } +} +#else +void mlp_process(const MLP *m, const float *in, float *out) +{ + int j; + float hidden[MAX_NEURONS]; + const float *W = m->weights; + /* Copy to tmp_in */ + for (j=0;jtopo[1];j++) + { + int k; + float sum = *W++; + for (k=0;ktopo[0];k++) + sum = sum + in[k]**W++; + hidden[j] = tansig_approx(sum); + } + for (j=0;jtopo[2];j++) + { + int k; + float sum = *W++; + for (k=0;ktopo[1];k++) + sum = sum + hidden[k]**W++; + out[j] = tansig_approx(sum); + } +} +#endif diff --git a/code/opus-1.1/src/mlp.h b/code/opus-1.1/src/mlp.h new file mode 100644 index 00000000..86c8e061 --- /dev/null +++ b/code/opus-1.1/src/mlp.h @@ -0,0 +1,41 @@ +/* Copyright (c) 2008-2011 Octasic Inc. + Written 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 FOUNDATION 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. +*/ + +#ifndef _MLP_H_ +#define _MLP_H_ + +#include "arch.h" + +typedef struct { + int layers; + const int *topo; + const float *weights; +} MLP; + +void mlp_process(const MLP *m, const float *in, float *out); + +#endif /* _MLP_H_ */ diff --git a/code/opus-1.1/src/mlp_data.c b/code/opus-1.1/src/mlp_data.c new file mode 100644 index 00000000..401c4c02 --- /dev/null +++ b/code/opus-1.1/src/mlp_data.c @@ -0,0 +1,105 @@ +/* The contents of this file was automatically generated by mlp_train.c + It contains multi-layer perceptron (MLP) weights. */ + +#include "mlp.h" + +/* RMS error was 0.138320, seed was 1361535663 */ + +static const float weights[422] = { + +/* hidden layer */ +-0.0941125f, -0.302976f, -0.603555f, -0.19393f, -0.185983f, +-0.601617f, -0.0465317f, -0.114563f, -0.103599f, -0.618938f, +-0.317859f, -0.169949f, -0.0702885f, 0.148065f, 0.409524f, +0.548432f, 0.367649f, -0.494393f, 0.764306f, -1.83957f, +0.170849f, 12.786f, -1.08848f, -1.27284f, -16.2606f, +24.1773f, -5.57454f, -0.17276f, -0.163388f, -0.224421f, +-0.0948944f, -0.0728695f, -0.26557f, -0.100283f, -0.0515459f, +-0.146142f, -0.120674f, -0.180655f, 0.12857f, 0.442138f, +-0.493735f, 0.167767f, 0.206699f, -0.197567f, 0.417999f, +1.50364f, -0.773341f, -10.0401f, 0.401872f, 2.97966f, +15.2165f, -1.88905f, -1.19254f, 0.0285397f, -0.00405139f, +0.0707565f, 0.00825699f, -0.0927269f, -0.010393f, -0.00428882f, +-0.00489743f, -0.0709731f, -0.00255992f, 0.0395619f, 0.226424f, +0.0325231f, 0.162175f, -0.100118f, 0.485789f, 0.12697f, +0.285937f, 0.0155637f, 0.10546f, 3.05558f, 1.15059f, +-1.00904f, -1.83088f, 3.31766f, -3.42516f, -0.119135f, +-0.0405654f, 0.00690068f, 0.0179877f, -0.0382487f, 0.00597941f, +-0.0183611f, 0.00190395f, -0.144322f, -0.0435671f, 0.000990594f, +0.221087f, 0.142405f, 0.484066f, 0.404395f, 0.511955f, +-0.237255f, 0.241742f, 0.35045f, -0.699428f, 10.3993f, +2.6507f, -2.43459f, -4.18838f, 1.05928f, 1.71067f, +0.00667811f, -0.0721335f, -0.0397346f, 0.0362704f, -0.11496f, +-0.0235776f, 0.0082161f, -0.0141741f, -0.0329699f, -0.0354253f, +0.00277404f, -0.290654f, -1.14767f, -0.319157f, -0.686544f, +0.36897f, 0.478899f, 0.182579f, -0.411069f, 0.881104f, +-4.60683f, 1.4697f, 0.335845f, -1.81905f, -30.1699f, +5.55225f, 0.0019508f, -0.123576f, -0.0727332f, -0.0641597f, +-0.0534458f, -0.108166f, -0.0937368f, -0.0697883f, -0.0275475f, +-0.192309f, -0.110074f, 0.285375f, -0.405597f, 0.0926724f, +-0.287881f, -0.851193f, -0.099493f, -0.233764f, -1.2852f, +1.13611f, 3.12168f, -0.0699f, -1.86216f, 2.65292f, +-7.31036f, 2.44776f, -0.00111802f, -0.0632786f, -0.0376296f, +-0.149851f, 0.142963f, 0.184368f, 0.123433f, 0.0756158f, +0.117312f, 0.0933395f, 0.0692163f, 0.0842592f, 0.0704683f, +0.0589963f, 0.0942205f, -0.448862f, 0.0262677f, 0.270352f, +-0.262317f, 0.172586f, 2.00227f, -0.159216f, 0.038422f, +10.2073f, 4.15536f, -2.3407f, -0.0550265f, 0.00964792f, +-0.141336f, 0.0274501f, 0.0343921f, -0.0487428f, 0.0950172f, +-0.00775017f, -0.0372492f, -0.00548121f, -0.0663695f, 0.0960506f, +-0.200008f, -0.0412827f, 0.58728f, 0.0515787f, 0.337254f, +0.855024f, 0.668371f, -0.114904f, -3.62962f, -0.467477f, +-0.215472f, 2.61537f, 0.406117f, -1.36373f, 0.0425394f, +0.12208f, 0.0934502f, 0.123055f, 0.0340935f, -0.142466f, +0.035037f, -0.0490666f, 0.0733208f, 0.0576672f, 0.123984f, +-0.0517194f, -0.253018f, 0.590565f, 0.145849f, 0.315185f, +0.221534f, -0.149081f, 0.216161f, -0.349575f, 24.5664f, +-0.994196f, 0.614289f, -18.7905f, -2.83277f, -0.716801f, +-0.347201f, 0.479515f, -0.246027f, 0.0758683f, 0.137293f, +-0.17781f, 0.118751f, -0.00108329f, -0.237334f, 0.355732f, +-0.12991f, -0.0547627f, -0.318576f, -0.325524f, 0.180494f, +-0.0625604f, 0.141219f, 0.344064f, 0.37658f, -0.591772f, +5.8427f, -0.38075f, 0.221894f, -1.41934f, -1.87943e+06f, +1.34114f, 0.0283355f, -0.0447856f, -0.0211466f, -0.0256927f, +0.0139618f, 0.0207934f, -0.0107666f, 0.0110969f, 0.0586069f, +-0.0253545f, -0.0328433f, 0.11872f, -0.216943f, 0.145748f, +0.119808f, -0.0915211f, -0.120647f, -0.0787719f, -0.143644f, +-0.595116f, -1.152f, -1.25335f, -1.17092f, 4.34023f, +-975268.f, -1.37033f, -0.0401123f, 0.210602f, -0.136656f, +0.135962f, -0.0523293f, 0.0444604f, 0.0143928f, 0.00412666f, +-0.0193003f, 0.218452f, -0.110204f, -2.02563f, 0.918238f, +-2.45362f, 1.19542f, -0.061362f, -1.92243f, 0.308111f, +0.49764f, 0.912356f, 0.209272f, -2.34525f, 2.19326f, +-6.47121f, 1.69771f, -0.725123f, 0.0118929f, 0.0377944f, +0.0554003f, 0.0226452f, -0.0704421f, -0.0300309f, 0.0122978f, +-0.0041782f, -0.0686612f, 0.0313115f, 0.039111f, 0.364111f, +-0.0945548f, 0.0229876f, -0.17414f, 0.329795f, 0.114714f, +0.30022f, 0.106997f, 0.132355f, 5.79932f, 0.908058f, +-0.905324f, -3.3561f, 0.190647f, 0.184211f, -0.673648f, +0.231807f, -0.0586222f, 0.230752f, -0.438277f, 0.245857f, +-0.17215f, 0.0876383f, -0.720512f, 0.162515f, 0.0170571f, +0.101781f, 0.388477f, 1.32931f, 1.08548f, -0.936301f, +-2.36958f, -6.71988f, -3.44376f, 2.13818f, 14.2318f, +4.91459f, -3.09052f, -9.69191f, -0.768234f, 1.79604f, +0.0549653f, 0.163399f, 0.0797025f, 0.0343933f, -0.0555876f, +-0.00505673f, 0.0187258f, 0.0326628f, 0.0231486f, 0.15573f, +0.0476223f, -0.254824f, 1.60155f, -0.801221f, 2.55496f, +0.737629f, -1.36249f, -0.695463f, -2.44301f, -1.73188f, +3.95279f, 1.89068f, 0.486087f, -11.3343f, 3.9416e+06f, + +/* output layer */ +-0.381439f, 0.12115f, -0.906927f, 2.93878f, 1.6388f, +0.882811f, 0.874344f, 1.21726f, -0.874545f, 0.321706f, +0.785055f, 0.946558f, -0.575066f, -3.46553f, 0.884905f, +0.0924047f, -9.90712f, 0.391338f, 0.160103f, -2.04954f, +4.1455f, 0.0684029f, -0.144761f, -0.285282f, 0.379244f, +-1.1584f, -0.0277241f, -9.85f, -4.82386f, 3.71333f, +3.87308f, 3.52558f}; + +static const int topo[3] = {25, 15, 2}; + +const MLP net = { + 3, + topo, + weights +}; diff --git a/code/opus-1.1/src/opus.c b/code/opus-1.1/src/opus.c new file mode 100644 index 00000000..30890b9c --- /dev/null +++ b/code/opus-1.1/src/opus.c @@ -0,0 +1,329 @@ +/* Copyright (c) 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. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus.h" +#include "opus_private.h" + +#ifndef DISABLE_FLOAT_API +OPUS_EXPORT void opus_pcm_soft_clip(float *_x, int N, int C, float *declip_mem) +{ + int c; + int i; + float *x; + + if (C<1 || N<1 || !_x || !declip_mem) return; + + /* First thing: saturate everything to +/- 2 which is the highest level our + non-linearity can handle. At the point where the signal reaches +/-2, + the derivative will be zero anyway, so this doesn't introduce any + discontinuity in the derivative. */ + for (i=0;i=0) + break; + x[i*C] = x[i*C]+a*x[i*C]*x[i*C]; + } + + curr=0; + x0 = x[0]; + while(1) + { + int start, end; + float maxval; + int special=0; + int peak_pos; + for (i=curr;i1 || x[i*C]<-1) + break; + } + if (i==N) + { + a=0; + break; + } + peak_pos = i; + start=end=i; + maxval=ABS16(x[i*C]); + /* Look for first zero crossing before clipping */ + while (start>0 && x[i*C]*x[(start-1)*C]>=0) + start--; + /* Look for first zero crossing after clipping */ + while (end=0) + { + /* Look for other peaks until the next zero-crossing. */ + if (ABS16(x[end*C])>maxval) + { + maxval = ABS16(x[end*C]); + peak_pos = end; + } + end++; + } + /* Detect the special case where we clip before the first zero crossing */ + special = (start==0 && x[i*C]*x[0]>=0); + + /* Compute a such that maxval + a*maxval^2 = 1 */ + a=(maxval-1)/(maxval*maxval); + if (x[i*C]>0) + a = -a; + /* Apply soft clipping */ + for (i=start;i=2) + { + /* Add a linear ramp from the first sample to the signal peak. + This avoids a discontinuity at the beginning of the frame. */ + float delta; + float offset = x0-x[0]; + delta = offset / peak_pos; + for (i=curr;i>2; + return 2; + } +} + +static int parse_size(const unsigned char *data, opus_int32 len, opus_int16 *size) +{ + if (len<1) + { + *size = -1; + return -1; + } else if (data[0]<252) + { + *size = data[0]; + return 1; + } else if (len<2) + { + *size = -1; + return -1; + } else { + *size = 4*data[1] + data[0]; + return 2; + } +} + +int opus_packet_parse_impl(const unsigned char *data, opus_int32 len, + int self_delimited, unsigned char *out_toc, + const unsigned char *frames[48], opus_int16 size[48], + int *payload_offset, opus_int32 *packet_offset) +{ + int i, bytes; + int count; + int cbr; + unsigned char ch, toc; + int framesize; + opus_int32 last_size; + opus_int32 pad = 0; + const unsigned char *data0 = data; + + if (size==NULL) + return OPUS_BAD_ARG; + + framesize = opus_packet_get_samples_per_frame(data, 48000); + + cbr = 0; + toc = *data++; + len--; + last_size = len; + switch (toc&0x3) + { + /* One frame */ + case 0: + count=1; + break; + /* Two CBR frames */ + case 1: + count=2; + cbr = 1; + if (!self_delimited) + { + if (len&0x1) + return OPUS_INVALID_PACKET; + last_size = len/2; + /* If last_size doesn't fit in size[0], we'll catch it later */ + size[0] = (opus_int16)last_size; + } + break; + /* Two VBR frames */ + case 2: + count = 2; + bytes = parse_size(data, len, size); + len -= bytes; + if (size[0]<0 || size[0] > len) + return OPUS_INVALID_PACKET; + data += bytes; + last_size = len-size[0]; + break; + /* Multiple CBR/VBR frames (from 0 to 120 ms) */ + default: /*case 3:*/ + if (len<1) + return OPUS_INVALID_PACKET; + /* Number of frames encoded in bits 0 to 5 */ + ch = *data++; + count = ch&0x3F; + if (count <= 0 || framesize*count > 5760) + return OPUS_INVALID_PACKET; + len--; + /* Padding flag is bit 6 */ + if (ch&0x40) + { + int p; + do { + int tmp; + if (len<=0) + return OPUS_INVALID_PACKET; + p = *data++; + len--; + tmp = p==255 ? 254: p; + len -= tmp; + pad += tmp; + } while (p==255); + } + if (len<0) + return OPUS_INVALID_PACKET; + /* VBR flag is bit 7 */ + cbr = !(ch&0x80); + if (!cbr) + { + /* VBR case */ + last_size = len; + for (i=0;i len) + return OPUS_INVALID_PACKET; + data += bytes; + last_size -= bytes+size[i]; + } + if (last_size<0) + return OPUS_INVALID_PACKET; + } else if (!self_delimited) + { + /* CBR case */ + last_size = len/count; + if (last_size*count!=len) + return OPUS_INVALID_PACKET; + for (i=0;i len) + return OPUS_INVALID_PACKET; + data += bytes; + /* For CBR packets, apply the size to all the frames. */ + if (cbr) + { + if (size[count-1]*count > len) + return OPUS_INVALID_PACKET; + for (i=0;i last_size) + return OPUS_INVALID_PACKET; + } else + { + /* Because it's not encoded explicitly, it's possible the size of the + last packet (or all the packets, for the CBR case) is larger than + 1275. Reject them here.*/ + if (last_size > 1275) + return OPUS_INVALID_PACKET; + size[count-1] = (opus_int16)last_size; + } + + if (payload_offset) + *payload_offset = (int)(data-data0); + + for (i=0;i= 2) && !defined(__OPTIMIZE__) +# pragma message "You appear to be compiling without optimization, if so opus will be very slow." #endif #include @@ -46,6 +50,7 @@ #include "structs.h" #include "define.h" #include "mathops.h" +#include "cpu_support.h" struct OpusDecoder { int celt_dec_offset; @@ -65,12 +70,15 @@ struct OpusDecoder { int frame_size; int prev_redundancy; int last_packet_duration; +#ifndef FIXED_POINT + opus_val16 softclip_mem[2]; +#endif opus_uint32 rangeFinal; }; #ifdef FIXED_POINT -static inline opus_int16 SAT16(opus_int32 x) { +static OPUS_INLINE opus_int16 SAT16(opus_int32 x) { return x > 32767 ? 32767 : x < -32768 ? -32768 : (opus_int16)x; } #endif @@ -201,8 +209,14 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, int i, silk_ret=0, celt_ret=0; ec_dec dec; opus_int32 silk_frame_size; + int pcm_silk_size; VARDECL(opus_int16, pcm_silk); - VARDECL(opus_val16, pcm_transition); + int pcm_transition_silk_size; + VARDECL(opus_val16, pcm_transition_silk); + int pcm_transition_celt_size; + VARDECL(opus_val16, pcm_transition_celt); + opus_val16 *pcm_transition; + int redundant_audio_size; VARDECL(opus_val16, redundant_audio); int audiosize; @@ -245,33 +259,61 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, ec_dec_init(&dec,(unsigned char*)data,len); } else { audiosize = frame_size; + mode = st->prev_mode; - if (st->prev_mode == 0) + if (mode == 0) { /* If we haven't got any packet yet, all we can do is return zeros */ for (i=0;ichannels;i++) pcm[i] = 0; RESTORE_STACK; return audiosize; - } else { - mode = st->prev_mode; + } + + /* Avoids trying to run the PLC on sizes other than 2.5 (CELT), 5 (CELT), + 10, or 20 (e.g. 12.5 or 30 ms). */ + if (audiosize > F20) + { + do { + int ret = opus_decode_frame(st, NULL, 0, pcm, IMIN(audiosize, F20), 0); + if (ret<0) + { + RESTORE_STACK; + return ret; + } + pcm += ret*st->channels; + audiosize -= ret; + } while (audiosize > 0); + RESTORE_STACK; + return frame_size; + } else if (audiosize < F20) + { + if (audiosize > F10) + audiosize = F10; + else if (mode != MODE_SILK_ONLY && audiosize > F5 && audiosize < F10) + audiosize = F5; } } - /* For CELT/hybrid PLC of more than 20 ms, opus_decode_native() will do - multiple calls */ - if (data==NULL && mode != MODE_SILK_ONLY) - frame_size = IMIN(frame_size, F20); - ALLOC(pcm_transition, F5*st->channels, opus_val16); - + pcm_transition_silk_size = ALLOC_NONE; + pcm_transition_celt_size = ALLOC_NONE; if (data!=NULL && st->prev_mode > 0 && ( (mode == MODE_CELT_ONLY && st->prev_mode != MODE_CELT_ONLY && !st->prev_redundancy) || (mode != MODE_CELT_ONLY && st->prev_mode == MODE_CELT_ONLY) ) ) { transition = 1; + /* Decide where to allocate the stack memory for pcm_transition */ if (mode == MODE_CELT_ONLY) - opus_decode_frame(st, NULL, 0, pcm_transition, IMIN(F5, audiosize), 0); + pcm_transition_celt_size = F5*st->channels; + else + pcm_transition_silk_size = F5*st->channels; + } + ALLOC(pcm_transition_celt, pcm_transition_celt_size, opus_val16); + if (transition && mode == MODE_CELT_ONLY) + { + pcm_transition = pcm_transition_celt; + opus_decode_frame(st, NULL, 0, pcm_transition, IMIN(F5, audiosize), 0); } if (audiosize > frame_size) { @@ -282,8 +324,9 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, frame_size = audiosize; } - ALLOC(pcm_silk, IMAX(F10, frame_size)*st->channels, opus_int16); - ALLOC(redundant_audio, F5*st->channels, opus_val16); + /* Don't allocate any memory when in CELT-only mode */ + pcm_silk_size = (mode != MODE_CELT_ONLY) ? IMAX(F10, frame_size)*st->channels : ALLOC_NONE; + ALLOC(pcm_silk, pcm_silk_size, opus_int16); /* SILK processing */ if (mode != MODE_CELT_ONLY) @@ -332,7 +375,7 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, pcm_ptr[i] = 0; } else { RESTORE_STACK; - return OPUS_INVALID_PACKET; + return OPUS_INTERNAL_ERROR; } } pcm_ptr += silk_frame_size * st->channels; @@ -397,10 +440,22 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, } if (redundancy) + { transition = 0; + pcm_transition_silk_size=ALLOC_NONE; + } + + ALLOC(pcm_transition_silk, pcm_transition_silk_size, opus_val16); if (transition && mode != MODE_CELT_ONLY) + { + pcm_transition = pcm_transition_silk; opus_decode_frame(st, NULL, 0, pcm_transition, IMIN(F5, audiosize), 0); + } + + /* Only allocation memory for redundancy if/when needed */ + redundant_audio_size = redundancy ? F5*st->channels : ALLOC_NONE; + ALLOC(redundant_audio, redundant_audio_size, opus_val16); /* 5 ms redundant frame for CELT->SILK*/ if (redundancy && celt_to_silk) @@ -514,197 +569,28 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, st->prev_mode = mode; st->prev_redundancy = redundancy && !celt_to_silk; + + if (celt_ret>=0) + { + if (OPUS_CHECK_ARRAY(pcm, audiosize*st->channels)) + OPUS_PRINT_INT(audiosize); + } + RESTORE_STACK; return celt_ret < 0 ? celt_ret : audiosize; } -static int parse_size(const unsigned char *data, opus_int32 len, short *size) -{ - if (len<1) - { - *size = -1; - return -1; - } else if (data[0]<252) - { - *size = data[0]; - return 1; - } else if (len<2) - { - *size = -1; - return -1; - } else { - *size = 4*data[1] + data[0]; - return 2; - } -} - -static int opus_packet_parse_impl(const unsigned char *data, opus_int32 len, - int self_delimited, unsigned char *out_toc, - const unsigned char *frames[48], short size[48], int *payload_offset) -{ - int i, bytes; - int count; - int cbr; - unsigned char ch, toc; - int framesize; - opus_int32 last_size; - const unsigned char *data0 = data; - - if (size==NULL) - return OPUS_BAD_ARG; - - framesize = opus_packet_get_samples_per_frame(data, 48000); - - cbr = 0; - toc = *data++; - len--; - last_size = len; - switch (toc&0x3) - { - /* One frame */ - case 0: - count=1; - break; - /* Two CBR frames */ - case 1: - count=2; - cbr = 1; - if (!self_delimited) - { - if (len&0x1) - return OPUS_INVALID_PACKET; - last_size = len/2; - /* If last_size doesn't fit in size[0], we'll catch it later */ - size[0] = (short)last_size; - } - break; - /* Two VBR frames */ - case 2: - count = 2; - bytes = parse_size(data, len, size); - len -= bytes; - if (size[0]<0 || size[0] > len) - return OPUS_INVALID_PACKET; - data += bytes; - last_size = len-size[0]; - break; - /* Multiple CBR/VBR frames (from 0 to 120 ms) */ - default: /*case 3:*/ - if (len<1) - return OPUS_INVALID_PACKET; - /* Number of frames encoded in bits 0 to 5 */ - ch = *data++; - count = ch&0x3F; - if (count <= 0 || framesize*count > 5760) - return OPUS_INVALID_PACKET; - len--; - /* Padding flag is bit 6 */ - if (ch&0x40) - { - int p; - do { - if (len<=0) - return OPUS_INVALID_PACKET; - p = *data++; - len--; - len -= p==255 ? 254: p; - } while (p==255); - } - if (len<0) - return OPUS_INVALID_PACKET; - /* VBR flag is bit 7 */ - cbr = !(ch&0x80); - if (!cbr) - { - /* VBR case */ - last_size = len; - for (i=0;i len) - return OPUS_INVALID_PACKET; - data += bytes; - last_size -= bytes+size[i]; - } - if (last_size<0) - return OPUS_INVALID_PACKET; - } else if (!self_delimited) - { - /* CBR case */ - last_size = len/count; - if (last_size*count!=len) - return OPUS_INVALID_PACKET; - for (i=0;i len) - return OPUS_INVALID_PACKET; - data += bytes; - /* For CBR packets, apply the size to all the frames. */ - if (cbr) - { - if (size[count-1]*count > len) - return OPUS_INVALID_PACKET; - for (i=0;i last_size) - return OPUS_INVALID_PACKET; - } else - { - /* Because it's not encoded explicitly, it's possible the size of the - last packet (or all the packets, for the CBR case) is larger than - 1275. Reject them here.*/ - if (last_size > 1275) - return OPUS_INVALID_PACKET; - size[count-1] = (short)last_size; - } - - if (frames) - { - for (i=0;i1) return OPUS_BAD_ARG; /* For FEC/PLC, frame_size has to be to have a multiple of 2.5 ms */ @@ -715,12 +601,14 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data, int pcm_count=0; do { int ret; - ret = opus_decode_frame(st, NULL, 0, pcm, frame_size-pcm_count, 0); + ret = opus_decode_frame(st, NULL, 0, pcm+pcm_count*st->channels, frame_size-pcm_count, 0); if (ret<0) return ret; - pcm += st->channels*ret; pcm_count += ret; } while (pcm_count < frame_size); + celt_assert(pcm_count == frame_size); + if (OPUS_CHECK_ARRAY(pcm, pcm_count*st->channels)) + OPUS_PRINT_INT(pcm_count); st->last_packet_duration = pcm_count; return pcm_count; } else if (len<0) @@ -731,7 +619,10 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data, packet_frame_size = opus_packet_get_samples_per_frame(data, st->Fs); packet_stream_channels = opus_packet_get_nb_channels(data); - count = opus_packet_parse_impl(data, len, self_delimited, &toc, NULL, size, &offset); + count = opus_packet_parse_impl(data, len, self_delimited, &toc, NULL, + size, &offset, packet_offset); + if (count<0) + return count; data += offset; @@ -740,15 +631,19 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data, int duration_copy; int ret; /* If no FEC can be present, run the PLC (recursive call) */ - if (frame_size <= packet_frame_size || packet_mode == MODE_CELT_ONLY || st->mode == MODE_CELT_ONLY) - return opus_decode_native(st, NULL, 0, pcm, frame_size, 0, 0, NULL); + if (frame_size < packet_frame_size || packet_mode == MODE_CELT_ONLY || st->mode == MODE_CELT_ONLY) + return opus_decode_native(st, NULL, 0, pcm, frame_size, 0, 0, NULL, soft_clip); /* Otherwise, run the PLC on everything except the size for which we might have FEC */ duration_copy = st->last_packet_duration; - ret = opus_decode_native(st, NULL, 0, pcm, frame_size-packet_frame_size, 0, 0, NULL); - if (ret<0) + if (frame_size-packet_frame_size!=0) { - st->last_packet_duration = duration_copy; - return ret; + ret = opus_decode_native(st, NULL, 0, pcm, frame_size-packet_frame_size, 0, 0, NULL, soft_clip); + if (ret<0) + { + st->last_packet_duration = duration_copy; + return ret; + } + celt_assert(ret==frame_size-packet_frame_size); } /* Complete with FEC */ st->mode = packet_mode; @@ -759,14 +654,13 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data, packet_frame_size, 1); if (ret<0) return ret; - st->last_packet_duration = frame_size; - return frame_size; + else { + if (OPUS_CHECK_ARRAY(pcm, frame_size*st->channels)) + OPUS_PRINT_INT(frame_size); + st->last_packet_duration = frame_size; + return frame_size; + } } - tot_offset = 0; - if (count < 0) - return count; - - tot_offset += offset; if (count*packet_frame_size > frame_size) return OPUS_BUFFER_TOO_SMALL; @@ -781,17 +675,22 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data, for (i=0;ichannels, frame_size-nb_samples, 0); if (ret<0) return ret; + celt_assert(ret==packet_frame_size); data += size[i]; - tot_offset += size[i]; - pcm += ret*st->channels; nb_samples += ret; } - if (packet_offset != NULL) - *packet_offset = tot_offset; st->last_packet_duration = nb_samples; + if (OPUS_CHECK_ARRAY(pcm, nb_samples*st->channels)) + OPUS_PRINT_INT(nb_samples); +#ifndef FIXED_POINT + if (soft_clip) + opus_pcm_soft_clip(pcm, nb_samples, st->channels, st->softclip_mem); + else + st->softclip_mem[0]=st->softclip_mem[1]=0; +#endif return nb_samples; } @@ -800,7 +699,9 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data, int opus_decode(OpusDecoder *st, const unsigned char *data, opus_int32 len, opus_val16 *pcm, int frame_size, int decode_fec) { - return opus_decode_native(st, data, len, pcm, frame_size, decode_fec, 0, NULL); + if(frame_size<=0) + return OPUS_BAD_ARG; + return opus_decode_native(st, data, len, pcm, frame_size, decode_fec, 0, NULL, 0); } #ifndef DISABLE_FLOAT_API @@ -811,9 +712,14 @@ int opus_decode_float(OpusDecoder *st, const unsigned char *data, int ret, i; ALLOC_STACK; + if(frame_size<=0) + { + RESTORE_STACK; + return OPUS_BAD_ARG; + } ALLOC(out, frame_size*st->channels, opus_int16); - ret = opus_decode_native(st, data, len, out, frame_size, decode_fec, 0, NULL); + ret = opus_decode_native(st, data, len, out, frame_size, decode_fec, 0, NULL, 0); if (ret > 0) { for (i=0;ichannels;i++) @@ -833,7 +739,7 @@ int opus_decode(OpusDecoder *st, const unsigned char *data, int ret, i; ALLOC_STACK; - if(frame_size<0) + if(frame_size<=0) { RESTORE_STACK; return OPUS_BAD_ARG; @@ -841,7 +747,7 @@ int opus_decode(OpusDecoder *st, const unsigned char *data, ALLOC(out, frame_size*st->channels, float); - ret = opus_decode_native(st, data, len, out, frame_size, decode_fec, 0, NULL); + ret = opus_decode_native(st, data, len, out, frame_size, decode_fec, 0, NULL, 1); if (ret > 0) { for (i=0;ichannels;i++) @@ -854,7 +760,9 @@ int opus_decode(OpusDecoder *st, const unsigned char *data, int opus_decode_float(OpusDecoder *st, const unsigned char *data, opus_int32 len, opus_val16 *pcm, int frame_size, int decode_fec) { - return opus_decode_native(st, data, len, pcm, frame_size, decode_fec, 0, NULL); + if(frame_size<=0) + return OPUS_BAD_ARG; + return opus_decode_native(st, data, len, pcm, frame_size, decode_fec, 0, NULL, 0); } #endif @@ -877,12 +785,20 @@ int opus_decoder_ctl(OpusDecoder *st, int request, ...) case OPUS_GET_BANDWIDTH_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } *value = st->bandwidth; } break; case OPUS_GET_FINAL_RANGE_REQUEST: { opus_uint32 *value = va_arg(ap, opus_uint32*); + if (!value) + { + goto bad_arg; + } *value = st->rangeFinal; } break; @@ -901,10 +817,9 @@ int opus_decoder_ctl(OpusDecoder *st, int request, ...) case OPUS_GET_SAMPLE_RATE_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); - if (value==NULL) + if (!value) { - ret = OPUS_BAD_ARG; - break; + goto bad_arg; } *value = st->Fs; } @@ -912,10 +827,9 @@ int opus_decoder_ctl(OpusDecoder *st, int request, ...) case OPUS_GET_PITCH_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); - if (value==NULL) + if (!value) { - ret = OPUS_BAD_ARG; - break; + goto bad_arg; } if (st->prev_mode == MODE_CELT_ONLY) celt_decoder_ctl(celt_dec, OPUS_GET_PITCH(value)); @@ -926,10 +840,9 @@ int opus_decoder_ctl(OpusDecoder *st, int request, ...) case OPUS_GET_GAIN_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); - if (value==NULL) + if (!value) { - ret = OPUS_BAD_ARG; - break; + goto bad_arg; } *value = st->decode_gain; } @@ -939,8 +852,7 @@ int opus_decoder_ctl(OpusDecoder *st, int request, ...) opus_int32 value = va_arg(ap, opus_int32); if (value<-32768 || value>32767) { - ret = OPUS_BAD_ARG; - break; + goto bad_arg; } st->decode_gain = value; } @@ -948,6 +860,10 @@ int opus_decoder_ctl(OpusDecoder *st, int request, ...) case OPUS_GET_LAST_PACKET_DURATION_REQUEST: { opus_uint32 *value = va_arg(ap, opus_uint32*); + if (!value) + { + goto bad_arg; + } *value = st->last_packet_duration; } break; @@ -959,6 +875,9 @@ int opus_decoder_ctl(OpusDecoder *st, int request, ...) va_end(ap); return ret; +bad_arg: + va_end(ap); + return OPUS_BAD_ARG; } void opus_decoder_destroy(OpusDecoder *st) diff --git a/code/opus-1.0.2/src/opus_encoder.c b/code/opus-1.1/src/opus_encoder.c similarity index 59% rename from code/opus-1.0.2/src/opus_encoder.c rename to code/opus-1.1/src/opus_encoder.c index aae31256..fbd3de63 100644 --- a/code/opus-1.0.2/src/opus_encoder.c +++ b/code/opus-1.1/src/opus_encoder.c @@ -40,7 +40,9 @@ #include "arch.h" #include "opus_private.h" #include "os_support.h" - +#include "cpu_support.h" +#include "analysis.h" +#include "mathops.h" #include "tuning_parameters.h" #ifdef FIXED_POINT #include "fixed/structs_FIX.h" @@ -50,6 +52,12 @@ #define MAX_ENCODER_BUFFER 480 +typedef struct { + opus_val32 XX, XY, YY; + opus_val16 smoothed_width; + opus_val16 max_follower; +} StereoWidthState; + struct OpusEncoder { int celt_enc_offset; int silk_enc_offset; @@ -66,14 +74,18 @@ struct OpusEncoder { opus_int32 Fs; int use_vbr; int vbr_constraint; + int variable_duration; opus_int32 bitrate_bps; opus_int32 user_bitrate_bps; + int lsb_depth; int encoder_buffer; + int lfe; #define OPUS_ENCODER_RESET_START stream_channels int stream_channels; opus_int16 hybrid_stereo_width_Q14; opus_int32 variable_HP_smth2_Q15; + opus_val16 prev_HB_gain; opus_val32 hp_mem[4]; int mode; int prev_mode; @@ -83,9 +95,16 @@ struct OpusEncoder { int silk_bw_switch; /* Sampling rate (at the API level) */ int first; + opus_val16 * energy_masking; + StereoWidthState width_mem; opus_val16 delay_buffer[MAX_ENCODER_BUFFER*2]; - +#ifndef DISABLE_FLOAT_API + TonalityAnalysisState analysis; + int detected_bandwidth; + int analysis_offset; +#endif opus_uint32 rangeFinal; + int arch; }; /* Transition tables for the voice and music. First column is the @@ -94,36 +113,36 @@ struct OpusEncoder { static const opus_int32 mono_voice_bandwidth_thresholds[8] = { 11000, 1000, /* NB<->MB */ 14000, 1000, /* MB<->WB */ - 21000, 2000, /* WB<->SWB */ - 29000, 2000, /* SWB<->FB */ + 17000, 1000, /* WB<->SWB */ + 21000, 2000, /* SWB<->FB */ }; static const opus_int32 mono_music_bandwidth_thresholds[8] = { - 14000, 1000, /* MB not allowed */ - 18000, 2000, /* MB<->WB */ - 24000, 2000, /* WB<->SWB */ - 33000, 2000, /* SWB<->FB */ + 12000, 1000, /* NB<->MB */ + 15000, 1000, /* MB<->WB */ + 18000, 2000, /* WB<->SWB */ + 22000, 2000, /* SWB<->FB */ }; static const opus_int32 stereo_voice_bandwidth_thresholds[8] = { 11000, 1000, /* NB<->MB */ 14000, 1000, /* MB<->WB */ 21000, 2000, /* WB<->SWB */ - 32000, 2000, /* SWB<->FB */ + 28000, 2000, /* SWB<->FB */ }; static const opus_int32 stereo_music_bandwidth_thresholds[8] = { - 14000, 1000, /* MB not allowed */ + 12000, 1000, /* NB<->MB */ 18000, 2000, /* MB<->WB */ - 24000, 2000, /* WB<->SWB */ - 48000, 2000, /* SWB<->FB */ + 21000, 2000, /* WB<->SWB */ + 30000, 2000, /* SWB<->FB */ }; /* Threshold bit-rates for switching between mono and stereo */ -static const opus_int32 stereo_voice_threshold = 26000; -static const opus_int32 stereo_music_threshold = 36000; +static const opus_int32 stereo_voice_threshold = 30000; +static const opus_int32 stereo_music_threshold = 30000; /* Threshold bit-rate for switching between SILK/hybrid and CELT-only */ static const opus_int32 mode_thresholds[2][2] = { /* voice */ /* music */ - { 48000, 24000}, /* mono */ - { 48000, 24000}, /* stereo */ + { 64000, 16000}, /* mono */ + { 36000, 16000}, /* stereo */ }; int opus_encoder_get_size(int channels) @@ -167,7 +186,9 @@ int opus_encoder_init(OpusEncoder* st, opus_int32 Fs, int channels, int applicat st->Fs = Fs; - ret = silk_InitEncoder( silk_enc, &st->silk_mode ); + st->arch = opus_select_arch(); + + ret = silk_InitEncoder( silk_enc, st->arch, &st->silk_mode ); if(ret)return OPUS_INTERNAL_ERROR; /* default SILK parameters */ @@ -180,18 +201,19 @@ int opus_encoder_init(OpusEncoder* st, opus_int32 Fs, int channels, int applicat st->silk_mode.payloadSize_ms = 20; st->silk_mode.bitRate = 25000; st->silk_mode.packetLossPercentage = 0; - st->silk_mode.complexity = 10; + st->silk_mode.complexity = 9; st->silk_mode.useInBandFEC = 0; st->silk_mode.useDTX = 0; st->silk_mode.useCBR = 0; + st->silk_mode.reducedDependency = 0; /* Create CELT encoder */ /* Initialize CELT encoder */ - err = celt_encoder_init(celt_enc, Fs, channels); + err = celt_encoder_init(celt_enc, Fs, channels, st->arch); if(err!=OPUS_OK)return OPUS_INTERNAL_ERROR; celt_encoder_ctl(celt_enc, CELT_SET_SIGNALLING(0)); - celt_encoder_ctl(celt_enc, OPUS_SET_COMPLEXITY(10)); + celt_encoder_ctl(celt_enc, OPUS_SET_COMPLEXITY(st->silk_mode.complexity)); st->use_vbr = 1; /* Makes constrained VBR the default (safer for real-time use) */ @@ -206,12 +228,15 @@ int opus_encoder_init(OpusEncoder* st, opus_int32 Fs, int channels, int applicat st->user_forced_mode = OPUS_AUTO; st->voice_ratio = -1; st->encoder_buffer = st->Fs/100; + st->lsb_depth = 24; + st->variable_duration = OPUS_FRAMESIZE_ARG; /* Delay compensation of 4 ms (2.5 ms for SILK's extra look-ahead + 1.5 ms for SILK resamplers and stereo prediction) */ st->delay_compensation = st->Fs/250; st->hybrid_stereo_width_Q14 = 1 << 14; + st->prev_HB_gain = Q15ONE; st->variable_HP_smth2_Q15 = silk_LSHIFT( silk_lin2log( VARIABLE_HP_MIN_CUTOFF_HZ ), 8 ); st->first = 1; st->mode = MODE_HYBRID; @@ -220,44 +245,6 @@ int opus_encoder_init(OpusEncoder* st, opus_int32 Fs, int channels, int applicat return OPUS_OK; } -static int pad_frame(unsigned char *data, opus_int32 len, opus_int32 new_len) -{ - if (len == new_len) - return 0; - if (len > new_len) - return 1; - - if ((data[0]&0x3)==0) - { - int i; - int padding, nb_255s; - - padding = new_len - len; - if (padding >= 2) - { - nb_255s = (padding-2)/255; - - for (i=len-1;i>=1;i--) - data[i+nb_255s+2] = data[i]; - data[0] |= 0x3; - data[1] = 0x41; - for (i=0;i=1;i--) - data[i+1] = data[i]; - data[0] |= 0x3; - data[1] = 1; - } - return 0; - } else { - return 1; - } -} - static unsigned char gen_toc(int mode, int framerate, int bandwidth, int channels) { int period; @@ -322,7 +309,7 @@ static void silk_biquad_float( S[ 0 ] = S[1] - vout*A[0] + B[1]*inval; - S[ 1 ] = - vout*A[1] + B[2]*inval; + S[ 1 ] = - vout*A[1] + B[2]*inval + VERY_SMALL; /* Scale back to Q0 and saturate */ out[ k*stride ] = vout; @@ -365,6 +352,56 @@ static void hp_cutoff(const opus_val16 *in, opus_int32 cutoff_Hz, opus_val16 *ou #endif } +#ifdef FIXED_POINT +static void dc_reject(const opus_val16 *in, opus_int32 cutoff_Hz, opus_val16 *out, opus_val32 *hp_mem, int len, int channels, opus_int32 Fs) +{ + int c, i; + int shift; + + /* Approximates -round(log2(4.*cutoff_Hz/Fs)) */ + shift=celt_ilog2(Fs/(cutoff_Hz*3)); + for (c=0;cuser_bitrate_bps; } -#ifdef FIXED_POINT -#define opus_encode_native opus_encode -opus_int32 opus_encode(OpusEncoder *st, const opus_val16 *pcm, int frame_size, - unsigned char *data, opus_int32 out_data_bytes) -#else -#define opus_encode_native opus_encode_float -opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size, - unsigned char *data, opus_int32 out_data_bytes) +#ifndef DISABLE_FLOAT_API +/* Don't use more than 60 ms for the frame size analysis */ +#define MAX_DYNAMIC_FRAMESIZE 24 +/* Estimates how much the bitrate will be boosted based on the sub-frame energy */ +static float transient_boost(const float *E, const float *E_1, int LM, int maxM) +{ + int i; + int M; + float sumE=0, sumE_1=0; + float metric; + + M = IMIN(maxM, (1<10 ? 1 : 0;*/ + /*return MAX16(0,1-exp(-.25*(metric-2.)));*/ + return MIN16(1,(float)sqrt(MAX16(0,.05f*(metric-2)))); +} + +/* Viterbi decoding trying to find the best frame size combination using look-ahead + + State numbering: + 0: unused + 1: 2.5 ms + 2: 5 ms (#1) + 3: 5 ms (#2) + 4: 10 ms (#1) + 5: 10 ms (#2) + 6: 10 ms (#3) + 7: 10 ms (#4) + 8: 20 ms (#1) + 9: 20 ms (#2) + 10: 20 ms (#3) + 11: 20 ms (#4) + 12: 20 ms (#5) + 13: 20 ms (#6) + 14: 20 ms (#7) + 15: 20 ms (#8) +*/ +static int transient_viterbi(const float *E, const float *E_1, int N, int frame_cost, int rate) +{ + int i; + float cost[MAX_DYNAMIC_FRAMESIZE][16]; + int states[MAX_DYNAMIC_FRAMESIZE][16]; + float best_cost; + int best_state; + float factor; + /* Take into account that we damp VBR in the 32 kb/s to 64 kb/s range. */ + if (rate<80) + factor=0; + else if (rate>160) + factor=1; + else + factor = (rate-80.f)/80.f; + /* Makes variable framesize less aggressive at lower bitrates, but I can't + find any valid theoretical justification for this (other than it seems + to help) */ + for (i=0;i<16;i++) + { + /* Impossible state */ + states[0][i] = -1; + cost[0][i] = 1e10; + } + for (i=0;i<4;i++) + { + cost[0][1<=0;i--) + { + /*printf("%d ", best_state);*/ + best_state = states[i][best_state]; + } + /*printf("%d\n", best_state);*/ + return best_state; +} + +int optimize_framesize(const opus_val16 *x, int len, int C, opus_int32 Fs, + int bitrate, opus_val16 tonality, float *mem, int buffering, + downmix_func downmix) +{ + int N; + int i; + float e[MAX_DYNAMIC_FRAMESIZE+4]; + float e_1[MAX_DYNAMIC_FRAMESIZE+3]; + opus_val32 memx; + int bestLM=0; + int subframe; + int pos; + VARDECL(opus_val32, sub); + + subframe = Fs/400; + ALLOC(sub, subframe, opus_val32); + e[0]=mem[0]; + e_1[0]=1.f/(EPSILON+mem[0]); + if (buffering) + { + /* Consider the CELT delay when not in restricted-lowdelay */ + /* We assume the buffering is between 2.5 and 5 ms */ + int offset = 2*subframe - buffering; + celt_assert(offset>=0 && offset <= subframe); + x += C*offset; + len -= offset; + e[1]=mem[1]; + e_1[1]=1.f/(EPSILON+mem[1]); + e[2]=mem[2]; + e_1[2]=1.f/(EPSILON+mem[2]); + pos = 3; + } else { + pos=1; + } + N=IMIN(len/subframe, MAX_DYNAMIC_FRAMESIZE); + /* Just silencing a warning, it's really initialized later */ + memx = 0; + for (i=0;i-1) + { + for (j=0;j-1) + { + for (j=0;j= OPUS_FRAMESIZE_2_5_MS && variable_duration <= OPUS_FRAMESIZE_60_MS) + new_size = IMIN(3*Fs/50, (Fs/400)<<(variable_duration-OPUS_FRAMESIZE_2_5_MS)); + else + return -1; + if (new_size>frame_size) + return -1; + if (400*new_size!=Fs && 200*new_size!=Fs && 100*new_size!=Fs && + 50*new_size!=Fs && 25*new_size!=Fs && 50*new_size!=3*Fs) + return -1; + return new_size; +} + +opus_int32 compute_frame_size(const void *analysis_pcm, int frame_size, + int variable_duration, int C, opus_int32 Fs, int bitrate_bps, + int delay_compensation, downmix_func downmix +#ifndef DISABLE_FLOAT_API + , float *subframe_mem +#endif + ) +{ +#ifndef DISABLE_FLOAT_API + if (variable_duration == OPUS_FRAMESIZE_VARIABLE && frame_size >= Fs/200) + { + int LM = 3; + LM = optimize_framesize(analysis_pcm, frame_size, C, Fs, bitrate_bps, + 0, subframe_mem, delay_compensation, downmix); + while ((Fs/400<frame_size) + LM--; + frame_size = (Fs/400<XX += MULT16_32_Q15(short_alpha, xx-mem->XX); + mem->XY += MULT16_32_Q15(short_alpha, xy-mem->XY); + mem->YY += MULT16_32_Q15(short_alpha, yy-mem->YY); + mem->XX = MAX32(0, mem->XX); + mem->XY = MAX32(0, mem->XY); + mem->YY = MAX32(0, mem->YY); + if (MAX32(mem->XX, mem->YY)>QCONST16(8e-4f, 18)) + { + sqrt_xx = celt_sqrt(mem->XX); + sqrt_yy = celt_sqrt(mem->YY); + qrrt_xx = celt_sqrt(sqrt_xx); + qrrt_yy = celt_sqrt(sqrt_yy); + /* Inter-channel correlation */ + mem->XY = MIN32(mem->XY, sqrt_xx*sqrt_yy); + corr = SHR32(frac_div32(mem->XY,EPSILON+MULT16_16(sqrt_xx,sqrt_yy)),16); + /* Approximate loudness difference */ + ldiff = Q15ONE*ABS16(qrrt_xx-qrrt_yy)/(EPSILON+qrrt_xx+qrrt_yy); + width = MULT16_16_Q15(celt_sqrt(QCONST32(1.f,30)-MULT16_16(corr,corr)), ldiff); + /* Smoothing over one second */ + mem->smoothed_width += (width-mem->smoothed_width)/frame_rate; + /* Peak follower */ + mem->max_follower = MAX16(mem->max_follower-QCONST16(.02f,15)/frame_rate, mem->smoothed_width); + } else { + width = 0; + corr=Q15ONE; + ldiff=0; + } + /*printf("%f %f %f %f %f ", corr/(float)Q15ONE, ldiff/(float)Q15ONE, width/(float)Q15ONE, mem->smoothed_width/(float)Q15ONE, mem->max_follower/(float)Q15ONE);*/ + return EXTRACT16(MIN32(Q15ONE,20*mem->max_follower)); +} + +opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_size, + unsigned char *data, opus_int32 out_data_bytes, int lsb_depth, + const void *analysis_pcm, opus_int32 analysis_size, int c1, int c2, int analysis_channels, downmix_func downmix) { void *silk_enc; CELTEncoder *celt_enc; @@ -471,7 +949,14 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s int frame_rate; opus_int32 max_rate; /* Max bitrate we're allowed to use */ int curr_bandwidth; + opus_val16 HB_gain; opus_int32 max_data_bytes; /* Max number of bytes we're allowed to use */ + int total_buffer; + opus_val16 stereo_width; + const CELTMode *celt_mode; + AnalysisInfo analysis_info; + int analysis_read_pos_bak=-1; + int analysis_read_subframe_bak=-1; VARDECL(opus_val16, tmp_prefill); ALLOC_STACK; @@ -479,25 +964,70 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s max_data_bytes = IMIN(1276, out_data_bytes); st->rangeFinal = 0; - if (400*frame_size != st->Fs && 200*frame_size != st->Fs && 100*frame_size != st->Fs && + if ((!st->variable_duration && 400*frame_size != st->Fs && 200*frame_size != st->Fs && 100*frame_size != st->Fs && 50*frame_size != st->Fs && 25*frame_size != st->Fs && 50*frame_size != 3*st->Fs) - { - RESTORE_STACK; - return OPUS_BAD_ARG; - } - if (max_data_bytes<=0) + || (400*frame_size < st->Fs) + || max_data_bytes<=0 + ) { RESTORE_STACK; return OPUS_BAD_ARG; } silk_enc = (char*)st+st->silk_enc_offset; celt_enc = (CELTEncoder*)((char*)st+st->celt_enc_offset); - if (st->application == OPUS_APPLICATION_RESTRICTED_LOWDELAY) delay_compensation = 0; else delay_compensation = st->delay_compensation; + lsb_depth = IMIN(lsb_depth, st->lsb_depth); + + analysis_info.valid = 0; + celt_encoder_ctl(celt_enc, CELT_GET_MODE(&celt_mode)); +#ifndef DISABLE_FLOAT_API +#ifdef FIXED_POINT + if (st->silk_mode.complexity >= 10 && st->Fs==48000) +#else + if (st->silk_mode.complexity >= 7 && st->Fs==48000) +#endif + { + analysis_read_pos_bak = st->analysis.read_pos; + analysis_read_subframe_bak = st->analysis.read_subframe; + run_analysis(&st->analysis, celt_mode, analysis_pcm, analysis_size, frame_size, + c1, c2, analysis_channels, st->Fs, + lsb_depth, downmix, &analysis_info); + } +#endif + + st->voice_ratio = -1; + +#ifndef DISABLE_FLOAT_API + st->detected_bandwidth = 0; + if (analysis_info.valid) + { + int analysis_bandwidth; + if (st->signal_type == OPUS_AUTO) + st->voice_ratio = (int)floor(.5+100*(1-analysis_info.music_prob)); + + analysis_bandwidth = analysis_info.bandwidth; + if (analysis_bandwidth<=12) + st->detected_bandwidth = OPUS_BANDWIDTH_NARROWBAND; + else if (analysis_bandwidth<=14) + st->detected_bandwidth = OPUS_BANDWIDTH_MEDIUMBAND; + else if (analysis_bandwidth<=16) + st->detected_bandwidth = OPUS_BANDWIDTH_WIDEBAND; + else if (analysis_bandwidth<=18) + st->detected_bandwidth = OPUS_BANDWIDTH_SUPERWIDEBAND; + else + st->detected_bandwidth = OPUS_BANDWIDTH_FULLBAND; + } +#endif + + if (st->channels==2 && st->force_channels!=1) + stereo_width = compute_stereo_width(pcm, frame_size, st->Fs, &st->width_mem); + else + stereo_width = 0; + total_buffer = delay_compensation; st->bitrate_bps = user_bitrate_to_bitrate(st, frame_size, max_data_bytes); frame_rate = st->Fs/frame_size; @@ -533,15 +1063,19 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s max_rate = frame_rate*max_data_bytes*8; /* Equivalent 20-ms rate for mode/channel/bandwidth decisions */ - equiv_rate = st->bitrate_bps - 60*(st->Fs/frame_size - 50); + equiv_rate = st->bitrate_bps - (40*st->channels+20)*(st->Fs/frame_size - 50); if (st->signal_type == OPUS_SIGNAL_VOICE) voice_est = 127; else if (st->signal_type == OPUS_SIGNAL_MUSIC) voice_est = 0; else if (st->voice_ratio >= 0) + { voice_est = st->voice_ratio*327>>8; - else if (st->application == OPUS_APPLICATION_VOIP) + /* For AUDIO, never be more than 90% confident of having speech */ + if (st->application == OPUS_APPLICATION_AUDIO) + voice_est = IMIN(voice_est, 115); + } else if (st->application == OPUS_APPLICATION_VOIP) voice_est = 115; else voice_est = 48; @@ -561,15 +1095,16 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s opus_int32 stereo_threshold; stereo_threshold = stereo_music_threshold + ((voice_est*voice_est*(stereo_voice_threshold-stereo_music_threshold))>>14); if (st->stream_channels == 2) - stereo_threshold -= 4000; + stereo_threshold -= 1000; else - stereo_threshold += 4000; + stereo_threshold += 1000; st->stream_channels = (equiv_rate > stereo_threshold) ? 2 : 1; } else { st->stream_channels = st->channels; } #endif } + equiv_rate = st->bitrate_bps - (40*st->stream_channels+20)*(st->Fs/frame_size - 50); /* Mode selection depending on application and signal type */ if (st->application == OPUS_APPLICATION_RESTRICTED_LOWDELAY) @@ -592,15 +1127,21 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s st->mode = MODE_SILK_ONLY; } #else - int chan; opus_int32 mode_voice, mode_music; opus_int32 threshold; - chan = (st->channels==2) && st->force_channels!=1; - mode_voice = mode_thresholds[chan][0]; - mode_music = mode_thresholds[chan][1]; + /* Interpolate based on stereo width */ + mode_voice = (opus_int32)(MULT16_32_Q15(Q15ONE-stereo_width,mode_thresholds[0][0]) + + MULT16_32_Q15(stereo_width,mode_thresholds[1][0])); + mode_music = (opus_int32)(MULT16_32_Q15(Q15ONE-stereo_width,mode_thresholds[1][1]) + + MULT16_32_Q15(stereo_width,mode_thresholds[1][1])); + /* Interpolate based on speech/music probability */ threshold = mode_music + ((voice_est*voice_est*(mode_voice-mode_music))>>14); + /* Bias towards SILK for VoIP because of some useful features */ + if (st->application == OPUS_APPLICATION_VOIP) + threshold += 8000; + /*printf("%f %d\n", stereo_width/(float)Q15ONE, threshold);*/ /* Hysteresis */ if (st->prev_mode == MODE_CELT_ONLY) threshold -= 4000; @@ -623,6 +1164,11 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s /* Override the chosen mode to make sure we meet the requested frame size */ if (st->mode != MODE_CELT_ONLY && frame_size < st->Fs/100) st->mode = MODE_CELT_ONLY; + if (st->lfe) + st->mode = MODE_CELT_ONLY; + /* If max_data_bytes represents less than 8 kb/s, switch to CELT-only mode */ + if (max_data_bytes < (frame_rate > 50 ? 12000 : 8000)*frame_size / (st->Fs * 8)) + st->mode = MODE_CELT_ONLY; if (st->stream_channels == 1 && st->prev_channels ==2 && st->silk_mode.toMono==0 && st->mode != MODE_CELT_ONLY && st->prev_mode != MODE_CELT_ONLY) @@ -658,6 +1204,7 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s redundancy = 1; celt_to_silk = 1; st->silk_bw_switch = 0; + prefill=1; } if (redundancy) @@ -672,7 +1219,7 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s if (st->mode != MODE_CELT_ONLY && st->prev_mode == MODE_CELT_ONLY) { silk_EncControlStruct dummy; - silk_InitEncoder( silk_enc, &dummy); + silk_InitEncoder( silk_enc, st->arch, &dummy); prefill=1; } @@ -750,14 +1297,37 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s st->bandwidth = OPUS_BANDWIDTH_MEDIUMBAND; if (st->Fs <= 8000 && st->bandwidth > OPUS_BANDWIDTH_NARROWBAND) st->bandwidth = OPUS_BANDWIDTH_NARROWBAND; +#ifndef DISABLE_FLOAT_API + /* Use detected bandwidth to reduce the encoded bandwidth. */ + if (st->detected_bandwidth && st->user_bandwidth == OPUS_AUTO) + { + int min_detected_bandwidth; + /* Makes bandwidth detection more conservative just in case the detector + gets it wrong when we could have coded a high bandwidth transparently. + When operating in SILK/hybrid mode, we don't go below wideband to avoid + more complicated switches that require redundancy. */ + if (equiv_rate <= 18000*st->stream_channels && st->mode == MODE_CELT_ONLY) + min_detected_bandwidth = OPUS_BANDWIDTH_NARROWBAND; + else if (equiv_rate <= 24000*st->stream_channels && st->mode == MODE_CELT_ONLY) + min_detected_bandwidth = OPUS_BANDWIDTH_MEDIUMBAND; + else if (equiv_rate <= 30000*st->stream_channels) + min_detected_bandwidth = OPUS_BANDWIDTH_WIDEBAND; + else if (equiv_rate <= 44000*st->stream_channels) + min_detected_bandwidth = OPUS_BANDWIDTH_SUPERWIDEBAND; + else + min_detected_bandwidth = OPUS_BANDWIDTH_FULLBAND; - /* If max_data_bytes represents less than 8 kb/s, switch to CELT-only mode */ - if (max_data_bytes < (frame_rate > 50 ? 12000 : 8000)*frame_size / (st->Fs * 8)) - st->mode = MODE_CELT_ONLY; + st->detected_bandwidth = IMAX(st->detected_bandwidth, min_detected_bandwidth); + st->bandwidth = IMIN(st->bandwidth, st->detected_bandwidth); + } +#endif + celt_encoder_ctl(celt_enc, OPUS_SET_LSB_DEPTH(lsb_depth)); /* CELT mode doesn't support mediumband, use wideband instead */ if (st->mode == MODE_CELT_ONLY && st->bandwidth == OPUS_BANDWIDTH_MEDIUMBAND) st->bandwidth = OPUS_BANDWIDTH_WIDEBAND; + if (st->lfe) + st->bandwidth = OPUS_BANDWIDTH_NARROWBAND; /* Can't support higher than wideband for >20 ms frames */ if (frame_size > st->Fs/50 && (st->mode == MODE_CELT_ONLY || st->bandwidth > OPUS_BANDWIDTH_WIDEBAND)) @@ -765,16 +1335,25 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s VARDECL(unsigned char, tmp_data); int nb_frames; int bak_mode, bak_bandwidth, bak_channels, bak_to_mono; - OpusRepacketizer rp; + VARDECL(OpusRepacketizer, rp); opus_int32 bytes_per_frame; + opus_int32 repacketize_len; +#ifndef DISABLE_FLOAT_API + if (analysis_read_pos_bak!= -1) + { + st->analysis.read_pos = analysis_read_pos_bak; + st->analysis.read_subframe = analysis_read_subframe_bak; + } +#endif nb_frames = frame_size > st->Fs/25 ? 3 : 2; bytes_per_frame = IMIN(1276,(out_data_bytes-3)/nb_frames); ALLOC(tmp_data, nb_frames*bytes_per_frame, unsigned char); - opus_repacketizer_init(&rp); + ALLOC(rp, 1, OpusRepacketizer); + opus_repacketizer_init(rp); bak_mode = st->user_forced_mode; bak_bandwidth = st->user_bandwidth; @@ -796,20 +1375,26 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s /* When switching from SILK/Hybrid to CELT, only ask for a switch at the last frame */ if (to_celt && i==nb_frames-1) st->user_forced_mode = MODE_CELT_ONLY; - tmp_len = opus_encode_native(st, pcm+i*(st->channels*st->Fs/50), st->Fs/50, tmp_data+i*bytes_per_frame, bytes_per_frame); + tmp_len = opus_encode_native(st, pcm+i*(st->channels*st->Fs/50), st->Fs/50, + tmp_data+i*bytes_per_frame, bytes_per_frame, lsb_depth, + NULL, 0, c1, c2, analysis_channels, downmix); if (tmp_len<0) { RESTORE_STACK; return OPUS_INTERNAL_ERROR; } - ret = opus_repacketizer_cat(&rp, tmp_data+i*bytes_per_frame, tmp_len); + ret = opus_repacketizer_cat(rp, tmp_data+i*bytes_per_frame, tmp_len); if (ret<0) { RESTORE_STACK; return OPUS_INTERNAL_ERROR; } } - ret = opus_repacketizer_out(&rp, data, out_data_bytes); + if (st->use_vbr) + repacketize_len = out_data_bytes; + else + repacketize_len = IMIN(3*st->bitrate_bps/(3*8*50/nb_frames), out_data_bytes); + ret = opus_repacketizer_out_range_impl(rp, 0, nb_frames, data, repacketize_len, 0, !st->use_vbr); if (ret<0) { RESTORE_STACK; @@ -822,7 +1407,6 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s RESTORE_STACK; return ret; } - curr_bandwidth = st->bandwidth; /* Chooses the appropriate mode for speech @@ -839,9 +1423,9 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s ec_enc_init(&enc, data, max_data_bytes-1); - ALLOC(pcm_buf, (delay_compensation+frame_size)*st->channels, opus_val16); - for (i=0;ichannels;i++) - pcm_buf[i] = st->delay_buffer[(st->encoder_buffer-delay_compensation)*st->channels+i]; + ALLOC(pcm_buf, (total_buffer+frame_size)*st->channels, opus_val16); + for (i=0;ichannels;i++) + pcm_buf[i] = st->delay_buffer[(st->encoder_buffer-total_buffer)*st->channels+i]; if (st->mode == MODE_CELT_ONLY) hp_freq_smth1 = silk_LSHIFT( silk_lin2log( VARIABLE_HP_MIN_CUTOFF_HZ ), 8 ); @@ -856,46 +1440,96 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s if (st->application == OPUS_APPLICATION_VOIP) { - hp_cutoff(pcm, cutoff_Hz, &pcm_buf[delay_compensation*st->channels], st->hp_mem, frame_size, st->channels, st->Fs); + hp_cutoff(pcm, cutoff_Hz, &pcm_buf[total_buffer*st->channels], st->hp_mem, frame_size, st->channels, st->Fs); } else { - for (i=0;ichannels;i++) - pcm_buf[delay_compensation*st->channels + i] = pcm[i]; + dc_reject(pcm, 3, &pcm_buf[total_buffer*st->channels], st->hp_mem, frame_size, st->channels, st->Fs); } + + /* SILK processing */ + HB_gain = Q15ONE; if (st->mode != MODE_CELT_ONLY) { + opus_int32 total_bitRate, celt_rate; #ifdef FIXED_POINT const opus_int16 *pcm_silk; #else VARDECL(opus_int16, pcm_silk); ALLOC(pcm_silk, st->channels*frame_size, opus_int16); #endif - st->silk_mode.bitRate = 8*bytes_target*frame_rate; + + /* Distribute bits between SILK and CELT */ + total_bitRate = 8 * bytes_target * frame_rate; if( st->mode == MODE_HYBRID ) { - st->silk_mode.bitRate /= st->stream_channels; + int HB_gain_ref; + /* Base rate for SILK */ + st->silk_mode.bitRate = st->stream_channels * ( 5000 + 1000 * ( st->Fs == 100 * frame_size ) ); if( curr_bandwidth == OPUS_BANDWIDTH_SUPERWIDEBAND ) { - if( st->Fs == 100 * frame_size ) { - /* 24 kHz, 10 ms */ - st->silk_mode.bitRate = ( ( st->silk_mode.bitRate + 2000 + st->use_vbr * 1000 ) * 2 ) / 3; - } else { - /* 24 kHz, 20 ms */ - st->silk_mode.bitRate = ( ( st->silk_mode.bitRate + 1000 + st->use_vbr * 1000 ) * 2 ) / 3; - } - } else { - if( st->Fs == 100 * frame_size ) { - /* 48 kHz, 10 ms */ - st->silk_mode.bitRate = ( st->silk_mode.bitRate + 8000 + st->use_vbr * 3000 ) / 2; - } else { - /* 48 kHz, 20 ms */ - st->silk_mode.bitRate = ( st->silk_mode.bitRate + 9000 + st->use_vbr * 1000 ) / 2; - } + /* SILK gets 2/3 of the remaining bits */ + st->silk_mode.bitRate += ( total_bitRate - st->silk_mode.bitRate ) * 2 / 3; + } else { /* FULLBAND */ + /* SILK gets 3/5 of the remaining bits */ + st->silk_mode.bitRate += ( total_bitRate - st->silk_mode.bitRate ) * 3 / 5; } - st->silk_mode.bitRate *= st->stream_channels; - /* don't let SILK use more than 80% */ - if( st->silk_mode.bitRate > ( st->bitrate_bps - 8*st->Fs/frame_size ) * 4/5 ) { - st->silk_mode.bitRate = ( st->bitrate_bps - 8*st->Fs/frame_size ) * 4/5; + /* Don't let SILK use more than 80% */ + if( st->silk_mode.bitRate > total_bitRate * 4/5 ) { + st->silk_mode.bitRate = total_bitRate * 4/5; } + if (!st->energy_masking) + { + /* Increasingly attenuate high band when it gets allocated fewer bits */ + celt_rate = total_bitRate - st->silk_mode.bitRate; + HB_gain_ref = (curr_bandwidth == OPUS_BANDWIDTH_SUPERWIDEBAND) ? 3000 : 3600; + HB_gain = SHL32((opus_val32)celt_rate, 9) / SHR32((opus_val32)celt_rate + st->stream_channels * HB_gain_ref, 6); + HB_gain = HB_gain < Q15ONE*6/7 ? HB_gain + Q15ONE/7 : Q15ONE; + } + } else { + /* SILK gets all bits */ + st->silk_mode.bitRate = total_bitRate; + } + + /* Surround masking for SILK */ + if (st->energy_masking && st->use_vbr && !st->lfe) + { + opus_val32 mask_sum=0; + opus_val16 masking_depth; + opus_int32 rate_offset; + int c; + int end = 17; + opus_int16 srate = 16000; + if (st->bandwidth == OPUS_BANDWIDTH_NARROWBAND) + { + end = 13; + srate = 8000; + } else if (st->bandwidth == OPUS_BANDWIDTH_MEDIUMBAND) + { + end = 15; + srate = 12000; + } + for (c=0;cchannels;c++) + { + for(i=0;ienergy_masking[21*c+i], + QCONST16(.5f, DB_SHIFT)), -QCONST16(2.0f, DB_SHIFT)); + if (mask > 0) + mask = HALF16(mask); + mask_sum += mask; + } + } + /* Conservative rate reduction, we cut the masking in half */ + masking_depth = mask_sum / end*st->channels; + masking_depth += QCONST16(.2f, DB_SHIFT); + rate_offset = (opus_int32)PSHR32(MULT16_16(srate, masking_depth), DB_SHIFT); + rate_offset = MAX32(rate_offset, -2*st->silk_mode.bitRate/3); + /* Split the rate change between the SILK and CELT part for hybrid. */ + if (st->bandwidth==OPUS_BANDWIDTH_SUPERWIDEBAND || st->bandwidth==OPUS_BANDWIDTH_FULLBAND) + st->silk_mode.bitRate += 3*rate_offset/5; + else + st->silk_mode.bitRate += rate_offset; + bytes_target += rate_offset * frame_size / (8 * st->Fs); } st->silk_mode.payloadSize_ms = 1000 * frame_size / st->Fs; @@ -955,6 +1589,18 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s if (prefill) { opus_int32 zero=0; + int prefill_offset; + /* Use a smooth onset for the SILK prefill to avoid the encoder trying to encode + a discontinuity. The exact location is what we need to avoid leaving any "gap" + in the audio when mixing with the redundant CELT frame. Here we can afford to + overwrite st->delay_buffer because the only thing that uses it before it gets + rewritten is tmp_prefill[] and even then only the part after the ramp really + gets used (rather than sent to the encoder and discarded) */ + prefill_offset = st->channels*(st->encoder_buffer-st->delay_compensation-st->Fs/400); + gain_fade(st->delay_buffer+prefill_offset, st->delay_buffer+prefill_offset, + 0, Q15ONE, celt_mode->overlap, st->Fs/400, st->channels, celt_mode->window, st->Fs); + for(i=0;idelay_buffer[i]=0; #ifdef FIXED_POINT pcm_silk = st->delay_buffer; #else @@ -965,10 +1611,10 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s } #ifdef FIXED_POINT - pcm_silk = pcm_buf+delay_compensation*st->channels; + pcm_silk = pcm_buf+total_buffer*st->channels; #else for (i=0;ichannels;i++) - pcm_silk[i] = FLOAT2INT16(pcm_buf[delay_compensation*st->channels + i]); + pcm_silk[i] = FLOAT2INT16(pcm_buf[total_buffer*st->channels + i]); #endif ret = silk_Encode( silk_enc, &st->silk_mode, pcm_silk, frame_size, &enc, &nBytes, 0 ); if( ret ) { @@ -1033,9 +1679,12 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s celt_encoder_ctl(celt_enc, OPUS_SET_BITRATE(OPUS_BITRATE_MAX)); if (st->mode != MODE_SILK_ONLY) { + opus_val32 celt_pred=2; celt_encoder_ctl(celt_enc, OPUS_SET_VBR(0)); - /* Allow prediction unless we decide to disable it later */ - celt_encoder_ctl(celt_enc, CELT_SET_PREDICTION(2)); + /* We may still decide to disable prediction later */ + if (st->silk_mode.reducedDependency) + celt_pred = 0; + celt_encoder_ctl(celt_enc, CELT_SET_PREDICTION(celt_pred)); if (st->mode == MODE_HYBRID) { @@ -1053,9 +1702,18 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s } else { if (st->use_vbr) { + opus_int32 bonus=0; +#ifndef DISABLE_FLOAT_API + if (st->variable_duration==OPUS_FRAMESIZE_VARIABLE && frame_size != st->Fs/50) + { + bonus = (60*st->stream_channels+40)*(st->Fs/frame_size-50); + if (analysis_info.valid) + bonus = (opus_int32)(bonus*(1.f+.5f*analysis_info.tonality)); + } +#endif celt_encoder_ctl(celt_enc, OPUS_SET_VBR(1)); celt_encoder_ctl(celt_enc, OPUS_SET_VBR_CONSTRAINT(st->vbr_constraint)); - celt_encoder_ctl(celt_enc, OPUS_SET_BITRATE(st->bitrate_bps)); + celt_encoder_ctl(celt_enc, OPUS_SET_BITRATE(st->bitrate_bps+bonus)); nb_compr_bytes = max_data_bytes-1-redundancy_bytes; } else { nb_compr_bytes = bytes_target; @@ -1070,24 +1728,27 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s if (st->mode != MODE_SILK_ONLY && st->mode != st->prev_mode && st->prev_mode > 0) { for (i=0;ichannels*st->Fs/400;i++) - tmp_prefill[i] = st->delay_buffer[(st->encoder_buffer-st->delay_compensation-st->Fs/400)*st->channels + i]; + tmp_prefill[i] = st->delay_buffer[(st->encoder_buffer-total_buffer-st->Fs/400)*st->channels + i]; } - for (i=0;ichannels*(st->encoder_buffer-(frame_size+delay_compensation));i++) + for (i=0;ichannels*(st->encoder_buffer-(frame_size+total_buffer));i++) st->delay_buffer[i] = st->delay_buffer[i+st->channels*frame_size]; for (;iencoder_buffer*st->channels;i++) - st->delay_buffer[i] = pcm_buf[(frame_size+delay_compensation-st->encoder_buffer)*st->channels+i]; - + st->delay_buffer[i] = pcm_buf[(frame_size+total_buffer-st->encoder_buffer)*st->channels+i]; + /* gain_fade() and stereo_fade() need to be after the buffer copying + because we don't want any of this to affect the SILK part */ + if( st->prev_HB_gain < Q15ONE || HB_gain < Q15ONE ) { + gain_fade(pcm_buf, pcm_buf, + st->prev_HB_gain, HB_gain, celt_mode->overlap, frame_size, st->channels, celt_mode->window, st->Fs); + } + st->prev_HB_gain = HB_gain; if (st->mode != MODE_HYBRID || st->stream_channels==1) - st->silk_mode.stereoWidth_Q14 = 1<<14; - if( st->channels == 2 ) { + st->silk_mode.stereoWidth_Q14 = IMIN((1<<14),2*IMAX(0,equiv_rate-30000)); + if( !st->energy_masking && st->channels == 2 ) { /* Apply stereo width reduction (at low bitrates) */ if( st->hybrid_stereo_width_Q14 < (1 << 14) || st->silk_mode.stereoWidth_Q14 < (1 << 14) ) { opus_val16 g1, g2; - const CELTMode *celt_mode; - - celt_encoder_ctl(celt_enc, CELT_GET_MODE(&celt_mode)); g1 = st->hybrid_stereo_width_Q14; g2 = (opus_val16)(st->silk_mode.stereoWidth_Q14); #ifdef FIXED_POINT @@ -1113,7 +1774,7 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s int max_redundancy; ec_enc_bit_logp(&enc, celt_to_silk, 1); if (st->mode == MODE_HYBRID) - max_redundancy = (max_data_bytes-1)-nb_compr_bytes-1; + max_redundancy = (max_data_bytes-1)-nb_compr_bytes; else max_redundancy = (max_data_bytes-1)-((ec_tell(&enc)+7)>>3); /* Target the same bit-rate for redundancy as for the rest, @@ -1144,6 +1805,10 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s ec_enc_shrink(&enc, nb_compr_bytes); } +#ifndef DISABLE_FLOAT_API + if (redundancy || st->mode != MODE_SILK_ONLY) + celt_encoder_ctl(celt_enc, CELT_SET_ANALYSIS(&analysis_info)); +#endif /* 5 ms redundant frame for CELT->SILK */ if (redundancy && celt_to_silk) @@ -1252,9 +1917,10 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s } /* Count ToC and redundancy */ ret += 1+redundancy_bytes; - if (!st->use_vbr && ret >= 3) + if (!st->use_vbr) { - if (pad_frame(data, ret, max_data_bytes)) + if (opus_packet_pad(data, ret, max_data_bytes) != OPUS_OK) + { RESTORE_STACK; return OPUS_INTERNAL_ERROR; @@ -1268,45 +1934,93 @@ opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_s #ifdef FIXED_POINT #ifndef DISABLE_FLOAT_API -opus_int32 opus_encode_float(OpusEncoder *st, const float *pcm, int frame_size, +opus_int32 opus_encode_float(OpusEncoder *st, const float *pcm, int analysis_frame_size, unsigned char *data, opus_int32 max_data_bytes) { int i, ret; + int frame_size; + int delay_compensation; VARDECL(opus_int16, in); ALLOC_STACK; - if(frame_size<0) - { - RESTORE_STACK; - return OPUS_BAD_ARG; - } + if (st->application == OPUS_APPLICATION_RESTRICTED_LOWDELAY) + delay_compensation = 0; + else + delay_compensation = st->delay_compensation; + frame_size = compute_frame_size(pcm, analysis_frame_size, + st->variable_duration, st->channels, st->Fs, st->bitrate_bps, + delay_compensation, downmix_float, st->analysis.subframe_mem); ALLOC(in, frame_size*st->channels, opus_int16); for (i=0;ichannels;i++) in[i] = FLOAT2INT16(pcm[i]); - ret = opus_encode(st, in, frame_size, data, max_data_bytes); + ret = opus_encode_native(st, in, frame_size, data, max_data_bytes, 16, pcm, analysis_frame_size, 0, -2, st->channels, downmix_float); RESTORE_STACK; return ret; } #endif +opus_int32 opus_encode(OpusEncoder *st, const opus_int16 *pcm, int analysis_frame_size, + unsigned char *data, opus_int32 out_data_bytes) +{ + int frame_size; + int delay_compensation; + if (st->application == OPUS_APPLICATION_RESTRICTED_LOWDELAY) + delay_compensation = 0; + else + delay_compensation = st->delay_compensation; + frame_size = compute_frame_size(pcm, analysis_frame_size, + st->variable_duration, st->channels, st->Fs, st->bitrate_bps, + delay_compensation, downmix_int +#ifndef DISABLE_FLOAT_API + , st->analysis.subframe_mem +#endif + ); + return opus_encode_native(st, pcm, frame_size, data, out_data_bytes, 16, pcm, analysis_frame_size, 0, -2, st->channels, downmix_int); +} + #else -opus_int32 opus_encode(OpusEncoder *st, const opus_int16 *pcm, int frame_size, +opus_int32 opus_encode(OpusEncoder *st, const opus_int16 *pcm, int analysis_frame_size, unsigned char *data, opus_int32 max_data_bytes) { int i, ret; + int frame_size; + int delay_compensation; VARDECL(float, in); ALLOC_STACK; + if (st->application == OPUS_APPLICATION_RESTRICTED_LOWDELAY) + delay_compensation = 0; + else + delay_compensation = st->delay_compensation; + frame_size = compute_frame_size(pcm, analysis_frame_size, + st->variable_duration, st->channels, st->Fs, st->bitrate_bps, + delay_compensation, downmix_int, st->analysis.subframe_mem); + ALLOC(in, frame_size*st->channels, float); for (i=0;ichannels;i++) in[i] = (1.0f/32768)*pcm[i]; - ret = opus_encode_float(st, in, frame_size, data, max_data_bytes); + ret = opus_encode_native(st, in, frame_size, data, max_data_bytes, 16, pcm, analysis_frame_size, 0, -2, st->channels, downmix_int); RESTORE_STACK; return ret; } +opus_int32 opus_encode_float(OpusEncoder *st, const float *pcm, int analysis_frame_size, + unsigned char *data, opus_int32 out_data_bytes) +{ + int frame_size; + int delay_compensation; + if (st->application == OPUS_APPLICATION_RESTRICTED_LOWDELAY) + delay_compensation = 0; + else + delay_compensation = st->delay_compensation; + frame_size = compute_frame_size(pcm, analysis_frame_size, + st->variable_duration, st->channels, st->Fs, st->bitrate_bps, + delay_compensation, downmix_float, st->analysis.subframe_mem); + return opus_encode_native(st, pcm, frame_size, data, out_data_bytes, 24, + pcm, analysis_frame_size, 0, -2, st->channels, downmix_float); +} #endif @@ -1339,6 +2053,10 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) case OPUS_GET_APPLICATION_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } *value = st->application; } break; @@ -1360,6 +2078,10 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) case OPUS_GET_BITRATE_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } *value = user_bitrate_to_bitrate(st, st->prev_framesize, 1276); } break; @@ -1367,21 +2089,29 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) { opus_int32 value = va_arg(ap, opus_int32); if((value<1 || value>st->channels) && value != OPUS_AUTO) - return OPUS_BAD_ARG; + { + goto bad_arg; + } st->force_channels = value; } break; case OPUS_GET_FORCE_CHANNELS_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } *value = st->force_channels; } break; case OPUS_SET_MAX_BANDWIDTH_REQUEST: { opus_int32 value = va_arg(ap, opus_int32); - if (value < OPUS_BANDWIDTH_NARROWBAND || value > OPUS_BANDWIDTH_FULLBAND) - return OPUS_BAD_ARG; + if (value < OPUS_BANDWIDTH_NARROWBAND || value > OPUS_BANDWIDTH_FULLBAND) + { + goto bad_arg; + } st->max_bandwidth = value; if (st->max_bandwidth == OPUS_BANDWIDTH_NARROWBAND) { st->silk_mode.maxInternalSampleRate = 8000; @@ -1395,6 +2125,10 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) case OPUS_GET_MAX_BANDWIDTH_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } *value = st->max_bandwidth; } break; @@ -1402,7 +2136,9 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) { opus_int32 value = va_arg(ap, opus_int32); if ((value < OPUS_BANDWIDTH_NARROWBAND || value > OPUS_BANDWIDTH_FULLBAND) && value != OPUS_AUTO) - return OPUS_BAD_ARG; + { + goto bad_arg; + } st->user_bandwidth = value; if (st->user_bandwidth == OPUS_BANDWIDTH_NARROWBAND) { st->silk_mode.maxInternalSampleRate = 8000; @@ -1416,6 +2152,10 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) case OPUS_GET_BANDWIDTH_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } *value = st->bandwidth; } break; @@ -1423,13 +2163,19 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) { opus_int32 value = va_arg(ap, opus_int32); if(value<0 || value>1) - return OPUS_BAD_ARG; + { + goto bad_arg; + } st->silk_mode.useDTX = value; } break; case OPUS_GET_DTX_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } *value = st->silk_mode.useDTX; } break; @@ -1437,7 +2183,9 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) { opus_int32 value = va_arg(ap, opus_int32); if(value<0 || value>10) - return OPUS_BAD_ARG; + { + goto bad_arg; + } st->silk_mode.complexity = value; celt_encoder_ctl(celt_enc, OPUS_SET_COMPLEXITY(value)); } @@ -1445,6 +2193,10 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) case OPUS_GET_COMPLEXITY_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } *value = st->silk_mode.complexity; } break; @@ -1452,13 +2204,19 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) { opus_int32 value = va_arg(ap, opus_int32); if(value<0 || value>1) - return OPUS_BAD_ARG; + { + goto bad_arg; + } st->silk_mode.useInBandFEC = value; } break; case OPUS_GET_INBAND_FEC_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } *value = st->silk_mode.useInBandFEC; } break; @@ -1466,7 +2224,9 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) { opus_int32 value = va_arg(ap, opus_int32); if (value < 0 || value > 100) - return OPUS_BAD_ARG; + { + goto bad_arg; + } st->silk_mode.packetLossPercentage = value; celt_encoder_ctl(celt_enc, OPUS_SET_PACKET_LOSS_PERC(value)); } @@ -1474,6 +2234,10 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) case OPUS_GET_PACKET_LOSS_PERC_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } *value = st->silk_mode.packetLossPercentage; } break; @@ -1481,7 +2245,9 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) { opus_int32 value = va_arg(ap, opus_int32); if(value<0 || value>1) - return OPUS_BAD_ARG; + { + goto bad_arg; + } st->use_vbr = value; st->silk_mode.useCBR = 1-value; } @@ -1489,20 +2255,30 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) case OPUS_GET_VBR_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } *value = st->use_vbr; } break; case OPUS_SET_VOICE_RATIO_REQUEST: { opus_int32 value = va_arg(ap, opus_int32); - if (value>100 || value<-1) - goto bad_arg; + if (value<-1 || value>100) + { + goto bad_arg; + } st->voice_ratio = value; } break; case OPUS_GET_VOICE_RATIO_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } *value = st->voice_ratio; } break; @@ -1510,13 +2286,19 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) { opus_int32 value = va_arg(ap, opus_int32); if(value<0 || value>1) - return OPUS_BAD_ARG; + { + goto bad_arg; + } st->vbr_constraint = value; } break; case OPUS_GET_VBR_CONSTRAINT_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } *value = st->vbr_constraint; } break; @@ -1524,19 +2306,29 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) { opus_int32 value = va_arg(ap, opus_int32); if(value!=OPUS_AUTO && value!=OPUS_SIGNAL_VOICE && value!=OPUS_SIGNAL_MUSIC) - return OPUS_BAD_ARG; + { + goto bad_arg; + } st->signal_type = value; } break; case OPUS_GET_SIGNAL_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } *value = st->signal_type; } break; case OPUS_GET_LOOKAHEAD_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } *value = st->Fs/400; if (st->application != OPUS_APPLICATION_RESTRICTED_LOWDELAY) *value += st->delay_compensation; @@ -1545,10 +2337,9 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) case OPUS_GET_SAMPLE_RATE_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); - if (value==NULL) + if (!value) { - ret = OPUS_BAD_ARG; - break; + goto bad_arg; } *value = st->Fs; } @@ -1556,19 +2347,71 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) case OPUS_GET_FINAL_RANGE_REQUEST: { opus_uint32 *value = va_arg(ap, opus_uint32*); + if (!value) + { + goto bad_arg; + } *value = st->rangeFinal; } break; case OPUS_SET_LSB_DEPTH_REQUEST: { opus_int32 value = va_arg(ap, opus_int32); - ret = celt_encoder_ctl(celt_enc, OPUS_SET_LSB_DEPTH(value)); + if (value<8 || value>24) + { + goto bad_arg; + } + st->lsb_depth=value; } break; case OPUS_GET_LSB_DEPTH_REQUEST: { opus_int32 *value = va_arg(ap, opus_int32*); - celt_encoder_ctl(celt_enc, OPUS_GET_LSB_DEPTH(value)); + if (!value) + { + goto bad_arg; + } + *value = st->lsb_depth; + } + break; + case OPUS_SET_EXPERT_FRAME_DURATION_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if (value != OPUS_FRAMESIZE_ARG && value != OPUS_FRAMESIZE_2_5_MS && + value != OPUS_FRAMESIZE_5_MS && value != OPUS_FRAMESIZE_10_MS && + value != OPUS_FRAMESIZE_20_MS && value != OPUS_FRAMESIZE_40_MS && + value != OPUS_FRAMESIZE_60_MS && value != OPUS_FRAMESIZE_VARIABLE) + { + goto bad_arg; + } + st->variable_duration = value; + celt_encoder_ctl(celt_enc, OPUS_SET_EXPERT_FRAME_DURATION(value)); + } + break; + case OPUS_GET_EXPERT_FRAME_DURATION_REQUEST: + { + opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } + *value = st->variable_duration; + } + break; + case OPUS_SET_PREDICTION_DISABLED_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + if (value > 1 || value < 0) + goto bad_arg; + st->silk_mode.reducedDependency = value; + } + break; + case OPUS_GET_PREDICTION_DISABLED_REQUEST: + { + opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + goto bad_arg; + *value = st->silk_mode.reducedDependency; } break; case OPUS_RESET_STATE: @@ -1582,9 +2425,10 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) ((char*)&st->OPUS_ENCODER_RESET_START - (char*)st)); celt_encoder_ctl(celt_enc, OPUS_RESET_STATE); - silk_InitEncoder( silk_enc, &dummy ); + silk_InitEncoder( silk_enc, st->arch, &dummy ); st->stream_channels = st->channels; st->hybrid_stereo_width_Q14 = 1 << 14; + st->prev_HB_gain = Q15ONE; st->first = 1; st->mode = MODE_HYBRID; st->bandwidth = OPUS_BANDWIDTH_FULLBAND; @@ -1595,10 +2439,37 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...) { opus_int32 value = va_arg(ap, opus_int32); if ((value < MODE_SILK_ONLY || value > MODE_CELT_ONLY) && value != OPUS_AUTO) + { goto bad_arg; + } st->user_forced_mode = value; } break; + case OPUS_SET_LFE_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + st->lfe = value; + ret = celt_encoder_ctl(celt_enc, OPUS_SET_LFE(value)); + } + break; + case OPUS_SET_ENERGY_MASK_REQUEST: + { + opus_val16 *value = va_arg(ap, opus_val16*); + st->energy_masking = value; + ret = celt_encoder_ctl(celt_enc, OPUS_SET_ENERGY_MASK(value)); + } + break; + + case CELT_GET_MODE_REQUEST: + { + const CELTMode ** value = va_arg(ap, const CELTMode**); + if (!value) + { + goto bad_arg; + } + ret = celt_encoder_ctl(celt_enc, CELT_GET_MODE(value)); + } + break; default: /* fprintf(stderr, "unknown opus_encoder_ctl() request: %d", request);*/ ret = OPUS_UNIMPLEMENTED; diff --git a/code/opus-1.1/src/opus_multistream.c b/code/opus-1.1/src/opus_multistream.c new file mode 100644 index 00000000..09c3639b --- /dev/null +++ b/code/opus-1.1/src/opus_multistream.c @@ -0,0 +1,92 @@ +/* Copyright (c) 2011 Xiph.Org Foundation + Written 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. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_multistream.h" +#include "opus.h" +#include "opus_private.h" +#include "stack_alloc.h" +#include +#include "float_cast.h" +#include "os_support.h" + + +int validate_layout(const ChannelLayout *layout) +{ + int i, max_channel; + + max_channel = layout->nb_streams+layout->nb_coupled_streams; + if (max_channel>255) + return 0; + for (i=0;inb_channels;i++) + { + if (layout->mapping[i] >= max_channel && layout->mapping[i] != 255) + return 0; + } + return 1; +} + + +int get_left_channel(const ChannelLayout *layout, int stream_id, int prev) +{ + int i; + i = (prev<0) ? 0 : prev+1; + for (;inb_channels;i++) + { + if (layout->mapping[i]==stream_id*2) + return i; + } + return -1; +} + +int get_right_channel(const ChannelLayout *layout, int stream_id, int prev) +{ + int i; + i = (prev<0) ? 0 : prev+1; + for (;inb_channels;i++) + { + if (layout->mapping[i]==stream_id*2+1) + return i; + } + return -1; +} + +int get_mono_channel(const ChannelLayout *layout, int stream_id, int prev) +{ + int i; + i = (prev<0) ? 0 : prev+1; + for (;inb_channels;i++) + { + if (layout->mapping[i]==stream_id+layout->nb_coupled_streams) + return i; + } + return -1; +} + diff --git a/code/opus-1.1/src/opus_multistream_decoder.c b/code/opus-1.1/src/opus_multistream_decoder.c new file mode 100644 index 00000000..a05fa1e7 --- /dev/null +++ b/code/opus-1.1/src/opus_multistream_decoder.c @@ -0,0 +1,537 @@ +/* Copyright (c) 2011 Xiph.Org Foundation + Written 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. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_multistream.h" +#include "opus.h" +#include "opus_private.h" +#include "stack_alloc.h" +#include +#include "float_cast.h" +#include "os_support.h" + +struct OpusMSDecoder { + ChannelLayout layout; + /* Decoder states go here */ +}; + + + + +/* DECODER */ + +opus_int32 opus_multistream_decoder_get_size(int nb_streams, int nb_coupled_streams) +{ + int coupled_size; + int mono_size; + + if(nb_streams<1||nb_coupled_streams>nb_streams||nb_coupled_streams<0)return 0; + coupled_size = opus_decoder_get_size(2); + mono_size = opus_decoder_get_size(1); + return align(sizeof(OpusMSDecoder)) + + nb_coupled_streams * align(coupled_size) + + (nb_streams-nb_coupled_streams) * align(mono_size); +} + +int opus_multistream_decoder_init( + OpusMSDecoder *st, + opus_int32 Fs, + int channels, + int streams, + int coupled_streams, + const unsigned char *mapping +) +{ + int coupled_size; + int mono_size; + int i, ret; + char *ptr; + + if ((channels>255) || (channels<1) || (coupled_streams>streams) || + (coupled_streams+streams>255) || (streams<1) || (coupled_streams<0)) + return OPUS_BAD_ARG; + + st->layout.nb_channels = channels; + st->layout.nb_streams = streams; + st->layout.nb_coupled_streams = coupled_streams; + + for (i=0;ilayout.nb_channels;i++) + st->layout.mapping[i] = mapping[i]; + if (!validate_layout(&st->layout)) + return OPUS_BAD_ARG; + + ptr = (char*)st + align(sizeof(OpusMSDecoder)); + coupled_size = opus_decoder_get_size(2); + mono_size = opus_decoder_get_size(1); + + for (i=0;ilayout.nb_coupled_streams;i++) + { + ret=opus_decoder_init((OpusDecoder*)ptr, Fs, 2); + if(ret!=OPUS_OK)return ret; + ptr += align(coupled_size); + } + for (;ilayout.nb_streams;i++) + { + ret=opus_decoder_init((OpusDecoder*)ptr, Fs, 1); + if(ret!=OPUS_OK)return ret; + ptr += align(mono_size); + } + return OPUS_OK; +} + + +OpusMSDecoder *opus_multistream_decoder_create( + opus_int32 Fs, + int channels, + int streams, + int coupled_streams, + const unsigned char *mapping, + int *error +) +{ + int ret; + OpusMSDecoder *st; + if ((channels>255) || (channels<1) || (coupled_streams>streams) || + (coupled_streams+streams>255) || (streams<1) || (coupled_streams<0)) + { + if (error) + *error = OPUS_BAD_ARG; + return NULL; + } + st = (OpusMSDecoder *)opus_alloc(opus_multistream_decoder_get_size(streams, coupled_streams)); + if (st==NULL) + { + if (error) + *error = OPUS_ALLOC_FAIL; + return NULL; + } + ret = opus_multistream_decoder_init(st, Fs, channels, streams, coupled_streams, mapping); + if (error) + *error = ret; + if (ret != OPUS_OK) + { + opus_free(st); + st = NULL; + } + return st; +} + +typedef void (*opus_copy_channel_out_func)( + void *dst, + int dst_stride, + int dst_channel, + const opus_val16 *src, + int src_stride, + int frame_size +); + +static int opus_multistream_packet_validate(const unsigned char *data, + opus_int32 len, int nb_streams, opus_int32 Fs) +{ + int s; + int count; + unsigned char toc; + opus_int16 size[48]; + int samples=0; + opus_int32 packet_offset; + + for (s=0;slayout.nb_streams-1) + { + RESTORE_STACK; + return OPUS_INVALID_PACKET; + } + if (!do_plc) + { + int ret = opus_multistream_packet_validate(data, len, st->layout.nb_streams, Fs); + if (ret < 0) + { + RESTORE_STACK; + return ret; + } else if (ret > frame_size) + { + RESTORE_STACK; + return OPUS_BUFFER_TOO_SMALL; + } + } + for (s=0;slayout.nb_streams;s++) + { + OpusDecoder *dec; + int packet_offset, ret; + + dec = (OpusDecoder*)ptr; + ptr += (s < st->layout.nb_coupled_streams) ? align(coupled_size) : align(mono_size); + + if (!do_plc && len<=0) + { + RESTORE_STACK; + return OPUS_INTERNAL_ERROR; + } + packet_offset = 0; + ret = opus_decode_native(dec, data, len, buf, frame_size, decode_fec, s!=st->layout.nb_streams-1, &packet_offset, soft_clip); + data += packet_offset; + len -= packet_offset; + if (ret <= 0) + { + RESTORE_STACK; + return ret; + } + frame_size = ret; + if (s < st->layout.nb_coupled_streams) + { + int chan, prev; + prev = -1; + /* Copy "left" audio to the channel(s) where it belongs */ + while ( (chan = get_left_channel(&st->layout, s, prev)) != -1) + { + (*copy_channel_out)(pcm, st->layout.nb_channels, chan, + buf, 2, frame_size); + prev = chan; + } + prev = -1; + /* Copy "right" audio to the channel(s) where it belongs */ + while ( (chan = get_right_channel(&st->layout, s, prev)) != -1) + { + (*copy_channel_out)(pcm, st->layout.nb_channels, chan, + buf+1, 2, frame_size); + prev = chan; + } + } else { + int chan, prev; + prev = -1; + /* Copy audio to the channel(s) where it belongs */ + while ( (chan = get_mono_channel(&st->layout, s, prev)) != -1) + { + (*copy_channel_out)(pcm, st->layout.nb_channels, chan, + buf, 1, frame_size); + prev = chan; + } + } + } + /* Handle muted channels */ + for (c=0;clayout.nb_channels;c++) + { + if (st->layout.mapping[c] == 255) + { + (*copy_channel_out)(pcm, st->layout.nb_channels, c, + NULL, 0, frame_size); + } + } + RESTORE_STACK; + return frame_size; +} + +#if !defined(DISABLE_FLOAT_API) +static void opus_copy_channel_out_float( + void *dst, + int dst_stride, + int dst_channel, + const opus_val16 *src, + int src_stride, + int frame_size +) +{ + float *float_dst; + opus_int32 i; + float_dst = (float*)dst; + if (src != NULL) + { + for (i=0;ilayout.nb_streams;s++) + { + OpusDecoder *dec; + dec = (OpusDecoder*)ptr; + if (s < st->layout.nb_coupled_streams) + ptr += align(coupled_size); + else + ptr += align(mono_size); + ret = opus_decoder_ctl(dec, request, &tmp); + if (ret != OPUS_OK) break; + *value ^= tmp; + } + } + break; + case OPUS_RESET_STATE: + { + int s; + for (s=0;slayout.nb_streams;s++) + { + OpusDecoder *dec; + + dec = (OpusDecoder*)ptr; + if (s < st->layout.nb_coupled_streams) + ptr += align(coupled_size); + else + ptr += align(mono_size); + ret = opus_decoder_ctl(dec, OPUS_RESET_STATE); + if (ret != OPUS_OK) + break; + } + } + break; + case OPUS_MULTISTREAM_GET_DECODER_STATE_REQUEST: + { + int s; + opus_int32 stream_id; + OpusDecoder **value; + stream_id = va_arg(ap, opus_int32); + if (stream_id<0 || stream_id >= st->layout.nb_streams) + ret = OPUS_BAD_ARG; + value = va_arg(ap, OpusDecoder**); + if (!value) + { + goto bad_arg; + } + for (s=0;slayout.nb_coupled_streams) + ptr += align(coupled_size); + else + ptr += align(mono_size); + } + *value = (OpusDecoder*)ptr; + } + break; + case OPUS_SET_GAIN_REQUEST: + { + int s; + /* This works for int32 params */ + opus_int32 value = va_arg(ap, opus_int32); + for (s=0;slayout.nb_streams;s++) + { + OpusDecoder *dec; + + dec = (OpusDecoder*)ptr; + if (s < st->layout.nb_coupled_streams) + ptr += align(coupled_size); + else + ptr += align(mono_size); + ret = opus_decoder_ctl(dec, request, value); + if (ret != OPUS_OK) + break; + } + } + break; + default: + ret = OPUS_UNIMPLEMENTED; + break; + } + + va_end(ap); + return ret; +bad_arg: + va_end(ap); + return OPUS_BAD_ARG; +} + + +void opus_multistream_decoder_destroy(OpusMSDecoder *st) +{ + opus_free(st); +} diff --git a/code/opus-1.1/src/opus_multistream_encoder.c b/code/opus-1.1/src/opus_multistream_encoder.c new file mode 100644 index 00000000..49e27913 --- /dev/null +++ b/code/opus-1.1/src/opus_multistream_encoder.c @@ -0,0 +1,1174 @@ +/* Copyright (c) 2011 Xiph.Org Foundation + Written 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. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_multistream.h" +#include "opus.h" +#include "opus_private.h" +#include "stack_alloc.h" +#include +#include "float_cast.h" +#include "os_support.h" +#include "mathops.h" +#include "mdct.h" +#include "modes.h" +#include "bands.h" +#include "quant_bands.h" + +typedef struct { + int nb_streams; + int nb_coupled_streams; + unsigned char mapping[8]; +} VorbisLayout; + +/* Index is nb_channel-1*/ +static const VorbisLayout vorbis_mappings[8] = { + {1, 0, {0}}, /* 1: mono */ + {1, 1, {0, 1}}, /* 2: stereo */ + {2, 1, {0, 2, 1}}, /* 3: 1-d surround */ + {2, 2, {0, 1, 2, 3}}, /* 4: quadraphonic surround */ + {3, 2, {0, 4, 1, 2, 3}}, /* 5: 5-channel surround */ + {4, 2, {0, 4, 1, 2, 3, 5}}, /* 6: 5.1 surround */ + {4, 3, {0, 4, 1, 2, 3, 5, 6}}, /* 7: 6.1 surround */ + {5, 3, {0, 6, 1, 2, 3, 4, 5, 7}}, /* 8: 7.1 surround */ +}; + +typedef void (*opus_copy_channel_in_func)( + opus_val16 *dst, + int dst_stride, + const void *src, + int src_stride, + int src_channel, + int frame_size +); + +struct OpusMSEncoder { + ChannelLayout layout; + int lfe_stream; + int application; + int variable_duration; + int surround; + opus_int32 bitrate_bps; + float subframe_mem[3]; + /* Encoder states go here */ + /* then opus_val32 window_mem[channels*120]; */ + /* then opus_val32 preemph_mem[channels]; */ +}; + +static opus_val32 *ms_get_preemph_mem(OpusMSEncoder *st) +{ + int s; + char *ptr; + int coupled_size, mono_size; + + coupled_size = opus_encoder_get_size(2); + mono_size = opus_encoder_get_size(1); + ptr = (char*)st + align(sizeof(OpusMSEncoder)); + for (s=0;slayout.nb_streams;s++) + { + if (s < st->layout.nb_coupled_streams) + ptr += align(coupled_size); + else + ptr += align(mono_size); + } + return (opus_val32*)(ptr+st->layout.nb_channels*120*sizeof(opus_val32)); +} + +static opus_val32 *ms_get_window_mem(OpusMSEncoder *st) +{ + int s; + char *ptr; + int coupled_size, mono_size; + + coupled_size = opus_encoder_get_size(2); + mono_size = opus_encoder_get_size(1); + ptr = (char*)st + align(sizeof(OpusMSEncoder)); + for (s=0;slayout.nb_streams;s++) + { + if (s < st->layout.nb_coupled_streams) + ptr += align(coupled_size); + else + ptr += align(mono_size); + } + return (opus_val32*)ptr; +} + +static int validate_encoder_layout(const ChannelLayout *layout) +{ + int s; + for (s=0;snb_streams;s++) + { + if (s < layout->nb_coupled_streams) + { + if (get_left_channel(layout, s, -1)==-1) + return 0; + if (get_right_channel(layout, s, -1)==-1) + return 0; + } else { + if (get_mono_channel(layout, s, -1)==-1) + return 0; + } + } + return 1; +} + +static void channel_pos(int channels, int pos[8]) +{ + /* Position in the mix: 0 don't mix, 1: left, 2: center, 3:right */ + if (channels==4) + { + pos[0]=1; + pos[1]=3; + pos[2]=1; + pos[3]=3; + } else if (channels==3||channels==5||channels==6) + { + pos[0]=1; + pos[1]=2; + pos[2]=3; + pos[3]=1; + pos[4]=3; + pos[5]=0; + } else if (channels==7) + { + pos[0]=1; + pos[1]=2; + pos[2]=3; + pos[3]=1; + pos[4]=3; + pos[5]=2; + pos[6]=0; + } else if (channels==8) + { + pos[0]=1; + pos[1]=2; + pos[2]=3; + pos[3]=1; + pos[4]=3; + pos[5]=1; + pos[6]=3; + pos[7]=0; + } +} + +#if 1 +/* Computes a rough approximation of log2(2^a + 2^b) */ +static opus_val16 logSum(opus_val16 a, opus_val16 b) +{ + opus_val16 max; + opus_val32 diff; + opus_val16 frac; + static const opus_val16 diff_table[17] = { + QCONST16(0.5000000f, DB_SHIFT), QCONST16(0.2924813f, DB_SHIFT), QCONST16(0.1609640f, DB_SHIFT), QCONST16(0.0849625f, DB_SHIFT), + QCONST16(0.0437314f, DB_SHIFT), QCONST16(0.0221971f, DB_SHIFT), QCONST16(0.0111839f, DB_SHIFT), QCONST16(0.0056136f, DB_SHIFT), + QCONST16(0.0028123f, DB_SHIFT) + }; + int low; + if (a>b) + { + max = a; + diff = SUB32(EXTEND32(a),EXTEND32(b)); + } else { + max = b; + diff = SUB32(EXTEND32(b),EXTEND32(a)); + } + if (diff >= QCONST16(8.f, DB_SHIFT)) + return max; +#ifdef FIXED_POINT + low = SHR32(diff, DB_SHIFT-1); + frac = SHL16(diff - SHL16(low, DB_SHIFT-1), 16-DB_SHIFT); +#else + low = (int)floor(2*diff); + frac = 2*diff - low; +#endif + return max + diff_table[low] + MULT16_16_Q15(frac, SUB16(diff_table[low+1], diff_table[low])); +} +#else +opus_val16 logSum(opus_val16 a, opus_val16 b) +{ + return log2(pow(4, a)+ pow(4, b))/2; +} +#endif + +void surround_analysis(const CELTMode *celt_mode, const void *pcm, opus_val16 *bandLogE, opus_val32 *mem, opus_val32 *preemph_mem, + int len, int overlap, int channels, int rate, opus_copy_channel_in_func copy_channel_in +) +{ + int c; + int i; + int LM; + int pos[8] = {0}; + int upsample; + int frame_size; + opus_val16 channel_offset; + opus_val32 bandE[21]; + opus_val16 maskLogE[3][21]; + VARDECL(opus_val32, in); + VARDECL(opus_val16, x); + VARDECL(opus_val32, freq); + SAVE_STACK; + + upsample = resampling_factor(rate); + frame_size = len*upsample; + + for (LM=0;LMmaxLM;LM++) + if (celt_mode->shortMdctSize<preemph, preemph_mem+c, 0); + clt_mdct_forward(&celt_mode->mdct, in, freq, celt_mode->window, overlap, celt_mode->maxLM-LM, 1); + if (upsample != 1) + { + int bound = len; + for (i=0;i=0;i--) + bandLogE[21*c+i] = MAX16(bandLogE[21*c+i], bandLogE[21*c+i+1]-QCONST16(2.f, DB_SHIFT)); + if (pos[c]==1) + { + for (i=0;i<21;i++) + maskLogE[0][i] = logSum(maskLogE[0][i], bandLogE[21*c+i]); + } else if (pos[c]==3) + { + for (i=0;i<21;i++) + maskLogE[2][i] = logSum(maskLogE[2][i], bandLogE[21*c+i]); + } else if (pos[c]==2) + { + for (i=0;i<21;i++) + { + maskLogE[0][i] = logSum(maskLogE[0][i], bandLogE[21*c+i]-QCONST16(.5f, DB_SHIFT)); + maskLogE[2][i] = logSum(maskLogE[2][i], bandLogE[21*c+i]-QCONST16(.5f, DB_SHIFT)); + } + } +#if 0 + for (i=0;i<21;i++) + printf("%f ", bandLogE[21*c+i]); + float sum=0; + for (i=0;i<21;i++) + sum += bandLogE[21*c+i]; + printf("%f ", sum/21); +#endif + OPUS_COPY(mem+c*overlap, in+frame_size, overlap); + } + for (i=0;i<21;i++) + maskLogE[1][i] = MIN32(maskLogE[0][i],maskLogE[2][i]); + channel_offset = HALF16(celt_log2(QCONST32(2.f,14)/(channels-1))); + for (c=0;c<3;c++) + for (i=0;i<21;i++) + maskLogE[c][i] += channel_offset; +#if 0 + for (c=0;c<3;c++) + { + for (i=0;i<21;i++) + printf("%f ", maskLogE[c][i]); + } +#endif + for (c=0;cnb_streams||nb_coupled_streams<0)return 0; + coupled_size = opus_encoder_get_size(2); + mono_size = opus_encoder_get_size(1); + return align(sizeof(OpusMSEncoder)) + + nb_coupled_streams * align(coupled_size) + + (nb_streams-nb_coupled_streams) * align(mono_size); +} + +opus_int32 opus_multistream_surround_encoder_get_size(int channels, int mapping_family) +{ + int nb_streams; + int nb_coupled_streams; + opus_int32 size; + + if (mapping_family==0) + { + if (channels==1) + { + nb_streams=1; + nb_coupled_streams=0; + } else if (channels==2) + { + nb_streams=1; + nb_coupled_streams=1; + } else + return 0; + } else if (mapping_family==1 && channels<=8 && channels>=1) + { + nb_streams=vorbis_mappings[channels-1].nb_streams; + nb_coupled_streams=vorbis_mappings[channels-1].nb_coupled_streams; + } else if (mapping_family==255) + { + nb_streams=channels; + nb_coupled_streams=0; + } else + return 0; + size = opus_multistream_encoder_get_size(nb_streams, nb_coupled_streams); + if (channels>2) + { + size += channels*(120*sizeof(opus_val32) + sizeof(opus_val32)); + } + return size; +} + + +static int opus_multistream_encoder_init_impl( + OpusMSEncoder *st, + opus_int32 Fs, + int channels, + int streams, + int coupled_streams, + const unsigned char *mapping, + int application, + int surround +) +{ + int coupled_size; + int mono_size; + int i, ret; + char *ptr; + + if ((channels>255) || (channels<1) || (coupled_streams>streams) || + (coupled_streams+streams>255) || (streams<1) || (coupled_streams<0)) + return OPUS_BAD_ARG; + + st->layout.nb_channels = channels; + st->layout.nb_streams = streams; + st->layout.nb_coupled_streams = coupled_streams; + st->subframe_mem[0]=st->subframe_mem[1]=st->subframe_mem[2]=0; + if (!surround) + st->lfe_stream = -1; + st->bitrate_bps = OPUS_AUTO; + st->application = application; + st->variable_duration = OPUS_FRAMESIZE_ARG; + for (i=0;ilayout.nb_channels;i++) + st->layout.mapping[i] = mapping[i]; + if (!validate_layout(&st->layout) || !validate_encoder_layout(&st->layout)) + return OPUS_BAD_ARG; + ptr = (char*)st + align(sizeof(OpusMSEncoder)); + coupled_size = opus_encoder_get_size(2); + mono_size = opus_encoder_get_size(1); + + for (i=0;ilayout.nb_coupled_streams;i++) + { + ret = opus_encoder_init((OpusEncoder*)ptr, Fs, 2, application); + if(ret!=OPUS_OK)return ret; + if (i==st->lfe_stream) + opus_encoder_ctl((OpusEncoder*)ptr, OPUS_SET_LFE(1)); + ptr += align(coupled_size); + } + for (;ilayout.nb_streams;i++) + { + ret = opus_encoder_init((OpusEncoder*)ptr, Fs, 1, application); + if (i==st->lfe_stream) + opus_encoder_ctl((OpusEncoder*)ptr, OPUS_SET_LFE(1)); + if(ret!=OPUS_OK)return ret; + ptr += align(mono_size); + } + if (surround) + { + OPUS_CLEAR(ms_get_preemph_mem(st), channels); + OPUS_CLEAR(ms_get_window_mem(st), channels*120); + } + st->surround = surround; + return OPUS_OK; +} + +int opus_multistream_encoder_init( + OpusMSEncoder *st, + opus_int32 Fs, + int channels, + int streams, + int coupled_streams, + const unsigned char *mapping, + int application +) +{ + return opus_multistream_encoder_init_impl(st, Fs, channels, streams, coupled_streams, mapping, application, 0); +} + +int opus_multistream_surround_encoder_init( + OpusMSEncoder *st, + opus_int32 Fs, + int channels, + int mapping_family, + int *streams, + int *coupled_streams, + unsigned char *mapping, + int application +) +{ + if ((channels>255) || (channels<1)) + return OPUS_BAD_ARG; + st->lfe_stream = -1; + if (mapping_family==0) + { + if (channels==1) + { + *streams=1; + *coupled_streams=0; + mapping[0]=0; + } else if (channels==2) + { + *streams=1; + *coupled_streams=1; + mapping[0]=0; + mapping[1]=1; + } else + return OPUS_UNIMPLEMENTED; + } else if (mapping_family==1 && channels<=8 && channels>=1) + { + int i; + *streams=vorbis_mappings[channels-1].nb_streams; + *coupled_streams=vorbis_mappings[channels-1].nb_coupled_streams; + for (i=0;i=6) + st->lfe_stream = *streams-1; + } else if (mapping_family==255) + { + int i; + *streams=channels; + *coupled_streams=0; + for(i=0;i2&&mapping_family==1); +} + +OpusMSEncoder *opus_multistream_encoder_create( + opus_int32 Fs, + int channels, + int streams, + int coupled_streams, + const unsigned char *mapping, + int application, + int *error +) +{ + int ret; + OpusMSEncoder *st; + if ((channels>255) || (channels<1) || (coupled_streams>streams) || + (coupled_streams+streams>255) || (streams<1) || (coupled_streams<0)) + { + if (error) + *error = OPUS_BAD_ARG; + return NULL; + } + st = (OpusMSEncoder *)opus_alloc(opus_multistream_encoder_get_size(streams, coupled_streams)); + if (st==NULL) + { + if (error) + *error = OPUS_ALLOC_FAIL; + return NULL; + } + ret = opus_multistream_encoder_init(st, Fs, channels, streams, coupled_streams, mapping, application); + if (ret != OPUS_OK) + { + opus_free(st); + st = NULL; + } + if (error) + *error = ret; + return st; +} + +OpusMSEncoder *opus_multistream_surround_encoder_create( + opus_int32 Fs, + int channels, + int mapping_family, + int *streams, + int *coupled_streams, + unsigned char *mapping, + int application, + int *error +) +{ + int ret; + OpusMSEncoder *st; + if ((channels>255) || (channels<1)) + { + if (error) + *error = OPUS_BAD_ARG; + return NULL; + } + st = (OpusMSEncoder *)opus_alloc(opus_multistream_surround_encoder_get_size(channels, mapping_family)); + if (st==NULL) + { + if (error) + *error = OPUS_ALLOC_FAIL; + return NULL; + } + ret = opus_multistream_surround_encoder_init(st, Fs, channels, mapping_family, streams, coupled_streams, mapping, application); + if (ret != OPUS_OK) + { + opus_free(st); + st = NULL; + } + if (error) + *error = ret; + return st; +} + +static void surround_rate_allocation( + OpusMSEncoder *st, + opus_int32 *rate, + int frame_size + ) +{ + int i; + opus_int32 channel_rate; + opus_int32 Fs; + char *ptr; + int stream_offset; + int lfe_offset; + int coupled_ratio; /* Q8 */ + int lfe_ratio; /* Q8 */ + + ptr = (char*)st + align(sizeof(OpusMSEncoder)); + opus_encoder_ctl((OpusEncoder*)ptr, OPUS_GET_SAMPLE_RATE(&Fs)); + + if (st->bitrate_bps > st->layout.nb_channels*40000) + stream_offset = 20000; + else + stream_offset = st->bitrate_bps/st->layout.nb_channels/2; + stream_offset += 60*(Fs/frame_size-50); + /* We start by giving each stream (coupled or uncoupled) the same bitrate. + This models the main saving of coupled channels over uncoupled. */ + /* The LFE stream is an exception to the above and gets fewer bits. */ + lfe_offset = 3500 + 60*(Fs/frame_size-50); + /* Coupled streams get twice the mono rate after the first 20 kb/s. */ + coupled_ratio = 512; + /* Should depend on the bitrate, for now we assume LFE gets 1/8 the bits of mono */ + lfe_ratio = 32; + + /* Compute bitrate allocation between streams */ + if (st->bitrate_bps==OPUS_AUTO) + { + channel_rate = Fs+60*Fs/frame_size; + } else if (st->bitrate_bps==OPUS_BITRATE_MAX) + { + channel_rate = 300000; + } else { + int nb_lfe; + int nb_uncoupled; + int nb_coupled; + int total; + nb_lfe = (st->lfe_stream!=-1); + nb_coupled = st->layout.nb_coupled_streams; + nb_uncoupled = st->layout.nb_streams-nb_coupled-nb_lfe; + total = (nb_uncoupled<<8) /* mono */ + + coupled_ratio*nb_coupled /* stereo */ + + nb_lfe*lfe_ratio; + channel_rate = 256*(st->bitrate_bps-lfe_offset*nb_lfe-stream_offset*(nb_coupled+nb_uncoupled))/total; + } +#ifndef FIXED_POINT + if (st->variable_duration==OPUS_FRAMESIZE_VARIABLE && frame_size != Fs/50) + { + opus_int32 bonus; + bonus = 60*(Fs/frame_size-50); + channel_rate += bonus; + } +#endif + + for (i=0;ilayout.nb_streams;i++) + { + if (ilayout.nb_coupled_streams) + rate[i] = stream_offset+(channel_rate*coupled_ratio>>8); + else if (i!=st->lfe_stream) + rate[i] = stream_offset+channel_rate; + else + rate[i] = lfe_offset+(channel_rate*lfe_ratio>>8); + } +} + +/* Max size in case the encoder decides to return three frames */ +#define MS_FRAME_TMP (3*1275+7) +static int opus_multistream_encode_native +( + OpusMSEncoder *st, + opus_copy_channel_in_func copy_channel_in, + const void *pcm, + int analysis_frame_size, + unsigned char *data, + opus_int32 max_data_bytes, + int lsb_depth, + downmix_func downmix +) +{ + opus_int32 Fs; + int coupled_size; + int mono_size; + int s; + char *ptr; + int tot_size; + VARDECL(opus_val16, buf); + VARDECL(opus_val16, bandSMR); + unsigned char tmp_data[MS_FRAME_TMP]; + OpusRepacketizer rp; + opus_int32 vbr; + const CELTMode *celt_mode; + opus_int32 bitrates[256]; + opus_val16 bandLogE[42]; + opus_val32 *mem = NULL; + opus_val32 *preemph_mem=NULL; + int frame_size; + ALLOC_STACK; + + if (st->surround) + { + preemph_mem = ms_get_preemph_mem(st); + mem = ms_get_window_mem(st); + } + + ptr = (char*)st + align(sizeof(OpusMSEncoder)); + opus_encoder_ctl((OpusEncoder*)ptr, OPUS_GET_SAMPLE_RATE(&Fs)); + opus_encoder_ctl((OpusEncoder*)ptr, OPUS_GET_VBR(&vbr)); + opus_encoder_ctl((OpusEncoder*)ptr, CELT_GET_MODE(&celt_mode)); + + { + opus_int32 delay_compensation; + int channels; + + channels = st->layout.nb_streams + st->layout.nb_coupled_streams; + opus_encoder_ctl((OpusEncoder*)ptr, OPUS_GET_LOOKAHEAD(&delay_compensation)); + delay_compensation -= Fs/400; + frame_size = compute_frame_size(pcm, analysis_frame_size, + st->variable_duration, channels, Fs, st->bitrate_bps, + delay_compensation, downmix +#ifndef DISABLE_FLOAT_API + , st->subframe_mem +#endif + ); + } + + if (400*frame_size < Fs) + { + RESTORE_STACK; + return OPUS_BAD_ARG; + } + /* Validate frame_size before using it to allocate stack space. + This mirrors the checks in opus_encode[_float](). */ + if (400*frame_size != Fs && 200*frame_size != Fs && + 100*frame_size != Fs && 50*frame_size != Fs && + 25*frame_size != Fs && 50*frame_size != 3*Fs) + { + RESTORE_STACK; + return OPUS_BAD_ARG; + } + ALLOC(buf, 2*frame_size, opus_val16); + coupled_size = opus_encoder_get_size(2); + mono_size = opus_encoder_get_size(1); + + ALLOC(bandSMR, 21*st->layout.nb_channels, opus_val16); + if (st->surround) + { + surround_analysis(celt_mode, pcm, bandSMR, mem, preemph_mem, frame_size, 120, st->layout.nb_channels, Fs, copy_channel_in); + } + + if (max_data_bytes < 4*st->layout.nb_streams-1) + { + RESTORE_STACK; + return OPUS_BUFFER_TOO_SMALL; + } + + /* Compute bitrate allocation between streams (this could be a lot better) */ + surround_rate_allocation(st, bitrates, frame_size); + + if (!vbr) + max_data_bytes = IMIN(max_data_bytes, 3*st->bitrate_bps/(3*8*Fs/frame_size)); + + ptr = (char*)st + align(sizeof(OpusMSEncoder)); + for (s=0;slayout.nb_streams;s++) + { + OpusEncoder *enc; + enc = (OpusEncoder*)ptr; + if (s < st->layout.nb_coupled_streams) + ptr += align(coupled_size); + else + ptr += align(mono_size); + opus_encoder_ctl(enc, OPUS_SET_BITRATE(bitrates[s])); + if (st->surround) + { + opus_int32 equiv_rate; + equiv_rate = st->bitrate_bps; + if (frame_size*50 < Fs) + equiv_rate -= 60*(Fs/frame_size - 50)*st->layout.nb_channels; + if (equiv_rate > 10000*st->layout.nb_channels) + opus_encoder_ctl(enc, OPUS_SET_BANDWIDTH(OPUS_BANDWIDTH_FULLBAND)); + else if (equiv_rate > 7000*st->layout.nb_channels) + opus_encoder_ctl(enc, OPUS_SET_BANDWIDTH(OPUS_BANDWIDTH_SUPERWIDEBAND)); + else if (equiv_rate > 5000*st->layout.nb_channels) + opus_encoder_ctl(enc, OPUS_SET_BANDWIDTH(OPUS_BANDWIDTH_WIDEBAND)); + else + opus_encoder_ctl(enc, OPUS_SET_BANDWIDTH(OPUS_BANDWIDTH_NARROWBAND)); + if (s < st->layout.nb_coupled_streams) + { + /* To preserve the spatial image, force stereo CELT on coupled streams */ + opus_encoder_ctl(enc, OPUS_SET_FORCE_MODE(MODE_CELT_ONLY)); + opus_encoder_ctl(enc, OPUS_SET_FORCE_CHANNELS(2)); + } + } + } + + ptr = (char*)st + align(sizeof(OpusMSEncoder)); + /* Counting ToC */ + tot_size = 0; + for (s=0;slayout.nb_streams;s++) + { + OpusEncoder *enc; + int len; + int curr_max; + int c1, c2; + + opus_repacketizer_init(&rp); + enc = (OpusEncoder*)ptr; + if (s < st->layout.nb_coupled_streams) + { + int i; + int left, right; + left = get_left_channel(&st->layout, s, -1); + right = get_right_channel(&st->layout, s, -1); + (*copy_channel_in)(buf, 2, + pcm, st->layout.nb_channels, left, frame_size); + (*copy_channel_in)(buf+1, 2, + pcm, st->layout.nb_channels, right, frame_size); + ptr += align(coupled_size); + if (st->surround) + { + for (i=0;i<21;i++) + { + bandLogE[i] = bandSMR[21*left+i]; + bandLogE[21+i] = bandSMR[21*right+i]; + } + } + c1 = left; + c2 = right; + } else { + int i; + int chan = get_mono_channel(&st->layout, s, -1); + (*copy_channel_in)(buf, 1, + pcm, st->layout.nb_channels, chan, frame_size); + ptr += align(mono_size); + if (st->surround) + { + for (i=0;i<21;i++) + bandLogE[i] = bandSMR[21*chan+i]; + } + c1 = chan; + c2 = -1; + } + if (st->surround) + opus_encoder_ctl(enc, OPUS_SET_ENERGY_MASK(bandLogE)); + /* number of bytes left (+Toc) */ + curr_max = max_data_bytes - tot_size; + /* Reserve three bytes for the last stream and four for the others */ + curr_max -= IMAX(0,4*(st->layout.nb_streams-s-1)-1); + curr_max = IMIN(curr_max,MS_FRAME_TMP); + if (!vbr && s == st->layout.nb_streams-1) + opus_encoder_ctl(enc, OPUS_SET_BITRATE(curr_max*(8*Fs/frame_size))); + len = opus_encode_native(enc, buf, frame_size, tmp_data, curr_max, lsb_depth, + pcm, analysis_frame_size, c1, c2, st->layout.nb_channels, downmix); + if (len<0) + { + RESTORE_STACK; + return len; + } + /* We need to use the repacketizer to add the self-delimiting lengths + while taking into account the fact that the encoder can now return + more than one frame at a time (e.g. 60 ms CELT-only) */ + opus_repacketizer_cat(&rp, tmp_data, len); + len = opus_repacketizer_out_range_impl(&rp, 0, opus_repacketizer_get_nb_frames(&rp), + data, max_data_bytes-tot_size, s != st->layout.nb_streams-1, !vbr && s == st->layout.nb_streams-1); + data += len; + tot_size += len; + } + /*printf("\n");*/ + RESTORE_STACK; + return tot_size; +} + +#if !defined(DISABLE_FLOAT_API) +static void opus_copy_channel_in_float( + opus_val16 *dst, + int dst_stride, + const void *src, + int src_stride, + int src_channel, + int frame_size +) +{ + const float *float_src; + opus_int32 i; + float_src = (const float *)src; + for (i=0;ibitrate_bps = value; + } + break; + case OPUS_GET_BITRATE_REQUEST: + { + int s; + opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } + *value = 0; + for (s=0;slayout.nb_streams;s++) + { + opus_int32 rate; + OpusEncoder *enc; + enc = (OpusEncoder*)ptr; + if (s < st->layout.nb_coupled_streams) + ptr += align(coupled_size); + else + ptr += align(mono_size); + opus_encoder_ctl(enc, request, &rate); + *value += rate; + } + } + break; + case OPUS_GET_LSB_DEPTH_REQUEST: + case OPUS_GET_VBR_REQUEST: + case OPUS_GET_APPLICATION_REQUEST: + case OPUS_GET_BANDWIDTH_REQUEST: + case OPUS_GET_COMPLEXITY_REQUEST: + case OPUS_GET_PACKET_LOSS_PERC_REQUEST: + case OPUS_GET_DTX_REQUEST: + case OPUS_GET_VOICE_RATIO_REQUEST: + case OPUS_GET_VBR_CONSTRAINT_REQUEST: + case OPUS_GET_SIGNAL_REQUEST: + case OPUS_GET_LOOKAHEAD_REQUEST: + case OPUS_GET_SAMPLE_RATE_REQUEST: + case OPUS_GET_INBAND_FEC_REQUEST: + case OPUS_GET_FORCE_CHANNELS_REQUEST: + case OPUS_GET_PREDICTION_DISABLED_REQUEST: + { + OpusEncoder *enc; + /* For int32* GET params, just query the first stream */ + opus_int32 *value = va_arg(ap, opus_int32*); + enc = (OpusEncoder*)ptr; + ret = opus_encoder_ctl(enc, request, value); + } + break; + case OPUS_GET_FINAL_RANGE_REQUEST: + { + int s; + opus_uint32 *value = va_arg(ap, opus_uint32*); + opus_uint32 tmp; + if (!value) + { + goto bad_arg; + } + *value=0; + for (s=0;slayout.nb_streams;s++) + { + OpusEncoder *enc; + enc = (OpusEncoder*)ptr; + if (s < st->layout.nb_coupled_streams) + ptr += align(coupled_size); + else + ptr += align(mono_size); + ret = opus_encoder_ctl(enc, request, &tmp); + if (ret != OPUS_OK) break; + *value ^= tmp; + } + } + break; + case OPUS_SET_LSB_DEPTH_REQUEST: + case OPUS_SET_COMPLEXITY_REQUEST: + case OPUS_SET_VBR_REQUEST: + case OPUS_SET_VBR_CONSTRAINT_REQUEST: + case OPUS_SET_MAX_BANDWIDTH_REQUEST: + case OPUS_SET_BANDWIDTH_REQUEST: + case OPUS_SET_SIGNAL_REQUEST: + case OPUS_SET_APPLICATION_REQUEST: + case OPUS_SET_INBAND_FEC_REQUEST: + case OPUS_SET_PACKET_LOSS_PERC_REQUEST: + case OPUS_SET_DTX_REQUEST: + case OPUS_SET_FORCE_MODE_REQUEST: + case OPUS_SET_FORCE_CHANNELS_REQUEST: + case OPUS_SET_PREDICTION_DISABLED_REQUEST: + { + int s; + /* This works for int32 params */ + opus_int32 value = va_arg(ap, opus_int32); + for (s=0;slayout.nb_streams;s++) + { + OpusEncoder *enc; + + enc = (OpusEncoder*)ptr; + if (s < st->layout.nb_coupled_streams) + ptr += align(coupled_size); + else + ptr += align(mono_size); + ret = opus_encoder_ctl(enc, request, value); + if (ret != OPUS_OK) + break; + } + } + break; + case OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST: + { + int s; + opus_int32 stream_id; + OpusEncoder **value; + stream_id = va_arg(ap, opus_int32); + if (stream_id<0 || stream_id >= st->layout.nb_streams) + ret = OPUS_BAD_ARG; + value = va_arg(ap, OpusEncoder**); + if (!value) + { + goto bad_arg; + } + for (s=0;slayout.nb_coupled_streams) + ptr += align(coupled_size); + else + ptr += align(mono_size); + } + *value = (OpusEncoder*)ptr; + } + break; + case OPUS_SET_EXPERT_FRAME_DURATION_REQUEST: + { + opus_int32 value = va_arg(ap, opus_int32); + st->variable_duration = value; + } + break; + case OPUS_GET_EXPERT_FRAME_DURATION_REQUEST: + { + opus_int32 *value = va_arg(ap, opus_int32*); + if (!value) + { + goto bad_arg; + } + *value = st->variable_duration; + } + break; + case OPUS_RESET_STATE: + { + int s; + st->subframe_mem[0] = st->subframe_mem[1] = st->subframe_mem[2] = 0; + if (st->surround) + { + OPUS_CLEAR(ms_get_preemph_mem(st), st->layout.nb_channels); + OPUS_CLEAR(ms_get_window_mem(st), st->layout.nb_channels*120); + } + for (s=0;slayout.nb_streams;s++) + { + OpusEncoder *enc; + enc = (OpusEncoder*)ptr; + if (s < st->layout.nb_coupled_streams) + ptr += align(coupled_size); + else + ptr += align(mono_size); + ret = opus_encoder_ctl(enc, OPUS_RESET_STATE); + if (ret != OPUS_OK) + break; + } + } + break; + default: + ret = OPUS_UNIMPLEMENTED; + break; + } + + va_end(ap); + return ret; +bad_arg: + va_end(ap); + return OPUS_BAD_ARG; +} + +void opus_multistream_encoder_destroy(OpusMSEncoder *st) +{ + opus_free(st); +} diff --git a/code/opus-1.0.2/src/opus_private.h b/code/opus-1.1/src/opus_private.h similarity index 59% rename from code/opus-1.0.2/src/opus_private.h rename to code/opus-1.1/src/opus_private.h index 52482bc1..83225f2b 100644 --- a/code/opus-1.0.2/src/opus_private.h +++ b/code/opus-1.1/src/opus_private.h @@ -31,15 +31,29 @@ #include "arch.h" #include "opus.h" +#include "celt.h" struct OpusRepacketizer { unsigned char toc; int nb_frames; const unsigned char *frames[48]; - short len[48]; + opus_int16 len[48]; int framesize; }; +typedef struct ChannelLayout { + int nb_channels; + int nb_streams; + int nb_coupled_streams; + unsigned char mapping[256]; +} ChannelLayout; + +int validate_layout(const ChannelLayout *layout); +int get_left_channel(const ChannelLayout *layout, int stream_id, int prev); +int get_right_channel(const ChannelLayout *layout, int stream_id, int prev); +int get_mono_channel(const ChannelLayout *layout, int stream_id, int prev); + + #define MODE_SILK_ONLY 1000 #define MODE_HYBRID 1001 @@ -68,18 +82,48 @@ struct OpusRepacketizer { #define OPUS_SET_FORCE_MODE_REQUEST 11002 #define OPUS_SET_FORCE_MODE(x) OPUS_SET_FORCE_MODE_REQUEST, __opus_check_int(x) +typedef void (*downmix_func)(const void *, opus_val32 *, int, int, int, int, int); +void downmix_float(const void *_x, opus_val32 *sub, int subframe, int offset, int c1, int c2, int C); +void downmix_int(const void *_x, opus_val32 *sub, int subframe, int offset, int c1, int c2, int C); + +int optimize_framesize(const opus_val16 *x, int len, int C, opus_int32 Fs, + int bitrate, opus_val16 tonality, float *mem, int buffering, + downmix_func downmix); int encode_size(int size, unsigned char *data); +opus_int32 frame_size_select(opus_int32 frame_size, int variable_duration, opus_int32 Fs); + +opus_int32 compute_frame_size(const void *analysis_pcm, int frame_size, + int variable_duration, int C, opus_int32 Fs, int bitrate_bps, + int delay_compensation, downmix_func downmix +#ifndef DISABLE_FLOAT_API + , float *subframe_mem +#endif + ); + +opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_size, + unsigned char *data, opus_int32 out_data_bytes, int lsb_depth, + const void *analysis_pcm, opus_int32 analysis_size, int c1, int c2, int analysis_channels, downmix_func downmix); + int opus_decode_native(OpusDecoder *st, const unsigned char *data, opus_int32 len, - opus_val16 *pcm, int frame_size, int decode_fec, int self_delimited, int *packet_offset); + opus_val16 *pcm, int frame_size, int decode_fec, int self_delimited, + opus_int32 *packet_offset, int soft_clip); /* Make sure everything's aligned to sizeof(void *) bytes */ -static inline int align(int i) +static OPUS_INLINE int align(int i) { - return (i+sizeof(void *)-1)&-((int)sizeof(void *)); + return (i+(int)sizeof(void *)-1)&-(int)sizeof(void *); } -opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int end, unsigned char *data, opus_int32 maxlen, int self_delimited); +int opus_packet_parse_impl(const unsigned char *data, opus_int32 len, + int self_delimited, unsigned char *out_toc, + const unsigned char *frames[48], opus_int16 size[48], + int *payload_offset, opus_int32 *packet_offset); + +opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int end, + unsigned char *data, opus_int32 maxlen, int self_delimited, int pad); + +int pad_frame(unsigned char *data, opus_int32 len, opus_int32 new_len); #endif /* OPUS_PRIVATE_H */ diff --git a/code/opus-1.0.2/src/repacketizer.c b/code/opus-1.1/src/repacketizer.c similarity index 50% rename from code/opus-1.0.2/src/repacketizer.c rename to code/opus-1.1/src/repacketizer.c index 26315b62..a62675ce 100644 --- a/code/opus-1.0.2/src/repacketizer.c +++ b/code/opus-1.1/src/repacketizer.c @@ -58,7 +58,7 @@ void opus_repacketizer_destroy(OpusRepacketizer *rp) opus_free(rp); } -int opus_repacketizer_cat(OpusRepacketizer *rp, const unsigned char *data, opus_int32 len) +static int opus_repacketizer_cat_impl(OpusRepacketizer *rp, const unsigned char *data, opus_int32 len, int self_delimited) { unsigned char tmp_toc; int curr_nb_frames,ret; @@ -82,24 +82,31 @@ int opus_repacketizer_cat(OpusRepacketizer *rp, const unsigned char *data, opus_ return OPUS_INVALID_PACKET; } - ret=opus_packet_parse(data, len, &tmp_toc, &rp->frames[rp->nb_frames], &rp->len[rp->nb_frames], NULL); + ret=opus_packet_parse_impl(data, len, self_delimited, &tmp_toc, &rp->frames[rp->nb_frames], &rp->len[rp->nb_frames], NULL, NULL); if(ret<1)return ret; rp->nb_frames += curr_nb_frames; return OPUS_OK; } +int opus_repacketizer_cat(OpusRepacketizer *rp, const unsigned char *data, opus_int32 len) +{ + return opus_repacketizer_cat_impl(rp, data, len, 0); +} + int opus_repacketizer_get_nb_frames(OpusRepacketizer *rp) { return rp->nb_frames; } -opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int end, unsigned char *data, opus_int32 maxlen, int self_delimited) +opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int end, + unsigned char *data, opus_int32 maxlen, int self_delimited, int pad) { int i, count; opus_int32 tot_size; - short *len; + opus_int16 *len; const unsigned char **frames; + unsigned char * ptr; if (begin<0 || begin>=end || end>rp->nb_frames) { @@ -115,18 +122,15 @@ opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int else tot_size = 0; - switch (count) - { - case 1: + ptr = data; + if (count==1) { /* Code 0 */ tot_size += len[0]+1; if (tot_size > maxlen) return OPUS_BUFFER_TOO_SMALL; - *data++ = rp->toc&0xFC; - } - break; - case 2: + *ptr++ = rp->toc&0xFC; + } else if (count==2) { if (len[1] == len[0]) { @@ -134,22 +138,28 @@ opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int tot_size += 2*len[0]+1; if (tot_size > maxlen) return OPUS_BUFFER_TOO_SMALL; - *data++ = (rp->toc&0xFC) | 0x1; + *ptr++ = (rp->toc&0xFC) | 0x1; } else { /* Code 2 */ tot_size += len[0]+len[1]+2+(len[0]>=252); if (tot_size > maxlen) return OPUS_BUFFER_TOO_SMALL; - *data++ = (rp->toc&0xFC) | 0x2; - data += encode_size(len[0], data); + *ptr++ = (rp->toc&0xFC) | 0x2; + ptr += encode_size(len[0], ptr); } } - break; - default: + if (count > 2 || (pad && tot_size < maxlen)) { /* Code 3 */ int vbr; + int pad_amount=0; + /* Restart the process for the padding case */ + ptr = data; + if (self_delimited) + tot_size = 1 + (len[count-1]>=252); + else + tot_size = 0; vbr = 0; for (i=1;i maxlen) return OPUS_BUFFER_TOO_SMALL; - *data++ = (rp->toc&0xFC) | 0x3; - *data++ = count | 0x80; - for (i=0;itoc&0xFC) | 0x3; + *ptr++ = count | 0x80; } else { tot_size += count*len[0]+2; if (tot_size > maxlen) return OPUS_BUFFER_TOO_SMALL; - *data++ = (rp->toc&0xFC) | 0x3; - *data++ = count; + *ptr++ = (rp->toc&0xFC) | 0x3; + *ptr++ = count; + } + pad_amount = pad ? (maxlen-tot_size) : 0; + if (pad_amount != 0) + { + int nb_255s; + data[1] |= 0x40; + nb_255s = (pad_amount-1)/255; + for (i=0;inb_frames, data, maxlen, 0); + return opus_repacketizer_out_range_impl(rp, 0, rp->nb_frames, data, maxlen, 0, 0); } +int opus_packet_pad(unsigned char *data, opus_int32 len, opus_int32 new_len) +{ + OpusRepacketizer rp; + opus_int32 ret; + if (len < 1) + return OPUS_BAD_ARG; + if (len==new_len) + return OPUS_OK; + else if (len > new_len) + return OPUS_BAD_ARG; + opus_repacketizer_init(&rp); + /* Moving payload to the end of the packet so we can do in-place padding */ + OPUS_MOVE(data+new_len-len, data, len); + opus_repacketizer_cat(&rp, data+new_len-len, len); + ret = opus_repacketizer_out_range_impl(&rp, 0, rp.nb_frames, data, new_len, 0, 1); + if (ret > 0) + return OPUS_OK; + else + return ret; +} + +opus_int32 opus_packet_unpad(unsigned char *data, opus_int32 len) +{ + OpusRepacketizer rp; + opus_int32 ret; + if (len < 1) + return OPUS_BAD_ARG; + opus_repacketizer_init(&rp); + ret = opus_repacketizer_cat(&rp, data, len); + if (ret < 0) + return ret; + ret = opus_repacketizer_out_range_impl(&rp, 0, rp.nb_frames, data, len, 0, 0); + celt_assert(ret > 0 && ret <= len); + return ret; +} + +int opus_multistream_packet_pad(unsigned char *data, opus_int32 len, opus_int32 new_len, int nb_streams) +{ + int s; + int count; + unsigned char toc; + opus_int16 size[48]; + opus_int32 packet_offset; + opus_int32 amount; + + if (len < 1) + return OPUS_BAD_ARG; + if (len==new_len) + return OPUS_OK; + else if (len > new_len) + return OPUS_BAD_ARG; + amount = new_len - len; + /* Seek to last stream */ + for (s=0;s -#include - -static unsigned op_parse_uint16le(const unsigned char *_data){ - return _data[0]|_data[1]<<8; -} - -static int op_parse_int16le(const unsigned char *_data){ - int ret; - ret=_data[0]|_data[1]<<8; - return (ret^0x8000)-0x8000; -} - -static opus_uint32 op_parse_uint32le(const unsigned char *_data){ - return _data[0]|_data[1]<<8|_data[2]<<16|_data[3]<<24; -} - -int opus_head_parse(OpusHead *_head,const unsigned char *_data,size_t _len){ - OpusHead head; - if(_len<8)return OP_ENOTFORMAT; - if(memcmp(_data,"OpusHead",8)!=0)return OP_ENOTFORMAT; - if(_len<9)return OP_EBADHEADER; - head.version=_data[8]; - if(head.version>15)return OP_EVERSION; - if(_len<19)return OP_EBADHEADER; - head.channel_count=_data[9]; - head.pre_skip=op_parse_uint16le(_data+10); - head.input_sample_rate=op_parse_uint32le(_data+12); - head.output_gain=op_parse_int16le(_data+16); - head.mapping_family=_data[18]; - if(head.mapping_family==0){ - if(head.channel_count<1||head.channel_count>2)return OP_EBADHEADER; - if(head.version<=1&&_len>19)return OP_EBADHEADER; - head.stream_count=1; - head.coupled_count=head.channel_count-1; - if(_head!=NULL){ - _head->mapping[0]=0; - _head->mapping[1]=1; - } - } - else if(head.mapping_family==1){ - size_t size; - int ci; - if(head.channel_count<1||head.channel_count>8)return OP_EBADHEADER; - size=21+head.channel_count; - if(_lensize)return OP_EBADHEADER; - head.stream_count=_data[19]; - if(head.stream_count<1)return OP_EBADHEADER; - head.coupled_count=_data[20]; - if(head.coupled_count>head.stream_count)return OP_EBADHEADER; - for(ci=0;ci=head.stream_count+head.coupled_count - &&_data[21+ci]!=255){ - return OP_EBADHEADER; - } - } - if(_head!=NULL)memcpy(_head->mapping,_data+21,head.channel_count); - } - /*General purpose players should not attempt to play back content with - channel mapping family 255.*/ - else if(head.mapping_family==255)return OP_EIMPL; - /*No other channel mapping families are currently defined.*/ - else return OP_EBADHEADER; - if(_head!=NULL)memcpy(_head,&head,head.mapping-(unsigned char *)&head); - return 0; -} - -void opus_tags_init(OpusTags *_tags){ - memset(_tags,0,sizeof(*_tags)); -} - -void opus_tags_clear(OpusTags *_tags){ - int i; - for(i=_tags->comments;i-->0;)_ogg_free(_tags->user_comments[i]); - _ogg_free(_tags->user_comments); - _ogg_free(_tags->comment_lengths); - _ogg_free(_tags->vendor); -} - -/*The actual implementation of opus_tags_parse(). - Unlike the public API, this function requires _tags to already be - initialized, modifies its contents before success is guaranteed, and assumes - the caller will clear it on error.*/ -int opus_tags_parse_impl(OpusTags *_tags, - const unsigned char *_data,size_t _len){ - opus_uint32 count; - size_t size; - size_t len; - int ncomments; - int i; - len=_len; - if(len<8)return OP_ENOTFORMAT; - if(memcmp(_data,"OpusTags",8)!=0)return OP_ENOTFORMAT; - if(len<16)return OP_EBADHEADER; - _data+=8; - len-=8; - count=op_parse_uint32le(_data); - _data+=4; - len-=4; - if(count>len)return OP_EBADHEADER; - if(_tags!=NULL){ - char *vendor; - size=count+1; - if(sizevendor=vendor; - } - _data+=count; - len-=count; - if(len<4)return OP_EBADHEADER; - count=op_parse_uint32le(_data); - _data+=4; - len-=4; - /*Check to make sure there's minimally sufficient data left in the packet.*/ - if(count>len>>2)return OP_EBADHEADER; - /*Check for overflow (the API limits this to an int).*/ - if(count>(opus_uint32)INT_MAX-1)return OP_EFAULT; - if(_tags!=NULL){ - size=sizeof(*_tags->comment_lengths)*(count+1); - if(size/sizeof(*_tags->comment_lengths)!=count+1)return OP_EFAULT; - _tags->comment_lengths=(int *)_ogg_malloc(size); - size=sizeof(*_tags->user_comments)*(count+1); - if(size/sizeof(*_tags->user_comments)!=count+1)return OP_EFAULT; - _tags->user_comments=(char **)_ogg_malloc(size); - if(_tags->comment_lengths==NULL||_tags->user_comments==NULL){ - return OP_EFAULT; - } - } - ncomments=(int)count; - for(i=0;ilen>>2)return OP_EBADHEADER; - count=op_parse_uint32le(_data); - _data+=4; - len-=4; - if(count>len)return OP_EBADHEADER; - /*Check for overflow (the API limits this to an int).*/ - if(count>(opus_uint32)INT_MAX)return OP_EFAULT; - if(_tags!=NULL){ - _tags->comment_lengths[i]=(int)count; - size=count+1; - if(sizeuser_comments[i]=(char *)_ogg_malloc(size); - if(_tags->user_comments[i]==NULL)return OP_EFAULT; - _tags->comments=i+1; - memcpy(_tags->user_comments[i],_data,count); - _tags->user_comments[i][count]='\0'; - } - _data+=count; - len-=count; - } - if(_tags!=NULL){ - _tags->user_comments[ncomments]=NULL; - _tags->comment_lengths[ncomments]=0; - } - return 0; -} - -int opus_tags_parse(OpusTags *_tags,const unsigned char *_data,size_t _len){ - if(_tags!=NULL){ - OpusTags tags; - int ret; - opus_tags_init(&tags); - ret=opus_tags_parse_impl(&tags,_data,_len); - if(ret<0)opus_tags_clear(&tags); - else *_tags=*&tags; - return ret; - } - else return opus_tags_parse_impl(NULL,_data,_len); -} - -/*Add room for a new comment.*/ -static int op_tags_add_prepare(OpusTags *_tags){ - char **user_comments; - int *comment_lengths; - int ncomments; - ncomments=_tags->comments; - user_comments=_ogg_realloc(_tags->user_comments, - sizeof(*_tags->user_comments)*(ncomments+2)); - if(OP_UNLIKELY(user_comments==NULL))return OP_EFAULT; - _tags->user_comments=user_comments; - comment_lengths=_ogg_realloc(_tags->comment_lengths, - sizeof(*_tags->comment_lengths)*(ncomments+2)); - if(OP_UNLIKELY(comment_lengths==NULL))return OP_EFAULT; - _tags->comment_lengths=comment_lengths; - comment_lengths[ncomments]=comment_lengths[ncomments+1]=0; - /*Our caller will always set user_comments[ncomments].*/ - user_comments[ncomments+1]=NULL; - return 0; -} - -int opus_tags_add(OpusTags *_tags,const char *_tag,const char *_value){ - char *comment; - int tag_len; - int value_len; - int ncomments; - int ret; - ret=op_tags_add_prepare(_tags); - if(OP_UNLIKELY(ret<0))return ret; - tag_len=strlen(_tag); - value_len=strlen(_value); - ncomments=_tags->comments; - /*+2 for '=' and '\0'.*/ - _tags->user_comments[ncomments]=comment= - (char *)_ogg_malloc(sizeof(*comment)*(tag_len+value_len+2)); - if(OP_UNLIKELY(comment==NULL))return OP_EFAULT; - _tags->comment_lengths[ncomments]=tag_len+value_len+1; - memcpy(comment,_tag,sizeof(*comment)*tag_len); - comment[tag_len]='='; - memcpy(comment+tag_len+1,_value,sizeof(*comment)*(value_len+1)); - return 0; -} - -int opus_tags_add_comment(OpusTags *_tags,const char *_comment){ - char *comment; - int ncomments; - int comment_len; - int ret; - ret=op_tags_add_prepare(_tags); - if(OP_UNLIKELY(ret<0))return ret; - comment_len=strlen(_comment); - ncomments=_tags->comments; - _tags->user_comments[ncomments]=comment=(char *) - _ogg_malloc(sizeof(*_tags->user_comments[ncomments])*(comment_len+1)); - if(OP_UNLIKELY(comment==NULL))return OP_EFAULT; - _tags->comment_lengths[ncomments]=comment_len; - memcpy(comment,_comment,sizeof(*comment)*(comment_len+1)); - return 0; -} - -/*Is _a a "tag=value" comment whose tag matches _b? - 0 if it is, a non-zero value otherwise.*/ -static int op_tagcompare(const char *_a,const char *_b,int _n){ - return op_strncasecmp(_a,_b,_n)||_a[_n]!='='; -} - -const char *opus_tags_query(const OpusTags *_tags,const char *_tag,int _count){ - char **user_comments; - int tag_len; - int found; - int ncomments; - int ci; - tag_len=strlen(_tag); - ncomments=_tags->comments; - user_comments=_tags->user_comments; - found=0; - for(ci=0;cicomments; - user_comments=_tags->user_comments; - found=0; - for(ci=0;ci -#include -#include -#include - -typedef struct OpusMemStream OpusMemStream; - -#define OP_MEM_SIZE_MAX (~(size_t)0>>1) -#define OP_MEM_DIFF_MAX ((ptrdiff_t)OP_MEM_SIZE_MAX) - -/*The context information needed to read from a block of memory as if it were a - file.*/ -struct OpusMemStream{ - /*The block of memory to read from.*/ - const unsigned char *data; - /*The total size of the block. - This must be at most OP_MEM_SIZE_MAX to prevent signed overflow while - seeking.*/ - ptrdiff_t size; - /*The current file position. - This is allowed to be set arbitrarily greater than size (i.e., past the end - of the block, though we will not read data past the end of the block), but - is not allowed to be negative (i.e., before the beginning of the block).*/ - ptrdiff_t pos; -}; - -static int op_fread(void *_stream,unsigned char *_ptr,int _buf_size){ - FILE *stream; - size_t ret; - /*Check for empty read.*/ - if(_buf_size<=0)return 0; - stream=(FILE *)_stream; - ret=fread(_ptr,1,_buf_size,stream); - OP_ASSERT(ret<=(size_t)_buf_size); - /*If ret==0 and !feof(stream), there was a read error.*/ - return ret>0||feof(stream)?(int)ret:OP_EREAD; -} - -static int op_fseek(void *_stream,opus_int64 _offset,int _whence){ -#if defined(__MINGW32__) - return fseeko64((FILE *)_stream,_offset,_whence); -#elif defined(_MSC_VER) - return _fseeki64((FILE *)_stream,_offset,_whence); -#else - return fseeko((FILE *)_stream,(off_t)_offset,_whence); -#endif -} - -static opus_int64 op_ftell(void *_stream){ -#if defined(__MINGW32__) - return ftello64((FILE *)_stream); -#elif defined(_MSC_VER) - return _ftelli64((FILE *)_stream); -#else - return ftello((FILE *)_stream); -#endif -} - -static const OpusFileCallbacks OP_FILE_CALLBACKS={ - op_fread, - op_fseek, - op_ftell, - (op_close_func)fclose -}; - -void *op_fopen(OpusFileCallbacks *_cb,const char *_path,const char *_mode){ - FILE *fp; - fp=fopen(_path,_mode); - if(fp!=NULL)*_cb=*&OP_FILE_CALLBACKS; - return fp; -} - -void *op_fdopen(OpusFileCallbacks *_cb,int _fd,const char *_mode){ - FILE *fp; - fp=fdopen(_fd,_mode); - if(fp!=NULL)*_cb=*&OP_FILE_CALLBACKS; - return fp; -} - -void *op_freopen(OpusFileCallbacks *_cb,const char *_path,const char *_mode, - void *_stream){ - FILE *fp; - fp=freopen(_path,_mode,(FILE *)_stream); - if(fp!=NULL)*_cb=*&OP_FILE_CALLBACKS; - return fp; -} - -static int op_mem_read(void *_stream,unsigned char *_ptr,int _buf_size){ - OpusMemStream *stream; - ptrdiff_t size; - ptrdiff_t pos; - stream=(OpusMemStream *)_stream; - /*Check for empty read.*/ - if(_buf_size<=0)return 0; - size=stream->size; - pos=stream->pos; - /*Check for EOF.*/ - if(pos>=size)return 0; - /*Check for a short read.*/ - _buf_size=(int)OP_MAX(size-pos,_buf_size); - memcpy(_ptr,stream->data+pos,_buf_size); - pos+=_buf_size; - stream->pos=pos; - return _buf_size; -} - -static int op_mem_seek(void *_stream,opus_int64 _offset,int _whence){ - OpusMemStream *stream; - ptrdiff_t pos; - stream=(OpusMemStream *)_stream; - pos=stream->pos; - switch(_whence){ - case SEEK_SET:{ - /*Check for overflow:*/ - if(_offset<0||_offset>OP_MEM_DIFF_MAX)return -1; - pos=(ptrdiff_t)_offset; - }break; - case SEEK_CUR:{ - /*Check for overflow:*/ - if(_offset<-pos||_offset>OP_MEM_DIFF_MAX-pos)return -1; - pos=(ptrdiff_t)(pos+_offset); - }break; - case SEEK_END:{ - ptrdiff_t size; - size=stream->size; - OP_ASSERT(size>=0); - /*Check for overflow:*/ - if(_offset>size||_offsetpos=pos; - return 0; -} - -static opus_int64 op_mem_tell(void *_stream){ - OpusMemStream *stream; - stream=(OpusMemStream *)_stream; - return (ogg_int64_t)stream->pos; -} - -static int op_mem_close(void *_stream){ - _ogg_free(_stream); - return 0; -} - -static const OpusFileCallbacks OP_MEM_CALLBACKS={ - op_mem_read, - op_mem_seek, - op_mem_tell, - op_mem_close -}; - -void *op_mem_stream_create(OpusFileCallbacks *_cb, - const unsigned char *_data,size_t _size){ - OpusMemStream *stream; - if(_size>OP_MEM_SIZE_MAX)return NULL; - stream=(OpusMemStream *)_ogg_malloc(sizeof(*stream)); - if(stream!=NULL){ - *_cb=*&OP_MEM_CALLBACKS; - stream->data=_data; - stream->size=_size; - stream->pos=0; - } - return stream; -} diff --git a/code/opusfile-0.2/include/opusfile.h b/code/opusfile-0.5/include/opusfile.h similarity index 76% rename from code/opusfile-0.2/include/opusfile.h rename to code/opusfile-0.5/include/opusfile.h index bc7c7384..850cd6b9 100644 --- a/code/opusfile-0.2/include/opusfile.h +++ b/code/opusfile-0.5/include/opusfile.h @@ -16,7 +16,6 @@ ********************************************************************/ #if !defined(_opusfile_h) # define _opusfile_h (1) -# include /**\mainpage \section Introduction @@ -50,17 +49,68 @@ Several additional sections are not tied to the main API. - \ref stream_callbacks - \ref header_info - - \ref error_codes*/ + - \ref error_codes + \section Overview + + The libopusfile API always decodes files to 48 kHz. + The original sample rate is not preserved by the lossy compression, though + it is stored in the header to allow you to resample to it after decoding + (the libopusfile API does not currently provide a resampler, + but the + the + Speex resampler is a good choice if you need one). + In general, if you are playing back the audio, you should leave it at + 48 kHz, provided your audio hardware supports it. + When decoding to a file, it may be worth resampling back to the original + sample rate, so as not to surprise users who might not expect the sample + rate to change after encoding to Opus and decoding. + + Opus files can contain anywhere from 1 to 255 channels of audio. + The channel mappings for up to 8 channels are the same as the + Vorbis + mappings. + A special stereo API can convert everything to 2 channels, making it simple + to support multichannel files in an application which only has stereo + output. + Although the libopusfile ABI provides support for the theoretical + maximum number of channels, the current implementation does not support + files with more than 8 channels, as they do not have well-defined channel + mappings. + + Like all Ogg files, Opus files may be "chained". + That is, multiple Opus files may be combined into a single, longer file just + by concatenating the original files. + This is commonly done in internet radio streaming, as it allows the title + and artist to be updated each time the song changes, since each link in the + chain includes its own set of metadata. + + libopusfile fully supports chained files. + It will decode the first Opus stream found in each link of a chained file + (ignoring any other streams that might be concurrently multiplexed with it, + such as a video stream). + + The channel count can also change between links. + If your application is not prepared to deal with this, it can use the stereo + API to ensure the audio from all links will always get decoded into a + common format. + Since libopusfile always decodes to 48 kHz, you do not have to + worry about the sample rate changing between links (as was possible with + Vorbis). + This makes application support for chained files with libopusfile + very easy.*/ # if defined(__cplusplus) extern "C" { # endif +# include # include # include # include +/**@cond PRIVATE*/ + /*Enable special features for gcc and gcc-compatible compilers.*/ # if !defined(OP_GNUC_PREREQ) # if defined(__GNUC__)&&defined(__GNUC_MINOR__) @@ -75,9 +125,12 @@ extern "C" { # pragma GCC visibility push(default) # endif -typedef struct OpusHead OpusHead; -typedef struct OpusTags OpusTags; -typedef struct OggOpusFile OggOpusFile; +typedef struct OpusHead OpusHead; +typedef struct OpusTags OpusTags; +typedef struct OpusPictureTag OpusPictureTag; +typedef struct OpusServerInfo OpusServerInfo; +typedef struct OpusFileCallbacks OpusFileCallbacks; +typedef struct OggOpusFile OggOpusFile; /*Warning attributes for libopusfile functions.*/ # if OP_GNUC_PREREQ(3,4) @@ -91,6 +144,8 @@ typedef struct OggOpusFile OggOpusFile; # define OP_ARG_NONNULL(_x) # endif +/**@endcond*/ + /**\defgroup error_codes Error Codes*/ /*@{*/ /**\name List of possible error codes @@ -182,8 +237,9 @@ struct OpusHead{ opus_uint32 input_sample_rate; /**The gain to apply to the decoded output, in dB, as a Q8 value in the range -32768...32767. - The decoder will automatically scale the output by - pow(10,output_gain/(20.0*256)).*/ + The libopusfile API will automatically apply this gain to the + decoded output before returning it, scaling it by + pow(10,output_gain/(20.0*256)).*/ int output_gain; /**The channel mapping family, in the range 0...255. Channel mapping family 0 covers mono or stereo in a single stream. @@ -253,6 +309,87 @@ struct OpusTags{ char *vendor; }; +/**\name Picture tag image formats*/ +/*@{*/ + +/**The MIME type was not recognized, or the image data did not match the + declared MIME type.*/ +#define OP_PIC_FORMAT_UNKNOWN (-1) +/**The MIME type indicates the image data is really a URL.*/ +#define OP_PIC_FORMAT_URL (0) +/**The image is a JPEG.*/ +#define OP_PIC_FORMAT_JPEG (1) +/**The image is a PNG.*/ +#define OP_PIC_FORMAT_PNG (2) +/**The image is a GIF.*/ +#define OP_PIC_FORMAT_GIF (3) + +/*@}*/ + +/**The contents of a METADATA_BLOCK_PICTURE tag.*/ +struct OpusPictureTag{ + /**The picture type according to the ID3v2 APIC frame: +
    +
  1. Other
  2. +
  3. 32x32 pixels 'file icon' (PNG only)
  4. +
  5. Other file icon
  6. +
  7. Cover (front)
  8. +
  9. Cover (back)
  10. +
  11. Leaflet page
  12. +
  13. Media (e.g. label side of CD)
  14. +
  15. Lead artist/lead performer/soloist
  16. +
  17. Artist/performer
  18. +
  19. Conductor
  20. +
  21. Band/Orchestra
  22. +
  23. Composer
  24. +
  25. Lyricist/text writer
  26. +
  27. Recording Location
  28. +
  29. During recording
  30. +
  31. During performance
  32. +
  33. Movie/video screen capture
  34. +
  35. A bright colored fish
  36. +
  37. Illustration
  38. +
  39. Band/artist logotype
  40. +
  41. Publisher/Studio logotype
  42. +
+ Others are reserved and should not be used. + There may only be one each of picture type 1 and 2 in a file.*/ + opus_int32 type; + /**The MIME type of the picture, in printable ASCII characters 0x20-0x7E. + The MIME type may also be "-->" to signify that the data part + is a URL pointing to the picture instead of the picture data itself. + In this case, a terminating NUL is appended to the URL string in #data, + but #data_length is set to the length of the string excluding that + terminating NUL.*/ + char *mime_type; + /**The description of the picture, in UTF-8.*/ + char *description; + /**The width of the picture in pixels.*/ + opus_uint32 width; + /**The height of the picture in pixels.*/ + opus_uint32 height; + /**The color depth of the picture in bits-per-pixel (not + bits-per-channel).*/ + opus_uint32 depth; + /**For indexed-color pictures (e.g., GIF), the number of colors used, or 0 + for non-indexed pictures.*/ + opus_uint32 colors; + /**The length of the picture data in bytes.*/ + opus_uint32 data_length; + /**The binary picture data.*/ + unsigned char *data; + /**The format of the picture data, if known. + One of +
    +
  • #OP_PIC_FORMAT_UNKNOWN,
  • +
  • #OP_PIC_FORMAT_URL,
  • +
  • #OP_PIC_FORMAT_JPEG,
  • +
  • #OP_PIC_FORMAT_PNG, or
  • +
  • #OP_PIC_FORMAT_GIF.
  • +
*/ + int format; +}; + /**\name Functions for manipulating header data These functions manipulate the #OpusHead and #OpusTags structures, @@ -315,7 +452,7 @@ ogg_int64_t opus_granule_sample(const OpusHead *_head,ogg_int64_t _gp) for validity. \param[in] _data The contents of the 'comment' header packet. \param _len The number of bytes of data in the 'info' header packet. - \retval 0 Success. + \retval 0 Success. \retval #OP_ENOTFORMAT If the data does not start with the "OpusTags" string. \retval #OP_EBADHEADER If the contents of the packet otherwise violate the @@ -324,6 +461,15 @@ ogg_int64_t opus_granule_sample(const OpusHead *_head,ogg_int64_t _gp) OP_WARN_UNUSED_RESULT int opus_tags_parse(OpusTags *_tags, const unsigned char *_data,size_t _len) OP_ARG_NONNULL(2); +/**Performs a deep copy of an #OpusTags structure. + \param _dst The #OpusTags structure to copy into. + If this function fails, the contents of this structure remain + untouched. + \param _src The #OpusTags structure to copy from. + \retval 0 Success. + \retval #OP_EFAULT If there wasn't enough memory to copy the tags.*/ +int opus_tags_copy(OpusTags *_dst,const OpusTags *_src) OP_ARG_NONNULL(1); + /**Initializes an #OpusTags structure. This should be called on a freshly allocated #OpusTags structure before attempting to use it. @@ -385,6 +531,24 @@ const char *opus_tags_query(const OpusTags *_tags,const char *_tag,int _count) int opus_tags_query_count(const OpusTags *_tags,const char *_tag) OP_ARG_NONNULL(1) OP_ARG_NONNULL(2); +/**Get the track gain from an R128_TRACK_GAIN tag, if one was specified. + This searches for the first R128_TRACK_GAIN tag with a valid signed, + 16-bit decimal integer value and returns the value. + This routine is exposed merely for convenience for applications which wish + to do something special with the track gain (i.e., display it). + If you simply wish to apply the track gain instead of the header gain, you + can use op_set_gain_offset() with an #OP_TRACK_GAIN type and no offset. + \param _tags An initialized #OpusTags structure. + \param[out] _gain_q8 The track gain, in 1/256ths of a dB. + This will lie in the range [-32768,32767], and should + be applied in addition to the header gain. + On error, no value is returned, and the previous + contents remain unchanged. + \return 0 on success, or a negative value on error. + \retval #OP_FALSE There was no track gain available in the given tags.*/ +int opus_tags_get_track_gain(const OpusTags *_tags,int *_gain_q8) + OP_ARG_NONNULL(1) OP_ARG_NONNULL(2); + /**Clears the #OpusTags structure. This should be called on an #OpusTags structure after it is no longer needed. @@ -392,6 +556,78 @@ int opus_tags_query_count(const OpusTags *_tags,const char *_tag) \param _tags The #OpusTags structure to clear.*/ void opus_tags_clear(OpusTags *_tags) OP_ARG_NONNULL(1); +/**Check if \a _comment is an instance of a \a _tag_name tag. + \see opus_tagncompare + \param _tag_name A NUL-terminated, case-insensitive, ASCII string containing + the name of the tag to check for (without the terminating + '=' character). + \param _comment The comment string to check. + \return An integer less than, equal to, or greater than zero if \a _comment + is found respectively, to be less than, to match, or be greater + than a "tag=value" string whose tag matches \a _tag_name.*/ +int opus_tagcompare(const char *_tag_name,const char *_comment); + +/**Check if \a _comment is an instance of a \a _tag_name tag. + This version is slightly more efficient than opus_tagcompare() if the length + of the tag name is already known (e.g., because it is a constant). + \see opus_tagcompare + \param _tag_name A case-insensitive ASCII string containing the name of the + tag to check for (without the terminating '=' character). + \param _tag_len The number of characters in the tag name. + This must be non-negative. + \param _comment The comment string to check. + \return An integer less than, equal to, or greater than zero if \a _comment + is found respectively, to be less than, to match, or be greater + than a "tag=value" string whose tag matches the first \a _tag_len + characters of \a _tag_name.*/ +int opus_tagncompare(const char *_tag_name,int _tag_len,const char *_comment); + +/**Parse a single METADATA_BLOCK_PICTURE tag. + This decodes the BASE64-encoded content of the tag and returns a structure + with the MIME type, description, image parameters (if known), and the + compressed image data. + If the MIME type indicates the presence of an image format we recognize + (JPEG, PNG, or GIF) and the actual image data contains the magic signature + associated with that format, then the OpusPictureTag::format field will be + set to the corresponding format. + This is provided as a convenience to avoid requiring applications to parse + the MIME type and/or do their own format detection for the commonly used + formats. + In this case, we also attempt to extract the image parameters directly from + the image data (overriding any that were present in the tag, which the + specification says applications are not meant to rely on). + The application must still provide its own support for actually decoding the + image data and, if applicable, retrieving that data from URLs. + \param[out] _pic Returns the parsed picture data. + No sanitation is done on the type, MIME type, or + description fields, so these might return invalid values. + The contents of this structure are left unmodified on + failure. + \param _tag The METADATA_BLOCK_PICTURE tag contents. + The leading "METADATA_BLOCK_PICTURE=" portion is optional, + to allow the function to be used on either directly on the + values in OpusTags::user_comments or on the return value + of opus_tags_query(). + \return 0 on success or a negative value on error. + \retval #OP_ENOTFORMAT The METADATA_BLOCK_PICTURE contents were not valid. + \retval #OP_EFAULT There was not enough memory to store the picture tag + contents.*/ +OP_WARN_UNUSED_RESULT int opus_picture_tag_parse(OpusPictureTag *_pic, + const char *_tag) OP_ARG_NONNULL(1) OP_ARG_NONNULL(2); + +/**Initializes an #OpusPictureTag structure. + This should be called on a freshly allocated #OpusPictureTag structure + before attempting to use it. + \param _pic The #OpusPictureTag structure to initialize.*/ +void opus_picture_tag_init(OpusPictureTag *_pic) OP_ARG_NONNULL(1); + +/**Clears the #OpusPictureTag structure. + This should be called on an #OpusPictureTag structure after it is no longer + needed. + It will free all memory used by the structure members. + \param _pic The #OpusPictureTag structure to clear.*/ +void opus_picture_tag_clear(OpusPictureTag *_pic) OP_ARG_NONNULL(1); + /*@}*/ /*@}*/ @@ -408,6 +644,8 @@ void opus_tags_clear(OpusTags *_tags) OP_ARG_NONNULL(1); They may be expanded in the future.*/ /*@{*/ +/**@cond PRIVATE*/ + /*These are the raw numbers used to define the request codes. They should not be used directly.*/ #define OP_SSL_SKIP_CERTIFICATE_CHECK_REQUEST (6464) @@ -415,6 +653,7 @@ void opus_tags_clear(OpusTags *_tags) OP_ARG_NONNULL(1); #define OP_HTTP_PROXY_PORT_REQUEST (6592) #define OP_HTTP_PROXY_USER_REQUEST (6656) #define OP_HTTP_PROXY_PASS_REQUEST (6720) +#define OP_GET_SERVER_INFO_REQUEST (6784) #define OP_URL_OPT(_request) ((_request)+(char *)0) @@ -422,6 +661,64 @@ void opus_tags_clear(OpusTags *_tags) OP_ARG_NONNULL(1); provided to one of the URL options.*/ #define OP_CHECK_INT(_x) ((void)((_x)==(opus_int32)0),(opus_int32)(_x)) #define OP_CHECK_CONST_CHAR_PTR(_x) ((_x)+((_x)-(const char *)(_x))) +#define OP_CHECK_SERVER_INFO_PTR(_x) ((_x)+((_x)-(OpusServerInfo *)(_x))) + +/**@endcond*/ + +/**HTTP/Shoutcast/Icecast server information associated with a URL.*/ +struct OpusServerInfo{ + /**The name of the server (icy-name/ice-name). + This is NULL if there was no icy-name or + ice-name header.*/ + char *name; + /**A short description of the server (icy-description/ice-description). + This is NULL if there was no icy-description or + ice-description header.*/ + char *description; + /**The genre the server falls under (icy-genre/ice-genre). + This is NULL if there was no icy-genre or + ice-genre header.*/ + char *genre; + /**The homepage for the server (icy-url/ice-url). + This is NULL if there was no icy-url or + ice-url header.*/ + char *url; + /**The software used by the origin server (Server). + This is NULL if there was no Server header.*/ + char *server; + /**The media type of the entity sent to the recepient (Content-Type). + This is NULL if there was no Content-Type + header.*/ + char *content_type; + /**The nominal stream bitrate in kbps (icy-br/ice-bitrate). + This is -1 if there was no icy-br or + ice-bitrate header.*/ + opus_int32 bitrate_kbps; + /**Flag indicating whether the server is public (1) or not + (0) (icy-pub/ice-public). + This is -1 if there was no icy-pub or + ice-public header.*/ + int is_public; + /**Flag indicating whether the server is using HTTPS instead of HTTP. + This is 0 unless HTTPS is being used. + This may not match the protocol used in the original URL if there were + redirections.*/ + int is_ssl; +}; + +/**Initializes an #OpusServerInfo structure. + All fields are set as if the corresponding header was not available. + \param _info The #OpusServerInfo structure to initialize. + \note If you use this function, you must link against libopusurl.*/ +void opus_server_info_init(OpusServerInfo *_info) OP_ARG_NONNULL(1); + +/**Clears the #OpusServerInfo structure. + This should be called on an #OpusServerInfo structure after it is no longer + needed. + It will free all memory used by the structure members. + \param _info The #OpusServerInfo structure to clear. + \note If you use this function, you must link against libopusurl.*/ +void opus_server_info_clear(OpusServerInfo *_info) OP_ARG_NONNULL(1); /**Skip the certificate check when connecting via TLS/SSL (https). \param _b opus_int32: Whether or not to skip the certificate @@ -467,7 +764,7 @@ void opus_tags_clear(OpusTags *_tags) OP_ARG_NONNULL(1); arguments. \hideinitializer*/ #define OP_HTTP_PROXY_USER(_user) \ - OP_URL_OPT(OP_HTTP_PROXY_USER_REQUEST),OP_CHECK_CONST_CHAR_PTR(_host) + OP_URL_OPT(OP_HTTP_PROXY_USER_REQUEST),OP_CHECK_CONST_CHAR_PTR(_user) /**Use the given password for authentication when proxying connections. All proxy parameters are ignored for non-http and non-https URLs. @@ -480,7 +777,28 @@ void opus_tags_clear(OpusTags *_tags) OP_ARG_NONNULL(1); arguments. \hideinitializer*/ #define OP_HTTP_PROXY_PASS(_pass) \ - OP_URL_OPT(OP_HTTP_PROXY_PASS_REQUEST),OP_CHECK_CONST_CHAR_PTR(_host) + OP_URL_OPT(OP_HTTP_PROXY_PASS_REQUEST),OP_CHECK_CONST_CHAR_PTR(_pass) + +/**Parse information about the streaming server (if any) and return it. + Very little validation is done. + In particular, OpusServerInfo::url may not be a valid URL, + OpusServerInfo::bitrate_kbps may not really be in kbps, and + OpusServerInfo::content_type may not be a valid MIME type. + The character set of the string fields is not specified anywhere, and should + not be assumed to be valid UTF-8. + \param _info OpusServerInfo *: Returns information about the server. + If there is any error opening the stream, the + contents of this structure remain + unmodified. + On success, fills in the structure with the + server information that was available, if + any. + After a successful return, the contents of + this structure should be freed by calling + opus_server_info_clear(). + \hideinitializer*/ +#define OP_GET_SERVER_INFO(_info) \ + OP_URL_OPT(OP_GET_SERVER_INFO_REQUEST),OP_CHECK_SERVER_INFO_PTR(_info) /*@}*/ /*@}*/ @@ -497,8 +815,6 @@ void opus_tags_clear(OpusTags *_tags) OP_ARG_NONNULL(1); block of memory, or URLs.*/ /*@{*/ -typedef struct OpusFileCallbacks OpusFileCallbacks; - /**Reads up to \a _nbytes bytes of data from \a _stream. \param _stream The stream to read from. \param[out] _ptr The buffer to store the data in. @@ -564,6 +880,10 @@ struct OpusFileCallbacks{ If there is an error opening the file, nothing will be filled in here. \param _path The path to the file to open. + On Windows, this string must be UTF-8 (to allow access to + files whose names cannot be represented in the current + MBCS code page). + All other systems use the native character encoding. \param _mode The mode to open the file in. \return A stream handle to use with the callbacks, or NULL on error.*/ @@ -597,6 +917,10 @@ OP_WARN_UNUSED_RESULT void *op_fdopen(OpusFileCallbacks *_cb, If there is an error opening the file, nothing will be filled in here. \param _path The path to the file to open. + On Windows, this string must be UTF-8 (to allow access + to files whose names cannot be represented in the + current MBCS code page). + All other systems use the native character encoding. \param _mode The mode to open the file in. \param _stream A stream previously returned by op_fopen(), op_fdopen(), or op_freopen(). @@ -624,6 +948,7 @@ OP_WARN_UNUSED_RESULT void *op_mem_stream_create(OpusFileCallbacks *_cb, takes a va_list instead of a variable number of arguments. It does not call the va_end macro, and because it invokes the va_arg macro, the value of \a _ap is undefined after the call. + \note If you use this function, you must link against libopusurl. \param[out] _cb The callbacks to use for this stream. If there is an error creating the stream, nothing will be filled in here. @@ -632,6 +957,10 @@ OP_WARN_UNUSED_RESULT void *op_mem_stream_create(OpusFileCallbacks *_cb, schemes are supported. Both and may be disabled at compile time, in which case opening such URLs will always fail. + Currently this only supports URIs. + IRIs should be converted to UTF-8 and URL-escaped, with + internationalized domain names encoded in punycode, + before passing them to this function. \param[in,out] _ap A list of the \ref url_options "optional flags" to use. This is a variable-length list of options terminated with NULL. @@ -640,7 +969,8 @@ OP_WARN_UNUSED_RESULT void *op_mem_stream_create(OpusFileCallbacks *_cb, OP_WARN_UNUSED_RESULT void *op_url_stream_vcreate(OpusFileCallbacks *_cb, const char *_url,va_list _ap) OP_ARG_NONNULL(1) OP_ARG_NONNULL(2); -/**Creates a stream that reads from the given URL using the specified proxy. +/**Creates a stream that reads from the given URL. + \note If you use this function, you must link against libopusurl. \param[out] _cb The callbacks to use for this stream. If there is an error creating the stream, nothing will be filled in here. @@ -649,6 +979,10 @@ OP_WARN_UNUSED_RESULT void *op_url_stream_vcreate(OpusFileCallbacks *_cb, are supported. Both and may be disabled at compile time, in which case opening such URLs will always fail. + Currently this only supports URIs. + IRIs should be converted to UTF-8 and URL-escaped, with + internationalized domain names encoded in punycode, before + passing them to this function. \param ... The \ref url_options "optional flags" to use. This is a variable-length list of options terminated with NULL. @@ -731,12 +1065,17 @@ OP_WARN_UNUSED_RESULT OggOpusFile *op_open_memory(const unsigned char *_data, takes a va_list instead of a variable number of arguments. It does not call the va_end macro, and because it invokes the va_arg macro, the value of \a _ap is undefined after the call. + \note If you use this function, you must link against libopusurl. \param _url The URL to open. Currently only the , , and schemes are supported. Both and may be disabled at compile time, in which case opening such URLs will always fail. + Currently this only supports URIs. + IRIs should be converted to UTF-8 and URL-escaped, + with internationalized domain names encoded in + punycode, before passing them to this function. \param[out] _error Returns 0 on success, or a failure code on error. You may pass in NULL if you don't want the failure code. @@ -751,13 +1090,16 @@ OP_WARN_UNUSED_RESULT OggOpusFile *op_vopen_url(const char *_url, int *_error,va_list _ap) OP_ARG_NONNULL(1); /**Open a stream from a URL. - However, this approach will not work for live streams or HTTP/1.0 servers - (which do not support Range requets). + \note If you use this function, you must link against libopusurl. \param _url The URL to open. Currently only the , , and schemes are supported. Both and may be disabled at compile time, in which case opening such URLs will always fail. + Currently this only supports URIs. + IRIs should be converted to UTF-8 and URL-escaped, with + internationalized domain names encoded in punycode, + before passing them to this function. \param[out] _error Returns 0 on success, or a failure code on error. You may pass in NULL if you don't want the failure code. @@ -841,7 +1183,11 @@ OP_WARN_UNUSED_RESULT OggOpusFile *op_open_url(const char *_url,
The first or last timestamp in a link failed basic validity checks.
- \return A freshly opened \c OggOpusFile, or NULL on error.*/ + \return A freshly opened \c OggOpusFile, or NULL on error. + libopusfile does not take ownership of the source + if the call fails. + The calling application is responsible for closing the source if + this call returns an error.*/ OP_WARN_UNUSED_RESULT OggOpusFile *op_open_callbacks(void *_source, const OpusFileCallbacks *_cb,const unsigned char *_initial_data, size_t _initial_bytes,int *_error) OP_ARG_NONNULL(2); @@ -876,6 +1222,7 @@ OP_WARN_UNUSED_RESULT OggOpusFile *op_test_memory(const unsigned char *_data, takes a va_list instead of a variable number of arguments. It does not call the va_end macro, and because it invokes the va_arg macro, the value of \a _ap is undefined after the call. + \note If you use this function, you must link against libopusurl. \see op_test_url \see op_test_callbacks \param _url The URL to open. @@ -884,6 +1231,10 @@ OP_WARN_UNUSED_RESULT OggOpusFile *op_test_memory(const unsigned char *_data, Both and may be disabled at compile time, in which case opening such URLs will always fail. + Currently this only supports URIs. + IRIs should be converted to UTF-8 and URL-escaped, + with internationalized domain names encoded in + punycode, before passing them to this function. \param[out] _error Returns 0 on success, or a failure code on error. You may pass in NULL if you don't want the failure code. @@ -898,12 +1249,17 @@ OP_WARN_UNUSED_RESULT OggOpusFile *op_vtest_url(const char *_url, int *_error,va_list _ap) OP_ARG_NONNULL(1); /**Partially open a stream from a URL. + \note If you use this function, you must link against libopusurl. \see op_test_callbacks \param _url The URL to open. Currently only the , , and schemes are supported. Both and may be disabled at compile time, in which case opening such URLs will always fail. + Currently this only supports URIs. + IRIs should be converted to UTF-8 and URL-escaped, with + internationalized domain names encoded in punycode, + before passing them to this function. \param[out] _error Returns 0 on success, or a failure code on error. You may pass in NULL if you don't want the failure code. @@ -974,7 +1330,11 @@ OP_WARN_UNUSED_RESULT OggOpusFile *op_test_url(const char *_url, the failure code. See op_open_callbacks() for a full list of failure codes. - \return A partially opened \c OggOpusFile, or NULL on error.*/ + \return A partially opened \c OggOpusFile, or NULL on error. + libopusfile does not take ownership of the source + if the call fails. + The calling application is responsible for closing the source if + this call returns an error.*/ OP_WARN_UNUSED_RESULT OggOpusFile *op_test_callbacks(void *_source, const OpusFileCallbacks *_cb,const unsigned char *_initial_data, size_t _initial_bytes,int *_error) OP_ARG_NONNULL(2); @@ -1046,7 +1406,7 @@ void op_free(OggOpusFile *_of); This function may be called on partially-opened streams. \param _of The \c OggOpusFile whose seekable status is to be returned. \return A non-zero value if seekable, and 0 if unseekable.*/ -int op_seekable(OggOpusFile *_of) OP_ARG_NONNULL(1); +int op_seekable(const OggOpusFile *_of) OP_ARG_NONNULL(1); /**Returns the number of links in this chained stream. This function may be called on partially-opened streams, but it will always @@ -1054,9 +1414,9 @@ int op_seekable(OggOpusFile *_of) OP_ARG_NONNULL(1); The actual number of links is not known until the stream is fully opened. \param _of The \c OggOpusFile from which to retrieve the link count. \return For fully-open seekable sources, this returns the total number of - links in the whole stream. + links in the whole stream, which will be at least 1. For partially-open or unseekable sources, this always returns 1.*/ -int op_link_count(OggOpusFile *_of) OP_ARG_NONNULL(1); +int op_link_count(const OggOpusFile *_of) OP_ARG_NONNULL(1); /**Get the serial number of the given link in a (possibly-chained) Ogg Opus stream. @@ -1071,7 +1431,7 @@ int op_link_count(OggOpusFile *_of) OP_ARG_NONNULL(1); the serial number of the last link. If the source is not seekable, this always returns the serial number of the current link.*/ -opus_uint32 op_serialno(OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); +opus_uint32 op_serialno(const OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); /**Get the channel count of the given link in a (possibly-chained) Ogg Opus stream. @@ -1088,7 +1448,7 @@ opus_uint32 op_serialno(OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); the channel count of the last link. If the source is not seekable, this always returns the channel count of the current link.*/ -int op_channel_count(OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); +int op_channel_count(const OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); /**Get the total (compressed) size of the stream, or of an individual link in a (possibly-chained) Ogg Opus stream, including all headers and Ogg muxing @@ -1106,7 +1466,7 @@ int op_channel_count(OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); \retval #OP_EINVAL The source is not seekable (so we can't know the length), \a _li wasn't less than the total number of links in the stream, or the stream was only partially open.*/ -opus_int64 op_raw_total(OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); +opus_int64 op_raw_total(const OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); /**Get the total PCM length (number of samples at 48 kHz) of the stream, or of an individual link in a (possibly-chained) Ogg Opus stream. @@ -1124,7 +1484,7 @@ opus_int64 op_raw_total(OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); \retval #OP_EINVAL The source is not seekable (so we can't know the length), \a _li wasn't less than the total number of links in the stream, or the stream was only partially open.*/ -ogg_int64_t op_pcm_total(OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); +ogg_int64_t op_pcm_total(const OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); /**Get the ID header information for the given link in a (possibly chained) Ogg Opus stream. @@ -1140,7 +1500,7 @@ ogg_int64_t op_pcm_total(OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); information for the current link is always returned, if available. \return The contents of the ID header for the given link.*/ -const OpusHead *op_head(OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); +const OpusHead *op_head(const OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); /**Get the comment header information for the given link in a (possibly chained) Ogg Opus stream. @@ -1158,7 +1518,7 @@ const OpusHead *op_head(OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); \return The contents of the comment header for the given link, or NULL if this is an unseekable stream that encountered an invalid link.*/ -const OpusTags *op_tags(OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); +const OpusTags *op_tags(const OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); /**Retrieve the index of the current link. This is the link that produced the data most recently read by @@ -1175,7 +1535,7 @@ const OpusTags *op_tags(OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); each time a new link is encountered (even though op_link_count() always returns 1). \retval #OP_EINVAL The stream was only partially open.*/ -int op_current_link(OggOpusFile *_of) OP_ARG_NONNULL(1); +int op_current_link(const OggOpusFile *_of) OP_ARG_NONNULL(1); /**Computes the bitrate for a given link in a (possibly chained) Ogg Opus stream. @@ -1188,7 +1548,7 @@ int op_current_link(OggOpusFile *_of) OP_ARG_NONNULL(1); \retval #OP_EINVAL The stream was only partially open, the stream was not seekable, or \a _li was larger than the number of links.*/ -opus_int32 op_bitrate(OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); +opus_int32 op_bitrate(const OggOpusFile *_of,int _li) OP_ARG_NONNULL(1); /**Compute the instantaneous bitrate, measured as the ratio of bits to playable samples decoded since a) the last call to op_bitrate_instant(), b) the last @@ -1207,7 +1567,7 @@ opus_int32 op_bitrate_instant(OggOpusFile *_of) OP_ARG_NONNULL(1); \param _of The \c OggOpusFile from which to retrieve the position indicator. \return The byte position that is currently being read from. \retval #OP_EINVAL The stream was only partially open.*/ -opus_int64 op_raw_tell(OggOpusFile *_of) OP_ARG_NONNULL(1); +opus_int64 op_raw_tell(const OggOpusFile *_of) OP_ARG_NONNULL(1); /**Obtain the PCM offset of the next sample to be read. If the stream is not properly timestamped, this might not increment by the @@ -1216,7 +1576,7 @@ opus_int64 op_raw_tell(OggOpusFile *_of) OP_ARG_NONNULL(1); \param _of The \c OggOpusFile from which to retrieve the PCM offset. \return The PCM offset of the next sample to be read. \retval #OP_EINVAL The stream was only partially open.*/ -ogg_int64_t op_pcm_tell(OggOpusFile *_of) OP_ARG_NONNULL(1); +ogg_int64_t op_pcm_tell(const OggOpusFile *_of) OP_ARG_NONNULL(1); /*@}*/ /*@}*/ @@ -1303,11 +1663,12 @@ int op_pcm_seek(OggOpusFile *_of,ogg_int64_t _pcm_offset) OP_ARG_NONNULL(1); clipping and other issues which might be avoided entirely if, e.g., you scale down the volume at some other stage. However, if you intend to direct consume 16-bit samples, the conversion in - libopusfile provides noise-shaping dithering API. + libopusfile provides noise-shaping dithering and, if compiled + against libopus 1.1 or later, soft-clipping prevention. libopusfile can also be configured at compile time to use the fixed-point libopus API. - If so, the floating-point API may also be disabled. + If so, libopusfile's floating-point API may also be disabled. In that configuration, nothing in libopusfile will use any floating-point operations, to simplify support on devices without an adequate FPU. @@ -1316,20 +1677,125 @@ int op_pcm_seek(OggOpusFile *_of,ogg_int64_t _pcm_offset) OP_ARG_NONNULL(1); not check the error return code from op_read_float() or its associated functions. If the remote peer does not close the connection gracefully (with a TLS - "close notify" message), these functions will return OP_EREAD instead of 0 + "close notify" message), these functions will return #OP_EREAD instead of 0 when they reach the end of the file. If you are reading from an URL (particularly if seeking is not supported), you should make sure to check for this error and warn the user appropriately.*/ /*@{*/ +/**Indicates that the decoding callback should produce signed 16-bit + native-endian output samples.*/ +#define OP_DEC_FORMAT_SHORT (7008) +/**Indicates that the decoding callback should produce 32-bit native-endian + float samples.*/ +#define OP_DEC_FORMAT_FLOAT (7040) + +/**Indicates that the decoding callback did not decode anything, and that + libopusfile should decode normally instead.*/ +#define OP_DEC_USE_DEFAULT (6720) + +/**Called to decode an Opus packet. + This should invoke the functional equivalent of opus_multistream_decode() or + opus_multistream_decode_float(), except that it returns 0 on success + instead of the number of decoded samples (which is known a priori). + \param _ctx The application-provided callback context. + \param _decoder The decoder to use to decode the packet. + \param[out] _pcm The buffer to decode into. + This will always have enough room for \a _nchannels of + \a _nsamples samples, which should be placed into this + buffer interleaved. + \param _op The packet to decode. + This will always have its granule position set to a valid + value. + \param _nsamples The number of samples expected from the packet. + \param _nchannels The number of channels expected from the packet. + \param _format The desired sample output format. + This is either #OP_DEC_FORMAT_SHORT or + #OP_DEC_FORMAT_FLOAT. + \param _li The index of the link from which this packet was decoded. + \return A non-negative value on success, or a negative value on error. + The error codes should be the same as those returned by + opus_multistream_decode() or opus_multistream_decode_float(). + \retval 0 Decoding was successful. + The application has filled the buffer with + exactly \a _nsamples*\a + _nchannels samples in the requested + format. + \retval #OP_DEC_USE_DEFAULT No decoding was done. + libopusfile should decode normally + instead.*/ +typedef int (*op_decode_cb_func)(void *_ctx,OpusMSDecoder *_decoder,void *_pcm, + const ogg_packet *_op,int _nsamples,int _nchannels,int _format,int _li); + +/**Sets the packet decode callback function. + This is called once for each packet that needs to be decoded. + A call to this function is no guarantee that the audio will eventually be + delivered to the application. + Some or all of the data from the packet may be discarded (i.e., at the + beginning or end of a link, or after a seek), however the callback is + required to provide all of it. + \param _of The \c OggOpusFile on which to set the decode callback. + \param _decode_cb The callback function to call. + This may be NULL to disable calling the + callback. + \param _ctx The application-provided context pointer to pass to the + callback on each call.*/ +void op_set_decode_callback(OggOpusFile *_of, + op_decode_cb_func _decode_cb,void *_ctx) OP_ARG_NONNULL(1); + +/**Gain offset type that indicates that the provided offset is relative to the + header gain. + This is the default.*/ +#define OP_HEADER_GAIN (0) + +/**Gain offset type that indicates that the provided offset is relative to the + R128_TRACK_GAIN value (if any), in addition to the header gain.*/ +#define OP_TRACK_GAIN (3008) + +/**Gain offset type that indicates that the provided offset should be used as + the gain directly, without applying any the header or track gains.*/ +#define OP_ABSOLUTE_GAIN (3009) + +/**Sets the gain to be used for decoded output. + By default, the gain in the header is applied with no additional offset. + The total gain (including header gain and/or track gain, if applicable, and + this offset), will be clamped to [-32768,32767]/256 dB. + This is more than enough to saturate or underflow 16-bit PCM. + \note The new gain will not be applied to any already buffered, decoded + output. + This means you cannot change it sample-by-sample, as at best it will be + updated packet-by-packet. + It is meant for setting a target volume level, rather than applying smooth + fades, etc. + \param _of The \c OggOpusFile on which to set the gain offset. + \param _gain_type One of #OP_HEADER_GAIN, #OP_TRACK_GAIN, or + #OP_ABSOLUTE_GAIN. + \param _gain_offset_q8 The gain offset to apply, in 1/256ths of a dB. + \return 0 on success or a negative value on error. + \retval #OP_EINVAL The \a _gain_type was unrecognized.*/ +int op_set_gain_offset(OggOpusFile *_of, + int _gain_type,opus_int32 _gain_offset_q8) OP_ARG_NONNULL(1); + +/**Sets whether or not dithering is enabled for 16-bit decoding. + By default, when libopusfile is compiled to use floating-point + internally, calling op_read() or op_read_stereo() will first decode to + float, and then convert to fixed-point using noise-shaping dithering. + This flag can be used to disable that dithering. + When the application uses op_read_float() or op_read_float_stereo(), or when + the library has been compiled to decode directly to fixed point, this flag + has no effect. + \param _of The \c OggOpusFile on which to enable or disable dithering. + \param _enabled A non-zero value to enable dithering, or 0 to disable it.*/ +void op_set_dither_enabled(OggOpusFile *_of,int _enabled) OP_ARG_NONNULL(1); + /**Reads more samples from the stream. \note Although \a _buf_size must indicate the total number of values that can be stored in \a _pcm, the return value is the number of samples per channel. This is done because
    -
  1. The channel count cannot be known a prior (reading more samples might +
  2. The channel count cannot be known a priori (reading more samples might advance us into the next link, with a different channel count), so \a _buf_size cannot also be in units of samples per channel,
  3. Returning the samples per channel matches the libopus API @@ -1346,14 +1812,14 @@ int op_pcm_seek(OggOpusFile *_of,ogg_int64_t _pcm_offset) OP_ARG_NONNULL(1);
\param _of The \c OggOpusFile from which to read. \param[out] _pcm A buffer in which to store the output PCM samples, as - signed native-endian 16-bit values with a nominal - range of [-32768,32767). + signed native-endian 16-bit values at 48 kHz + with a nominal range of [-32768,32767). Multiple channels are interleaved using the Vorbis channel ordering. This must have room for at least \a _buf_size values. \param _buf_size The number of values that can be stored in \a _pcm. - It is reccommended that this be large enough for at + It is recommended that this be large enough for at least 120 ms of data at 48 kHz per channel (5760 values per channel). Smaller buffers will simply return less data, possibly @@ -1411,7 +1877,7 @@ OP_WARN_UNUSED_RESULT int op_read(OggOpusFile *_of, can be stored in \a _pcm, the return value is the number of samples per channel.
    -
  1. The channel count cannot be known a prior (reading more samples might +
  2. The channel count cannot be known a priori (reading more samples might advance us into the next link, with a different channel count), so \a _buf_size cannot also be in units of samples per channel,
  3. Returning the samples per channel matches the libopus API @@ -1428,14 +1894,14 @@ OP_WARN_UNUSED_RESULT int op_read(OggOpusFile *_of,
\param _of The \c OggOpusFile from which to read. \param[out] _pcm A buffer in which to store the output PCM samples as - signed floats with a nominal range of + signed floats at 48 kHz with a nominal range of [-1.0,1.0]. Multiple channels are interleaved using the Vorbis channel ordering. This must have room for at least \a _buf_size floats. \param _buf_size The number of floats that can be stored in \a _pcm. - It is reccommended that this be large enough for at + It is recommended that this be large enough for at least 120 ms of data at 48 kHz per channel (5760 samples per channel). Smaller buffers will simply return less data, possibly @@ -1497,13 +1963,13 @@ OP_WARN_UNUSED_RESULT int op_read_float(OggOpusFile *_of, op_read(). \param _of The \c OggOpusFile from which to read. \param[out] _pcm A buffer in which to store the output PCM samples, as - signed native-endian 16-bit values with a nominal - range of [-32768,32767). + signed native-endian 16-bit values at 48 kHz + with a nominal range of [-32768,32767). The left and right channels are interleaved in the buffer. This must have room for at least \a _buf_size values. \param _buf_size The number of values that can be stored in \a _pcm. - It is reccommended that this be large enough for at + It is recommended that this be large enough for at least 120 ms of data at 48 kHz per channel (11520 values total). Smaller buffers will simply return less data, possibly @@ -1558,13 +2024,13 @@ OP_WARN_UNUSED_RESULT int op_read_stereo(OggOpusFile *_of, op_read_float(). \param _of The \c OggOpusFile from which to read. \param[out] _pcm A buffer in which to store the output PCM samples, as - signed floats with a nominal range of + signed floats at 48 kHz with a nominal range of [-1.0,1.0]. The left and right channels are interleaved in the buffer. This must have room for at least \a _buf_size values. \param _buf_size The number of values that can be stored in \a _pcm. - It is reccommended that this be large enough for at + It is recommended that this be large enough for at least 120 ms of data at 48 kHz per channel (11520 values total). Smaller buffers will simply return less data, possibly diff --git a/code/opusfile-0.2/src/http.c b/code/opusfile-0.5/src/http.c similarity index 86% rename from code/opusfile-0.2/src/http.c rename to code/opusfile-0.5/src/http.c index 09580c6f..4a9eaf59 100644 --- a/code/opusfile-0.2/src/http.c +++ b/code/opusfile-0.5/src/http.c @@ -9,6 +9,10 @@ * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * * * ********************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "internal.h" #include #include @@ -40,7 +44,8 @@ RFC 6066: Transport Layer Security (TLS) Extensions: Extension Definitions RFC 6125: Representation and Verification of Domain-Based Application Service Identity within Internet Public Key Infrastructure Using X.509 (PKIX) - Certificates in the Context of Transport Layer Security (TLS)*/ + Certificates in the Context of Transport Layer Security (TLS) + RFC 6555: Happy Eyeballs: Success with Dual-Stack Hosts*/ typedef struct OpusParsedURL OpusParsedURL; typedef struct OpusStringBuf OpusStringBuf; @@ -56,7 +61,7 @@ static char *op_string_range_dup(const char *_start,const char *_end){ if(OP_UNLIKELY(len>=INT_MAX))return NULL; ret=(char *)_ogg_malloc(sizeof(*ret)*(len+1)); if(OP_LIKELY(ret!=NULL)){ - memcpy(ret,_start,sizeof(*ret)*(len)); + ret=(char *)memcpy(ret,_start,sizeof(*ret)*(len)); ret[len]='\0'; } return ret; @@ -205,18 +210,144 @@ static const char *op_parse_file_url(const char *_src){ } #if defined(OP_ENABLE_HTTP) -# include -# include -# include +# if defined(_WIN32) +# include +# include +# include +# include "winerrno.h" + +typedef SOCKET op_sock; + +# define OP_INVALID_SOCKET (INVALID_SOCKET) + +/*Vista and later support WSAPoll(), but we don't want to rely on that. + Instead we re-implement it badly using select(). + Unfortunately, they define a conflicting struct pollfd, so we only define our + own if it looks like that one has not already been defined.*/ +# if !defined(POLLIN) +/*Equivalent to POLLIN.*/ +# define POLLRDNORM (0x0100) +/*Priority band data can be read.*/ +# define POLLRDBAND (0x0200) +/*There is data to read.*/ +# define POLLIN (POLLRDNORM|POLLRDBAND) +/* There is urgent data to read.*/ +# define POLLPRI (0x0400) +/*Equivalent to POLLOUT.*/ +# define POLLWRNORM (0x0010) +/*Writing now will not block.*/ +# define POLLOUT (POLLWRNORM) +/*Priority data may be written.*/ +# define POLLWRBAND (0x0020) +/*Error condition (output only).*/ +# define POLLERR (0x0001) +/*Hang up (output only).*/ +# define POLLHUP (0x0002) +/*Invalid request: fd not open (output only).*/ +# define POLLNVAL (0x0004) + +struct pollfd{ + /*File descriptor.*/ + op_sock fd; + /*Requested events.*/ + short events; + /*Returned events.*/ + short revents; +}; +# endif + +/*But Winsock never defines nfds_t (it's simply hard-coded to ULONG).*/ +typedef unsigned long nfds_t; + +/*The usage of FD_SET() below is O(N^2). + This is okay because select() is limited to 64 sockets in Winsock, anyway. + In practice, we only ever call it with one or two sockets.*/ +static int op_poll_win32(struct pollfd *_fds,nfds_t _nfds,int _timeout){ + struct timeval tv; + fd_set ifds; + fd_set ofds; + fd_set efds; + nfds_t i; + int ret; + FD_ZERO(&ifds); + FD_ZERO(&ofds); + FD_ZERO(&efds); + for(i=0;i<_nfds;i++){ + _fds[i].revents=0; + if(_fds[i].events&POLLIN)FD_SET(_fds[i].fd,&ifds); + if(_fds[i].events&POLLOUT)FD_SET(_fds[i].fd,&ofds); + FD_SET(_fds[i].fd,&efds); + } + if(_timeout>=0){ + tv.tv_sec=_timeout/1000; + tv.tv_usec=(_timeout%1000)*1000; + } + ret=select(-1,&ifds,&ofds,&efds,_timeout<0?NULL:&tv); + if(ret>0){ + for(i=0;i<_nfds;i++){ + if(FD_ISSET(_fds[i].fd,&ifds))_fds[i].revents|=POLLIN; + if(FD_ISSET(_fds[i].fd,&ofds))_fds[i].revents|=POLLOUT; + /*This isn't correct: there are several different things that might have + happened to a fd in efds, but I don't know a good way to distinguish + them without more context from the caller. + It's okay, because we don't actually check any of these bits, we just + need _some_ bit set.*/ + if(FD_ISSET(_fds[i].fd,&efds))_fds[i].revents|=POLLHUP; + } + } + return ret; +} + +/*We define op_errno() to make it clear that it's not an l-value like normal + errno is.*/ +# define op_errno() (WSAGetLastError()?WSAGetLastError()-WSABASEERR:0) +# define op_reset_errno() (WSASetLastError(0)) + +/*The remaining functions don't get an op_ prefix even though they only + operate on sockets, because we don't use non-socket I/O here, and this + minimizes the changes needed to deal with Winsock.*/ +# define close(_fd) closesocket(_fd) +/*This relies on sizeof(u_long)==sizeof(int), which is always true on both + Win32 and Win64.*/ +# define ioctl(_fd,_req,_arg) ioctlsocket(_fd,_req,(u_long *)(_arg)) +# define getsockopt(_fd,_level,_name,_val,_len) \ + getsockopt(_fd,_level,_name,(char *)(_val),_len) +# define setsockopt(_fd,_level,_name,_val,_len) \ + setsockopt(_fd,_level,_name,(const char *)(_val),_len) +# define poll(_fds,_nfds,_timeout) op_poll_win32(_fds,_nfds,_timeout) + +# if defined(_MSC_VER) +typedef ptrdiff_t ssize_t; +# endif + +/*Load certificates from the built-in certificate store.*/ +int SSL_CTX_set_default_verify_paths_win32(SSL_CTX *_ssl_ctx); +# define SSL_CTX_set_default_verify_paths \ + SSL_CTX_set_default_verify_paths_win32 + +# else +/*Normal Berkeley sockets.*/ +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +typedef int op_sock; + +# define OP_INVALID_SOCKET (-1) + +# define op_errno() (errno) +# define op_reset_errno() (errno=0) + +# endif # include -# include -# include -# include -# include -# include -# include -# include -# include # include /*The maximum number of simultaneous connections. @@ -228,6 +359,11 @@ static const char *op_parse_file_url(const char *_src){ when seeking, and time out rapidly.*/ # define OP_NCONNS_MAX (4) +/*The amount of time before we attempt to re-resolve the host. + This is 10 minutes, as recommended in RFC 6555 for expiring cached connection + results for dual-stack hosts.*/ +# define OP_RESOLVE_CACHE_TIMEOUT_MS (10*60*(opus_int32)1000) + /*The number of redirections at which we give up. The value here is the current default in Firefox. RFC 2068 mandated a maximum of 5, but RFC 2616 relaxed that to "a client @@ -486,6 +622,8 @@ static void op_sb_clear(OpusStringBuf *_sb){ _ogg_free(_sb->buf); } +/*Make sure we have room for at least _capacity characters (plus 1 more for the + terminating NUL).*/ static int op_sb_ensure_capacity(OpusStringBuf *_sb,int _capacity){ char *buf; int cbuf; @@ -503,6 +641,8 @@ static int op_sb_ensure_capacity(OpusStringBuf *_sb,int _capacity){ return 0; } +/*Increase the capacity of the buffer, but not to more than _max_size + characters (plus 1 more for the terminating NUL).*/ static int op_sb_grow(OpusStringBuf *_sb,int _max_size){ char *buf; int cbuf; @@ -581,27 +721,33 @@ static struct addrinfo *op_resolve(const char *_host,unsigned _port){ char service[6]; memset(&hints,0,sizeof(hints)); hints.ai_socktype=SOCK_STREAM; +#if !defined(_WIN32) hints.ai_flags=AI_NUMERICSERV; +#endif OP_ASSERT(_port<=65535U); sprintf(service,"%u",_port); if(OP_LIKELY(!getaddrinfo(_host,service,&hints,&addrs)))return addrs; return NULL; } -static int op_sock_set_nonblocking(int _fd,int _nonblocking){ +static int op_sock_set_nonblocking(op_sock _fd,int _nonblocking){ +#if !defined(_WIN32) int flags; flags=fcntl(_fd,F_GETFL); if(OP_UNLIKELY(flags<0))return flags; if(_nonblocking)flags|=O_NONBLOCK; else flags&=~O_NONBLOCK; return fcntl(_fd,F_SETFL,flags); +#else + return ioctl(_fd,FIONBIO,&_nonblocking); +#endif } /*Disable/enable write coalescing if we can. We always send whole requests at once and always parse the response headers before sending another one, so normally write coalescing just causes added delay.*/ -static void op_sock_set_tcp_nodelay(int _fd,int _nodelay){ +static void op_sock_set_tcp_nodelay(op_sock _fd,int _nodelay){ # if defined(TCP_NODELAY)&&(defined(IPPROTO_TCP)||defined(SOL_TCP)) # if defined(IPPROTO_TCP) # define OP_SO_LEVEL IPPROTO_TCP @@ -615,6 +761,14 @@ static void op_sock_set_tcp_nodelay(int _fd,int _nodelay){ # endif } +#if defined(_WIN32) +static void op_init_winsock(){ + static LONG count; + static WSADATA wsadata; + if(InterlockedIncrement(&count)==1)WSAStartup(0x0202,&wsadata); +} +#endif + /*A single physical connection to an HTTP server. We may have several of these open at once.*/ struct OpusHTTPConn{ @@ -640,7 +794,7 @@ struct OpusHTTPConn{ /*The estimated throughput of this connection, in bytes/s.*/ opus_int64 read_rate; /*The socket we're reading from.*/ - int fd; + op_sock fd; /*The number of remaining requests we are allowed on this connection.*/ int nrequests_left; /*The chunk size to use for pipelining requests.*/ @@ -651,13 +805,13 @@ static void op_http_conn_init(OpusHTTPConn *_conn){ _conn->next_pos=-1; _conn->ssl_conn=NULL; _conn->next=NULL; - _conn->fd=-1; + _conn->fd=OP_INVALID_SOCKET; } static void op_http_conn_clear(OpusHTTPConn *_conn){ if(_conn->ssl_conn!=NULL)SSL_free(_conn->ssl_conn); /*SSL frees the BIO for us.*/ - if(_conn->fd>=0)close(_conn->fd); + if(_conn->fd!=OP_INVALID_SOCKET)close(_conn->fd); } /*The global stream state.*/ @@ -683,6 +837,8 @@ struct OpusHTTPStream{ struct sockaddr_in v4; struct sockaddr_in6 v6; } addr; + /*The last time we re-resolved the host.*/ + struct timeb resolve_time; /*A buffer used to build HTTP requests.*/ OpusStringBuf request; /*A buffer used to build proxy CONNECT requests.*/ @@ -694,6 +850,10 @@ struct OpusHTTPStream{ opus_int64 content_length; /*The position indicator used when no connection is active.*/ opus_int64 pos; + /*The host we actually connected to.*/ + char *connect_host; + /*The port we actually connected to.*/ + unsigned connect_port; /*The connection we're currently reading from. This can be -1 if no connection is active.*/ int cur_conni; @@ -713,7 +873,7 @@ struct OpusHTTPStream{ static void op_http_stream_init(OpusHTTPStream *_stream){ OpusHTTPConn **pnext; - int ci; + int ci; pnext=&_stream->free_head; for(ci=0;ciconns+ci); @@ -727,6 +887,7 @@ static void op_http_stream_init(OpusHTTPStream *_stream){ op_sb_init(&_stream->request); op_sb_init(&_stream->proxy_connect); op_sb_init(&_stream->response); + _stream->connect_host=NULL; _stream->seekable=0; } @@ -744,19 +905,13 @@ static void op_http_conn_close(OpusHTTPStream *_stream,OpusHTTPConn *_conn, However, we will not wait if this would block (it's not worth the savings from session resumption to do so). Clients (that's us) MAY resume a TLS session that ended with an incomplete - close, according to RFC 2818, so that's no reason to make sure the server - shut things down gracefully. - It also says "client implementations MUST treat any premature closes as - errors and the data received as potentially truncated," but libopusfile - treats errors and potentially truncated data in unseekable streams just - like a normal EOF. - We warn about this in the docs, and give some suggestions if you truly want - to avoid truncation attacks.*/ + close, according to RFC 2818, so there's no reason to make sure the server + shut things down gracefully.*/ if(_gracefully&&_conn->ssl_conn!=NULL)SSL_shutdown(_conn->ssl_conn); op_http_conn_clear(_conn); _conn->next_pos=-1; _conn->ssl_conn=NULL; - _conn->fd=-1; + _conn->fd=OP_INVALID_SOCKET; OP_ASSERT(*_pnext==_conn); *_pnext=_conn->next; _conn->next=_stream->free_head; @@ -772,6 +927,7 @@ static void op_http_stream_clear(OpusHTTPStream *_stream){ op_sb_clear(&_stream->response); op_sb_clear(&_stream->proxy_connect); op_sb_clear(&_stream->request); + if(_stream->connect_host!=_stream->url.host)_ogg_free(_stream->connect_host); op_parsed_url_clear(&_stream->url); } @@ -802,14 +958,14 @@ static int op_http_conn_write_fully(OpusHTTPConn *_conn, } else{ ssize_t ret; - errno=0; - ret=write(fd.fd,_buf,_buf_size); + op_reset_errno(); + ret=send(fd.fd,_buf,_buf_size,0); if(ret>0){ _buf+=ret; _buf_size-=ret; continue; } - err=errno; + err=op_errno(); if(err!=EAGAIN&&err!=EWOULDBLOCK)return OP_FALSE; fd.events=POLLOUT; } @@ -839,11 +995,11 @@ static int op_http_conn_estimate_available(OpusHTTPConn *_conn){ static opus_int32 op_time_diff_ms(const struct timeb *_end, const struct timeb *_start){ opus_int64 dtime; - dtime=_end->time-_start->time; + dtime=_end->time-(opus_int64)_start->time; OP_ASSERT(_end->millitm<1000); OP_ASSERT(_start->millitm<1000); - if(OP_UNLIKELY(dtime>(0x7FFFFFFF-1000)/1000))return 0x7FFFFFFF; - if(OP_UNLIKELY(dtime<(-0x7FFFFFFF+999)/1000))return -0x7FFFFFFF-1; + if(OP_UNLIKELY(dtime>(OP_INT32_MAX-1000)/1000))return OP_INT32_MAX; + if(OP_UNLIKELY(dtime<(OP_INT32_MIN+1000)/1000))return OP_INT32_MIN; return (opus_int32)dtime*1000+_end->millitm-_start->millitm; } @@ -855,7 +1011,7 @@ static void op_http_conn_read_rate_update(OpusHTTPConn *_conn){ opus_int64 read_rate; read_delta_bytes=_conn->read_bytes; if(read_delta_bytes<=0)return; - OP_ALWAYS_TRUE(!ftime(&read_time)); + ftime(&read_time); read_delta_ms=op_time_diff_ms(&read_time,&_conn->read_time); read_rate=_conn->read_rate; read_delta_ms=OP_MAX(read_delta_ms,1); @@ -881,6 +1037,9 @@ static int op_http_conn_read(OpusHTTPConn *_conn, fd.fd=_conn->fd; ssl_conn=_conn->ssl_conn; nread=nread_unblocked=0; + /*RFC 2818 says "client implementations MUST treat any premature closes as + errors and the data received as potentially truncated," so we make very + sure to report read errors upwards.*/ do{ int err; if(ssl_conn!=NULL){ @@ -912,8 +1071,8 @@ static int op_http_conn_read(OpusHTTPConn *_conn, } else{ ssize_t ret; - errno=0; - ret=read(fd.fd,_buf+nread,_buf_size-nread); + op_reset_errno(); + ret=recv(fd.fd,_buf+nread,_buf_size-nread,0); OP_ASSERT(ret<=_buf_size-nread); if(ret>0){ /*Read some data. @@ -925,7 +1084,7 @@ static int op_http_conn_read(OpusHTTPConn *_conn, /*If we already read some data or the connection was closed, return right now.*/ if(ret==0||nread>0)break; - err=errno; + err=op_errno(); if(err!=EAGAIN&&err!=EWOULDBLOCK)return OP_EREAD; fd.events=POLLIN; } @@ -944,8 +1103,7 @@ static int op_http_conn_read(OpusHTTPConn *_conn, /*Tries to look at the pending data for a connection without consuming it. [out] _buf: Returns the data at which we're peeking. _buf_size: The size of the buffer.*/ -static int op_http_conn_peek(OpusHTTPConn *_conn, - char *_buf,int _buf_size){ +static int op_http_conn_peek(OpusHTTPConn *_conn,char *_buf,int _buf_size){ struct pollfd fd; SSL *ssl_conn; int ret; @@ -964,11 +1122,11 @@ static int op_http_conn_peek(OpusHTTPConn *_conn, else return 0; } else{ - errno=0; + op_reset_errno(); ret=(int)recv(fd.fd,_buf,_buf_size,MSG_PEEK); /*Either saw some data or the connection was closed.*/ if(ret>=0)return ret; - err=errno; + err=op_errno(); if(err!=EAGAIN&&err!=EWOULDBLOCK)return 0; fd.events=POLLIN; } @@ -1192,24 +1350,22 @@ static int op_http_get_next_header(char **_header,char **_cdr,char **_s){ static opus_int64 op_http_parse_nonnegative_int64(const char **_next, const char *_cdr){ const char *next; - opus_int64 content_length; + opus_int64 ret; int i; next=_cdr+strspn(_cdr,OP_HTTP_DIGIT); *_next=next; if(OP_UNLIKELY(next<=_cdr))return OP_FALSE; while(*_cdr=='0')_cdr++; if(OP_UNLIKELY(next-_cdr>19))return OP_EIMPL; - content_length=0; + ret=0; for(i=0;i(OP_INT64_MAX-9)/10+(digit<=7))){ - return OP_EIMPL; - } - content_length=content_length*10+digit; + if(OP_UNLIKELY(ret>(OP_INT64_MAX-9)/10+(digit<=7)))return OP_EIMPL; + ret=ret*10+digit; } - return content_length; + return ret; } static opus_int64 op_http_parse_content_length(const char *_cdr){ @@ -1295,7 +1451,7 @@ static int op_http_parse_connection(char *_cdr){ typedef int (*op_ssl_step_func)(SSL *_ssl_conn); /*Try to run an SSL function to completion (blocking if necessary).*/ -static int op_do_ssl_step(SSL *_ssl_conn,int _fd,op_ssl_step_func _step){ +static int op_do_ssl_step(SSL *_ssl_conn,op_sock _fd,op_ssl_step_func _step){ struct pollfd fd; fd.fd=_fd; for(;;){ @@ -1389,8 +1545,8 @@ static BIO_METHOD op_bio_retry_method={ /*Establish a CONNECT tunnel and pipeline the start of the TLS handshake for proxying https URL requests.*/ -int op_http_conn_establish_tunnel(OpusHTTPStream *_stream, - OpusHTTPConn *_conn,int _fd,SSL *_ssl_conn,BIO *_ssl_bio){ +static int op_http_conn_establish_tunnel(OpusHTTPStream *_stream, + OpusHTTPConn *_conn,op_sock _fd,SSL *_ssl_conn,BIO *_ssl_bio){ BIO *retry_bio; char *status_code; char *next; @@ -1507,8 +1663,7 @@ static struct addrinfo *op_inet_pton(const char *_host){ /*Verify the server's hostname matches the certificate they presented using the procedure from Section 6 of RFC 6125. Return: 0 if the certificate doesn't match, and a non-zero value if it does.*/ -static int op_http_verify_hostname(OpusHTTPStream *_stream, - SSL *_ssl_conn){ +static int op_http_verify_hostname(OpusHTTPStream *_stream,SSL *_ssl_conn){ X509 *peer_cert; STACK_OF(GENERAL_NAME) *san_names; char *host; @@ -1576,7 +1731,7 @@ static int op_http_verify_hostname(OpusHTTPStream *_stream, equivalent) of a URI or deriving the application service type from the scheme of a URI) ..." We don't have a way to check (without relying on DNS records, which might - be subverted), if this address is fully-qualified. + be subverted) if this address is fully-qualified. This is particularly problematic when using a CONNECT tunnel, as it is the server that does DNS lookup, not us. However, we are certain that if the hostname has no '.', it is definitely @@ -1659,8 +1814,8 @@ static int op_http_verify_hostname(OpusHTTPStream *_stream, } /*Perform the TLS handshake on a new connection.*/ -int op_http_conn_start_tls(OpusHTTPStream *_stream,OpusHTTPConn *_conn, - int _fd,SSL *_ssl_conn){ +static int op_http_conn_start_tls(OpusHTTPStream *_stream,OpusHTTPConn *_conn, + op_sock _fd,SSL *_ssl_conn){ SSL_SESSION *ssl_session; BIO *ssl_bio; int skip_certificate_check; @@ -1724,9 +1879,10 @@ int op_http_conn_start_tls(OpusHTTPStream *_stream,OpusHTTPConn *_conn, OP_FALSE If the connection failed and there were no more addresses left to try. *_addr will be set to NULL in this case.*/ -static int op_sock_connect_next(int _fd, - struct addrinfo **_addr,int _ai_family){ - struct addrinfo *addr; +static int op_sock_connect_next(op_sock _fd, + const struct addrinfo **_addr,int _ai_family){ + const struct addrinfo *addr; + int err; addr=*_addr; for(;;){ /*Move to the next address of the requested type.*/ @@ -1735,7 +1891,9 @@ static int op_sock_connect_next(int _fd, /*No more: failure.*/ if(addr==NULL)return OP_FALSE; if(connect(_fd,addr->ai_addr,addr->ai_addrlen)>=0)return 1; - if(OP_LIKELY(errno==EINPROGRESS))return 0; + err=op_errno(); + /*Winsock will set WSAEWOULDBLOCK.*/ + if(OP_LIKELY(err==EINPROGRESS||err==EWOULDBLOCK))return 0; addr=addr->ai_next; } } @@ -1743,36 +1901,30 @@ static int op_sock_connect_next(int _fd, /*The number of address families to try connecting to simultaneously.*/ # define OP_NPROTOS (2) -static int op_http_connect(OpusHTTPStream *_stream,OpusHTTPConn *_conn, - struct addrinfo *_addrs,struct timeb *_start_time){ - struct addrinfo *addr; - struct addrinfo *addrs[OP_NPROTOS]; - struct pollfd fds[OP_NPROTOS]; - int ai_family; - int nprotos; - int ret; - int pi; - int pj; +static int op_http_connect_impl(OpusHTTPStream *_stream,OpusHTTPConn *_conn, + const struct addrinfo *_addrs,struct timeb *_start_time){ + const struct addrinfo *addr; + const struct addrinfo *addrs[OP_NPROTOS]; + struct pollfd fds[OP_NPROTOS]; + int ai_family; + int nprotos; + int ret; + int pi; + int pj; for(pi=0;piai_next){ - /*Give IPv6 a slight edge by putting it first in the list.*/ - if(addr->ai_family==AF_INET6){ + one that succeeds. + Start by finding the first address from each family. + We order the first connection attempts in the same order the address + families were returned in the DNS records in accordance with RFC 6555.*/ + for(addr=_addrs,nprotos=0;addr!=NULL&&nprotosai_next){ + if(addr->ai_family==AF_INET6||addr->ai_family==AF_INET){ OP_ASSERT(addr->ai_addrlen<=sizeof(struct sockaddr_in6)); - if(addrs[0]==NULL)addrs[0]=addr; - } - else if(addr->ai_family==AF_INET){ OP_ASSERT(addr->ai_addrlen<=sizeof(struct sockaddr_in)); - if(addrs[1]==NULL)addrs[1]=addr; - } - } - /*Consolidate the list of addresses.*/ - for(pi=nprotos=0;piai_family==addr->ai_family)break; + if(pifree_head=_conn->next; _conn->next=_stream->lru_head; _stream->lru_head=_conn; - OP_ALWAYS_TRUE(!ftime(_start_time)); + ftime(_start_time); *&_conn->read_time=*_start_time; _conn->read_bytes=0; _conn->read_rate=0; - /*Try to start a connection to each protocol.*/ + /*Try to start a connection to each protocol. + RFC 6555 says it is RECOMMENDED that connection attempts be paced + 150...250 ms apart "to balance human factors against network load", but + that "stateful algorithms" (that's us) "are expected to be more + aggressive". + We are definitely more aggressive: we don't pace at all.*/ for(pi=0;piai_family; fds[pi].fd=socket(ai_family,SOCK_STREAM,addrs[pi]->ai_protocol); fds[pi].events=POLLOUT; - if(OP_LIKELY(fds[pi].fd>=0)){ + if(OP_LIKELY(fds[pi].fd!=OP_INVALID_SOCKET)){ if(OP_LIKELY(op_sock_set_nonblocking(fds[pi].fd,1)>=0)){ ret=op_sock_connect_next(fds[pi].fd,addrs+pi,ai_family); if(OP_UNLIKELY(ret>0)){ @@ -1820,7 +1977,7 @@ static int op_http_connect(OpusHTTPStream *_stream,OpusHTTPConn *_conn, /*Some platforms will return the pending error in &err and return 0. Others will put it in errno and return -1.*/ ret=getsockopt(fds[pi].fd,SOL_SOCKET,SO_ERROR,&err,&errlen); - if(ret<0)err=errno; + if(ret<0)err=op_errno(); /*Success!*/ if(err==0||err==EISCONN)break; /*Move on to the next address for this protocol.*/ @@ -1862,7 +2019,7 @@ static int op_http_connect(OpusHTTPStream *_stream,OpusHTTPConn *_conn, SSL_free(ssl_conn); } close(fds[pi].fd); - _conn->fd=-1; + _conn->fd=OP_INVALID_SOCKET; return OP_FALSE; } /*Just a normal non-SSL connection.*/ @@ -1876,6 +2033,29 @@ static int op_http_connect(OpusHTTPStream *_stream,OpusHTTPConn *_conn, return 0; } +static int op_http_connect(OpusHTTPStream *_stream,OpusHTTPConn *_conn, + const struct addrinfo *_addrs,struct timeb *_start_time){ + struct timeb resolve_time; + struct addrinfo *new_addrs; + int ret; + /*Re-resolve the host if we need to (RFC 6555 says we MUST do so + occasionally).*/ + new_addrs=NULL; + ftime(&resolve_time); + if(_addrs!=&_stream->addr_info||op_time_diff_ms(&resolve_time, + &_stream->resolve_time)>=OP_RESOLVE_CACHE_TIMEOUT_MS){ + new_addrs=op_resolve(_stream->connect_host,_stream->connect_port); + if(OP_LIKELY(new_addrs!=NULL)){ + _addrs=new_addrs; + *&_stream->resolve_time=*&resolve_time; + } + else if(OP_LIKELY(_addrs==NULL))return OP_FALSE; + } + ret=op_http_connect_impl(_stream,_conn,_addrs,_start_time); + if(new_addrs!=NULL)freeaddrinfo(new_addrs); + return ret; +} + # define OP_BASE64_LENGTH(_len) (((_len)+2)/3*4) static const char BASE64_TABLE[64]={ @@ -1897,15 +2077,15 @@ static char *op_base64_encode(char *_dst,const char *_src,int _len){ s1=_src[3*i+1]; s2=_src[3*i+2]; _dst[4*i+0]=BASE64_TABLE[s0>>2]; - _dst[4*i+1]=BASE64_TABLE[s0&3<<4|s1>>4]; - _dst[4*i+2]=BASE64_TABLE[s1&15<<2|s2>>6]; + _dst[4*i+1]=BASE64_TABLE[(s0&3)<<4|s1>>4]; + _dst[4*i+2]=BASE64_TABLE[(s1&15)<<2|s2>>6]; _dst[4*i+3]=BASE64_TABLE[s2&63]; } _len-=3*i; if(_len==1){ s0=_src[3*i+0]; _dst[4*i+0]=BASE64_TABLE[s0>>2]; - _dst[4*i+1]=BASE64_TABLE[s0&3<<4]; + _dst[4*i+1]=BASE64_TABLE[(s0&3)<<4]; _dst[4*i+2]='='; _dst[4*i+3]='='; i++; @@ -1914,8 +2094,8 @@ static char *op_base64_encode(char *_dst,const char *_src,int _len){ s0=_src[3*i+0]; s1=_src[3*i+1]; _dst[4*i+0]=BASE64_TABLE[s0>>2]; - _dst[4*i+1]=BASE64_TABLE[s0&3<<4|s1>>4]; - _dst[4*i+2]=BASE64_TABLE[s1&15<<2]; + _dst[4*i+1]=BASE64_TABLE[(s0&3)<<4|s1>>4]; + _dst[4*i+2]=BASE64_TABLE[(s1&15)<<2]; _dst[4*i+3]='='; i++; } @@ -1990,50 +2170,33 @@ static int op_http_allow_pipelining(const char *_server){ static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url, int _skip_certificate_check,const char *_proxy_host,unsigned _proxy_port, - const char *_proxy_user,const char *_proxy_pass){ + const char *_proxy_user,const char *_proxy_pass,OpusServerInfo *_info){ struct addrinfo *addrs; - const char *last_host; - unsigned last_port; int nredirs; int ret; - if(_proxy_host!=NULL&&OP_UNLIKELY(_proxy_port>65535U))return OP_EINVAL; - last_host=NULL; - /*We shouldn't have to initialize last_port, but gcc is too dumb to figure - out that last_host!=NULL implies we've already taken one trip through the - loop.*/ - last_port=0; +#if defined(_WIN32) + op_init_winsock(); +#endif ret=op_parse_url(&_stream->url,_url); if(OP_UNLIKELY(ret<0))return ret; + if(_proxy_host!=NULL){ + if(OP_UNLIKELY(_proxy_port>65535U))return OP_EINVAL; + _stream->connect_host=op_string_dup(_proxy_host); + _stream->connect_port=_proxy_port; + } + else{ + _stream->connect_host=_stream->url.host; + _stream->connect_port=_stream->url.port; + } + addrs=NULL; for(nredirs=0;nredirsurl.host; - port=_stream->url.port; - } - else{ - host=_proxy_host; - port=_proxy_port; - } - /*If connecting to the same place as last time, don't re-resolve it.*/ - addrs=NULL; - if(last_host!=NULL){ - if(strcmp(last_host,host)==0&&last_port==port)addrs=&_stream->addr_info; - else if(_stream->ssl_session!=NULL){ - /*Forget any cached SSL session from the last host.*/ - SSL_SESSION_free(_stream->ssl_session); - _stream->ssl_session=NULL; - } - if(last_host!=_proxy_host)_ogg_free((void *)last_host); - } - last_host=host; - last_port=port; + OpusParsedURL next_url; + struct timeb start_time; + struct timeb end_time; + char *next; + char *status_code; + int minor_version_pos; + int v1_1_compat; /*Initialize the SSL library if necessary.*/ if(OP_URL_IS_SSL(&_stream->url)&&_stream->ssl_ctx==NULL){ SSL_CTX *ssl_ctx; @@ -2069,6 +2232,7 @@ static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url, if(_proxy_host!=NULL){ /*We need to establish a CONNECT tunnel to handle https proxying. Build the request we'll send to do so.*/ + _stream->proxy_connect.nbuf=0; ret=op_sb_append(&_stream->proxy_connect,"CONNECT ",8); ret|=op_sb_append_string(&_stream->proxy_connect,_stream->url.host); ret|=op_sb_append_port(&_stream->proxy_connect,_stream->url.port); @@ -2096,12 +2260,7 @@ static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url, } } /*Actually make the connection.*/ - if(addrs!=&_stream->addr_info){ - addrs=op_resolve(host,port); - if(OP_UNLIKELY(addrs==NULL))return OP_FALSE; - } ret=op_http_connect(_stream,_stream->conns+0,addrs,&start_time); - if(addrs!=&_stream->addr_info)freeaddrinfo(addrs); if(OP_UNLIKELY(ret<0))return ret; /*Build the request to send.*/ _stream->request.nbuf=0; @@ -2162,20 +2321,22 @@ static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url, if(OP_UNLIKELY(ret<0))return ret; ret=op_http_conn_read_response(_stream->conns+0,&_stream->response); if(OP_UNLIKELY(ret<0))return ret; - OP_ALWAYS_TRUE(!ftime(&end_time)); + ftime(&end_time); next=op_http_parse_status_line(&v1_1_compat,&status_code, _stream->response.buf); if(OP_UNLIKELY(next==NULL))return OP_FALSE; if(status_code[0]=='2'){ opus_int64 content_length; opus_int64 range_length; - int pipeline; + int pipeline_supported; + int pipeline_disabled; /*We only understand 20x codes.*/ if(status_code[1]!='0')return OP_FALSE; content_length=-1; range_length=-1; - /*Pipelining is disabled by default.*/ - pipeline=0; + /*Pipelining must be explicitly enabled.*/ + pipeline_supported=0; + pipeline_disabled=0; for(;;){ char *header; char *cdr; @@ -2200,7 +2361,7 @@ static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url, ret=op_http_parse_content_range(&range_first,&range_last, &range_length,cdr); if(OP_UNLIKELY(ret<0))return ret; - /*"A response with satus code 206 (Partial Content) MUST NOTE + /*"A response with satus code 206 (Partial Content) MUST NOT include a Content-Range field with a byte-range-resp-spec of '*'."*/ if(status_code[2]=='6' @@ -2233,9 +2394,9 @@ static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url, error out and reconnect, adding lots of latency.*/ ret=op_http_parse_connection(cdr); if(OP_UNLIKELY(ret<0))return ret; - pipeline-=ret; + pipeline_disabled|=ret; } - else if(strcmp(header,"server")){ + else if(strcmp(header,"server")==0){ /*If we got a Server response header, and it wasn't from a known-bad server, enable pipelining, as long as it's at least HTTP/1.1. According to RFC 2145, the server is supposed to respond with the @@ -2243,7 +2404,51 @@ static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url, suspected that we incorrectly implement the HTTP specification. So it should send back at least HTTP/1.1, despite our HTTP/1.0 request.*/ - pipeline+=v1_1_compat&&op_http_allow_pipelining(cdr); + pipeline_supported=v1_1_compat; + if(v1_1_compat)pipeline_disabled|=!op_http_allow_pipelining(cdr); + if(_info!=NULL&&_info->server==NULL)_info->server=op_string_dup(cdr); + } + /*Collect station information headers if the caller requested it. + If there's more than one copy of a header, the first one wins.*/ + else if(_info!=NULL){ + if(strcmp(header,"content-type")==0){ + if(_info->content_type==NULL){ + _info->content_type=op_string_dup(cdr); + } + } + else if(header[0]=='i'&&header[1]=='c' + &&(header[2]=='e'||header[2]=='y')&&header[3]=='-'){ + if(strcmp(header+4,"name")==0){ + if(_info->name==NULL)_info->name=op_string_dup(cdr); + } + else if(strcmp(header+4,"description")==0){ + if(_info->description==NULL)_info->description=op_string_dup(cdr); + } + else if(strcmp(header+4,"genre")==0){ + if(_info->genre==NULL)_info->genre=op_string_dup(cdr); + } + else if(strcmp(header+4,"url")==0){ + if(_info->url==NULL)_info->url=op_string_dup(cdr); + } + else if(strcmp(header,"icy-br")==0 + ||strcmp(header,"ice-bitrate")==0){ + if(_info->bitrate_kbps<0){ + opus_int64 bitrate_kbps; + /*Just re-using this function to parse a random unsigned + integer field.*/ + bitrate_kbps=op_http_parse_content_length(cdr); + if(bitrate_kbps>=0&&bitrate_kbps<=OP_INT32_MAX){ + _info->bitrate_kbps=(opus_int32)bitrate_kbps; + } + } + } + else if(strcmp(header,"icy-pub")==0 + ||strcmp(header,"ice-public")==0){ + if(_info->is_public<0&&(cdr[0]=='0'||cdr[0]=='1')&&cdr[1]=='\0'){ + _info->is_public=cdr[0]-'0'; + } + } + } } } switch(status_code[2]){ @@ -2278,15 +2483,16 @@ static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url, default:return OP_FALSE; } _stream->content_length=content_length; - _stream->pipeline=pipeline>0; + _stream->pipeline=pipeline_supported&&!pipeline_disabled; /*Pipelining requires HTTP/1.1 persistent connections.*/ - if(pipeline)_stream->request.buf[minor_version_pos]='1'; + if(_stream->pipeline)_stream->request.buf[minor_version_pos]='1'; _stream->conns[0].pos=0; _stream->conns[0].end_pos=_stream->seekable?content_length:-1; _stream->conns[0].chunk_size=-1; _stream->cur_conni=0; _stream->connect_rate=op_time_diff_ms(&end_time,&start_time); _stream->connect_rate=OP_MAX(_stream->connect_rate,1); + if(_info!=NULL)_info->is_ssl=OP_URL_IS_SSL(&_stream->url); /*The URL has been successfully opened.*/ return 0; } @@ -2306,7 +2512,9 @@ static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url, /*302 Found*/ case '2': /*307 Temporary Redirect*/ - case '7':break; + case '7': + /*308 Permanent Redirect (defined by draft-reschke-http-status-308-07).*/ + case '8':break; /*305 Use Proxy: "The Location field gives the URI of the proxy." TODO: This shouldn't actually be that hard to do.*/ case '5':return OP_EIMPL; @@ -2314,7 +2522,7 @@ static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url, originally requested resource." 304 Not Modified: "The 304 response MUST NOT contain a message-body." 306 (Unused) - 308...309 are not yet defined, so we don't know how to handle them.*/ + 309 is not yet defined, so we don't know how to handle it.*/ default:return OP_FALSE; } _url=NULL; @@ -2327,15 +2535,33 @@ static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url, if(strcmp(header,"location")==0&&OP_LIKELY(_url==NULL))_url=cdr; } if(OP_UNLIKELY(_url==NULL))return OP_FALSE; - /*Don't free last_host if it came from the last URL.*/ - if(last_host!=_proxy_host)_stream->url.host=NULL; - op_parsed_url_clear(&_stream->url); - ret=op_parse_url(&_stream->url,_url); - if(OP_UNLIKELY(ret<0)){ - if(ret==OP_EINVAL)ret=OP_FALSE; - if(last_host!=_proxy_host)_ogg_free((void *)last_host); - return ret; + ret=op_parse_url(&next_url,_url); + if(OP_UNLIKELY(ret<0))return ret; + if(_proxy_host==NULL||_stream->ssl_session!=NULL){ + if(strcmp(_stream->url.host,next_url.host)==0 + &&_stream->url.port==next_url.port){ + /*Try to skip re-resolve when connecting to the same host.*/ + addrs=&_stream->addr_info; + } + else{ + if(_stream->ssl_session!=NULL){ + /*Forget any cached SSL session from the last host.*/ + SSL_SESSION_free(_stream->ssl_session); + _stream->ssl_session=NULL; + } + } } + if(_proxy_host==NULL){ + OP_ASSERT(_stream->connect_host==_stream->url.host); + _stream->connect_host=next_url.host; + _stream->connect_port=next_url.port; + } + /*Always try to skip re-resolve for proxy connections.*/ + else addrs=&_stream->addr_info; + op_parsed_url_clear(&_stream->url); + *&_stream->url=*&next_url; + /*TODO: On servers/proxies that support pipelining, we might be able to + re-use this connection.*/ op_http_conn_close(_stream,_stream->conns+0,&_stream->lru_head,1); } /*Redirection limit reached.*/ @@ -2500,7 +2726,7 @@ static int op_http_conn_handle_response(OpusHTTPStream *_stream, } /*Open a new connection that will start reading at byte offset _pos. - _pos: The byte offset to start readiny from. + _pos: The byte offset to start reading from. _chunk_size: The number of bytes to ask for in the initial request, or -1 to request the rest of the resource. This may be more bytes than remain, in which case it will be @@ -2518,7 +2744,7 @@ static int op_http_conn_open_pos(OpusHTTPStream *_stream, if(OP_UNLIKELY(ret<0))return ret; ret=op_http_conn_handle_response(_stream,_conn); if(OP_UNLIKELY(ret!=0))return OP_FALSE; - OP_ALWAYS_TRUE(!ftime(&end_time)); + ftime(&end_time); _stream->cur_conni=_conn-_stream->conns; OP_ASSERT(_stream->cur_conni>=0&&_stream->cur_conni=0&&next_end-next_pos<=0x7FFFFFFF); + ||next_end-next_pos>=0&&next_end-next_pos<=OP_INT32_MAX); ret=op_http_conn_open_pos(_stream,_conn,next_pos, next_end<0?-1:(opus_int32)(next_end-next_pos)); if(OP_UNLIKELY(ret<0))return OP_EREAD; @@ -2811,7 +3037,7 @@ static int op_http_stream_seek(void *_stream,opus_int64 _offset,int _whence){ op_http_conn_read_rate_update(stream->conns+ci); *&seek_time=*&stream->conns[ci].read_time; } - else OP_ALWAYS_TRUE(!ftime(&seek_time)); + else ftime(&seek_time); /*If we seeked past the end of the stream, just disable the active connection.*/ if(pos>=content_length){ @@ -2979,12 +3205,33 @@ static const OpusFileCallbacks OP_HTTP_CALLBACKS={ }; #endif +void opus_server_info_init(OpusServerInfo *_info){ + _info->name=NULL; + _info->description=NULL; + _info->genre=NULL; + _info->url=NULL; + _info->server=NULL; + _info->content_type=NULL; + _info->bitrate_kbps=-1; + _info->is_public=-1; + _info->is_ssl=0; +} + +void opus_server_info_clear(OpusServerInfo *_info){ + _ogg_free(_info->content_type); + _ogg_free(_info->server); + _ogg_free(_info->url); + _ogg_free(_info->genre); + _ogg_free(_info->description); + _ogg_free(_info->name); +} + /*The actual URL stream creation function. This one isn't extensible like the application-level interface, but because it isn't public, we're free to change it in the future.*/ static void *op_url_stream_create_impl(OpusFileCallbacks *_cb,const char *_url, int _skip_certificate_check,const char *_proxy_host,unsigned _proxy_port, - const char *_proxy_user,const char *_proxy_pass){ + const char *_proxy_user,const char *_proxy_pass,OpusServerInfo *_info){ const char *path; /*Check to see if this is a valid file: URL.*/ path=op_parse_file_url(_url); @@ -3006,7 +3253,7 @@ static void *op_url_stream_create_impl(OpusFileCallbacks *_cb,const char *_url, if(OP_UNLIKELY(stream==NULL))return NULL; op_http_stream_init(stream); ret=op_http_stream_open(stream,_url,_skip_certificate_check, - _proxy_host,_proxy_port,_proxy_user,_proxy_pass); + _proxy_host,_proxy_port,_proxy_user,_proxy_pass,_info); if(OP_UNLIKELY(ret<0)){ op_http_stream_clear(stream); _ogg_free(stream); @@ -3021,22 +3268,25 @@ static void *op_url_stream_create_impl(OpusFileCallbacks *_cb,const char *_url, (void)_proxy_port; (void)_proxy_user; (void)_proxy_pass; + (void)_info; return NULL; #endif } void *op_url_stream_vcreate(OpusFileCallbacks *_cb, const char *_url,va_list _ap){ - int skip_certificate_check; - const char *proxy_host; - opus_int32 proxy_port; - const char *proxy_user; - const char *proxy_pass; + int skip_certificate_check; + const char *proxy_host; + opus_int32 proxy_port; + const char *proxy_user; + const char *proxy_pass; + OpusServerInfo *pinfo; skip_certificate_check=0; proxy_host=NULL; proxy_port=8080; proxy_user=NULL; proxy_pass=NULL; + pinfo=NULL; for(;;){ ptrdiff_t request; request=va_arg(_ap,char *)-(char *)NULL; @@ -3059,17 +3309,83 @@ void *op_url_stream_vcreate(OpusFileCallbacks *_cb, case OP_HTTP_PROXY_PASS_REQUEST:{ proxy_pass=va_arg(_ap,const char *); }break; + case OP_GET_SERVER_INFO_REQUEST:{ + pinfo=va_arg(_ap,OpusServerInfo *); + }break; /*Some unknown option.*/ default:return NULL; } } + /*If the caller has requested server information, proxy it to a local copy to + simplify error handling.*/ + if(pinfo!=NULL){ + OpusServerInfo info; + void *ret; + opus_server_info_init(&info); + ret=op_url_stream_create_impl(_cb,_url,skip_certificate_check, + proxy_host,proxy_port,proxy_user,proxy_pass,&info); + if(ret!=NULL)*pinfo=*&info; + else opus_server_info_clear(&info); + return ret; + } return op_url_stream_create_impl(_cb,_url,skip_certificate_check, - proxy_host,proxy_port,proxy_user,proxy_pass); + proxy_host,proxy_port,proxy_user,proxy_pass,NULL); } void *op_url_stream_create(OpusFileCallbacks *_cb, const char *_url,...){ - va_list ap; + va_list ap; + void *ret; va_start(ap,_url); - return op_url_stream_vcreate(_cb,_url,ap); + ret=op_url_stream_vcreate(_cb,_url,ap); + va_end(ap); + return ret; +} + +/*Convenience routines to open/test URLs in a single step.*/ + +OggOpusFile *op_vopen_url(const char *_url,int *_error,va_list _ap){ + OpusFileCallbacks cb; + OggOpusFile *of; + void *source; + source=op_url_stream_vcreate(&cb,_url,_ap); + if(OP_UNLIKELY(source==NULL)){ + if(_error!=NULL)*_error=OP_EFAULT; + return NULL; + } + of=op_open_callbacks(source,&cb,NULL,0,_error); + if(OP_UNLIKELY(of==NULL))(*cb.close)(source); + return of; +} + +OggOpusFile *op_open_url(const char *_url,int *_error,...){ + OggOpusFile *ret; + va_list ap; + va_start(ap,_error); + ret=op_vopen_url(_url,_error,ap); + va_end(ap); + return ret; +} + +OggOpusFile *op_vtest_url(const char *_url,int *_error,va_list _ap){ + OpusFileCallbacks cb; + OggOpusFile *of; + void *source; + source=op_url_stream_vcreate(&cb,_url,_ap); + if(OP_UNLIKELY(source==NULL)){ + if(_error!=NULL)*_error=OP_EFAULT; + return NULL; + } + of=op_test_callbacks(source,&cb,NULL,0,_error); + if(OP_UNLIKELY(of==NULL))(*cb.close)(source); + return of; +} + +OggOpusFile *op_test_url(const char *_url,int *_error,...){ + OggOpusFile *ret; + va_list ap; + va_start(ap,_error); + ret=op_vtest_url(_url,_error,ap); + va_end(ap); + return ret; } diff --git a/code/opusfile-0.5/src/info.c b/code/opusfile-0.5/src/info.c new file mode 100644 index 00000000..6cf98516 --- /dev/null +++ b/code/opusfile-0.5/src/info.c @@ -0,0 +1,683 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE libopusfile SOURCE CODE IS (C) COPYRIGHT 2012 * + * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * + * * + ********************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "internal.h" +#include +#include + +static unsigned op_parse_uint16le(const unsigned char *_data){ + return _data[0]|_data[1]<<8; +} + +static int op_parse_int16le(const unsigned char *_data){ + int ret; + ret=_data[0]|_data[1]<<8; + return (ret^0x8000)-0x8000; +} + +static opus_uint32 op_parse_uint32le(const unsigned char *_data){ + return _data[0]|_data[1]<<8|_data[2]<<16|_data[3]<<24; +} + +static opus_uint32 op_parse_uint32be(const unsigned char *_data){ + return _data[3]|_data[2]<<8|_data[1]<<16|_data[0]<<24; +} + +int opus_head_parse(OpusHead *_head,const unsigned char *_data,size_t _len){ + OpusHead head; + if(_len<8)return OP_ENOTFORMAT; + if(memcmp(_data,"OpusHead",8)!=0)return OP_ENOTFORMAT; + if(_len<9)return OP_EBADHEADER; + head.version=_data[8]; + if(head.version>15)return OP_EVERSION; + if(_len<19)return OP_EBADHEADER; + head.channel_count=_data[9]; + head.pre_skip=op_parse_uint16le(_data+10); + head.input_sample_rate=op_parse_uint32le(_data+12); + head.output_gain=op_parse_int16le(_data+16); + head.mapping_family=_data[18]; + if(head.mapping_family==0){ + if(head.channel_count<1||head.channel_count>2)return OP_EBADHEADER; + if(head.version<=1&&_len>19)return OP_EBADHEADER; + head.stream_count=1; + head.coupled_count=head.channel_count-1; + if(_head!=NULL){ + _head->mapping[0]=0; + _head->mapping[1]=1; + } + } + else if(head.mapping_family==1){ + size_t size; + int ci; + if(head.channel_count<1||head.channel_count>8)return OP_EBADHEADER; + size=21+head.channel_count; + if(_lensize)return OP_EBADHEADER; + head.stream_count=_data[19]; + if(head.stream_count<1)return OP_EBADHEADER; + head.coupled_count=_data[20]; + if(head.coupled_count>head.stream_count)return OP_EBADHEADER; + for(ci=0;ci=head.stream_count+head.coupled_count + &&_data[21+ci]!=255){ + return OP_EBADHEADER; + } + } + if(_head!=NULL)memcpy(_head->mapping,_data+21,head.channel_count); + } + /*General purpose players should not attempt to play back content with + channel mapping family 255.*/ + else if(head.mapping_family==255)return OP_EIMPL; + /*No other channel mapping families are currently defined.*/ + else return OP_EBADHEADER; + if(_head!=NULL)memcpy(_head,&head,head.mapping-(unsigned char *)&head); + return 0; +} + +void opus_tags_init(OpusTags *_tags){ + memset(_tags,0,sizeof(*_tags)); +} + +void opus_tags_clear(OpusTags *_tags){ + int ci; + for(ci=_tags->comments;ci-->0;)_ogg_free(_tags->user_comments[ci]); + _ogg_free(_tags->user_comments); + _ogg_free(_tags->comment_lengths); + _ogg_free(_tags->vendor); +} + +/*Ensure there's room for up to _ncomments comments.*/ +static int op_tags_ensure_capacity(OpusTags *_tags,size_t _ncomments){ + char **user_comments; + int *comment_lengths; + size_t size; + if(OP_UNLIKELY(_ncomments>=(size_t)INT_MAX))return OP_EFAULT; + size=sizeof(*_tags->comment_lengths)*(_ncomments+1); + if(size/sizeof(*_tags->comment_lengths)!=_ncomments+1)return OP_EFAULT; + comment_lengths=(int *)_ogg_realloc(_tags->comment_lengths,size); + if(OP_UNLIKELY(comment_lengths==NULL))return OP_EFAULT; + comment_lengths[_ncomments]=0; + _tags->comment_lengths=comment_lengths; + size=sizeof(*_tags->user_comments)*(_ncomments+1); + if(size/sizeof(*_tags->user_comments)!=_ncomments+1)return OP_EFAULT; + user_comments=(char **)_ogg_realloc(_tags->user_comments,size); + if(OP_UNLIKELY(user_comments==NULL))return OP_EFAULT; + user_comments[_ncomments]=NULL; + _tags->user_comments=user_comments; + return 0; +} + +/*Duplicate a (possibly non-NUL terminated) string with a known length.*/ +static char *op_strdup_with_len(const char *_s,size_t _len){ + size_t size; + char *ret; + size=sizeof(*ret)*(_len+1); + if(OP_UNLIKELY(size<_len))return NULL; + ret=(char *)_ogg_malloc(size); + if(OP_LIKELY(ret!=NULL)){ + ret=(char *)memcpy(ret,_s,sizeof(*ret)*_len); + ret[_len]='\0'; + } + return ret; +} + +/*The actual implementation of opus_tags_parse(). + Unlike the public API, this function requires _tags to already be + initialized, modifies its contents before success is guaranteed, and assumes + the caller will clear it on error.*/ +static int opus_tags_parse_impl(OpusTags *_tags, + const unsigned char *_data,size_t _len){ + opus_uint32 count; + size_t len; + int ncomments; + int ci; + len=_len; + if(len<8)return OP_ENOTFORMAT; + if(memcmp(_data,"OpusTags",8)!=0)return OP_ENOTFORMAT; + if(len<16)return OP_EBADHEADER; + _data+=8; + len-=8; + count=op_parse_uint32le(_data); + _data+=4; + len-=4; + if(count>len)return OP_EBADHEADER; + if(_tags!=NULL){ + _tags->vendor=op_strdup_with_len((char *)_data,count); + if(_tags->vendor==NULL)return OP_EFAULT; + } + _data+=count; + len-=count; + if(len<4)return OP_EBADHEADER; + count=op_parse_uint32le(_data); + _data+=4; + len-=4; + /*Check to make sure there's minimally sufficient data left in the packet.*/ + if(count>len>>2)return OP_EBADHEADER; + /*Check for overflow (the API limits this to an int).*/ + if(count>(opus_uint32)INT_MAX-1)return OP_EFAULT; + if(_tags!=NULL){ + int ret; + ret=op_tags_ensure_capacity(_tags,count); + if(ret<0)return ret; + } + ncomments=(int)count; + for(ci=0;cilen>>2)return OP_EBADHEADER; + count=op_parse_uint32le(_data); + _data+=4; + len-=4; + if(count>len)return OP_EBADHEADER; + /*Check for overflow (the API limits this to an int).*/ + if(count>(opus_uint32)INT_MAX)return OP_EFAULT; + if(_tags!=NULL){ + _tags->user_comments[ci]=op_strdup_with_len((char *)_data,count); + if(_tags->user_comments[ci]==NULL)return OP_EFAULT; + _tags->comment_lengths[ci]=(int)count; + _tags->comments=ci+1; + } + _data+=count; + len-=count; + } + return 0; +} + +int opus_tags_parse(OpusTags *_tags,const unsigned char *_data,size_t _len){ + if(_tags!=NULL){ + OpusTags tags; + int ret; + opus_tags_init(&tags); + ret=opus_tags_parse_impl(&tags,_data,_len); + if(ret<0)opus_tags_clear(&tags); + else *_tags=*&tags; + return ret; + } + else return opus_tags_parse_impl(NULL,_data,_len); +} + +/*The actual implementation of opus_tags_copy(). + Unlike the public API, this function requires _dst to already be + initialized, modifies its contents before success is guaranteed, and assumes + the caller will clear it on error.*/ +static int opus_tags_copy_impl(OpusTags *_dst,const OpusTags *_src){ + char *vendor; + int ncomments; + int ret; + int ci; + vendor=_src->vendor; + _dst->vendor=op_strdup_with_len(vendor,strlen(vendor)); + if(OP_UNLIKELY(_dst->vendor==NULL))return OP_EFAULT; + ncomments=_src->comments; + ret=op_tags_ensure_capacity(_dst,ncomments); + if(OP_UNLIKELY(ret<0))return ret; + for(ci=0;cicomment_lengths[ci]; + OP_ASSERT(len>=0); + _dst->user_comments[ci]=op_strdup_with_len(_src->user_comments[ci],len); + if(OP_UNLIKELY(_dst->user_comments[ci]==NULL))return OP_EFAULT; + _dst->comment_lengths[ci]=len; + _dst->comments=ci+1; + } + return 0; +} + +int opus_tags_copy(OpusTags *_dst,const OpusTags *_src){ + OpusTags dst; + int ret; + opus_tags_init(&dst); + ret=opus_tags_copy_impl(&dst,_src); + if(OP_UNLIKELY(ret<0))opus_tags_clear(&dst); + else *_dst=*&dst; + return 0; +} + +int opus_tags_add(OpusTags *_tags,const char *_tag,const char *_value){ + char *comment; + int tag_len; + int value_len; + int ncomments; + int ret; + ncomments=_tags->comments; + ret=op_tags_ensure_capacity(_tags,ncomments+1); + if(OP_UNLIKELY(ret<0))return ret; + tag_len=strlen(_tag); + value_len=strlen(_value); + /*+2 for '=' and '\0'.*/ + _tags->comment_lengths[ncomments]=0; + _tags->user_comments[ncomments]=comment= + (char *)_ogg_malloc(sizeof(*comment)*(tag_len+value_len+2)); + if(OP_UNLIKELY(comment==NULL))return OP_EFAULT; + _tags->comment_lengths[ncomments]=tag_len+value_len+1; + memcpy(comment,_tag,sizeof(*comment)*tag_len); + comment[tag_len]='='; + memcpy(comment+tag_len+1,_value,sizeof(*comment)*(value_len+1)); + return 0; +} + +int opus_tags_add_comment(OpusTags *_tags,const char *_comment){ + int comment_len; + int ncomments; + int ret; + ncomments=_tags->comments; + ret=op_tags_ensure_capacity(_tags,ncomments+1); + if(OP_UNLIKELY(ret<0))return ret; + comment_len=(int)strlen(_comment); + _tags->comment_lengths[ncomments]=0; + _tags->user_comments[ncomments]=op_strdup_with_len(_comment,comment_len); + if(OP_UNLIKELY(_tags->user_comments[ncomments]==NULL))return OP_EFAULT; + _tags->comment_lengths[ncomments]=comment_len; + return 0; +} + +int opus_tagcompare(const char *_tag_name,const char *_comment){ + return opus_tagncompare(_tag_name,strlen(_tag_name),_comment); +} + +int opus_tagncompare(const char *_tag_name,int _tag_len,const char *_comment){ + int ret; + OP_ASSERT(_tag_len>=0); + ret=op_strncasecmp(_tag_name,_comment,_tag_len); + return ret?ret:'='-_comment[_tag_len]; +} + +const char *opus_tags_query(const OpusTags *_tags,const char *_tag,int _count){ + char **user_comments; + int tag_len; + int found; + int ncomments; + int ci; + tag_len=strlen(_tag); + ncomments=_tags->comments; + user_comments=_tags->user_comments; + found=0; + for(ci=0;cicomments; + user_comments=_tags->user_comments; + found=0; + for(ci=0;ciuser_comments; + ncomments=_tags->comments; + /*Look for the first valid R128_TRACK_GAIN tag and use that.*/ + for(ci=0;ci='0'&&*p<='9'){ + gain_q8=10*gain_q8+*p-'0'; + if(gain_q8>32767-negative)break; + p++; + } + /*This didn't look like a signed 16-bit decimal integer. + Not a valid R128_TRACK_GAIN tag.*/ + if(*p!='\0')continue; + *_gain_q8=(int)(gain_q8+negative^negative); + return 0; + } + } + return OP_FALSE; +} + +static int op_is_jpeg(const unsigned char *_buf,size_t _buf_sz){ + return _buf_sz>=11&&memcmp(_buf,"\xFF\xD8\xFF\xE0",4)==0 + &&(_buf[4]<<8|_buf[5])>=16&&memcmp(_buf+6,"JFIF",5)==0; +} + +/*Tries to extract the width, height, bits per pixel, and palette size of a + JPEG. + On failure, simply leaves its outputs unmodified.*/ +static void op_extract_jpeg_params(const unsigned char *_buf,size_t _buf_sz, + opus_uint32 *_width,opus_uint32 *_height, + opus_uint32 *_depth,opus_uint32 *_colors,int *_has_palette){ + if(op_is_jpeg(_buf,_buf_sz)){ + size_t offs; + offs=2; + for(;;){ + size_t segment_len; + int marker; + while(offs<_buf_sz&&_buf[offs]!=0xFF)offs++; + while(offs<_buf_sz&&_buf[offs]==0xFF)offs++; + marker=_buf[offs]; + offs++; + /*If we hit EOI* (end of image), or another SOI* (start of image), + or SOS (start of scan), then stop now.*/ + if(offs>=_buf_sz||(marker>=0xD8&&marker<=0xDA))break; + /*RST* (restart markers): skip (no segment length).*/ + else if(marker>=0xD0&&marker<=0xD7)continue; + /*Read the length of the marker segment.*/ + if(_buf_sz-offs<2)break; + segment_len=_buf[offs]<<8|_buf[offs+1]; + if(segment_len<2||_buf_sz-offs0xC0&&marker<0xD0&&(marker&3)!=0)){ + /*Found a SOFn (start of frame) marker segment:*/ + if(segment_len>=8){ + *_height=_buf[offs+3]<<8|_buf[offs+4]; + *_width=_buf[offs+5]<<8|_buf[offs+6]; + *_depth=_buf[offs+2]*_buf[offs+7]; + *_colors=0; + *_has_palette=0; + } + break; + } + /*Other markers: skip the whole marker segment.*/ + offs+=segment_len; + } + } +} + +static int op_is_png(const unsigned char *_buf,size_t _buf_sz){ + return _buf_sz>=8&&memcmp(_buf,"\x89PNG\x0D\x0A\x1A\x0A",8)==0; +} + +/*Tries to extract the width, height, bits per pixel, and palette size of a + PNG. + On failure, simply leaves its outputs unmodified.*/ +static void op_extract_png_params(const unsigned char *_buf,size_t _buf_sz, + opus_uint32 *_width,opus_uint32 *_height, + opus_uint32 *_depth,opus_uint32 *_colors,int *_has_palette){ + if(op_is_png(_buf,_buf_sz)){ + size_t offs; + offs=8; + while(_buf_sz-offs>=12){ + ogg_uint32_t chunk_len; + chunk_len=op_parse_uint32be(_buf+offs); + if(chunk_len>_buf_sz-(offs+12))break; + else if(chunk_len==13&&memcmp(_buf+offs+4,"IHDR",4)==0){ + int color_type; + *_width=op_parse_uint32be(_buf+offs+8); + *_height=op_parse_uint32be(_buf+offs+12); + color_type=_buf[offs+17]; + if(color_type==3){ + *_depth=24; + *_has_palette=1; + } + else{ + int sample_depth; + sample_depth=_buf[offs+16]; + if(color_type==0)*_depth=sample_depth; + else if(color_type==2)*_depth=sample_depth*3; + else if(color_type==4)*_depth=sample_depth*2; + else if(color_type==6)*_depth=sample_depth*4; + *_colors=0; + *_has_palette=0; + break; + } + } + else if(*_has_palette>0&&memcmp(_buf+offs+4,"PLTE",4)==0){ + *_colors=chunk_len/3; + break; + } + offs+=12+chunk_len; + } + } +} + +static int op_is_gif(const unsigned char *_buf,size_t _buf_sz){ + return _buf_sz>=6&&(memcmp(_buf,"GIF87a",6)==0||memcmp(_buf,"GIF89a",6)==0); +} + +/*Tries to extract the width, height, bits per pixel, and palette size of a + GIF. + On failure, simply leaves its outputs unmodified.*/ +static void op_extract_gif_params(const unsigned char *_buf,size_t _buf_sz, + opus_uint32 *_width,opus_uint32 *_height, + opus_uint32 *_depth,opus_uint32 *_colors,int *_has_palette){ + if(op_is_gif(_buf,_buf_sz)&&_buf_sz>=14){ + *_width=_buf[6]|_buf[7]<<8; + *_height=_buf[8]|_buf[9]<<8; + /*libFLAC hard-codes the depth to 24.*/ + *_depth=24; + *_colors=1<<((_buf[10]&7)+1); + *_has_palette=1; + } +} + +/*The actual implementation of opus_picture_tag_parse(). + Unlike the public API, this function requires _pic to already be + initialized, modifies its contents before success is guaranteed, and assumes + the caller will clear it on error.*/ +static int opus_picture_tag_parse_impl(OpusPictureTag *_pic,const char *_tag, + unsigned char *_buf,size_t _buf_sz,size_t _base64_sz){ + opus_int32 picture_type; + opus_uint32 mime_type_length; + char *mime_type; + opus_uint32 description_length; + char *description; + opus_uint32 width; + opus_uint32 height; + opus_uint32 depth; + opus_uint32 colors; + opus_uint32 data_length; + opus_uint32 file_width; + opus_uint32 file_height; + opus_uint32 file_depth; + opus_uint32 file_colors; + int format; + int has_palette; + int colors_set; + size_t i; + /*Decode the BASE64 data.*/ + for(i=0;i<_base64_sz;i++){ + opus_uint32 value; + int j; + value=0; + for(j=0;j<4;j++){ + unsigned c; + unsigned d; + c=(unsigned char)_tag[4*i+j]; + if(c=='+')d=62; + else if(c=='/')d=63; + else if(c>='0'&&c<='9')d=52+c-'0'; + else if(c>='a'&&c<='z')d=26+c-'a'; + else if(c>='A'&&c<='Z')d=c-'A'; + else if(c=='='&&3*i+j>_buf_sz)d=0; + else return OP_ENOTFORMAT; + value=value<<6|d; + } + _buf[3*i]=(unsigned char)(value>>16); + if(3*i+1<_buf_sz){ + _buf[3*i+1]=(unsigned char)(value>>8); + if(3*i+2<_buf_sz)_buf[3*i+2]=(unsigned char)value; + } + } + i=0; + picture_type=op_parse_uint32be(_buf+i); + i+=4; + /*Extract the MIME type.*/ + mime_type_length=op_parse_uint32be(_buf+i); + i+=4; + if(mime_type_length>_buf_sz-32)return OP_ENOTFORMAT; + mime_type=(char *)_ogg_malloc(sizeof(*_pic->mime_type)*(mime_type_length+1)); + if(mime_type==NULL)return OP_EFAULT; + memcpy(mime_type,_buf+i,sizeof(*mime_type)*mime_type_length); + mime_type[mime_type_length]='\0'; + _pic->mime_type=mime_type; + i+=mime_type_length; + /*Extract the description string.*/ + description_length=op_parse_uint32be(_buf+i); + i+=4; + if(description_length>_buf_sz-mime_type_length-32)return OP_ENOTFORMAT; + description= + (char *)_ogg_malloc(sizeof(*_pic->mime_type)*(description_length+1)); + if(description==NULL)return OP_EFAULT; + memcpy(description,_buf+i,sizeof(*description)*description_length); + description[description_length]='\0'; + _pic->description=description; + i+=description_length; + /*Extract the remaining fields.*/ + width=op_parse_uint32be(_buf+i); + i+=4; + height=op_parse_uint32be(_buf+i); + i+=4; + depth=op_parse_uint32be(_buf+i); + i+=4; + colors=op_parse_uint32be(_buf+i); + i+=4; + /*If one of these is set, they all must be, but colors==0 is a valid value.*/ + colors_set=width!=0||height!=0||depth!=0||colors!=0; + if(width==0||height==0||depth==0&&colors_set)return OP_ENOTFORMAT; + data_length=op_parse_uint32be(_buf+i); + i+=4; + if(data_length>_buf_sz-i)return OP_ENOTFORMAT; + /*Trim extraneous data so we don't copy it below.*/ + _buf_sz=i+data_length; + /*Attempt to determine the image format.*/ + format=OP_PIC_FORMAT_UNKNOWN; + if(mime_type_length==3&&strcmp(mime_type,"-->")==0){ + format=OP_PIC_FORMAT_URL; + /*Picture type 1 must be a 32x32 PNG.*/ + if(picture_type==1&&(width!=0||height!=0)&&(width!=32||height!=32)){ + return OP_ENOTFORMAT; + } + /*Append a terminating NUL for the convenience of our callers.*/ + _buf[_buf_sz++]='\0'; + } + else{ + if(mime_type_length==10 + &&op_strncasecmp(mime_type,"image/jpeg",mime_type_length)==0){ + if(op_is_jpeg(_buf+i,data_length))format=OP_PIC_FORMAT_JPEG; + } + else if(mime_type_length==9 + &&op_strncasecmp(mime_type,"image/png",mime_type_length)==0){ + if(op_is_png(_buf+i,data_length))format=OP_PIC_FORMAT_PNG; + } + else if(mime_type_length==9 + &&op_strncasecmp(mime_type,"image/gif",mime_type_length)==0){ + if(op_is_gif(_buf+i,data_length))format=OP_PIC_FORMAT_GIF; + } + else if(mime_type_length==0||(mime_type_length==6 + &&op_strncasecmp(mime_type,"image/",mime_type_length)==0)){ + if(op_is_jpeg(_buf+i,data_length))format=OP_PIC_FORMAT_JPEG; + else if(op_is_png(_buf+i,data_length))format=OP_PIC_FORMAT_PNG; + else if(op_is_gif(_buf+i,data_length))format=OP_PIC_FORMAT_GIF; + } + file_width=file_height=file_depth=file_colors=0; + has_palette=-1; + switch(format){ + case OP_PIC_FORMAT_JPEG:{ + op_extract_jpeg_params(_buf+i,data_length, + &file_width,&file_height,&file_depth,&file_colors,&has_palette); + }break; + case OP_PIC_FORMAT_PNG:{ + op_extract_png_params(_buf+i,data_length, + &file_width,&file_height,&file_depth,&file_colors,&has_palette); + }break; + case OP_PIC_FORMAT_GIF:{ + op_extract_gif_params(_buf+i,data_length, + &file_width,&file_height,&file_depth,&file_colors,&has_palette); + }break; + } + if(has_palette>=0){ + /*If we successfully extracted these parameters from the image, override + any declared values.*/ + width=file_width; + height=file_height; + depth=file_depth; + colors=file_colors; + } + /*Picture type 1 must be a 32x32 PNG.*/ + if(picture_type==1&&(format!=OP_PIC_FORMAT_PNG||width!=32||height!=32)){ + return OP_ENOTFORMAT; + } + } + /*Adjust _buf_sz instead of using data_length to capture the terminating NUL + for URLs.*/ + _buf_sz-=i; + memmove(_buf,_buf+i,sizeof(*_buf)*_buf_sz); + _buf=(unsigned char *)_ogg_realloc(_buf,_buf_sz); + if(_buf_sz>0&&_buf==NULL)return OP_EFAULT; + _pic->type=picture_type; + _pic->width=width; + _pic->height=height; + _pic->depth=depth; + _pic->colors=colors; + _pic->data_length=data_length; + _pic->data=_buf; + _pic->format=format; + return 0; +} + +int opus_picture_tag_parse(OpusPictureTag *_pic,const char *_tag){ + OpusPictureTag pic; + unsigned char *buf; + size_t base64_sz; + size_t buf_sz; + size_t tag_length; + int ret; + if(opus_tagncompare("METADATA_BLOCK_PICTURE",22,_tag)==0)_tag+=23; + /*Figure out how much BASE64-encoded data we have.*/ + tag_length=strlen(_tag); + if(tag_length&3)return OP_ENOTFORMAT; + base64_sz=tag_length>>2; + buf_sz=3*base64_sz; + if(buf_sz<32)return OP_ENOTFORMAT; + if(_tag[tag_length-1]=='=')buf_sz--; + if(_tag[tag_length-2]=='=')buf_sz--; + if(buf_sz<32)return OP_ENOTFORMAT; + /*Allocate an extra byte to allow appending a terminating NUL to URL data.*/ + buf=(unsigned char *)_ogg_malloc(sizeof(*buf)*(buf_sz+1)); + if(buf==NULL)return OP_EFAULT; + opus_picture_tag_init(&pic); + ret=opus_picture_tag_parse_impl(&pic,_tag,buf,buf_sz,base64_sz); + if(ret<0){ + opus_picture_tag_clear(&pic); + _ogg_free(buf); + } + else *_pic=*&pic; + return ret; +} + +void opus_picture_tag_init(OpusPictureTag *_pic){ + memset(_pic,0,sizeof(*_pic)); +} + +void opus_picture_tag_clear(OpusPictureTag *_pic){ + _ogg_free(_pic->description); + _ogg_free(_pic->mime_type); + _ogg_free(_pic->data); +} diff --git a/code/opusfile-0.2/src/internal.c b/code/opusfile-0.5/src/internal.c similarity index 96% rename from code/opusfile-0.2/src/internal.c rename to code/opusfile-0.5/src/internal.c index 2d2e3c85..96c80def 100644 --- a/code/opusfile-0.2/src/internal.c +++ b/code/opusfile-0.5/src/internal.c @@ -9,6 +9,10 @@ * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * * * ********************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "internal.h" #if defined(OP_ENABLE_ASSERTIONS) diff --git a/code/opusfile-0.2/src/internal.h b/code/opusfile-0.5/src/internal.h similarity index 85% rename from code/opusfile-0.2/src/internal.h rename to code/opusfile-0.5/src/internal.h index 79416ae3..08114919 100644 --- a/code/opusfile-0.2/src/internal.h +++ b/code/opusfile-0.5/src/internal.h @@ -32,10 +32,22 @@ # include typedef struct OggOpusLink OggOpusLink; + # if defined(OP_FIXED_POINT) + typedef opus_int16 op_sample; + # else + typedef float op_sample; + +/*We're using this define to test for libopus 1.1 or later until libopus + provides a better mechanism.*/ +# if defined(OPUS_GET_EXPERT_FRAME_DURATION_REQUEST) +/*Enable soft clipping prevention in 16-bit decodes.*/ +# define OP_SOFT_CLIP (1) +# endif + # endif # if OP_GNUC_PREREQ(4,2) @@ -80,8 +92,10 @@ void op_fatal_impl(const char *_str,const char *_file,int _line); # define OP_ALWAYS_TRUE(_cond) ((void)(_cond)) # endif -# define OP_INT64_MAX ((ogg_int64_t)0x7FFFFFFFFFFFFFFFLL) +# define OP_INT64_MAX (2*(((ogg_int64_t)1<<62)-1)|1) # define OP_INT64_MIN (-OP_INT64_MAX-1) +# define OP_INT32_MAX (2*(((ogg_int32_t)1<<30)-1)|1) +# define OP_INT32_MIN (-OP_INT32_MAX-1) # define OP_MIN(_a,_b) ((_a)<(_b)?(_a):(_b)) # define OP_MAX(_a,_b) ((_a)>(_b)?(_a):(_b)) @@ -90,7 +104,7 @@ void op_fatal_impl(const char *_str,const char *_file,int _line); /*Advance a file offset by the given amount, clamping against OP_INT64_MAX. This is used to advance a known offset by things like OP_CHUNK_SIZE or OP_PAGE_SIZE_MAX, while making sure to avoid signed overflow. - It assumes that both _offset and _amount are positive.*/ + It assumes that both _offset and _amount are non-negative.*/ #define OP_ADV_OFFSET(_offset,_amount) \ (OP_MIN(_offset,OP_INT64_MAX-(_amount))+(_amount)) @@ -189,6 +203,10 @@ struct OggOpusFile{ int op_count; /*Central working state for the packet-to-PCM decoder.*/ OpusMSDecoder *od; + /*The application-provided packet decode callback.*/ + op_decode_cb_func decode_cb; + /*The application-provided packet decode callback context.*/ + void *decode_cb_ctx; /*The stream count used to initialize the decoder.*/ int od_stream_count; /*The coupled stream count used to initialize the decoder.*/ @@ -203,12 +221,26 @@ struct OggOpusFile{ int od_buffer_pos; /*The number of valid samples in the decoded buffer.*/ int od_buffer_size; - /*Internal state for dithering float->short output.*/ + /*The type of gain offset to apply. + One of OP_HEADER_GAIN, OP_TRACK_GAIN, or OP_ABSOLUTE_GAIN.*/ + int gain_type; + /*The offset to apply to the gain.*/ + opus_int32 gain_offset_q8; + /*Internal state for soft clipping and dithering float->short output.*/ #if !defined(OP_FIXED_POINT) +# if defined(OP_SOFT_CLIP) + float clip_state[OP_NCHANNELS_MAX]; +# endif float dither_a[OP_NCHANNELS_MAX*4]; float dither_b[OP_NCHANNELS_MAX*4]; - int dither_mute; opus_uint32 dither_seed; + int dither_mute; + int dither_disabled; + /*The number of channels represented by the internal state. + This gets set to 0 whenever anything that would prevent state propagation + occurs (switching between the float/short APIs, or between the + stereo/multistream APIs).*/ + int state_channel_count; #endif }; diff --git a/code/opusfile-0.2/src/opusfile.c b/code/opusfile-0.5/src/opusfile.c similarity index 86% rename from code/opusfile-0.2/src/opusfile.c rename to code/opusfile-0.5/src/opusfile.c index 812c2c45..392ddb29 100644 --- a/code/opusfile-0.2/src/opusfile.c +++ b/code/opusfile-0.5/src/opusfile.c @@ -14,6 +14,10 @@ last mod: $Id: vorbisfile.c 17573 2010-10-27 14:53:59Z xiphmont $ ********************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "internal.h" #include #include @@ -163,7 +167,7 @@ static int op_seek_helper(OggOpusFile *_of,opus_int64 _offset){ /*Get the current position indicator of the underlying source. This should be the same as the value reported by tell().*/ -static opus_int64 op_position(OggOpusFile *_of){ +static opus_int64 op_position(const OggOpusFile *_of){ /*The current position indicator is _not_ simply offset. We may also have unprocessed, buffered data in the sync state.*/ return _of->offset+_of->oy.fill-_of->oy.returned; @@ -182,9 +186,8 @@ static opus_int64 op_position(OggOpusFile *_of){ OP_BADLINK: We hit end-of-file before reaching _boundary.*/ static opus_int64 op_get_next_page(OggOpusFile *_of,ogg_page *_og, opus_int64 _boundary){ - for(;;){ + while(_boundary<=0||_of->offset<_boundary){ int more; - if(_boundary>0&&_of->offset>=_boundary)return OP_FALSE; more=ogg_sync_pageseek(&_of->oy,_og); /*Skipped (-more) bytes.*/ if(OP_UNLIKELY(more<0))_of->offset-=more; @@ -211,17 +214,19 @@ static opus_int64 op_get_next_page(OggOpusFile *_of,ogg_page *_og, } else{ /*Got a page. - Return the offset at the page beginning, advance the internal offset - past the page end.*/ + Return the page start offset and advance the internal offset past the + page end.*/ opus_int64 page_offset; page_offset=_of->offset; _of->offset+=more; + OP_ASSERT(page_offset>=0); return page_offset; } } + return OP_FALSE; } -static int op_add_serialno(ogg_page *_og, +static int op_add_serialno(const ogg_page *_og, ogg_uint32_t **_serialnos,int *_nserialnos,int *_cserialnos){ ogg_uint32_t *serialnos; int nserialnos; @@ -235,7 +240,8 @@ static int op_add_serialno(ogg_page *_og, if(OP_UNLIKELY(cserialnos>INT_MAX-1>>1))return OP_EFAULT; cserialnos=2*cserialnos+1; OP_ASSERT(nserialnos=0 implies we entered the if(page_gp!=-1) block at least once.*/ + gp=-1; chunk_size=OP_CHUNK_SIZE; do{ int left_link; @@ -422,7 +431,7 @@ static opus_int64 op_get_last_page(OggOpusFile *_of,ogg_int64_t *_gp, opus_int64 llret; ogg_uint32_t serialno; llret=op_get_next_page(_of,&og,end); - if(OP_UNLIKELY(llretop[op_count].packet, _of->op[op_count].bytes); if(OP_LIKELY(_durations[op_count]>0)){ @@ -990,7 +1003,7 @@ static int op_find_final_pcm_offset(OggOpusFile *_of, /*Rescale the number _x from the range [0,_from] to [0,_to]. _from and _to must be positive.*/ -opus_int64 op_rescale64(opus_int64 _x,opus_int64 _from,opus_int64 _to){ +static opus_int64 op_rescale64(opus_int64 _x,opus_int64 _from,opus_int64 _to){ opus_int64 frac; opus_int64 ret; int i; @@ -1124,7 +1137,7 @@ static int op_bisect_forward_serialno(OggOpusFile *_of, if(OP_UNLIKELY(clinks>INT_MAX-1>>1))return OP_EFAULT; clinks=2*clinks+1; OP_ASSERT(nlinkslinks=links; } @@ -1134,7 +1147,7 @@ static int op_bisect_forward_serialno(OggOpusFile *_of, (potentially not a page we care about).*/ /*Scan the seek records we already have to save us some bisection.*/ for(sri=0;srilinks=links; /*We also don't need these anymore.*/ _ogg_free(*_serialnos); @@ -1282,12 +1295,49 @@ static int op_bisect_forward_serialno(OggOpusFile *_of, return 0; } +static void op_update_gain(OggOpusFile *_of){ + OpusHead *head; + opus_int32 gain_q8; + int li; + /*If decode isn't ready, then we'll apply the gain when we initialize the + decoder.*/ + if(_of->ready_stategain_offset_q8; + li=_of->seekable?_of->cur_link:0; + head=&_of->links[li].head; + /*We don't have to worry about overflow here because the header gain and + track gain must lie in the range [-32768,32767], and the user-supplied + offset has been pre-clamped to [-98302,98303].*/ + switch(_of->gain_type){ + case OP_TRACK_GAIN:{ + int track_gain_q8; + track_gain_q8=0; + opus_tags_get_track_gain(&_of->links[li].tags,&track_gain_q8); + gain_q8+=track_gain_q8; + } + /*Fall through.*/ + case OP_HEADER_GAIN:gain_q8+=head->output_gain;break; + case OP_ABSOLUTE_GAIN:break; + default:OP_ASSERT(0); + } + gain_q8=OP_CLAMP(-32768,gain_q8,32767); + OP_ASSERT(_of->od!=NULL); +#if defined(OPUS_SET_GAIN) + opus_multistream_decoder_ctl(_of->od,OPUS_SET_GAIN(gain_q8)); +#else +/*A fallback that works with both float and fixed-point is a bunch of work, + so just force people to use a sufficiently new version. + This is deployed well enough at this point that this shouldn't be a burden.*/ +# error "libopus 1.0.1 or later required" +#endif +} + static int op_make_decode_ready(OggOpusFile *_of){ - OpusHead *head; - int li; - int stream_count; - int coupled_count; - int channel_count; + const OpusHead *head; + int li; + int stream_count; + int coupled_count; + int channel_count; if(_of->ready_state>OP_STREAMSET)return 0; if(OP_UNLIKELY(_of->ready_stateseekable?_of->cur_link:0; @@ -1313,23 +1363,16 @@ static int op_make_decode_ready(OggOpusFile *_of){ _of->od_channel_count=channel_count; memcpy(_of->od_mapping,head->mapping,sizeof(*head->mapping)*channel_count); } -#if defined(OPUS_SET_GAIN) - opus_multistream_decoder_ctl(_of->od,OPUS_SET_GAIN(head->output_gain)); -#else -/*A fallback that works with both float and fixed-point is a bunch of work, - so just force people to use a sufficiently new version. - This is deployed well enough at this point that this shouldn't be a burden.*/ -# error "libopus 1.0.1 or later required" -#endif _of->ready_state=OP_INITSET; _of->bytes_tracked=0; _of->samples_tracked=0; #if !defined(OP_FIXED_POINT) - _of->dither_mute=65; + _of->state_channel_count=0; /*Use the serial number for the PRNG seed to get repeatable output for straight play-throughs.*/ _of->dither_seed=_of->links[li].serialno; #endif + op_update_gain(_of); return 0; } @@ -1368,7 +1411,15 @@ static int op_open_seekable2(OggOpusFile *_of){ int start_op_count; int ret; /*We're partially open and have a first link header state in storage in _of. - Save off that stream state so we can come back to it.*/ + Save off that stream state so we can come back to it. + It would be simpler to just dump all this state and seek back to + links[0].data_offset when we're done. + But we do the extra work to allow us to seek back to _exactly_ the same + stream position we're at now. + This allows, e.g., the HTTP backend to continue reading from the original + connection (if it's still available), instead of opening a new one. + This means we can open and start playing a normal Opus file with a single + link and reasonable packet sizes using only two HTTP requests.*/ start_op_count=_of->op_count; /*This is a bit too large to put on the stack unconditionally.*/ op_start=(ogg_packet *)_ogg_malloc(sizeof(*op_start)*start_op_count); @@ -1468,14 +1519,12 @@ static int op_open1(OggOpusFile *_of, seekable=_cb->seek!=NULL&&(*_cb->seek)(_source,0,SEEK_CUR)!=-1; /*If seek is implemented, tell must also be implemented.*/ if(seekable){ + opus_int64 pos; if(OP_UNLIKELY(_of->callbacks.tell==NULL))return OP_EINVAL; - else{ - opus_int64 pos; - pos=(*_of->callbacks.tell)(_of->source); - /*If the current position is not equal to the initial bytes consumed, - absolute seeking will not work.*/ - if(OP_UNLIKELY(pos!=(opus_int64)_initial_bytes))return OP_EINVAL; - } + pos=(*_of->callbacks.tell)(_of->source); + /*If the current position is not equal to the initial bytes consumed, + absolute seeking will not work.*/ + if(OP_UNLIKELY(pos!=(opus_int64)_initial_bytes))return OP_EINVAL; } _of->seekable=seekable; /*Don't seek yet. @@ -1506,12 +1555,7 @@ static int op_open1(OggOpusFile *_of, if(!seekable)_of->cur_link++; pog=&og; } - if(OP_UNLIKELY(ret<0)){ - /*Don't auto-close the stream on failure.*/ - _of->callbacks.close=NULL; - op_clear(_of); - } - else _of->ready_state=OP_PARTOPEN; + if(OP_LIKELY(ret>=0))_of->ready_state=OP_PARTOPEN; return ret; } @@ -1548,6 +1592,9 @@ OggOpusFile *op_test_callbacks(void *_source,const OpusFileCallbacks *_cb, if(_error!=NULL)*_error=0; return of; } + /*Don't auto-close the stream on failure.*/ + of->callbacks.close=NULL; + op_clear(of); _ogg_free(of); } if(_error!=NULL)*_error=ret; @@ -1594,18 +1641,6 @@ OggOpusFile *op_open_memory(const unsigned char *_data,size_t _size, _error); } -OggOpusFile *op_vopen_url(const char *_url,int *_error,va_list _ap){ - OpusFileCallbacks cb; - return op_open_close_on_failure(op_url_stream_vcreate(&cb,_url,_ap),&cb, - _error); -} - -OggOpusFile *op_open_url(const char *_url,int *_error,...){ - va_list ap; - va_start(ap,_error); - return op_vopen_url(_url,_error,ap); -} - /*Convenience routine to clean up from failure for the open functions that create their own streams.*/ static OggOpusFile *op_test_close_on_failure(void *_source, @@ -1632,18 +1667,6 @@ OggOpusFile *op_test_memory(const unsigned char *_data,size_t _size, _error); } -OggOpusFile *op_vtest_url(const char *_url,int *_error,va_list _ap){ - OpusFileCallbacks cb; - return op_test_close_on_failure(op_url_stream_vcreate(&cb,_url,_ap),&cb, - _error); -} - -OggOpusFile *op_test_url(const char *_url,int *_error,...){ - va_list ap; - va_start(ap,_error); - return op_vtest_url(_url,_error,ap); -} - int op_test_open(OggOpusFile *_of){ int ret; if(OP_UNLIKELY(_of->ready_state!=OP_PARTOPEN))return OP_EINVAL; @@ -1661,25 +1684,25 @@ void op_free(OggOpusFile *_of){ } } -int op_seekable(OggOpusFile *_of){ +int op_seekable(const OggOpusFile *_of){ return _of->seekable; } -int op_link_count(OggOpusFile *_of){ +int op_link_count(const OggOpusFile *_of){ return _of->nlinks; } -ogg_uint32_t op_serialno(OggOpusFile *_of,int _li){ +ogg_uint32_t op_serialno(const OggOpusFile *_of,int _li){ if(OP_UNLIKELY(_li>=_of->nlinks))_li=_of->nlinks-1; if(!_of->seekable)_li=0; return _of->links[_li<0?_of->cur_link:_li].serialno; } -int op_channel_count(OggOpusFile *_of,int _li){ +int op_channel_count(const OggOpusFile *_of,int _li){ return op_head(_of,_li)->channel_count; } -opus_int64 op_raw_total(OggOpusFile *_of,int _li){ +opus_int64 op_raw_total(const OggOpusFile *_of,int _li){ if(OP_UNLIKELY(_of->ready_stateseekable) ||OP_UNLIKELY(_li>=_of->nlinks)){ @@ -1690,7 +1713,7 @@ opus_int64 op_raw_total(OggOpusFile *_of,int _li){ -_of->links[_li].offset; } -ogg_int64_t op_pcm_total(OggOpusFile *_of,int _li){ +ogg_int64_t op_pcm_total(const OggOpusFile *_of,int _li){ OggOpusLink *links; ogg_int64_t diff; int nlinks; @@ -1720,13 +1743,13 @@ ogg_int64_t op_pcm_total(OggOpusFile *_of,int _li){ return diff-links[_li].head.pre_skip; } -const OpusHead *op_head(OggOpusFile *_of,int _li){ +const OpusHead *op_head(const OggOpusFile *_of,int _li){ if(OP_UNLIKELY(_li>=_of->nlinks))_li=_of->nlinks-1; if(!_of->seekable)_li=0; return &_of->links[_li<0?_of->cur_link:_li].head; } -const OpusTags *op_tags(OggOpusFile *_of,int _li){ +const OpusTags *op_tags(const OggOpusFile *_of,int _li){ if(OP_UNLIKELY(_li>=_of->nlinks))_li=_of->nlinks-1; if(!_of->seekable){ if(_of->ready_stateready_state!=OP_PARTOPEN){ @@ -1738,7 +1761,7 @@ const OpusTags *op_tags(OggOpusFile *_of,int _li){ return &_of->links[_li].tags; } -int op_current_link(OggOpusFile *_of){ +int op_current_link(const OggOpusFile *_of){ if(OP_UNLIKELY(_of->ready_statecur_link; } @@ -1749,11 +1772,13 @@ static opus_int32 op_calc_bitrate(opus_int64 _bytes,ogg_int64_t _samples){ /*These rates are absurd, but let's handle them anyway.*/ if(OP_UNLIKELY(_bytes>(OP_INT64_MAX-(_samples>>1))/(48000*8))){ ogg_int64_t den; - if(OP_UNLIKELY(_bytes/(0x7FFFFFFFF/(48000*8))>=_samples))return 0x7FFFFFFF; + if(OP_UNLIKELY(_bytes/(OP_INT32_MAX/(48000*8))>=_samples)){ + return OP_INT32_MAX; + } den=_samples/(48000*8); return (opus_int32)((_bytes+(den>>1))/den); } - if(OP_UNLIKELY(_samples<=0))return 0x7FFFFFFF; + if(OP_UNLIKELY(_samples<=0))return OP_INT32_MAX; /*This can't actually overflow in normal operation: even with a pre-skip of 545 2.5 ms frames with 8 streams running at 1282*8+1 bytes per packet (1275 byte frames + Opus framing overhead + Ogg lacing values), that all @@ -1761,10 +1786,11 @@ static opus_int32 op_calc_bitrate(opus_int64 _bytes,ogg_int64_t _samples){ The only way to get bitrates larger than that is with excessive Opus padding, more encoded streams than output channels, or lots and lots of Ogg pages with no packets on them.*/ - return (opus_int32)OP_MIN((_bytes*48000*8+(_samples>>1))/_samples,0x7FFFFFFF); + return (opus_int32)OP_MIN((_bytes*48000*8+(_samples>>1))/_samples, + OP_INT32_MAX); } -opus_int32 op_bitrate(OggOpusFile *_of,int _li){ +opus_int32 op_bitrate(const OggOpusFile *_of,int _li){ if(OP_UNLIKELY(_of->ready_stateseekable) ||OP_UNLIKELY(_li>=_of->nlinks)){ return OP_EINVAL; @@ -1800,11 +1826,8 @@ static int op_fetch_and_process_page(OggOpusFile *_of, int seekable; int cur_link; int ret; - if(OP_LIKELY(_of->ready_state>=OP_INITSET) - &&OP_LIKELY(_of->op_pos<_of->op_count)){ - /*We're ready to decode and have at least one packet available already.*/ - return 1; - } + /*We shouldn't get here if we have unprocessed packets.*/ + OP_ASSERT(_of->ready_stateop_pos>=_of->op_count); if(!_readp)return 0; seekable=_of->seekable; links=_of->links; @@ -2059,7 +2082,7 @@ static int op_fetch_and_process_page(OggOpusFile *_of, } int op_raw_seek(OggOpusFile *_of,opus_int64 _pos){ - int ret; + int ret; if(OP_UNLIKELY(_of->ready_stateseekable))return OP_ENOSEEK; @@ -2090,10 +2113,10 @@ int op_raw_seek(OggOpusFile *_of,opus_int64 _pos){ position in an individual link.*/ static ogg_int64_t op_get_granulepos(const OggOpusFile *_of, ogg_int64_t _pcm_offset,int *_li){ - OggOpusLink *links; - ogg_int64_t duration; - int nlinks; - int li; + const OggOpusLink *links; + ogg_int64_t duration; + int nlinks; + int li; OP_ASSERT(_pcm_offset>=0); nlinks=_of->nlinks; links=_of->links; @@ -2128,6 +2151,12 @@ static ogg_int64_t op_get_granulepos(const OggOpusFile *_of, Two minutes seems to be a good default.*/ #define OP_CUR_TIME_THRESH (120*48*(opus_int32)1000) +/*Note: The OP_SMALL_FOOTPRINT #define doesn't (currently) save much code size, + but it's meant to serve as documentation for portions of the seeking + algorithm that are purely optional, to aid others learning from/porting this + code to other contexts.*/ +/*#define OP_SMALL_FOOTPRINT (1)*/ + /*Search within link _li for the page with the highest granule position preceding (or equal to) _target_gp. There is a danger here: missing pages or incorrect frame number information @@ -2135,27 +2164,27 @@ static ogg_int64_t op_get_granulepos(const OggOpusFile *_of, Account for that (and report it as an error condition).*/ static int op_pcm_seek_page(OggOpusFile *_of, ogg_int64_t _target_gp,int _li){ - OggOpusLink *link; - ogg_page og; - ogg_int64_t pcm_pre_skip; - ogg_int64_t pcm_start; - ogg_int64_t pcm_end; - ogg_int64_t best_gp; - ogg_int64_t diff; - ogg_uint32_t serialno; - opus_int32 pre_skip; - opus_int32 cur_discard_count; - opus_int64 begin; - opus_int64 end; - opus_int64 boundary; - opus_int64 best; - opus_int64 page_offset; - opus_int64 d[3]; - int force_bisect; - int ret; + const OggOpusLink *link; + ogg_page og; + ogg_int64_t pcm_pre_skip; + ogg_int64_t pcm_start; + ogg_int64_t pcm_end; + ogg_int64_t best_gp; + ogg_int64_t diff; + ogg_uint32_t serialno; + opus_int32 pre_skip; + opus_int64 begin; + opus_int64 end; + opus_int64 boundary; + opus_int64 best; + opus_int64 page_offset; + opus_int64 d0; + opus_int64 d1; + opus_int64 d2; + int force_bisect; + int ret; _of->bytes_tracked=0; _of->samples_tracked=0; - /*New search algorithm by HB (Nicholas Vinen).*/ link=_of->links+_li; best_gp=pcm_start=link->pcm_start; pcm_end=link->pcm_end; @@ -2165,7 +2194,8 @@ static int op_pcm_seek_page(OggOpusFile *_of, /*We discard the first 80 ms of data after a seek, so seek back that much farther. If we can't, simply seek to the beginning of the link.*/ - if(OP_UNLIKELY(op_granpos_add(&_target_gp,_target_gp,-80*48)<0)){ + if(OP_UNLIKELY(op_granpos_add(&_target_gp,_target_gp,-80*48)<0) + ||OP_UNLIKELY(op_granpos_cmp(_target_gp,pcm_start)<0)){ _target_gp=pcm_start; } /*Special case seeking to the start of the link.*/ @@ -2174,6 +2204,7 @@ static int op_pcm_seek_page(OggOpusFile *_of, if(op_granpos_cmp(_target_gp,pcm_pre_skip)<0)end=boundary=begin; else{ end=boundary=link->end_offset; +#if !defined(OP_SMALL_FOOTPRINT) /*If we were decoding from this link, we can narrow the range a bit.*/ if(_li==_of->cur_link&&_of->ready_state>=OP_INITSET){ opus_int64 offset; @@ -2187,15 +2218,15 @@ static int op_pcm_seek_page(OggOpusFile *_of, offset=_of->offset; if(op_count>0&&OP_LIKELY(offset<=end)){ ogg_int64_t gp; - gp=_of->op[op_count-1].granulepos; /*Make sure the timestamp is valid. The granule position might be -1 if we collected the packets from a page without a granule position after reporting a hole.*/ + gp=_of->op[op_count-1].granulepos; if(OP_LIKELY(gp!=-1)&&OP_LIKELY(op_granpos_cmp(pcm_start,gp)<0) &&OP_LIKELY(op_granpos_cmp(pcm_end,gp)>0)){ OP_ALWAYS_TRUE(!op_granpos_diff(&diff,gp,_target_gp)); /*We only actually use the current time if either - a) We can cut off more than half the range, or + a) We can cut off at least half the range, or b) We're seeking sufficiently close to the current position that it's likely to be informative. Otherwise it appears using the whole link range to estimate the @@ -2207,18 +2238,44 @@ static int op_pcm_seek_page(OggOpusFile *_of, best_gp=pcm_start=gp; } } - else if(offset-begin<=end-begin>>1||diffop[0].granulepos, + op_get_packet_duration(_of->op[0].packet,_of->op[0].bytes))); + if(op_granpos_cmp(prev_page_gp,_target_gp)<=0){ + /*Don't call op_decode_clear(), because it will dump our + packets.*/ + _of->op_pos=0; + _of->od_buffer_size=0; + _of->prev_packet_gp=prev_page_gp; + _of->ready_state=OP_STREAMSET; + return op_make_decode_ready(_of); + } + /*No such luck. + Check if we can cut off at least half the range, though.*/ + if(offset-begin<=end-begin>>1||diff>1; - d[1]=d[2]>>1; - d[2]=end-begin>>1; + d0=d1>>1; + d1=d2>>1; + d2=end-begin>>1; if(force_bisect)bisect=begin+(end-begin>>1); else{ ogg_int64_t diff2; @@ -2307,7 +2364,7 @@ static int op_pcm_seek_page(OggOpusFile *_of, boundary=next_boundary; /*If we're not making much progress shrinking the interval size, start forcing straight bisection to limit the worst case.*/ - force_bisect=end-begin>d[0]*2; + force_bisect=end-begin>d0*2; /*Don't let pcm_end get out of range! That could happen with an invalid timestamp.*/ if(OP_LIKELY(op_granpos_cmp(pcm_end,gp)>0) @@ -2321,7 +2378,8 @@ static int op_pcm_seek_page(OggOpusFile *_of, } } /*Found our page. - Seek right after it and update prev_packet_gp and cur_discard_count. + Seek to the end of it and update prev_packet_gp. + Our caller will set cur_discard_count. This is an easier case than op_raw_seek(), as we don't need to keep any packets from the page we found.*/ /*Seek, if necessary.*/ @@ -2330,21 +2388,10 @@ static int op_pcm_seek_page(OggOpusFile *_of, ret=op_seek_helper(_of,best); if(OP_UNLIKELY(ret<0))return ret; } - /*By default, discard 80 ms of data after a seek, unless we seek - into the pre-skip region.*/ - cur_discard_count=80*48; - OP_ALWAYS_TRUE(!op_granpos_diff(&diff,best_gp,pcm_start)); - OP_ASSERT(diff>=0); - /*If we start at the beginning of the pre-skip region, or we're at least - 80 ms from the end of the pre-skip region, we discard to the end of the - pre-skip region. - Otherwise, we still use the 80 ms default, which will discard past the end - of the pre-skip region.*/ - if(diff<=OP_MAX(0,pre_skip-80*48))cur_discard_count=pre_skip-(int)diff; + OP_ASSERT(op_granpos_cmp(best_gp,pcm_start)>=0); _of->cur_link=_li; _of->ready_state=OP_STREAMSET; _of->prev_packet_gp=best_gp; - _of->cur_discard_count=cur_discard_count; ogg_stream_reset_serialno(&_of->os,serialno); ret=op_fetch_and_process_page(_of,page_offset<0?NULL:&og,page_offset,1,0,1); if(OP_UNLIKELY(ret<=0))return OP_EBADLINK; @@ -2356,31 +2403,60 @@ static int op_pcm_seek_page(OggOpusFile *_of, } int op_pcm_seek(OggOpusFile *_of,ogg_int64_t _pcm_offset){ - OggOpusLink *link; - ogg_int64_t pcm_start; - ogg_int64_t target_gp; - ogg_int64_t prev_packet_gp; - ogg_int64_t skip; - ogg_int64_t diff; - int op_count; - int op_pos; - int ret; - int li; + const OggOpusLink *link; + ogg_int64_t pcm_start; + ogg_int64_t target_gp; + ogg_int64_t prev_packet_gp; + ogg_int64_t skip; + ogg_int64_t diff; + int op_count; + int op_pos; + int ret; + int li; if(OP_UNLIKELY(_of->ready_stateseekable))return OP_ENOSEEK; if(OP_UNLIKELY(_pcm_offset<0))return OP_EINVAL; target_gp=op_get_granulepos(_of,_pcm_offset,&li); if(OP_UNLIKELY(target_gp==-1))return OP_EINVAL; - ret=op_pcm_seek_page(_of,target_gp,li); - /*Now skip samples until we actually get to our target.*/ link=_of->links+li; pcm_start=link->pcm_start; OP_ALWAYS_TRUE(!op_granpos_diff(&_pcm_offset,target_gp,pcm_start)); +#if !defined(OP_SMALL_FOOTPRINT) + /*For small (90 ms or less) forward seeks within the same link, just decode + forward. + This also optimizes the case of seeking to the current position.*/ + if(li==_of->cur_link&&_of->ready_state>=OP_INITSET){ + ogg_int64_t gp; + gp=_of->prev_packet_gp; + if(OP_LIKELY(gp!=-1)){ + int nbuffered; + nbuffered=OP_MAX(_of->od_buffer_size-_of->od_buffer_pos,0); + OP_ALWAYS_TRUE(!op_granpos_add(&gp,gp,-nbuffered)); + /*We do _not_ add cur_discard_count to gp. + Otherwise the total amount to discard could grow without bound, and it + would be better just to do a full seek.*/ + if(OP_LIKELY(!op_granpos_diff(&diff,gp,pcm_start))){ + ogg_int64_t discard_count; + discard_count=_pcm_offset-diff; + /*We use a threshold of 90 ms instead of 80, since 80 ms is the + _minimum_ we would have discarded after a full seek. + Assuming 20 ms frames (the default), we'd discard 90 ms on average.*/ + if(discard_count>=0&&OP_UNLIKELY(discard_count<90*48)){ + _of->cur_discard_count=(opus_int32)discard_count; + return 0; + } + } + } + } +#endif + ret=op_pcm_seek_page(_of,target_gp,li); + if(OP_UNLIKELY(ret<0))return ret; + /*Now skip samples until we actually get to our target.*/ /*Figure out where we should skip to.*/ if(_pcm_offset<=link->head.pre_skip)skip=0; else skip=OP_MAX(_pcm_offset-80*48,0); OP_ASSERT(_pcm_offset-skip>=0); - OP_ASSERT(_pcm_offset-skip<0x7FFFFFFF-120*48); + OP_ASSERT(_pcm_offset-skipop_count; @@ -2406,7 +2482,7 @@ int op_pcm_seek(OggOpusFile *_of,ogg_int64_t _pcm_offset){ /*We skipped too far. Either the timestamps were illegal or there was a hole in the data.*/ if(diff>skip)return OP_EBADLINK; - OP_ASSERT(_pcm_offset-diff<0x7FFFFFFF); + OP_ASSERT(_pcm_offset-diffready_stateoffset; } @@ -2425,10 +2501,10 @@ opus_int64 op_raw_tell(OggOpusFile *_of){ For unseekable sources, this gets reset to 0 at the beginning of each link.*/ static ogg_int64_t op_get_pcm_offset(const OggOpusFile *_of, ogg_int64_t _gp,int _li){ - OggOpusLink *links; - ogg_int64_t pcm_offset; - ogg_int64_t delta; - int li; + const OggOpusLink *links; + ogg_int64_t pcm_offset; + ogg_int64_t delta; + int li; links=_of->links; pcm_offset=0; OP_ASSERT(_li<_of->nlinks); @@ -2443,15 +2519,23 @@ static ogg_int64_t op_get_pcm_offset(const OggOpusFile *_of, _gp=links[_li].pcm_end; } if(OP_LIKELY(op_granpos_cmp(_gp,links[_li].pcm_start)>0)){ - OP_ALWAYS_TRUE(!op_granpos_diff(&delta,_gp,links[_li].pcm_start)); + if(OP_UNLIKELY(op_granpos_diff(&delta,_gp,links[_li].pcm_start)<0)){ + /*This means an unseekable stream claimed to have a page from more than + 2 billion days after we joined.*/ + OP_ASSERT(!_of->seekable); + return OP_INT64_MAX; + } if(deltadecode_cb=_decode_cb; + _of->decode_cb_ctx=_ctx; +} + +int op_set_gain_offset(OggOpusFile *_of, + int _gain_type,opus_int32 _gain_offset_q8){ + if(_gain_type!=OP_HEADER_GAIN&&_gain_type!=OP_TRACK_GAIN + &&_gain_type!=OP_ABSOLUTE_GAIN){ + return OP_EINVAL; + } + _of->gain_type=_gain_type; + /*The sum of header gain and track gain lies in the range [-65536,65534]. + These bounds allow the offset to set the final value to anywhere in the + range [-32768,32767], which is what we'll clamp it to before applying.*/ + _of->gain_offset_q8=OP_CLAMP(-98302,_gain_offset_q8,98303); + op_update_gain(_of); + return 0; +} + +void op_set_dither_enabled(OggOpusFile *_of,int _enabled){ +#if !defined(OP_FIXED_POINT) + _of->dither_disabled=!_enabled; + if(!_enabled)_of->dither_mute=65; +#endif +} + /*Allocate the decoder scratch buffer. This is done lazily, since if the user provides large enough buffers, we'll never need it.*/ static int op_init_buffer(OggOpusFile *_of){ int nchannels_max; if(_of->seekable){ - OggOpusLink *links; - int nlinks; - int li; + const OggOpusLink *links; + int nlinks; + int li; links=_of->links; nlinks=_of->nlinks; nchannels_max=1; @@ -2490,6 +2602,39 @@ static int op_init_buffer(OggOpusFile *_of){ return 0; } +/*Decode a single packet into the target buffer.*/ +static int op_decode(OggOpusFile *_of,op_sample *_pcm, + const ogg_packet *_op,int _nsamples,int _nchannels){ + int ret; + /*First we try using the application-provided decode callback.*/ + if(_of->decode_cb!=NULL){ +#if defined(OP_FIXED_POINT) + ret=(*_of->decode_cb)(_of->decode_cb_ctx,_of->od,_pcm,_op, + _nsamples,_nchannels,OP_DEC_FORMAT_SHORT,_of->cur_link); +#else + ret=(*_of->decode_cb)(_of->decode_cb_ctx,_of->od,_pcm,_op, + _nsamples,_nchannels,OP_DEC_FORMAT_FLOAT,_of->cur_link); +#endif + } + else ret=OP_DEC_USE_DEFAULT; + /*If the application didn't want to handle decoding, do it ourselves.*/ + if(ret==OP_DEC_USE_DEFAULT){ +#if defined(OP_FIXED_POINT) + ret=opus_multistream_decode(_of->od, + _op->packet,_op->bytes,_pcm,_nsamples,0); +#else + ret=opus_multistream_decode_float(_of->od, + _op->packet,_op->bytes,_pcm,_nsamples,0); +#endif + OP_ASSERT(ret<0||ret==_nsamples); + } + /*If the application returned a positive value other than 0 or + OP_DEC_USE_DEFAULT, fail.*/ + else if(OP_UNLIKELY(ret>0))return OP_EBADPACKET; + if(OP_UNLIKELY(ret<0))return OP_EBADPACKET; + return ret; +} + /*Read more samples from the stream, using the same API as op_read() or op_read_float().*/ static int op_read_native(OggOpusFile *_of, @@ -2506,10 +2651,8 @@ static int op_read_native(OggOpusFile *_of, od_buffer_pos=_of->od_buffer_pos; nsamples=_of->od_buffer_size-od_buffer_pos; /*If we have buffered samples, return them.*/ - if(OP_UNLIKELY(nsamples>0)){ - if(OP_UNLIKELY(nsamples*nchannels>_buf_size)){ - nsamples=_buf_size/nchannels; - } + if(nsamples>0){ + if(nsamples*nchannels>_buf_size)nsamples=_buf_size/nchannels; memcpy(_pcm,_of->od_buffer+nchannels*od_buffer_pos, sizeof(*_pcm)*nchannels*nsamples); od_buffer_pos+=nsamples; @@ -2520,11 +2663,11 @@ static int op_read_native(OggOpusFile *_of, /*If we have buffered packets, decode one.*/ op_pos=_of->op_pos; if(OP_LIKELY(op_pos<_of->op_count)){ - ogg_packet *pop; - ogg_int64_t diff; - opus_int32 cur_discard_count; - int duration; - int trimmed_duration; + const ogg_packet *pop; + ogg_int64_t diff; + opus_int32 cur_discard_count; + int duration; + int trimmed_duration; pop=_of->op+op_pos++; _of->op_pos=op_pos; cur_discard_count=_of->cur_discard_count; @@ -2553,15 +2696,8 @@ static int op_read_native(OggOpusFile *_of, if(OP_UNLIKELY(ret<0))return ret; buf=_of->od_buffer; } -#if defined(OP_FIXED_POINT) - ret=opus_multistream_decode(_of->od, - pop->packet,pop->bytes,buf,120*48,0); -#else - ret=opus_multistream_decode_float(_of->od, - pop->packet,pop->bytes,buf,120*48,0); -#endif - if(OP_UNLIKELY(ret<0))return OP_EBADPACKET; - OP_ASSERT(ret==duration); + ret=op_decode(_of,buf,pop,duration,nchannels); + if(OP_UNLIKELY(ret<0))return ret; /*Perform pre-skip/pre-roll.*/ od_buffer_pos=(int)OP_MIN(trimmed_duration,cur_discard_count); cur_discard_count-=od_buffer_pos; @@ -2572,31 +2708,22 @@ static int op_read_native(OggOpusFile *_of, what was decoded.*/ _of->bytes_tracked+=pop->bytes; _of->samples_tracked+=trimmed_duration-od_buffer_pos; - /*Don't grab another page yet.*/ - if(OP_LIKELY(od_buffer_posod,pop->packet,pop->bytes, - _pcm,_buf_size/nchannels,0); -#else - ret=opus_multistream_decode_float(_of->od,pop->packet,pop->bytes, - _pcm,_buf_size/nchannels,0); -#endif - if(OP_UNLIKELY(ret<0))return OP_EBADPACKET; - OP_ASSERT(ret==duration); + ret=op_decode(_of,_pcm,pop,duration,nchannels); + if(OP_UNLIKELY(ret<0))return ret; if(OP_LIKELY(trimmed_duration>0)){ /*Perform pre-skip/pre-roll.*/ od_buffer_pos=(int)OP_MIN(trimmed_duration,cur_discard_count); cur_discard_count-=od_buffer_pos; _of->cur_discard_count=cur_discard_count; - if(OP_UNLIKELY(od_buffer_pos>0) - &&OP_LIKELY(od_buffer_pos0) + &&OP_UNLIKELY(od_buffer_pos>0)){ + memmove(_pcm,_pcm+od_buffer_pos*nchannels, + sizeof(*_pcm)*trimmed_duration*nchannels); + } /*Update bitrate tracking based on the actual samples we used from what was decoded.*/ _of->bytes_tracked+=pop->bytes; @@ -2607,6 +2734,9 @@ static int op_read_native(OggOpusFile *_of, } } } + /*Don't grab another page yet. + This one might have more packets, or might have buffered data now.*/ + continue; } } /*Suck in another page.*/ @@ -2619,12 +2749,15 @@ static int op_read_native(OggOpusFile *_of, } } +/*A generic filter to apply to the decoded audio data. + _src is non-const because we will destructively modify the contents of the + source buffer that we consume in some cases.*/ typedef int (*op_read_filter_func)(OggOpusFile *_of,void *_dst,int _dst_sz, op_sample *_src,int _nsamples,int _nchannels); /*Decode some samples and then apply a custom filter to them. This is used to convert to different output formats.*/ -static int op_read_native_filter(OggOpusFile *_of,void *_dst,int _dst_sz, +static int op_filter_read_native(OggOpusFile *_of,void *_dst,int _dst_sz, op_read_filter_func _filter,int *_li){ int ret; /*Ensure we have some decoded samples in our buffer.*/ @@ -2648,11 +2781,46 @@ static int op_read_native_filter(OggOpusFile *_of,void *_dst,int _dst_sz, return ret; } -#if defined(OP_FIXED_POINT) +#if !defined(OP_FIXED_POINT)||!defined(OP_DISABLE_FLOAT_API) -int op_read(OggOpusFile *_of,opus_int16 *_pcm,int _buf_size,int *_li){ - return op_read_native(_of,_pcm,_buf_size,_li); -} +/*Matrices for downmixing from the supported channel counts to stereo. + The matrices with 5 or more channels are normalized to a total volume of 2.0, + since most mixes sound too quiet if normalized to 1.0 (as there is generally + little volume in the side/rear channels).*/ +static const float OP_STEREO_DOWNMIX[OP_NCHANNELS_MAX-2][OP_NCHANNELS_MAX][2]={ + /*3.0*/ + { + {0.5858F,0.0F},{0.4142F,0.4142F},{0.0F,0.5858F} + }, + /*quadrophonic*/ + { + {0.4226F,0.0F},{0.0F,0.4226F},{0.366F,0.2114F},{0.2114F,0.336F} + }, + /*5.0*/ + { + {0.651F,0.0F},{0.46F,0.46F},{0.0F,0.651F},{0.5636F,0.3254F}, + {0.3254F,0.5636F} + }, + /*5.1*/ + { + {0.529F,0.0F},{0.3741F,0.3741F},{0.0F,0.529F},{0.4582F,0.2645F}, + {0.2645F,0.4582F},{0.3741F,0.3741F} + }, + /*6.1*/ + { + {0.4553F,0.0F},{0.322F,0.322F},{0.0F,0.4553F},{0.3943F,0.2277F}, + {0.2277F,0.3943F},{0.2788F,0.2788F},{0.322F,0.322F} + }, + /*7.1*/ + { + {0.3886F,0.0F},{0.2748F,0.2748F},{0.0F,0.3886F},{0.3366F,0.1943F}, + {0.1943F,0.3366F},{0.3366F,0.1943F},{0.1943F,0.3366F},{0.2748F,0.2748F} + } +}; + +#endif + +#if defined(OP_FIXED_POINT) /*Matrices for downmixing from the supported channel counts to stereo. The matrices with 5 or more channels are normalized to a total volume of 2.0, @@ -2690,9 +2858,13 @@ static const opus_int16 OP_STEREO_DOWNMIX_Q14 } }; +int op_read(OggOpusFile *_of,opus_int16 *_pcm,int _buf_size,int *_li){ + return op_read_native(_of,_pcm,_buf_size,_li); +} + static int op_stereo_filter(OggOpusFile *_of,void *_dst,int _dst_sz, op_sample *_src,int _nsamples,int _nchannels){ - _of=_of; + (void)_of; _nsamples=OP_MIN(_nsamples,_dst_sz>>1); if(_nchannels==2)memcpy(_dst,_src,_nsamples*2*sizeof(*_src)); else{ @@ -2714,6 +2886,7 @@ static int op_stereo_filter(OggOpusFile *_of,void *_dst,int _dst_sz, l+=OP_STEREO_DOWNMIX_Q14[_nchannels-3][ci][0]*s; r+=OP_STEREO_DOWNMIX_Q14[_nchannels-3][ci][1]*s; } + /*TODO: For 5 or more channels, we should do soft clipping here.*/ dst[2*i+0]=(opus_int16)OP_CLAMP(-32768,l+8192>>14,32767); dst[2*i+1]=(opus_int16)OP_CLAMP(-32768,r+8192>>14,32767); } @@ -2723,7 +2896,7 @@ static int op_stereo_filter(OggOpusFile *_of,void *_dst,int _dst_sz, } int op_read_stereo(OggOpusFile *_of,opus_int16 *_pcm,int _buf_size){ - return op_read_native_filter(_of,_pcm,_buf_size,op_stereo_filter,NULL); + return op_filter_read_native(_of,_pcm,_buf_size,op_stereo_filter,NULL); } # if !defined(OP_DISABLE_FLOAT_API) @@ -2732,7 +2905,7 @@ static int op_short2float_filter(OggOpusFile *_of,void *_dst,int _dst_sz, op_sample *_src,int _nsamples,int _nchannels){ float *dst; int i; - _of=_of; + (void)_of; dst=(float *)_dst; if(OP_UNLIKELY(_nsamples*_nchannels>_dst_sz))_nsamples=_dst_sz/_nchannels; _dst_sz=_nsamples*_nchannels; @@ -2741,33 +2914,51 @@ static int op_short2float_filter(OggOpusFile *_of,void *_dst,int _dst_sz, } int op_read_float(OggOpusFile *_of,float *_pcm,int _buf_size,int *_li){ - return op_read_native_filter(_of,_pcm,_buf_size,op_short2float_filter,_li); + return op_filter_read_native(_of,_pcm,_buf_size,op_short2float_filter,_li); } static int op_short2float_stereo_filter(OggOpusFile *_of, void *_dst,int _dst_sz,op_sample *_src,int _nsamples,int _nchannels){ float *dst; + int i; dst=(float *)_dst; _nsamples=OP_MIN(_nsamples,_dst_sz>>1); if(_nchannels==1){ - int i; _nsamples=op_short2float_filter(_of,dst,_nsamples,_src,_nsamples,1); for(i=_nsamples;i-->0;)dst[2*i+0]=dst[2*i+1]=dst[i]; - return _nsamples; } - /*It would be better to convert to floats and then downmix (so that we don't - risk clipping with more than 5 channels), but that would require a large - stack buffer, which is probably not a good idea if you're using the - fixed-point build.*/ - if(_nchannels>2){ - _nsamples=op_stereo_filter(_of,_src,_nsamples*2, - _src,_nsamples,_nchannels); + else if(_nchannels<5){ + /*For 3 or 4 channels, we can downmix in fixed point without risk of + clipping.*/ + if(_nchannels>2){ + _nsamples=op_stereo_filter(_of,_src,_nsamples*2, + _src,_nsamples,_nchannels); + } + return op_short2float_filter(_of,dst,_dst_sz,_src,_nsamples,2); } - return op_short2float_filter(_of,dst,_dst_sz,_src,_nsamples,2); + else{ + /*For 5 or more channels, we convert to floats and then downmix (so that we + don't risk clipping).*/ + for(i=0;i<_nsamples;i++){ + float l; + float r; + int ci; + l=r=0; + for(ci=0;ci<_nchannels;ci++){ + float s; + s=(1.0F/32768)*_src[_nchannels*i+ci]; + l+=OP_STEREO_DOWNMIX[_nchannels-3][ci][0]*s; + r+=OP_STEREO_DOWNMIX[_nchannels-3][ci][1]*s; + } + dst[2*i+0]=l; + dst[2*i+1]=r; + } + } + return _nsamples; } int op_read_float_stereo(OggOpusFile *_of,float *_pcm,int _buf_size){ - return op_read_native_filter(_of,_pcm,_buf_size, + return op_filter_read_native(_of,_pcm,_buf_size, op_short2float_stereo_filter,NULL); } @@ -2801,7 +2992,7 @@ static opus_uint32 op_rand(opus_uint32 _seed){ suppression. This process can increase the peak level of the signal (in theory by the peak error of 1.5 +20 dB, though that is unobservably rare). - To avoid clipping, the signal is attenuated by a couple thousands of a dB. + To avoid clipping, the signal is attenuated by a couple thousandths of a dB. Initially, the approach taken here was to only attenuate by the 99.9th percentile, making clipping rare but not impossible (like SoX), but the limited gain of the filter means that the worst case was only two @@ -2809,9 +3000,9 @@ static opus_uint32 op_rand(opus_uint32 _seed){ The attenuation is probably also helpful to prevent clipping in the DAC reconstruction filters or downstream resampling, in any case.*/ -#define OP_GAIN (32753.0F) +# define OP_GAIN (32753.0F) -#define OP_PRNG_GAIN (1.0F/0xFFFFFFFF) +# define OP_PRNG_GAIN (1.0F/0xFFFFFFFF) /*48 kHz noise shaping filter, sd=2.34.*/ @@ -2823,118 +3014,95 @@ static const float OP_FCOEF_A[4]={ 0.9030F,0.0116F,-0.5853F,-0.2571F }; -static void op_shaped_dither16(OggOpusFile *_of,opus_int16 *_dst, - const float *_src,int _nsamples,int _nchannels){ - opus_uint32 seed; - int mute; - int i; - mute=_of->dither_mute; - seed=_of->dither_seed; - /*In order to avoid replacing digital silence with quiet dither noise, we - mute if the output has been silent for a while.*/ - if(mute>64)memset(_of->dither_a,0,sizeof(*_of->dither_a)*4*_nchannels); - for(i=0;i<_nsamples;i++){ - int silent; - int ci; - silent=1; - for(ci=0;ci<_nchannels;ci++){ - float r; - float s; - float err; - int si; - int j; - s=_src[_nchannels*i+ci]; - silent&=s==0; - s*=OP_GAIN; - err=0; - for(j=0;j<4;j++){ - err+=OP_FCOEF_B[j]*_of->dither_b[ci*4+j] - -OP_FCOEF_A[j]*_of->dither_a[ci*4+j]; - } - for(j=3;j-->0;)_of->dither_a[ci*4+j+1]=_of->dither_a[ci*4+j]; - for(j=3;j-->0;)_of->dither_b[ci*4+j+1]=_of->dither_b[ci*4+j]; - _of->dither_a[ci*4]=err; - s-=err; - if(mute>16)r=0; - else{ - seed=op_rand(seed); - r=seed*OP_PRNG_GAIN; - seed=op_rand(seed); - r-=seed*OP_PRNG_GAIN; - } - /*Clamp in float out of paranoia that the input will be > 96 dBFS and - wrap if the integer is clamped.*/ - si=op_float2int(OP_CLAMP(-32768,s+r,32767)); - _dst[_nchannels*i+ci]=(opus_int16)si; - /*Including clipping in the noise shaping is generally disastrous: the - futile effort to restore the clipped energy results in more clipping. - However, small amounts---at the level which could normally be created - by dither and rounding---are harmless and can even reduce clipping - somewhat due to the clipping sometimes reducing the dither + rounding - error.*/ - _of->dither_b[ci*4]=mute>16?0:OP_CLAMP(-1.5F,si-s,1.5F); - } - mute++; - if(!silent)mute=0; - } - _of->dither_mute=OP_MIN(mute,65); - _of->dither_seed=seed; -} - static int op_float2short_filter(OggOpusFile *_of,void *_dst,int _dst_sz, - op_sample *_src,int _nsamples,int _nchannels){ + float *_src,int _nsamples,int _nchannels){ opus_int16 *dst; + int ci; + int i; dst=(opus_int16 *)_dst; if(OP_UNLIKELY(_nsamples*_nchannels>_dst_sz))_nsamples=_dst_sz/_nchannels; - op_shaped_dither16(_of,dst,_src,_nsamples,_nchannels); +# if defined(OP_SOFT_CLIP) + if(_of->state_channel_count!=_nchannels){ + for(ci=0;ci<_nchannels;ci++)_of->clip_state[ci]=0; + } + opus_pcm_soft_clip(_src,_nsamples,_nchannels,_of->clip_state); +# endif + if(_of->dither_disabled){ + for(i=0;i<_nchannels*_nsamples;i++){ + dst[i]=op_float2int(OP_CLAMP(-32768,32768.0F*_src[i],32767)); + } + } + else{ + opus_uint32 seed; + int mute; + seed=_of->dither_seed; + mute=_of->dither_mute; + if(_of->state_channel_count!=_nchannels)mute=65; + /*In order to avoid replacing digital silence with quiet dither noise, we + mute if the output has been silent for a while.*/ + if(mute>64)memset(_of->dither_a,0,sizeof(*_of->dither_a)*4*_nchannels); + for(i=0;i<_nsamples;i++){ + int silent; + silent=1; + for(ci=0;ci<_nchannels;ci++){ + float r; + float s; + float err; + int si; + int j; + s=_src[_nchannels*i+ci]; + silent&=s==0; + s*=OP_GAIN; + err=0; + for(j=0;j<4;j++){ + err+=OP_FCOEF_B[j]*_of->dither_b[ci*4+j] + -OP_FCOEF_A[j]*_of->dither_a[ci*4+j]; + } + for(j=3;j-->0;)_of->dither_a[ci*4+j+1]=_of->dither_a[ci*4+j]; + for(j=3;j-->0;)_of->dither_b[ci*4+j+1]=_of->dither_b[ci*4+j]; + _of->dither_a[ci*4]=err; + s-=err; + if(mute>16)r=0; + else{ + seed=op_rand(seed); + r=seed*OP_PRNG_GAIN; + seed=op_rand(seed); + r-=seed*OP_PRNG_GAIN; + } + /*Clamp in float out of paranoia that the input will be > 96 dBFS and + wrap if the integer is clamped.*/ + si=op_float2int(OP_CLAMP(-32768,s+r,32767)); + dst[_nchannels*i+ci]=(opus_int16)si; + /*Including clipping in the noise shaping is generally disastrous: the + futile effort to restore the clipped energy results in more clipping. + However, small amounts---at the level which could normally be created + by dither and rounding---are harmless and can even reduce clipping + somewhat due to the clipping sometimes reducing the dither + rounding + error.*/ + _of->dither_b[ci*4]=mute>16?0:OP_CLAMP(-1.5F,si-s,1.5F); + } + mute++; + if(!silent)mute=0; + } + _of->dither_mute=OP_MIN(mute,65); + _of->dither_seed=seed; + } + _of->state_channel_count=_nchannels; return _nsamples; } int op_read(OggOpusFile *_of,opus_int16 *_pcm,int _buf_size,int *_li){ - return op_read_native_filter(_of,_pcm,_buf_size,op_float2short_filter,_li); + return op_filter_read_native(_of,_pcm,_buf_size,op_float2short_filter,_li); } int op_read_float(OggOpusFile *_of,float *_pcm,int _buf_size,int *_li){ + _of->state_channel_count=0; return op_read_native(_of,_pcm,_buf_size,_li); } -/*Matrices for downmixing from the supported channel counts to stereo. - The matrices with 5 or more channels are normalized to a total volume of 2.0, - since most mixes sound too quiet if normalized to 1.0 (as there is generally - little volume in the side/rear channels).*/ -static const float OP_STEREO_DOWNMIX[OP_NCHANNELS_MAX-2][OP_NCHANNELS_MAX][2]={ - /*3.0*/ - { - {0.5858F,0.0F},{0.4142F,0.4142F},{0.0F,0.5858F} - }, - /*quadrophonic*/ - { - {0.4226F,0.0F},{0.0F,0.4226F},{0.366F,0.2114F},{0.2114F,0.336F} - }, - /*5.0*/ - { - {0.651F,0.0F},{0.46F,0.46F},{0.0F,0.651F},{0.5636F,0.3254F}, - {0.3254F,0.5636F} - }, - /*5.1*/ - { - {0.529F,0.0F},{0.3741F,0.3741F},{0.0F,0.529F},{0.4582F,0.2645F}, - {0.2645F,0.4582F},{0.3741F,0.3741F} - }, - /*6.1*/ - { - {0.4553F,0.0F},{0.322F,0.322F},{0.0F,0.4553F},{0.3943F,0.2277F}, - {0.2277F,0.3943F},{0.2788F,0.2788F},{0.322F,0.322F} - }, - /*7.1*/ - { - {0.3886F,0.0F},{0.2748F,0.2748F},{0.0F,0.3886F},{0.3366F,0.1943F}, - {0.1943F,0.3366F},{0.3366F,0.1943F},{0.1943F,0.3366F},{0.2748F,0.2748F} - } -}; - static int op_stereo_filter(OggOpusFile *_of,void *_dst,int _dst_sz, op_sample *_src,int _nsamples,int _nchannels){ + (void)_of; _nsamples=OP_MIN(_nsamples,_dst_sz>>1); if(_nchannels==2)memcpy(_dst,_src,_nsamples*2*sizeof(*_src)); else{ @@ -2966,29 +3134,30 @@ static int op_float2short_stereo_filter(OggOpusFile *_of, void *_dst,int _dst_sz,op_sample *_src,int _nsamples,int _nchannels){ opus_int16 *dst; dst=(opus_int16 *)_dst; - _nsamples=OP_MIN(_nsamples,_dst_sz>>1); if(_nchannels==1){ int i; - op_shaped_dither16(_of,dst,_src,_nsamples,1); + _nsamples=op_float2short_filter(_of,dst,_dst_sz>>1,_src,_nsamples,1); for(i=_nsamples;i-->0;)dst[2*i+0]=dst[2*i+1]=dst[i]; } else{ if(_nchannels>2){ + _nsamples=OP_MIN(_nsamples,_dst_sz>>1); _nsamples=op_stereo_filter(_of,_src,_nsamples*2, _src,_nsamples,_nchannels); } - op_shaped_dither16(_of,dst,_src,_nsamples,_nchannels); + _nsamples=op_float2short_filter(_of,dst,_dst_sz,_src,_nsamples,2); } return _nsamples; } int op_read_stereo(OggOpusFile *_of,opus_int16 *_pcm,int _buf_size){ - return op_read_native_filter(_of,_pcm,_buf_size, + return op_filter_read_native(_of,_pcm,_buf_size, op_float2short_stereo_filter,NULL); } int op_read_float_stereo(OggOpusFile *_of,float *_pcm,int _buf_size){ - return op_read_native_filter(_of,_pcm,_buf_size,op_stereo_filter,NULL); + _of->state_channel_count=0; + return op_filter_read_native(_of,_pcm,_buf_size,op_stereo_filter,NULL); } #endif diff --git a/code/opusfile-0.5/src/stream.c b/code/opusfile-0.5/src/stream.c new file mode 100644 index 00000000..0238a6b3 --- /dev/null +++ b/code/opusfile-0.5/src/stream.c @@ -0,0 +1,366 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE libopusfile SOURCE CODE IS (C) COPYRIGHT 1994-2012 * + * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * + * * + ******************************************************************** + + function: stdio-based convenience library for opening/seeking/decoding + last mod: $Id: vorbisfile.c 17573 2010-10-27 14:53:59Z xiphmont $ + + ********************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "internal.h" +#include +#include +#include +#include +#include +#if defined(_WIN32) +# include +#endif + +typedef struct OpusMemStream OpusMemStream; + +#define OP_MEM_SIZE_MAX (~(size_t)0>>1) +#define OP_MEM_DIFF_MAX ((ptrdiff_t)OP_MEM_SIZE_MAX) + +/*The context information needed to read from a block of memory as if it were a + file.*/ +struct OpusMemStream{ + /*The block of memory to read from.*/ + const unsigned char *data; + /*The total size of the block. + This must be at most OP_MEM_SIZE_MAX to prevent signed overflow while + seeking.*/ + ptrdiff_t size; + /*The current file position. + This is allowed to be set arbitrarily greater than size (i.e., past the end + of the block, though we will not read data past the end of the block), but + is not allowed to be negative (i.e., before the beginning of the block).*/ + ptrdiff_t pos; +}; + +static int op_fread(void *_stream,unsigned char *_ptr,int _buf_size){ + FILE *stream; + size_t ret; + /*Check for empty read.*/ + if(_buf_size<=0)return 0; + stream=(FILE *)_stream; + ret=fread(_ptr,1,_buf_size,stream); + OP_ASSERT(ret<=(size_t)_buf_size); + /*If ret==0 and !feof(stream), there was a read error.*/ + return ret>0||feof(stream)?(int)ret:OP_EREAD; +} + +static int op_fseek(void *_stream,opus_int64 _offset,int _whence){ +#if defined(_WIN32) + /*_fseeki64() is not exposed until MSCVCRT80. + This is the default starting with MSVC 2005 (_MSC_VER>=1400), but we want + to allow linking against older MSVCRT versions for compatibility back to + XP without installing extra runtime libraries. + i686-pc-mingw32 does not have fseeko() and requires + __MSVCRT_VERSION__>=0x800 for _fseeki64(), which screws up linking with + other libraries (that don't use MSVCRT80 from MSVC 2005 by default). + i686-w64-mingw32 does have fseeko() and respects _FILE_OFFSET_BITS, but I + don't know how to detect that at compile time. + We could just use fseeko64() (which is available in both), but its + implemented using fgetpos()/fsetpos() just like this code, except without + the overflow checking, so we prefer our version.*/ + opus_int64 pos; + /*We don't use fpos_t directly because it might be a struct if __STDC__ is + non-zero or _INTEGRAL_MAX_BITS < 64. + I'm not certain when the latter is true, but someone could in theory set + the former. + Either way, it should be binary compatible with a normal 64-bit int (this + assumption is not portable, but I believe it is true for MSVCRT).*/ + OP_ASSERT(sizeof(pos)==sizeof(fpos_t)); + /*Translate the seek to an absolute one.*/ + if(_whence==SEEK_CUR){ + int ret; + ret=fgetpos((FILE *)_stream,(fpos_t *)&pos); + if(ret)return ret; + } + else if(_whence==SEEK_END)pos=_filelengthi64(_fileno((FILE *)_stream)); + else if(_whence==SEEK_SET)pos=0; + else return -1; + /*Check for errors or overflow.*/ + if(pos<0||_offset<-pos||_offset>OP_INT64_MAX-pos)return -1; + pos+=_offset; + return fsetpos((FILE *)_stream,(fpos_t *)&pos); +#else + /*This function actually conforms to the SUSv2 and POSIX.1-2001, so we prefer + it except on Windows.*/ + return fseeko((FILE *)_stream,(off_t)_offset,_whence); +#endif +} + +static opus_int64 op_ftell(void *_stream){ +#if defined(_WIN32) + /*_ftelli64() is not exposed until MSCVCRT80, and ftello()/ftello64() have + the same problems as fseeko()/fseeko64() in MingW. + See above for a more detailed explanation.*/ + opus_int64 pos; + OP_ASSERT(sizeof(pos)==sizeof(fpos_t)); + return fgetpos((FILE *)_stream,(fpos_t *)&pos)?-1:pos; +#else + /*This function actually conforms to the SUSv2 and POSIX.1-2001, so we prefer + it except on Windows.*/ + return ftello((FILE *)_stream); +#endif +} + +static const OpusFileCallbacks OP_FILE_CALLBACKS={ + op_fread, + op_fseek, + op_ftell, + (op_close_func)fclose +}; + +#if defined(_WIN32) +# include +# include + +/*Windows doesn't accept UTF-8 by default, and we don't have a wchar_t API, + so if we just pass the path to fopen(), then there'd be no way for a user + of our API to open a Unicode filename. + Instead, we translate from UTF-8 to UTF-16 and use Windows' wchar_t API. + This makes this API more consistent with platforms where the character set + used by fopen is the same as used on disk, which is generally UTF-8, and + with our metadata API, which always uses UTF-8.*/ +static wchar_t *op_utf8_to_utf16(const char *_src){ + wchar_t *dst; + size_t len; + len=strlen(_src); + /*Worst-case output is 1 wide character per 1 input character.*/ + dst=(wchar_t *)_ogg_malloc(sizeof(*dst)*(len+1)); + if(dst!=NULL){ + size_t si; + size_t di; + for(di=si=0;si=0x80U){ + /*This is a 2-byte sequence that is not overlong.*/ + dst[di++]=w; + si++; + continue; + } + } + else{ + int c2; + /*This is safe, because c1 was not 0 and _src is NUL-terminated.*/ + c2=(unsigned char)_src[si+2]; + if((c2&0xC0)==0x80){ + /*Found at least two continuation bytes.*/ + if((c0&0xF0)==0xE0){ + wchar_t w; + /*Start byte says this is a 3-byte sequence.*/ + w=(c0&0xF)<<12|(c1&0x3F)<<6|c2&0x3F; + if(w>=0x800U&&(w<0xD800||w>=0xE000)&&w<0xFFFE){ + /*This is a 3-byte sequence that is not overlong, not a + UTF-16 surrogate pair value, and not a 'not a character' + value.*/ + dst[di++]=w; + si+=2; + continue; + } + } + else{ + int c3; + /*This is safe, because c2 was not 0 and _src is + NUL-terminated.*/ + c3=(unsigned char)_src[si+3]; + if((c3&0xC0)==0x80){ + /*Found at least three continuation bytes.*/ + if((c0&0xF8)==0xF0){ + opus_uint32 w; + /*Start byte says this is a 4-byte sequence.*/ + w=(c0&7)<<18|(c1&0x3F)<<12|(c2&0x3F)<<6&(c3&0x3F); + if(w>=0x10000U&&w<0x110000U){ + /*This is a 4-byte sequence that is not overlong and not + greater than the largest valid Unicode code point. + Convert it to a surrogate pair.*/ + w-=0x10000; + dst[di++]=(wchar_t)(0xD800+(w>>10)); + dst[di++]=(wchar_t)(0xDC00+(w&0x3FF)); + si+=3; + continue; + } + } + } + } + } + } + } + } + /*If we got here, we encountered an illegal UTF-8 sequence.*/ + _ogg_free(dst); + return NULL; + } + OP_ASSERT(di<=len); + dst[di]='\0'; + } + return dst; +} + +#endif + +void *op_fopen(OpusFileCallbacks *_cb,const char *_path,const char *_mode){ + FILE *fp; +#if !defined(_WIN32) + fp=fopen(_path,_mode); +#else + fp=NULL; + if(_path==NULL||_mode==NULL)errno=EINVAL; + else{ + wchar_t *wpath; + wchar_t *wmode; + wpath=op_utf8_to_utf16(_path); + wmode=op_utf8_to_utf16(_mode); + if(wmode==NULL)errno=EINVAL; + else if(wpath==NULL)errno=ENOENT; + else fp=_wfopen(wpath,wmode); + _ogg_free(wmode); + _ogg_free(wpath); + } +#endif + if(fp!=NULL)*_cb=*&OP_FILE_CALLBACKS; + return fp; +} + +void *op_fdopen(OpusFileCallbacks *_cb,int _fd,const char *_mode){ + FILE *fp; + fp=fdopen(_fd,_mode); + if(fp!=NULL)*_cb=*&OP_FILE_CALLBACKS; + return fp; +} + +void *op_freopen(OpusFileCallbacks *_cb,const char *_path,const char *_mode, + void *_stream){ + FILE *fp; +#if !defined(_WIN32) + fp=freopen(_path,_mode,(FILE *)_stream); +#else + fp=NULL; + if(_path==NULL||_mode==NULL)errno=EINVAL; + else{ + wchar_t *wpath; + wchar_t *wmode; + wpath=op_utf8_to_utf16(_path); + wmode=op_utf8_to_utf16(_mode); + if(wmode==NULL)errno=EINVAL; + else if(wpath==NULL)errno=ENOENT; + else fp=_wfreopen(wpath,wmode,(FILE *)_stream); + _ogg_free(wmode); + _ogg_free(wpath); + } +#endif + if(fp!=NULL)*_cb=*&OP_FILE_CALLBACKS; + return fp; +} + +static int op_mem_read(void *_stream,unsigned char *_ptr,int _buf_size){ + OpusMemStream *stream; + ptrdiff_t size; + ptrdiff_t pos; + stream=(OpusMemStream *)_stream; + /*Check for empty read.*/ + if(_buf_size<=0)return 0; + size=stream->size; + pos=stream->pos; + /*Check for EOF.*/ + if(pos>=size)return 0; + /*Check for a short read.*/ + _buf_size=(int)OP_MIN(size-pos,_buf_size); + memcpy(_ptr,stream->data+pos,_buf_size); + pos+=_buf_size; + stream->pos=pos; + return _buf_size; +} + +static int op_mem_seek(void *_stream,opus_int64 _offset,int _whence){ + OpusMemStream *stream; + ptrdiff_t pos; + stream=(OpusMemStream *)_stream; + pos=stream->pos; + OP_ASSERT(pos>=0); + switch(_whence){ + case SEEK_SET:{ + /*Check for overflow:*/ + if(_offset<0||_offset>OP_MEM_DIFF_MAX)return -1; + pos=(ptrdiff_t)_offset; + }break; + case SEEK_CUR:{ + /*Check for overflow:*/ + if(_offset<-pos||_offset>OP_MEM_DIFF_MAX-pos)return -1; + pos=(ptrdiff_t)(pos+_offset); + }break; + case SEEK_END:{ + ptrdiff_t size; + size=stream->size; + OP_ASSERT(size>=0); + /*Check for overflow:*/ + if(_offset>size||_offsetpos=pos; + return 0; +} + +static opus_int64 op_mem_tell(void *_stream){ + OpusMemStream *stream; + stream=(OpusMemStream *)_stream; + return (ogg_int64_t)stream->pos; +} + +static int op_mem_close(void *_stream){ + _ogg_free(_stream); + return 0; +} + +static const OpusFileCallbacks OP_MEM_CALLBACKS={ + op_mem_read, + op_mem_seek, + op_mem_tell, + op_mem_close +}; + +void *op_mem_stream_create(OpusFileCallbacks *_cb, + const unsigned char *_data,size_t _size){ + OpusMemStream *stream; + if(_size>OP_MEM_SIZE_MAX)return NULL; + stream=(OpusMemStream *)_ogg_malloc(sizeof(*stream)); + if(stream!=NULL){ + *_cb=*&OP_MEM_CALLBACKS; + stream->data=_data; + stream->size=_size; + stream->pos=0; + } + return stream; +} diff --git a/code/opusfile-0.5/src/wincerts.c b/code/opusfile-0.5/src/wincerts.c new file mode 100644 index 00000000..b0e35aa3 --- /dev/null +++ b/code/opusfile-0.5/src/wincerts.c @@ -0,0 +1,171 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE libopusfile SOURCE CODE IS (C) COPYRIGHT 2013 * + * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * + * * + ********************************************************************/ + +/*This should really be part of OpenSSL, but there's been a patch [1] sitting + in their bugtracker for over two years that implements this, without any + action, so I'm giving up and re-implementing it locally. + + [1] */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "internal.h" +#if defined(OP_ENABLE_HTTP)&&defined(_WIN32) +/*You must include windows.h before wincrypt.h and x509.h.*/ +# define WIN32_LEAN_AND_MEAN +# define WIN32_EXTRA_LEAN +# include +/*You must include wincrypt.h before x509.h, too, or X509_NAME doesn't get + defined properly.*/ +# include +# include +# include +# include + +static int op_capi_new(X509_LOOKUP *_lu){ + HCERTSTORE h_store; + h_store=CertOpenStore(CERT_STORE_PROV_SYSTEM_A,0,0, + CERT_STORE_OPEN_EXISTING_FLAG|CERT_STORE_READONLY_FLAG| + CERT_SYSTEM_STORE_CURRENT_USER|CERT_STORE_SHARE_CONTEXT_FLAG,"ROOT"); + if(h_store!=NULL){ + _lu->method_data=(char *)h_store; + return 1; + } + return 0; +} + +static void op_capi_free(X509_LOOKUP *_lu){ + HCERTSTORE h_store; + h_store=(HCERTSTORE)_lu->method_data; +# if defined(OP_ENABLE_ASSERTIONS) + OP_ALWAYS_TRUE(CertCloseStore(h_store,CERT_CLOSE_STORE_CHECK_FLAG)); +# else + CertCloseStore(h_store,0); +# endif +} + +static int op_capi_retrieve_by_subject(X509_LOOKUP *_lu,int _type, + X509_NAME *_name,X509_OBJECT *_ret){ + X509_OBJECT *obj; + CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE); + obj=X509_OBJECT_retrieve_by_subject(_lu->store_ctx->objs,_type,_name); + CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE); + if(obj!=NULL){ + _ret->type=obj->type; + memcpy(&_ret->data,&obj->data,sizeof(_ret->data)); + return 1; + } + return 0; +} + +static int op_capi_get_by_subject(X509_LOOKUP *_lu,int _type,X509_NAME *_name, + X509_OBJECT *_ret){ + HCERTSTORE h_store; + if(_name==NULL)return 0; + if(_name->bytes==NULL||_name->bytes->length<=0||_name->modified){ + if(i2d_X509_NAME(_name,NULL)<0)return 0; + OP_ASSERT(_name->bytes->length>0); + } + h_store=(HCERTSTORE)_lu->method_data; + switch(_type){ + case X509_LU_X509:{ + CERT_NAME_BLOB find_para; + PCCERT_CONTEXT cert; + X509 *x; + int ret; + /*Although X509_NAME contains a canon_enc field, that "canonical" [1] + encoding was just made up by OpenSSL. + It doesn't correspond to any actual standard, and since it drops the + initial sequence header, won't be recognized by the Crypto API. + The assumption here is that CertFindCertificateInStore() will allow any + appropriate variations in the encoding when it does its comparison. + This is, however, emphatically not true under Wine, which just compares + the encodings with memcmp(). + Most of the time things work anyway, though, and there isn't really + anything we can do to make the situation better. + + [1] A "canonical form" is defined as the one where, if you locked 10 + mathematicians in a room and asked them to come up with a + representation for something, it's the answer that 9 of them would + give you back. + I don't think OpenSSL's encoding qualifies.*/ + find_para.cbData=_name->bytes->length; + find_para.pbData=(unsigned char *)_name->bytes->data; + cert=CertFindCertificateInStore(h_store,X509_ASN_ENCODING,0, + CERT_FIND_SUBJECT_NAME,&find_para,NULL); + if(cert==NULL)return 0; + x=d2i_X509(NULL,(const unsigned char **)&cert->pbCertEncoded, + cert->cbCertEncoded); + CertFreeCertificateContext(cert); + if(x==NULL)return 0; + ret=X509_STORE_add_cert(_lu->store_ctx,x); + X509_free(x); + if(ret)return op_capi_retrieve_by_subject(_lu,_type,_name,_ret); + }break; + case X509_LU_CRL:{ + CERT_INFO cert_info; + CERT_CONTEXT find_para; + PCCRL_CONTEXT crl; + X509_CRL *x; + int ret; + ret=op_capi_retrieve_by_subject(_lu,_type,_name,_ret); + if(ret>0)return ret; + memset(&cert_info,0,sizeof(cert_info)); + cert_info.Issuer.cbData=_name->bytes->length; + cert_info.Issuer.pbData=(unsigned char *)_name->bytes->data; + memset(&find_para,0,sizeof(find_para)); + find_para.pCertInfo=&cert_info; + crl=CertFindCRLInStore(h_store,0,0,CRL_FIND_ISSUED_BY,&find_para,NULL); + if(crl==NULL)return 0; + x=d2i_X509_CRL(NULL,(const unsigned char **)&crl->pbCrlEncoded, + crl->cbCrlEncoded); + CertFreeCRLContext(crl); + if(x==NULL)return 0; + ret=X509_STORE_add_crl(_lu->store_ctx,x); + X509_CRL_free(x); + if(ret)return op_capi_retrieve_by_subject(_lu,_type,_name,_ret); + }break; + } + return 0; +} + +/*This is not const because OpenSSL doesn't allow it, even though it won't + write to it.*/ +static X509_LOOKUP_METHOD X509_LOOKUP_CAPI={ + "Load Crypto API store into cache", + op_capi_new, + op_capi_free, + NULL, + NULL, + NULL, + op_capi_get_by_subject, + NULL, + NULL, + NULL +}; + +int SSL_CTX_set_default_verify_paths_win32(SSL_CTX *_ssl_ctx){ + X509_STORE *store; + X509_LOOKUP *lu; + /*We intentionally do not add the normal default paths, as they are usually + wrong, and are just asking to be used as an exploit vector.*/ + store=SSL_CTX_get_cert_store(_ssl_ctx); + OP_ASSERT(store!=NULL); + lu=X509_STORE_add_lookup(store,&X509_LOOKUP_CAPI); + if(lu==NULL)return 0; + ERR_clear_error(); + return 1; +} + +#endif diff --git a/code/opusfile-0.5/src/winerrno.h b/code/opusfile-0.5/src/winerrno.h new file mode 100644 index 00000000..32a90b4e --- /dev/null +++ b/code/opusfile-0.5/src/winerrno.h @@ -0,0 +1,90 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE libopusfile SOURCE CODE IS (C) COPYRIGHT 2012 * + * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * + * * + ********************************************************************/ +#if !defined(_opusfile_winerrno_h) +# define _opusfile_winerrno_h (1) + +# include +# include + +/*These conflict with the MSVC errno.h definitions, but we don't need to use + the original ones in any file that deals with sockets. + We could map the WSA errors to the errno.h ones (most of which are only + available on sufficiently new versions of MSVC), but they aren't ordered the + same, and given how rarely we actually look at the values, I don't think + it's worth a lookup table.*/ +# undef EWOULDBLOCK +# undef EINPROGRESS +# undef EALREADY +# undef ENOTSOCK +# undef EDESTADDRREQ +# undef EMSGSIZE +# undef EPROTOTYPE +# undef ENOPROTOOPT +# undef EPROTONOSUPPORT +# undef EOPNOTSUPP +# undef EAFNOSUPPORT +# undef EADDRINUSE +# undef EADDRNOTAVAIL +# undef ENETDOWN +# undef ENETUNREACH +# undef ENETRESET +# undef ECONNABORTED +# undef ECONNRESET +# undef ENOBUFS +# undef EISCONN +# undef ENOTCONN +# undef ETIMEDOUT +# undef ECONNREFUSED +# undef ELOOP +# undef ENAMETOOLONG +# undef EHOSTUNREACH +# undef ENOTEMPTY + +# define EWOULDBLOCK (WSAEWOULDBLOCK-WSABASEERR) +# define EINPROGRESS (WSAEINPROGRESS-WSABASEERR) +# define EALREADY (WSAEALREADY-WSABASEERR) +# define ENOTSOCK (WSAENOTSOCK-WSABASEERR) +# define EDESTADDRREQ (WSAEDESTADDRREQ-WSABASEERR) +# define EMSGSIZE (WSAEMSGSIZE-WSABASEERR) +# define EPROTOTYPE (WSAEPROTOTYPE-WSABASEERR) +# define ENOPROTOOPT (WSAENOPROTOOPT-WSABASEERR) +# define EPROTONOSUPPORT (WSAEPROTONOSUPPORT-WSABASEERR) +# define ESOCKTNOSUPPORT (WSAESOCKTNOSUPPORT-WSABASEERR) +# define EOPNOTSUPP (WSAEOPNOTSUPP-WSABASEERR) +# define EPFNOSUPPORT (WSAEPFNOSUPPORT-WSABASEERR) +# define EAFNOSUPPORT (WSAEAFNOSUPPORT-WSABASEERR) +# define EADDRINUSE (WSAEADDRINUSE-WSABASEERR) +# define EADDRNOTAVAIL (WSAEADDRNOTAVAIL-WSABASEERR) +# define ENETDOWN (WSAENETDOWN-WSABASEERR) +# define ENETUNREACH (WSAENETUNREACH-WSABASEERR) +# define ENETRESET (WSAENETRESET-WSABASEERR) +# define ECONNABORTED (WSAECONNABORTED-WSABASEERR) +# define ECONNRESET (WSAECONNRESET-WSABASEERR) +# define ENOBUFS (WSAENOBUFS-WSABASEERR) +# define EISCONN (WSAEISCONN-WSABASEERR) +# define ENOTCONN (WSAENOTCONN-WSABASEERR) +# define ESHUTDOWN (WSAESHUTDOWN-WSABASEERR) +# define ETOOMANYREFS (WSAETOOMANYREFS-WSABASEERR) +# define ETIMEDOUT (WSAETIMEDOUT-WSABASEERR) +# define ECONNREFUSED (WSAECONNREFUSED-WSABASEERR) +# define ELOOP (WSAELOOP-WSABASEERR) +# define ENAMETOOLONG (WSAENAMETOOLONG-WSABASEERR) +# define EHOSTDOWN (WSAEHOSTDOWN-WSABASEERR) +# define EHOSTUNREACH (WSAEHOSTUNREACH-WSABASEERR) +# define ENOTEMPTY (WSAENOTEMPTY-WSABASEERR) +# define EPROCLIM (WSAEPROCLIM-WSABASEERR) +# define EUSERS (WSAEUSERS-WSABASEERR) +# define EDQUOT (WSAEDQUOT-WSABASEERR) +# define ESTALE (WSAESTALE-WSABASEERR) +# define EREMOTE (WSAEREMOTE-WSABASEERR) + +#endif diff --git a/code/qcommon/common.c b/code/qcommon/common.c index c931d57a..db74cec1 100644 --- a/code/qcommon/common.c +++ b/code/qcommon/common.c @@ -1519,7 +1519,7 @@ void Hunk_SmallLog( void) { /* ================= -Com_InitZoneMemory +Com_InitHunkZoneMemory ================= */ void Com_InitHunkMemory( void ) { @@ -3508,7 +3508,7 @@ void Field_AutoComplete( field_t *field ) ================== Com_RandomBytes -fills string array with len radom bytes, peferably from the OS randomizer +fills string array with len random bytes, preferably from the OS randomizer ================== */ void Com_RandomBytes( byte *string, int len ) diff --git a/code/qcommon/files.c b/code/qcommon/files.c index 2fb2f8af..bffaa60f 100644 --- a/code/qcommon/files.c +++ b/code/qcommon/files.c @@ -1326,6 +1326,7 @@ long FS_FOpenFileReadDir(const char *filename, searchpath_t *search, fileHandle_ return FS_fplength(filep); } + *file = 0; return -1; } diff --git a/code/qcommon/q_shared.h b/code/qcommon/q_shared.h index 8dffa191..f3375d7e 100644 --- a/code/qcommon/q_shared.h +++ b/code/qcommon/q_shared.h @@ -584,7 +584,7 @@ typedef struct { #define SnapVector(v) {v[0]=((int)(v[0]));v[1]=((int)(v[1]));v[2]=((int)(v[2]));} void SnapVectorTowards(vec3_t v, vec3_t to); -// just in case you do't want to use the macros +// just in case you don't want to use the macros vec_t _DotProduct( const vec3_t v1, const vec3_t v2 ); void _VectorSubtract( const vec3_t veca, const vec3_t vecb, vec3_t out ); void _VectorAdd( const vec3_t veca, const vec3_t vecb, vec3_t out ); diff --git a/code/renderercommon/tr_image_jpg.c b/code/renderercommon/tr_image_jpg.c index bd81c048..3bf44bbb 100644 --- a/code/renderercommon/tr_image_jpg.c +++ b/code/renderercommon/tr_image_jpg.c @@ -37,8 +37,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #ifndef USE_INTERNAL_JPEG -# if JPEG_LIB_VERSION < 80 -# error Need system libjpeg >= 80 +# if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED) +# error Need system libjpeg >= 80 or jpeg_mem_ support # endif #endif diff --git a/code/renderercommon/tr_types.h b/code/renderercommon/tr_types.h index 215c789c..a1aef1bd 100644 --- a/code/renderercommon/tr_types.h +++ b/code/renderercommon/tr_types.h @@ -53,6 +53,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define RF_SHADOW_PLANE 0x0100 // use refEntity->shadowPlane #define RF_WRAP_FRAMES 0x0200 // mod the model frames by the maxframes to allow continuous + // animation without needing to know the frame count // refdef flags #define RDF_NOWORLDMODEL 0x0001 // used for player configuration screen diff --git a/code/renderergl1/tr_bsp.c b/code/renderergl1/tr_bsp.c index 7ca4d977..64f6a565 100644 --- a/code/renderergl1/tr_bsp.c +++ b/code/renderergl1/tr_bsp.c @@ -1550,7 +1550,7 @@ static void R_LoadFogs( lump_t *l, lump_t *brushesLump, lump_t *sidesLump ) { } count = l->filelen / sizeof(*fogs); - // create fog strucutres for them + // create fog structures for them s_worldData.numfogs = count + 1; s_worldData.fogs = ri.Hunk_Alloc ( s_worldData.numfogs*sizeof(*out), h_low); out = s_worldData.fogs + 1; @@ -1776,7 +1776,7 @@ qboolean R_GetEntityToken( char *buffer, int size ) { s = COM_Parse( &s_worldData.entityParsePoint ); Q_strncpyz( buffer, s, size ); - if ( !s_worldData.entityParsePoint || !s[0] ) { + if ( !s_worldData.entityParsePoint && !s[0] ) { s_worldData.entityParsePoint = s_worldData.entityString; return qfalse; } else { diff --git a/code/renderergl1/tr_image.c b/code/renderergl1/tr_image.c index d1127829..dc7860ea 100644 --- a/code/renderergl1/tr_image.c +++ b/code/renderergl1/tr_image.c @@ -552,7 +552,6 @@ Upload32 =============== */ -extern qboolean charSet; static void Upload32( unsigned *data, int width, int height, qboolean mipmap, diff --git a/code/renderergl1/tr_shader.c b/code/renderergl1/tr_shader.c index 877c6191..de3a45c4 100644 --- a/code/renderergl1/tr_shader.c +++ b/code/renderergl1/tr_shader.c @@ -690,7 +690,7 @@ static qboolean ParseStage( shaderStage_t *stage, char **text ) token = COM_ParseExt( text, qfalse ); if ( !token[0] ) { - ri.Printf( PRINT_WARNING, "WARNING: missing parameter for 'animMmap' keyword in shader '%s'\n", shader.name ); + ri.Printf( PRINT_WARNING, "WARNING: missing parameter for 'animMap' keyword in shader '%s'\n", shader.name ); return qfalse; } stage->bundle[0].imageAnimationSpeed = atof( token ); @@ -728,7 +728,7 @@ static qboolean ParseStage( shaderStage_t *stage, char **text ) token = COM_ParseExt( text, qfalse ); if ( !token[0] ) { - ri.Printf( PRINT_WARNING, "WARNING: missing parameter for 'videoMmap' keyword in shader '%s'\n", shader.name ); + ri.Printf( PRINT_WARNING, "WARNING: missing parameter for 'videoMap' keyword in shader '%s'\n", shader.name ); return qfalse; } stage->bundle[0].videoMapHandle = ri.CIN_PlayCinematic( token, 0, 0, 256, 256, (CIN_loop | CIN_silent | CIN_shader)); @@ -1476,7 +1476,7 @@ static qboolean ParseShader( char **text ) continue; } // sun parms - else if ( !Q_stricmp( token, "q3map_sun" ) ) { + else if ( !Q_stricmp( token, "q3map_sun" ) || !Q_stricmp( token, "q3map_sunExt" ) ) { float a, b; token = COM_ParseExt( text, qfalse ); @@ -1503,6 +1503,9 @@ static qboolean ParseShader( char **text ) tr.sunDirection[0] = cos( a ) * cos( b ); tr.sunDirection[1] = sin( a ) * cos( b ); tr.sunDirection[2] = sin( b ); + + SkipRestOfLine( text ); + continue; } else if ( !Q_stricmp( token, "deformVertexes" ) ) { ParseDeform( text ); diff --git a/code/renderergl1/tr_surface.c b/code/renderergl1/tr_surface.c index dca89c5e..1879fe2c 100644 --- a/code/renderergl1/tr_surface.c +++ b/code/renderergl1/tr_surface.c @@ -344,6 +344,8 @@ static void DoRailCore( const vec3_t start, const vec3_t end, const vec3_t up, f int vbase; float t = len / 256.0f; + RB_CHECKOVERFLOW( 4, 6 ); + vbase = tess.numVertexes; spanWidth2 = -spanWidth; diff --git a/code/renderergl2/glsl/calclevels4x_fp.glsl b/code/renderergl2/glsl/calclevels4x_fp.glsl index c8cf06c7..1de59e9f 100644 --- a/code/renderergl2/glsl/calclevels4x_fp.glsl +++ b/code/renderergl2/glsl/calclevels4x_fp.glsl @@ -9,10 +9,15 @@ const vec3 LUMINANCE_VECTOR = vec3(0.2125, 0.7154, 0.0721); //vec3(0.299, 0.5 vec3 GetValues(vec2 offset, vec3 current) { - vec3 minAvgMax; - vec2 tc = var_TexCoords + u_InvTexRes * offset; minAvgMax = texture2D(u_TextureMap, tc).rgb; + vec2 tc = var_TexCoords + u_InvTexRes * offset; + vec3 minAvgMax = texture2D(u_TextureMap, tc).rgb; #ifdef FIRST_PASS + + #if defined(r_framebufferGamma) + minAvgMax = pow(minAvgMax, vec3(r_framebufferGamma)); + #endif + float lumi = max(dot(LUMINANCE_VECTOR, minAvgMax), 0.000001); float loglumi = clamp(log2(lumi), -10.0, 10.0); minAvgMax = vec3(loglumi * 0.05 + 0.5); diff --git a/code/renderergl2/glsl/generic_fp.glsl b/code/renderergl2/glsl/generic_fp.glsl index f485797f..aefa33c3 100644 --- a/code/renderergl2/glsl/generic_fp.glsl +++ b/code/renderergl2/glsl/generic_fp.glsl @@ -21,7 +21,7 @@ void main() #if defined(USE_LIGHTMAP) vec4 color2 = texture2D(u_LightMap, var_LightTex); #if defined(RGBM_LIGHTMAP) - color2.rgb *= 32.0 * color2.a; + color2.rgb *= color2.a; color2.a = 1.0; #endif diff --git a/code/renderergl2/glsl/lightall_fp.glsl b/code/renderergl2/glsl/lightall_fp.glsl index d134e409..7c62d664 100644 --- a/code/renderergl2/glsl/lightall_fp.glsl +++ b/code/renderergl2/glsl/lightall_fp.glsl @@ -25,7 +25,8 @@ uniform samplerCube u_CubeMap; #endif #if defined(USE_NORMALMAP) || defined(USE_DELUXEMAP) || defined(USE_SPECULARMAP) || defined(USE_CUBEMAP) -uniform vec4 u_EnableTextures; // x = normal, y = deluxe, z = specular, w = cube +// y = deluxe, w = cube +uniform vec4 u_EnableTextures; #endif #if defined(USE_LIGHT_VECTOR) && !defined(USE_FAST_LIGHT) @@ -39,7 +40,14 @@ uniform vec3 u_PrimaryLightAmbient; #endif #if defined(USE_LIGHT) && !defined(USE_FAST_LIGHT) -uniform vec2 u_MaterialInfo; +uniform vec4 u_NormalScale; +uniform vec4 u_SpecularScale; +#endif + +#if defined(USE_LIGHT) && !defined(USE_FAST_LIGHT) +#if defined(USE_CUBEMAP) +uniform vec4 u_CubeMapInfo; +#endif #endif varying vec4 var_TexCoords; @@ -57,10 +65,6 @@ varying vec3 var_ViewDir; #endif #endif -#if defined(USE_LIGHT_VERTEX) && !defined(USE_FAST_LIGHT) -varying vec3 var_LightColor; -#endif - #if defined(USE_LIGHT) && !defined(USE_FAST_LIGHT) varying vec4 var_LightDir; #endif @@ -167,7 +171,7 @@ vec3 EnvironmentBRDF(float gloss, float NE, vec3 specular) return clamp( a0 + specular * ( a1 - a0 ), 0.0, 1.0 ); #elif 0 // from http://seblagarde.wordpress.com/2011/08/17/hello-world/ - return mix(specular.rgb, max(specular.rgb, vec3(gloss)), CalcFresnel(NE)); + return specular + CalcFresnel(NE) * clamp(vec3(gloss) - specular, 0.0, 1.0); #else // from http://advances.realtimerendering.com/s2011/Lazarov-Physically-Based-Lighting-in-Black-Ops%20%28Siggraph%202011%20Advances%20in%20Real-Time%20Rendering%20Course%29.pptx return mix(specular.rgb, vec3(1.0), CalcFresnel(NE) / (4.0 - 3.0 * gloss)); @@ -321,19 +325,20 @@ mat3 cotangent_frame( vec3 N, vec3 p, vec2 uv ) void main() { + vec3 viewDir, lightColor, ambientColor; vec3 L, N, E, H; - float NL, NH, NE, EH; + float NL, NH, NE, EH, attenuation; #if defined(USE_LIGHT) && !defined(USE_FAST_LIGHT) #if defined(USE_VERT_TANGENT_SPACE) mat3 tangentToWorld = mat3(var_Tangent.xyz, var_Bitangent.xyz, var_Normal.xyz); - E = vec3(var_Normal.w, var_Tangent.w, var_Bitangent.w); + viewDir = vec3(var_Normal.w, var_Tangent.w, var_Bitangent.w); #else mat3 tangentToWorld = cotangent_frame(var_Normal, -var_ViewDir, var_TexCoords.xy); - E = var_ViewDir; + viewDir = var_ViewDir; #endif - E = normalize(E); + E = normalize(viewDir); L = var_LightDir.xyz; #if defined(USE_DELUXEMAP) @@ -343,16 +348,10 @@ void main() #endif #if defined(USE_LIGHTMAP) - vec4 lightSample = texture2D(u_LightMap, var_TexCoords.zw); - vec3 lightColor = lightSample.rgb; + vec4 lightmapColor = texture2D(u_LightMap, var_TexCoords.zw); #if defined(RGBM_LIGHTMAP) - lightColor *= 32.0 * lightSample.a; + lightmapColor.rgb *= lightmapColor.a; #endif -#elif defined(USE_LIGHT_VECTOR) && !defined(USE_FAST_LIGHT) - vec3 lightColor = u_DirectedLight * CalcLightAttenuation(float(var_LightDir.w > 0.0), var_LightDir.w / sqrLightDist); - vec3 ambientColor = u_AmbientLight; -#elif defined(USE_LIGHT_VERTEX) && !defined(USE_FAST_LIGHT) - vec3 lightColor = var_LightColor; #endif vec2 texCoords = var_TexCoords.xy; @@ -360,26 +359,36 @@ void main() #if defined(USE_PARALLAXMAP) vec3 offsetDir = normalize(E * tangentToWorld); - offsetDir.xy *= -0.05 / offsetDir.z; + offsetDir.xy *= -u_NormalScale.a / offsetDir.z; texCoords += offsetDir.xy * RayIntersectDisplaceMap(texCoords, offsetDir.xy, u_NormalMap); #endif vec4 diffuse = texture2D(u_DiffuseMap, texCoords); -#if defined(USE_GAMMA2_TEXTURES) - diffuse.rgb *= diffuse.rgb; -#endif - #if defined(USE_LIGHT) && !defined(USE_FAST_LIGHT) + #if defined(USE_LIGHTMAP) + lightColor = lightmapColor.rgb * var_Color.rgb; + ambientColor = vec3(0.0); + attenuation = 1.0; + #elif defined(USE_LIGHT_VECTOR) + lightColor = u_DirectedLight * var_Color.rgb; + ambientColor = u_AmbientLight * var_Color.rgb; + attenuation = CalcLightAttenuation(float(var_LightDir.w > 0.0), var_LightDir.w / sqrLightDist); + #elif defined(USE_LIGHT_VERTEX) + lightColor = var_Color.rgb; + ambientColor = vec3(0.0); + attenuation = 1.0; + #endif + #if defined(USE_NORMALMAP) #if defined(SWIZZLE_NORMALMAP) N.xy = texture2D(u_NormalMap, texCoords).ag - vec2(0.5); #else N.xy = texture2D(u_NormalMap, texCoords).rg - vec2(0.5); #endif - N.xy *= u_EnableTextures.x; - N.z = sqrt((0.25 - N.x * N.x) - N.y * N.y); + N.xy *= u_NormalScale.xy; + N.z = sqrt(clamp((0.25 - N.x * N.x) - N.y * N.y, 0.0, 1.0)); N = tangentToWorld * N; #else N = var_Normal.xyz; @@ -407,8 +416,13 @@ void main() #endif #endif + #if defined(r_lightGamma) + lightColor = pow(lightColor, vec3(r_lightGamma)); + ambientColor = pow(ambientColor, vec3(r_lightGamma)); + #endif + #if defined(USE_LIGHTMAP) || defined(USE_LIGHT_VERTEX) - vec3 ambientColor = lightColor; + ambientColor = lightColor; float surfNL = clamp(dot(var_Normal.xyz, L), 0.0, 1.0); // Scale the incoming light to compensate for the baked-in light angle @@ -417,7 +431,7 @@ void main() // Recover any unused light as ambient, in case attenuation is over 4x or // light is below the surface - ambientColor -= lightColor * surfNL; + ambientColor = clamp(ambientColor - lightColor * surfNL, 0.0, 1.0); #endif vec3 reflectance; @@ -425,15 +439,18 @@ void main() NL = clamp(dot(N, L), 0.0, 1.0); NE = clamp(dot(N, E), 0.0, 1.0); - vec4 specular = vec4(1.0); #if defined(USE_SPECULARMAP) - specular += texture2D(u_SpecularMap, texCoords) * u_EnableTextures.z - u_EnableTextures.zzzz; - #if defined(USE_GAMMA2_TEXTURES) - specular.rgb *= specular.rgb; - #endif + vec4 specular = texture2D(u_SpecularMap, texCoords); + #else + vec4 specular = vec4(1.0); #endif - specular *= u_MaterialInfo.xxxy; + specular *= u_SpecularScale; + + #if defined(r_materialGamma) + diffuse.rgb = pow(diffuse.rgb, vec3(r_materialGamma)); + specular.rgb = pow(specular.rgb, vec3(r_materialGamma)); + #endif float gloss = specular.a; float shininess = exp2(gloss * 13.0); @@ -472,25 +489,47 @@ void main() #endif #endif - gl_FragColor.rgb = lightColor * reflectance * NL; + gl_FragColor.rgb = lightColor * reflectance * (attenuation * NL); + +#if 0 + vec3 aSpecular = EnvironmentBRDF(gloss, NE, specular.rgb); + + // do ambient as two hemisphere lights, one straight up one straight down + float hemiDiffuseUp = N.z * 0.5 + 0.5; + float hemiDiffuseDown = 1.0 - hemiDiffuseUp; + float hemiSpecularUp = mix(hemiDiffuseUp, float(N.z >= 0.0), gloss); + float hemiSpecularDown = 1.0 - hemiSpecularUp; + + gl_FragColor.rgb += ambientColor * 0.75 * (diffuse.rgb * hemiDiffuseUp + aSpecular * hemiSpecularUp); + gl_FragColor.rgb += ambientColor * 0.25 * (diffuse.rgb * hemiDiffuseDown + aSpecular * hemiSpecularDown); +#else gl_FragColor.rgb += ambientColor * (diffuse.rgb + specular.rgb); +#endif #if defined(USE_CUBEMAP) reflectance = EnvironmentBRDF(gloss, NE, specular.rgb); vec3 R = reflect(E, N); - vec3 cubeLightColor = textureCubeLod(u_CubeMap, R, 7.0 - gloss * 7.0).rgb * u_EnableTextures.w; + // parallax corrected cubemap (cheaper trick) + // from http://seblagarde.wordpress.com/2012/09/29/image-based-lighting-approaches-and-parallax-corrected-cubemap/ + vec3 parallax = u_CubeMapInfo.xyz + u_CubeMapInfo.w * viewDir; - #if defined(USE_LIGHTMAP) - cubeLightColor *= lightSample.rgb; - #elif defined (USE_LIGHT_VERTEX) - cubeLightColor *= var_LightColor; - #else - cubeLightColor *= lightColor * NL + ambientColor; - #endif + vec3 cubeLightColor = textureCubeLod(u_CubeMap, R + parallax, 7.0 - gloss * 7.0).rgb * u_EnableTextures.w; + + // normalize cubemap based on lowest mip (~diffuse) + // multiplying cubemap values by lighting below depends on either this or the cubemap being normalized at generation + //vec3 cubeLightDiffuse = max(textureCubeLod(u_CubeMap, N, 6.0).rgb, 0.5 / 255.0); + //cubeLightColor /= dot(cubeLightDiffuse, vec3(0.2125, 0.7154, 0.0721)); + + #if defined(r_framebufferGamma) + cubeLightColor = pow(cubeLightColor, vec3(r_framebufferGamma)); + #endif + + // multiply cubemap values by lighting + // not technically correct, but helps make reflections look less unnatural + //cubeLightColor *= lightColor * (attenuation * NL) + ambientColor; - //gl_FragColor.rgb += diffuse.rgb * textureCubeLod(u_CubeMap, N, 7.0).rgb * u_EnableTextures.w; gl_FragColor.rgb += cubeLightColor * reflectance; #endif @@ -513,25 +552,43 @@ void main() reflectance = CalcDiffuse(diffuse.rgb, N, L2, E, NE, NL2, shininess); reflectance += CalcSpecular(specular.rgb, NH2, NL2, NE, EH2, gloss, shininess); - lightColor = u_PrimaryLightColor; + lightColor = u_PrimaryLightColor * var_Color.rgb; - // enable when point lights are supported as primary lights - //lightColor *= CalcLightAttenuation(float(u_PrimaryLightDir.w > 0.0), u_PrimaryLightDir.w / sqrLightDist); + #if defined(r_lightGamma) + lightColor = pow(lightColor, vec3(r_lightGamma)); + #endif #if defined(USE_SHADOWMAP) lightColor *= shadowValue; #endif + // enable when point lights are supported as primary lights + //lightColor *= CalcLightAttenuation(float(u_PrimaryLightDir.w > 0.0), u_PrimaryLightDir.w / sqrLightDist); + gl_FragColor.rgb += lightColor * reflectance * NL2; #endif - - gl_FragColor.a = diffuse.a; #else - gl_FragColor = diffuse; + lightColor = var_Color.rgb; + #if defined(USE_LIGHTMAP) - gl_FragColor.rgb *= lightColor; + lightColor *= lightmapColor.rgb; #endif + + #if defined(r_lightGamma) + lightColor = pow(lightColor, vec3(r_lightGamma)); + #endif + + #if defined(r_materialGamma) + diffuse.rgb = pow(diffuse.rgb, vec3(r_materialGamma)); + #endif + + gl_FragColor.rgb = diffuse.rgb * lightColor; + #endif - gl_FragColor *= var_Color; +#if defined(r_framebufferGamma) + gl_FragColor.rgb = pow(gl_FragColor.rgb, vec3(1.0 / r_framebufferGamma)); +#endif + + gl_FragColor.a = diffuse.a * var_Color.a; } diff --git a/code/renderergl2/glsl/lightall_vp.glsl b/code/renderergl2/glsl/lightall_vp.glsl index 2e1c899c..b9e839de 100644 --- a/code/renderergl2/glsl/lightall_vp.glsl +++ b/code/renderergl2/glsl/lightall_vp.glsl @@ -83,10 +83,6 @@ varying vec3 var_ViewDir; #endif #endif -#if defined(USE_LIGHT_VERTEX) && !defined(USE_FAST_LIGHT) -varying vec3 var_LightColor; -#endif - #if defined(USE_LIGHT) && !defined(USE_FAST_LIGHT) varying vec4 var_LightDir; #endif @@ -216,10 +212,6 @@ void main() #endif var_Color = u_VertColor * attr_Color + u_BaseColor; -#if defined(USE_LIGHT_VERTEX) && !defined(USE_FAST_LIGHT) - var_LightColor = var_Color.rgb; - var_Color.rgb = vec3(1.0); -#endif #if defined(USE_LIGHT_VECTOR) && defined(USE_FAST_LIGHT) float sqrLightDist = dot(L, L); diff --git a/code/renderergl2/glsl/shadowmask_fp.glsl b/code/renderergl2/glsl/shadowmask_fp.glsl index 4bac5ccd..b489fef5 100644 --- a/code/renderergl2/glsl/shadowmask_fp.glsl +++ b/code/renderergl2/glsl/shadowmask_fp.glsl @@ -18,6 +18,10 @@ uniform vec4 u_ViewInfo; // zfar / znear, zfar varying vec2 var_DepthTex; varying vec3 var_ViewDir; +// depth is GL_DEPTH_COMPONENT24 +// so the maximum error is 1.0 / 2^24 +#define DEPTH_MAX_ERROR 0.000000059604644775390625 + // Input: It uses texture coords as the random number seed. // Output: Random number: [0,1), that is between 0.0 and 0.999999... inclusive. // Author: Michael Pohoreski @@ -39,7 +43,7 @@ float PCF(const sampler2D shadowmap, const vec2 st, const float dist) { float mult; float scale = 2.0 / r_shadowMapSize; - + #if defined(USE_SHADOW_FILTER) float r = random(var_DepthTex.xy); float sinr = sin(r) * scale; @@ -71,6 +75,7 @@ float PCF(const sampler2D shadowmap, const vec2 st, const float dist) float getLinearDepth(sampler2D depthMap, vec2 tex, float zFarDivZNear) { float sampleZDivW = texture2D(depthMap, tex).r; + sampleZDivW -= DEPTH_MAX_ERROR; return 1.0 / mix(zFarDivZNear, 1.0, sampleZDivW); } @@ -81,7 +86,7 @@ void main() float depth = getLinearDepth(u_ScreenDepthMap, var_DepthTex, u_ViewInfo.x); float sampleZ = u_ViewInfo.y * depth; - vec4 biasPos = vec4(u_ViewOrigin + var_ViewDir * depth * 0.99, 1.0); + vec4 biasPos = vec4(u_ViewOrigin + var_ViewDir * (depth - 0.5 / u_ViewInfo.x), 1.0); vec4 shadowpos = u_ShadowMvp * biasPos; diff --git a/code/renderergl2/glsl/tonemap_fp.glsl b/code/renderergl2/glsl/tonemap_fp.glsl index 9b18de8a..4c914aca 100644 --- a/code/renderergl2/glsl/tonemap_fp.glsl +++ b/code/renderergl2/glsl/tonemap_fp.glsl @@ -32,6 +32,11 @@ vec3 FilmicTonemap(vec3 x) void main() { vec4 color = texture2D(u_TextureMap, var_TexCoords) * u_Color; + + #if defined(r_framebufferGamma) + color.rgb = pow(color.rgb, vec3(r_framebufferGamma)); + #endif + vec3 minAvgMax = texture2D(u_LevelsMap, var_TexCoords).rgb; vec3 logMinAvgMaxLum = clamp(minAvgMax * 20.0 - 10.0, -u_AutoExposureMinMax.y, -u_AutoExposureMinMax.x); @@ -44,5 +49,9 @@ void main() vec3 fWhite = 1.0 / FilmicTonemap(vec3(u_ToneMinAvgMaxLinear.z - u_ToneMinAvgMaxLinear.x)); color.rgb = FilmicTonemap(color.rgb) * fWhite; + #if defined(r_tonemapGamma) + color.rgb = pow(color.rgb, vec3(1.0 / r_tonemapGamma)); + #endif + gl_FragColor = clamp(color, 0.0, 1.0); } diff --git a/code/renderergl2/tr_animation.c b/code/renderergl2/tr_animation.c index a5f08986..3c49e146 100644 --- a/code/renderergl2/tr_animation.c +++ b/code/renderergl2/tr_animation.c @@ -193,7 +193,8 @@ void R_MDRAddAnimSurfaces( trRefEntity_t *ent ) { header = (mdrHeader_t *) tr.currentModel->modelData; - personalModel = (ent->e.renderfx & RF_THIRD_PERSON) && !tr.viewParms.isPortal; + personalModel = (ent->e.renderfx & RF_THIRD_PERSON) && !(tr.viewParms.isPortal + || (tr.viewParms.flags & (VPF_SHADOWMAP | VPF_DEPTHSHADOW))); if ( ent->e.renderfx & RF_WRAP_FRAMES ) { diff --git a/code/renderergl2/tr_bsp.c b/code/renderergl2/tr_bsp.c index 3413ff2d..63824284 100644 --- a/code/renderergl2/tr_bsp.c +++ b/code/renderergl2/tr_bsp.c @@ -143,7 +143,7 @@ static void R_ColorShiftLightingFloats(float in[4], float out[4], float scale ) b = in[2] * scale; // normalize by color instead of saturating to white - if ( !r_hdr->integer && ( r > 1 || g > 1 || b > 1 ) ) { + if ( r > 1 || g > 1 || b > 1 ) { float max; max = r > g ? r : g; @@ -165,7 +165,7 @@ void ColorToRGBM(const vec3_t color, unsigned char rgbm[4]) vec3_t sample; float maxComponent; - VectorScale(color, 1.0f / 32.0f, sample); + VectorCopy(color, sample); maxComponent = MAX(sample[0], sample[1]); maxComponent = MAX(maxComponent, sample[2]); @@ -286,13 +286,10 @@ static void R_LoadLightmaps( lump_t *l, lump_t *surfs ) { tr.deluxemaps = ri.Hunk_Alloc( tr.numLightmaps * sizeof(image_t *), h_low ); } - if (r_hdr->integer) - { - if (glRefConfig.textureFloat && glRefConfig.halfFloatPixel && r_floatLightmap->integer) - textureInternalFormat = GL_RGBA16F_ARB; - else - textureInternalFormat = GL_RGBA8; - } + if (glRefConfig.floatLightmap) + textureInternalFormat = GL_RGBA16F_ARB; + else + textureInternalFormat = GL_RGBA8; if (r_mergeLightmaps->integer) { @@ -326,7 +323,6 @@ static void R_LoadLightmaps( lump_t *l, lump_t *surfs ) { { char filename[MAX_QPATH]; byte *hdrLightmap = NULL; - float lightScale = 1.0f; int size = 0; // look for hdr lightmaps @@ -383,55 +379,58 @@ static void R_LoadLightmaps( lump_t *l, lump_t *surfs ) { buf_p = buf + i * tr.lightmapSize * tr.lightmapSize * 3; } - lightScale = pow(2, r_mapOverBrightBits->integer - tr.overbrightBits - 8); //exp2(r_mapOverBrightBits->integer - tr.overbrightBits - 8); - for ( j = 0 ; j < tr.lightmapSize * tr.lightmapSize; j++ ) { - if (r_hdr->integer) + if (hdrLightmap) { - float color[3]; + vec4_t color; - if (hdrLightmap) - { #if 0 // HDRFILE_RGBE - float exponent = exp2(buf_p[j*4+3] - 128); + float exponent = exp2(buf_p[j*4+3] - 128); - color[0] = buf_p[j*4+0] * exponent; - color[1] = buf_p[j*4+1] * exponent; - color[2] = buf_p[j*4+2] * exponent; + color[0] = buf_p[j*4+0] * exponent; + color[1] = buf_p[j*4+1] * exponent; + color[2] = buf_p[j*4+2] * exponent; #else // HDRFILE_FLOAT - memcpy(color, &buf_p[j*12], 12); + memcpy(color, &buf_p[j*12], 12); - color[0] = LittleFloat(color[0]); - color[1] = LittleFloat(color[1]); - color[2] = LittleFloat(color[2]); + color[0] = LittleFloat(color[0]); + color[1] = LittleFloat(color[1]); + color[2] = LittleFloat(color[2]); #endif - } - else - { - //hack: convert LDR lightmap to HDR one - color[0] = (buf_p[j*3+0] + 1.0f); - color[1] = (buf_p[j*3+1] + 1.0f); - color[2] = (buf_p[j*3+2] + 1.0f); + color[3] = 1.0f; - // if under an arbitrary value (say 12) grey it out - // this prevents weird splotches in dimly lit areas - if (color[0] + color[1] + color[2] < 12.0f) - { - float avg = (color[0] + color[1] + color[2]) * 0.3333f; - color[0] = avg; - color[1] = avg; - color[2] = avg; - } - } + R_ColorShiftLightingFloats(color, color, 1.0f/255.0f); - VectorScale(color, lightScale, color); - - if (glRefConfig.textureFloat && glRefConfig.halfFloatPixel && r_floatLightmap->integer) + if (glRefConfig.floatLightmap) ColorToRGBA16F(color, (unsigned short *)(&image[j*8])); else ColorToRGBM(color, &image[j*4]); } + else if (glRefConfig.floatLightmap) + { + vec4_t color; + + //hack: convert LDR lightmap to HDR one + color[0] = MAX(buf_p[j*3+0], 0.499f); + color[1] = MAX(buf_p[j*3+1], 0.499f); + color[2] = MAX(buf_p[j*3+2], 0.499f); + + // if under an arbitrary value (say 12) grey it out + // this prevents weird splotches in dimly lit areas + if (color[0] + color[1] + color[2] < 12.0f) + { + float avg = (color[0] + color[1] + color[2]) * 0.3333f; + color[0] = avg; + color[1] = avg; + color[2] = avg; + } + color[3] = 1.0f; + + R_ColorShiftLightingFloats(color, color, 1.0f/255.0f); + + ColorToRGBA16F(color, (unsigned short *)(&image[j*8])); + } else { if ( r_lightmap->integer == 2 ) @@ -601,8 +600,6 @@ static void R_LoadVisibility( lump_t *l ) { byte *buf; len = ( s_worldData.numClusters + 63 ) & ~63; - s_worldData.novis = ri.Hunk_Alloc( len, h_low ); - Com_Memset( s_worldData.novis, 0xff, len ); len = l->filelen; if ( !len ) { @@ -737,9 +734,9 @@ static void ParseFace( dsurface_t *ds, drawVert_t *verts, float *hdrVertColors, //hack: convert LDR vertex colors to HDR if (r_hdr->integer) { - color[0] = verts[i].color[0] + 1.0f; - color[1] = verts[i].color[1] + 1.0f; - color[2] = verts[i].color[2] + 1.0f; + color[0] = MAX(verts[i].color[0], 0.499f); + color[1] = MAX(verts[i].color[1], 0.499f); + color[2] = MAX(verts[i].color[2], 0.499f); } else { @@ -881,9 +878,9 @@ static void ParseMesh ( dsurface_t *ds, drawVert_t *verts, float *hdrVertColors, //hack: convert LDR vertex colors to HDR if (r_hdr->integer) { - color[0] = verts[i].color[0] + 1.0f; - color[1] = verts[i].color[1] + 1.0f; - color[2] = verts[i].color[2] + 1.0f; + color[0] = MAX(verts[i].color[0], 0.499f); + color[1] = MAX(verts[i].color[1], 0.499f); + color[2] = MAX(verts[i].color[2], 0.499f); } else { @@ -982,9 +979,9 @@ static void ParseTriSurf( dsurface_t *ds, drawVert_t *verts, float *hdrVertColor //hack: convert LDR vertex colors to HDR if (r_hdr->integer) { - color[0] = verts[i].color[0] + 1.0f; - color[1] = verts[i].color[1] + 1.0f; - color[2] = verts[i].color[2] + 1.0f; + color[0] = MAX(verts[i].color[0], 0.499f); + color[1] = MAX(verts[i].color[1], 0.499f); + color[2] = MAX(verts[i].color[2], 0.499f); } else { @@ -2723,7 +2720,7 @@ qboolean R_GetEntityToken( char *buffer, int size ) { s = COM_Parse( &s_worldData.entityParsePoint ); Q_strncpyz( buffer, s, size ); - if ( !s_worldData.entityParsePoint || !s[0] ) { + if ( !s_worldData.entityParsePoint && !s[0] ) { s_worldData.entityParsePoint = s_worldData.entityString; return qfalse; } else { @@ -2750,7 +2747,8 @@ qboolean R_ParseSpawnVars( char *spawnVarChars, int maxSpawnVarChars, int *numSp return qfalse; } if ( com_token[0] != '{' ) { - ri.Printf( PRINT_ALL, "R_ParseSpawnVars: found %s when expecting {",com_token ); + ri.Printf( PRINT_ALL, "R_ParseSpawnVars: found %s when expecting {\n",com_token ); + return qfalse; } // go through all the key / value pairs @@ -2759,7 +2757,8 @@ qboolean R_ParseSpawnVars( char *spawnVarChars, int maxSpawnVarChars, int *numSp // parse key if ( !R_GetEntityToken( keyname, sizeof( keyname ) ) ) { - ri.Printf( PRINT_ALL, "R_ParseSpawnVars: EOF without closing brace" ); + ri.Printf( PRINT_ALL, "R_ParseSpawnVars: EOF without closing brace\n" ); + return qfalse; } if ( keyname[0] == '}' ) { @@ -2768,18 +2767,18 @@ qboolean R_ParseSpawnVars( char *spawnVarChars, int maxSpawnVarChars, int *numSp // parse value if ( !R_GetEntityToken( com_token, sizeof( com_token ) ) ) { - ri.Printf( PRINT_ALL, "R_ParseSpawnVars: EOF without closing brace" ); - break; + ri.Printf( PRINT_ALL, "R_ParseSpawnVars: EOF without closing brace\n" ); + return qfalse; } if ( com_token[0] == '}' ) { - ri.Printf( PRINT_ALL, "R_ParseSpawnVars: closing brace without data" ); - break; + ri.Printf( PRINT_ALL, "R_ParseSpawnVars: closing brace without data\n" ); + return qfalse; } if ( *numSpawnVars == MAX_SPAWN_VARS ) { - ri.Printf( PRINT_ALL, "R_ParseSpawnVars: MAX_SPAWN_VARS" ); - break; + ri.Printf( PRINT_ALL, "R_ParseSpawnVars: MAX_SPAWN_VARS\n" ); + return qfalse; } keyLength = strlen(keyname) + 1; @@ -2787,8 +2786,8 @@ qboolean R_ParseSpawnVars( char *spawnVarChars, int maxSpawnVarChars, int *numSp if (numSpawnVarChars + keyLength + tokenLength > maxSpawnVarChars) { - ri.Printf( PRINT_ALL, "R_ParseSpawnVars: MAX_SPAWN_VAR_CHARS" ); - break; + ri.Printf( PRINT_ALL, "R_ParseSpawnVars: MAX_SPAWN_VAR_CHARS\n" ); + return qfalse; } strcpy(spawnVarChars + numSpawnVarChars, keyname); diff --git a/code/renderergl2/tr_extensions.c b/code/renderergl2/tr_extensions.c index d7e5f1ba..10a1cb3a 100644 --- a/code/renderergl2/tr_extensions.c +++ b/code/renderergl2/tr_extensions.c @@ -593,52 +593,6 @@ void GLimp_InitExtraExtensions() ri.Printf(PRINT_ALL, result[2], extension); } - // GL_EXT_texture_sRGB - extension = "GL_EXT_texture_sRGB"; - glRefConfig.textureSrgb = qfalse; - if (GLimp_HaveExtension(extension)) - { - if (r_srgb->integer) - glRefConfig.textureSrgb = qtrue; - - ri.Printf(PRINT_ALL, result[glRefConfig.textureSrgb], extension); - } - else - { - ri.Printf(PRINT_ALL, result[2], extension); - } - - // GL_EXT_framebuffer_sRGB - extension = "GL_EXT_framebuffer_sRGB"; - glRefConfig.framebufferSrgb = qfalse; - if (GLimp_HaveExtension(extension)) - { - if (r_srgb->integer) - glRefConfig.framebufferSrgb = qtrue; - - ri.Printf(PRINT_ALL, result[glRefConfig.framebufferSrgb], extension); - } - else - { - ri.Printf(PRINT_ALL, result[2], extension); - } - - // GL_EXT_texture_sRGB_decode - extension = "GL_EXT_texture_sRGB_decode"; - glRefConfig.textureSrgbDecode = qfalse; - if (GLimp_HaveExtension(extension)) - { - if (r_srgb->integer) - glRefConfig.textureSrgbDecode = qtrue; - - ri.Printf(PRINT_ALL, result[glRefConfig.textureSrgbDecode], extension); - } - else - { - ri.Printf(PRINT_ALL, result[2], extension); - } - - glRefConfig.textureCompression = TCR_NONE; // GL_EXT_texture_compression_latc @@ -725,4 +679,7 @@ void GLimp_InitExtraExtensions() { ri.Printf(PRINT_ALL, result[2], extension); } + + // use float lightmaps? + glRefConfig.floatLightmap = (glRefConfig.textureFloat && glRefConfig.halfFloatPixel && r_floatLightmap->integer && r_hdr->integer); } diff --git a/code/renderergl2/tr_glsl.c b/code/renderergl2/tr_glsl.c index 2212c4fe..58a00e6e 100644 --- a/code/renderergl2/tr_glsl.c +++ b/code/renderergl2/tr_glsl.c @@ -123,9 +123,10 @@ static uniformInfo_t uniformsInfo[] = { "u_ModelMatrix", GLSL_MAT16 }, { "u_ModelViewProjectionMatrix", GLSL_MAT16 }, - { "u_Time", GLSL_FLOAT }, - { "u_VertexLerp" , GLSL_FLOAT }, - { "u_MaterialInfo", GLSL_VEC2 }, + { "u_Time", GLSL_FLOAT }, + { "u_VertexLerp" , GLSL_FLOAT }, + { "u_NormalScale", GLSL_VEC4 }, + { "u_SpecularScale", GLSL_VEC4 }, { "u_ViewInfo", GLSL_VEC4 }, { "u_ViewOrigin", GLSL_VEC3 }, @@ -141,7 +142,9 @@ static uniformInfo_t uniformsInfo[] = { "u_PrimaryLightOrigin", GLSL_VEC4 }, { "u_PrimaryLightColor", GLSL_VEC3 }, { "u_PrimaryLightAmbient", GLSL_VEC3 }, - { "u_PrimaryLightRadius", GLSL_FLOAT } + { "u_PrimaryLightRadius", GLSL_FLOAT }, + + { "u_CubeMapInfo", GLSL_VEC4 }, }; @@ -318,6 +321,18 @@ static void GLSL_GetShaderHeader( GLenum shaderType, const GLcharARB *extra, cha Q_strcat(dest, size, va("#ifndef r_FBufScale\n#define r_FBufScale vec2(%f, %f)\n#endif\n", fbufWidthScale, fbufHeightScale)); + if (r_materialGamma->value != 1.0f) + Q_strcat(dest, size, va("#ifndef r_materialGamma\n#define r_materialGamma %f\n#endif\n", r_materialGamma->value)); + + if (r_lightGamma->value != 1.0f) + Q_strcat(dest, size, va("#ifndef r_lightGamma\n#define r_lightGamma %f\n#endif\n", r_lightGamma->value)); + + if (r_framebufferGamma->value != 1.0f) + Q_strcat(dest, size, va("#ifndef r_framebufferGamma\n#define r_framebufferGamma %f\n#endif\n", r_framebufferGamma->value)); + + if (r_tonemapGamma->value != 1.0f) + Q_strcat(dest, size, va("#ifndef r_tonemapGamma\n#define r_tonemapGamma %f\n#endif\n", r_tonemapGamma->value)); + if (extra) { Q_strcat(dest, size, extra); @@ -903,7 +918,7 @@ void GLSL_InitGPUShaders(void) if (i & GENERICDEF_USE_LIGHTMAP) Q_strcat(extradefines, 1024, "#define USE_LIGHTMAP\n"); - if (r_hdr->integer && !(glRefConfig.textureFloat && glRefConfig.halfFloatPixel && r_floatLightmap->integer)) + if (r_hdr->integer && !glRefConfig.floatLightmap) Q_strcat(extradefines, 1024, "#define RGBM_LIGHTMAP\n"); if (!GLSL_InitGPUShader(&tr.genericShader[i], "generic", attribs, qtrue, extradefines, qtrue, fallbackShader_generic_vp, fallbackShader_generic_fp)) @@ -1022,7 +1037,7 @@ void GLSL_InitGPUShaders(void) if (1) Q_strcat(extradefines, 1024, "#define SWIZZLE_NORMALMAP\n"); - if (r_hdr->integer && !(glRefConfig.textureFloat && glRefConfig.halfFloatPixel && r_floatLightmap->integer)) + if (r_hdr->integer && !glRefConfig.floatLightmap) Q_strcat(extradefines, 1024, "#define RGBM_LIGHTMAP\n"); if (lightType) diff --git a/code/renderergl2/tr_image.c b/code/renderergl2/tr_image.c index 243d27df..ffee673d 100644 --- a/code/renderergl2/tr_image.c +++ b/code/renderergl2/tr_image.c @@ -1857,61 +1857,6 @@ static GLenum RawImage_GetFormat(const byte *data, int numPixels, qboolean light } } } - - if (glRefConfig.textureSrgb && (flags & IMGFLAG_SRGB)) - { - switch(internalFormat) - { - case GL_RGB: - internalFormat = GL_SRGB_EXT; - break; - - case GL_RGB4: - case GL_RGB5: - case GL_RGB8: - internalFormat = GL_SRGB8_EXT; - break; - - case GL_RGBA: - internalFormat = GL_SRGB_ALPHA_EXT; - break; - - case GL_RGBA4: - case GL_RGBA8: - internalFormat = GL_SRGB8_ALPHA8_EXT; - break; - - case GL_LUMINANCE: - internalFormat = GL_SLUMINANCE_EXT; - break; - - case GL_LUMINANCE8: - case GL_LUMINANCE16: - internalFormat = GL_SLUMINANCE8_EXT; - break; - - case GL_LUMINANCE_ALPHA: - internalFormat = GL_SLUMINANCE_ALPHA_EXT; - break; - - case GL_LUMINANCE8_ALPHA8: - case GL_LUMINANCE16_ALPHA16: - internalFormat = GL_SLUMINANCE8_ALPHA8_EXT; - break; - - case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: - internalFormat = GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT; - break; - - case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: - internalFormat = GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT; - break; - - case GL_COMPRESSED_RGBA_BPTC_UNORM_ARB: - internalFormat = GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB; - break; - } - } } return internalFormat; @@ -1966,13 +1911,9 @@ static void RawImage_UploadTexture( byte *data, int x, int y, int width, int hei R_MipMapNormalHeight( data, data, width, height, qtrue); } } - else if (flags & IMGFLAG_SRGB) - { - R_MipMapsRGB( data, width, height ); - } else { - R_MipMap( data, width, height ); + R_MipMapsRGB( data, width, height ); } } @@ -2008,7 +1949,6 @@ Upload32 =============== */ -extern qboolean charSet; static void Upload32( byte *data, int width, int height, imgType_t type, imgFlags_t flags, qboolean lightMap, GLenum internalFormat, int *pUploadWidth, int *pUploadHeight) { @@ -2050,26 +1990,6 @@ static void Upload32( byte *data, int width, int height, imgType_t type, imgFlag } } - // Convert to RGB if sRGB textures aren't supported in hardware - if (!glRefConfig.textureSrgb && (flags & IMGFLAG_SRGB)) - { - byte *in = data; - int c = width * height; - while (c--) - { - for (i = 0; i < 3; i++) - { - float x = ByteToFloat(in[i]); - x = sRGBtoRGB(x); - in[i] = FloatToByte(x); - } - in += 4; - } - - // FIXME: Probably should mark the image as non-sRGB as well - flags &= ~IMGFLAG_SRGB; - } - // normals are always swizzled if (type == IMGTYPE_NORMAL || type == IMGTYPE_NORMALHEIGHT) { @@ -2108,13 +2028,20 @@ static void Upload32( byte *data, int width, int height, imgType_t type, imgFlag // use the normal mip-mapping function to go down from here while ( width > scaled_width || height > scaled_height ) { - if (flags & IMGFLAG_SRGB) + if (type == IMGTYPE_NORMAL || type == IMGTYPE_NORMALHEIGHT) { - R_MipMapsRGB( (byte *)data, width, height ); + if (internalFormat == GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT) + { + R_MipMapLuminanceAlpha( data, data, width, height ); + } + else + { + R_MipMapNormalHeight( data, data, width, height, qtrue); + } } else { - R_MipMap( (byte *)data, width, height ); + R_MipMapsRGB( data, width, height ); } width >>= 1; @@ -2396,13 +2323,20 @@ void R_UpdateSubImage( image_t *image, byte *pic, int x, int y, int width, int h // use the normal mip-mapping function to go down from here while ( width > scaled_width || height > scaled_height ) { - if (image->flags & IMGFLAG_SRGB) + if (image->type == IMGTYPE_NORMAL || image->type == IMGTYPE_NORMALHEIGHT) { - R_MipMapsRGB( (byte *)data, width, height ); + if (image->internalFormat == GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT) + { + R_MipMapLuminanceAlpha( data, data, width, height ); + } + else + { + R_MipMapNormalHeight( data, data, width, height, qtrue); + } } else { - R_MipMap( (byte *)data, width, height ); + R_MipMapsRGB( data, width, height ); } width >>= 1; @@ -2594,7 +2528,7 @@ image_t *R_FindImageFile( const char *name, imgType_t type, imgFlags_t flags ) int normalWidth, normalHeight; imgFlags_t normalFlags; - normalFlags = (flags & ~(IMGFLAG_GENNORMALMAP | IMGFLAG_SRGB)) | IMGFLAG_NOLIGHTSCALE; + normalFlags = (flags & ~IMGFLAG_GENNORMALMAP) | IMGFLAG_NOLIGHTSCALE; COM_StripExtension(name, normalName, MAX_QPATH); Q_strcat(normalName, MAX_QPATH, "_n"); @@ -3013,37 +2947,14 @@ void R_SetColorMappings( void ) { int i, j; float g; int inf; - int shift; // setup the overbright lighting tr.overbrightBits = r_overBrightBits->integer; - if ( !glConfig.deviceSupportsGamma ) { - tr.overbrightBits = 0; // need hardware gamma for overbright - } - // never overbright in windowed mode without soft overbright - if ( !glConfig.isFullscreen && !r_softOverbright->integer ) - { - tr.overbrightBits = 0; - } - - // never overbright with tonemapping - if ( r_toneMap->integer && r_hdr->integer ) - { - tr.overbrightBits = 0; - } - - // allow 2 overbright bits in 24 bit, but only 1 in 16 bit - if ( glConfig.colorBits > 16 ) { - if ( tr.overbrightBits > 2 ) { - tr.overbrightBits = 2; - } - } else { - if ( tr.overbrightBits > 1 ) { - tr.overbrightBits = 1; - } - } - if ( tr.overbrightBits < 0 ) { + // allow 2 overbright bits + if ( tr.overbrightBits > 2 ) { + tr.overbrightBits = 2; + } else if ( tr.overbrightBits < 0 ) { tr.overbrightBits = 0; } @@ -3063,32 +2974,13 @@ void R_SetColorMappings( void ) { g = r_gamma->value; - shift = tr.overbrightBits; - - // no shift with soft overbright - if (r_softOverbright->integer) - { - shift = 0; - } - for ( i = 0; i < 256; i++ ) { - int i2; - - if (r_srgb->integer) - { - i2 = 255 * RGBtosRGB(i/255.0f) + 0.5f; - } - else - { - i2 = i; - } - if ( g == 1 ) { - inf = i2; + inf = i; } else { - inf = 255 * pow ( i2/255.0f, 1.0f / g ) + 0.5f; + inf = 255 * pow ( i/255.0f, 1.0f / g ) + 0.5f; } - inf <<= shift; + if (inf < 0) { inf = 0; } diff --git a/code/renderergl2/tr_init.c b/code/renderergl2/tr_init.c index 84bbeba2..015b661c 100644 --- a/code/renderergl2/tr_init.c +++ b/code/renderergl2/tr_init.c @@ -108,8 +108,6 @@ cvar_t *r_mergeLeafSurfaces; cvar_t *r_cameraExposure; -cvar_t *r_softOverbright; - cvar_t *r_hdr; cvar_t *r_floatLightmap; cvar_t *r_postProcess; @@ -125,7 +123,10 @@ cvar_t *r_forceAutoExposure; cvar_t *r_forceAutoExposureMin; cvar_t *r_forceAutoExposureMax; -cvar_t *r_srgb; +cvar_t *r_materialGamma; +cvar_t *r_lightGamma; +cvar_t *r_framebufferGamma; +cvar_t *r_tonemapGamma; cvar_t *r_depthPrepass; cvar_t *r_ssao; @@ -137,6 +138,9 @@ cvar_t *r_parallaxMapping; cvar_t *r_cubeMapping; cvar_t *r_deluxeSpecular; cvar_t *r_specularIsMetallic; +cvar_t *r_baseNormalX; +cvar_t *r_baseNormalY; +cvar_t *r_baseParallax; cvar_t *r_baseSpecular; cvar_t *r_baseGloss; cvar_t *r_recalcMD3Normals; @@ -1161,8 +1165,6 @@ void R_Register( void ) r_greyscale = ri.Cvar_Get("r_greyscale", "0", CVAR_ARCHIVE | CVAR_LATCH); ri.Cvar_CheckRange(r_greyscale, 0, 1, qfalse); - r_softOverbright = ri.Cvar_Get( "r_softOverbright", "1", CVAR_ARCHIVE | CVAR_LATCH ); - r_hdr = ri.Cvar_Get( "r_hdr", "1", CVAR_ARCHIVE | CVAR_LATCH ); r_floatLightmap = ri.Cvar_Get( "r_floatLightmap", "0", CVAR_ARCHIVE | CVAR_LATCH ); r_postProcess = ri.Cvar_Get( "r_postProcess", "1", CVAR_ARCHIVE ); @@ -1180,7 +1182,10 @@ void R_Register( void ) r_cameraExposure = ri.Cvar_Get( "r_cameraExposure", "0", CVAR_CHEAT ); - r_srgb = ri.Cvar_Get( "r_srgb", "0", CVAR_ARCHIVE | CVAR_LATCH ); + r_materialGamma = ri.Cvar_Get( "r_materialGamma", "1.0", CVAR_ARCHIVE | CVAR_LATCH ); + r_lightGamma = ri.Cvar_Get( "r_lightGamma", "1.0", CVAR_ARCHIVE | CVAR_LATCH ); + r_framebufferGamma = ri.Cvar_Get( "r_framebufferGamma", "1.0", CVAR_ARCHIVE | CVAR_LATCH ); + r_tonemapGamma = ri.Cvar_Get( "r_tonemapGamma", "1.0", CVAR_ARCHIVE | CVAR_LATCH ); r_depthPrepass = ri.Cvar_Get( "r_depthPrepass", "1", CVAR_ARCHIVE ); r_ssao = ri.Cvar_Get( "r_ssao", "0", CVAR_LATCH | CVAR_ARCHIVE ); @@ -1192,6 +1197,9 @@ void R_Register( void ) r_cubeMapping = ri.Cvar_Get( "r_cubeMapping", "0", CVAR_ARCHIVE | CVAR_LATCH ); r_deluxeSpecular = ri.Cvar_Get( "r_deluxeSpecular", "0.3", CVAR_ARCHIVE | CVAR_LATCH ); r_specularIsMetallic = ri.Cvar_Get( "r_specularIsMetallic", "0", CVAR_ARCHIVE | CVAR_LATCH ); + r_baseNormalX = ri.Cvar_Get( "r_baseNormalX", "1.0", CVAR_ARCHIVE | CVAR_LATCH ); + r_baseNormalY = ri.Cvar_Get( "r_baseNormalY", "1.0", CVAR_ARCHIVE | CVAR_LATCH ); + r_baseParallax = ri.Cvar_Get( "r_baseParallax", "0.05", CVAR_ARCHIVE | CVAR_LATCH ); r_baseSpecular = ri.Cvar_Get( "r_baseSpecular", "0.04", CVAR_ARCHIVE | CVAR_LATCH ); r_baseGloss = ri.Cvar_Get( "r_baseGloss", "0.3", CVAR_ARCHIVE | CVAR_LATCH ); r_dlightMode = ri.Cvar_Get( "r_dlightMode", "0", CVAR_ARCHIVE | CVAR_LATCH ); diff --git a/code/renderergl2/tr_local.h b/code/renderergl2/tr_local.h index 0fbabd20..10614f32 100644 --- a/code/renderergl2/tr_local.h +++ b/code/renderergl2/tr_local.h @@ -400,7 +400,10 @@ typedef struct { stageType_t type; struct shaderProgram_s *glslShaderGroup; int glslShaderIndex; - vec2_t materialInfo; + + vec4_t normalScale; + vec4_t specularScale; + } shaderStage_t; struct shaderCommands_s; @@ -676,7 +679,8 @@ typedef enum UNIFORM_TIME, UNIFORM_VERTEXLERP, - UNIFORM_MATERIALINFO, + UNIFORM_NORMALSCALE, + UNIFORM_SPECULARSCALE, UNIFORM_VIEWINFO, // znear, zfar, width/2, height/2 UNIFORM_VIEWORIGIN, @@ -694,6 +698,8 @@ typedef enum UNIFORM_PRIMARYLIGHTAMBIENT, UNIFORM_PRIMARYLIGHTRADIUS, + UNIFORM_CUBEMAPINFO, + UNIFORM_COUNT } uniform_t; @@ -1175,8 +1181,6 @@ typedef struct { int clusterBytes; const byte *vis; // may be passed in by CM_LoadMap to save space - byte *novis; // clusterBytes of 0xff - char *entityString; char *entityParsePoint; } world_t; @@ -1417,14 +1421,12 @@ typedef struct { qboolean framebufferMultisample; qboolean framebufferBlit; - qboolean textureSrgb; - qboolean framebufferSrgb; - qboolean textureSrgbDecode; - qboolean depthClamp; qboolean seamlessCubeMap; GLenum packedNormalDataType; + + qboolean floatLightmap; } glRefConfig_t; @@ -1763,8 +1765,6 @@ extern cvar_t *r_anaglyphMode; extern cvar_t *r_mergeMultidraws; extern cvar_t *r_mergeLeafSurfaces; -extern cvar_t *r_softOverbright; - extern cvar_t *r_hdr; extern cvar_t *r_floatLightmap; extern cvar_t *r_postProcess; @@ -1782,7 +1782,10 @@ extern cvar_t *r_forceAutoExposureMax; extern cvar_t *r_cameraExposure; -extern cvar_t *r_srgb; +extern cvar_t *r_materialGamma; +extern cvar_t *r_lightGamma; +extern cvar_t *r_framebufferGamma; +extern cvar_t *r_tonemapGamma; extern cvar_t *r_depthPrepass; extern cvar_t *r_ssao; @@ -1794,6 +1797,9 @@ extern cvar_t *r_parallaxMapping; extern cvar_t *r_cubeMapping; extern cvar_t *r_deluxeSpecular; extern cvar_t *r_specularIsMetallic; +extern cvar_t *r_baseNormalX; +extern cvar_t *r_baseNormalY; +extern cvar_t *r_baseParallax; extern cvar_t *r_baseSpecular; extern cvar_t *r_baseGloss; extern cvar_t *r_dlightMode; diff --git a/code/renderergl2/tr_main.c b/code/renderergl2/tr_main.c index df1f8e60..3e614394 100644 --- a/code/renderergl2/tr_main.c +++ b/code/renderergl2/tr_main.c @@ -2862,8 +2862,9 @@ void R_RenderCubemapSide( int cubemapIndex, int cubemapSide, qboolean subscene ) { vec3_t ambient, directed, lightDir; R_LightForPoint(tr.refdef.vieworg, ambient, directed, lightDir); - tr.refdef.colorScale = 766.0f / (directed[0] + directed[1] + directed[2] + 1.0f); - if (directed[0] + directed[1] + directed[2] == 0) + tr.refdef.colorScale = 1.0f; //766.0f / (directed[0] + directed[1] + directed[2] + 1.0f); + // only print message for first side + if (directed[0] + directed[1] + directed[2] == 0 && cubemapSide == 0) { ri.Printf(PRINT_ALL, "cubemap %d (%f, %f, %f) is outside the lightgrid!\n", cubemapIndex, tr.refdef.vieworg[0], tr.refdef.vieworg[1], tr.refdef.vieworg[2]); } @@ -2910,4 +2911,4 @@ void R_RenderCubemapSide( int cubemapIndex, int cubemapSide, qboolean subscene ) { RE_EndScene(); } -} \ No newline at end of file +} diff --git a/code/renderergl2/tr_shade.c b/code/renderergl2/tr_shade.c index 856b8748..5285e28e 100644 --- a/code/renderergl2/tr_shade.c +++ b/code/renderergl2/tr_shade.c @@ -602,7 +602,7 @@ static void ComputeShaderColors( shaderStage_t *pStage, vec4_t baseColor, vec4_t } // multiply color by overbrightbits if this isn't a blend - if (r_softOverbright->integer && tr.overbrightBits + if (tr.overbrightBits && !((blend & GLS_SRCBLEND_BITS) == GLS_SRCBLEND_DST_COLOR) && !((blend & GLS_SRCBLEND_BITS) == GLS_SRCBLEND_ONE_MINUS_DST_COLOR) && !((blend & GLS_DSTBLEND_BITS) == GLS_DSTBLEND_SRC_COLOR) @@ -811,7 +811,8 @@ static void ForwardDlight( void ) { GLSL_SetUniformFloat(sp, UNIFORM_LIGHTRADIUS, radius); - GLSL_SetUniformVec2(sp, UNIFORM_MATERIALINFO, pStage->materialInfo); + GLSL_SetUniformVec4(sp, UNIFORM_NORMALSCALE, pStage->normalScale); + GLSL_SetUniformVec4(sp, UNIFORM_SPECULARSCALE, pStage->specularScale); // include GLS_DEPTHFUNC_EQUAL so alpha tested surfaces don't add light // where they aren't rendered @@ -822,11 +823,36 @@ static void ForwardDlight( void ) { if (pStage->bundle[TB_DIFFUSEMAP].image[0]) R_BindAnimatedImageToTMU( &pStage->bundle[TB_DIFFUSEMAP], TB_DIFFUSEMAP); + // bind textures that are sampled and used in the glsl shader, and + // bind whiteImage to textures that are sampled but zeroed in the glsl shader + // + // alternatives: + // - use the last bound texture + // -> costs more to sample a higher res texture then throw out the result + // - disable texture sampling in glsl shader with #ifdefs, as before + // -> increases the number of shaders that must be compiled + // + if (pStage->bundle[TB_NORMALMAP].image[0]) + { R_BindAnimatedImageToTMU( &pStage->bundle[TB_NORMALMAP], TB_NORMALMAP); + } + else if (r_normalMapping->integer) + GL_BindToTMU( tr.whiteImage, TB_NORMALMAP ); if (pStage->bundle[TB_SPECULARMAP].image[0]) + { R_BindAnimatedImageToTMU( &pStage->bundle[TB_SPECULARMAP], TB_SPECULARMAP); + } + else if (r_specularMapping->integer) + GL_BindToTMU( tr.whiteImage, TB_SPECULARMAP ); + + { + vec4_t enableTextures; + + VectorSet4(enableTextures, 0.0f, 0.0f, 0.0f, 0.0f); + GLSL_SetUniformVec4(sp, UNIFORM_ENABLETEXTURES, enableTextures); + } if (r_dlightMode->integer >= 2) { @@ -1222,7 +1248,8 @@ static void RB_IterateStagesGeneric( shaderCommands_t *input ) GLSL_SetUniformMat4(sp, UNIFORM_MODELMATRIX, backEnd.or.transformMatrix); - GLSL_SetUniformVec2(sp, UNIFORM_MATERIALINFO, pStage->materialInfo); + GLSL_SetUniformVec4(sp, UNIFORM_NORMALSCALE, pStage->normalScale); + GLSL_SetUniformVec4(sp, UNIFORM_SPECULARSCALE, pStage->specularScale); //GLSL_SetUniformFloat(sp, UNIFORM_MAPLIGHTSCALE, backEnd.refdef.mapLightScale); @@ -1351,8 +1378,21 @@ static void RB_IterateStagesGeneric( shaderCommands_t *input ) // testing cube map // if (!(tr.viewParms.flags & VPF_NOCUBEMAPS) && input->cubemapIndex && r_cubeMapping->integer) + { + vec4_t vec; + GL_BindToTMU( tr.cubemaps[input->cubemapIndex - 1], TB_CUBEMAP); + vec[0] = tr.cubemapOrigins[input->cubemapIndex - 1][0] - backEnd.viewParms.or.origin[0]; + vec[1] = tr.cubemapOrigins[input->cubemapIndex - 1][1] - backEnd.viewParms.or.origin[1]; + vec[2] = tr.cubemapOrigins[input->cubemapIndex - 1][2] - backEnd.viewParms.or.origin[2]; + vec[3] = 1.0f; + + VectorScale4(vec, 1.0f / 1000.0f, vec); + + GLSL_SetUniformVec4(sp, UNIFORM_CUBEMAPINFO, vec); + } + // // draw // diff --git a/code/renderergl2/tr_shader.c b/code/renderergl2/tr_shader.c index 6dbac55a..295dad7b 100644 --- a/code/renderergl2/tr_shader.c +++ b/code/renderergl2/tr_shader.c @@ -685,9 +685,6 @@ static qboolean ParseStage( shaderStage_t *stage, char **text ) { if (r_genNormalMaps->integer) flags |= IMGFLAG_GENNORMALMAP; - - if (r_srgb->integer) - flags |= IMGFLAG_SRGB; } stage->bundle[0].image[0] = R_FindImageFile( token, type, flags ); @@ -732,9 +729,6 @@ static qboolean ParseStage( shaderStage_t *stage, char **text ) { if (r_genNormalMaps->integer) flags |= IMGFLAG_GENNORMALMAP; - - if (r_srgb->integer) - flags |= IMGFLAG_SRGB; } @@ -753,7 +747,7 @@ static qboolean ParseStage( shaderStage_t *stage, char **text ) token = COM_ParseExt( text, qfalse ); if ( !token[0] ) { - ri.Printf( PRINT_WARNING, "WARNING: missing parameter for 'animMmap' keyword in shader '%s'\n", shader.name ); + ri.Printf( PRINT_WARNING, "WARNING: missing parameter for 'animMap' keyword in shader '%s'\n", shader.name ); return qfalse; } stage->bundle[0].imageAnimationSpeed = atof( token ); @@ -776,9 +770,6 @@ static qboolean ParseStage( shaderStage_t *stage, char **text ) if (!shader.noPicMip) flags |= IMGFLAG_PICMIP; - if (r_srgb->integer) - flags |= IMGFLAG_SRGB; - stage->bundle[0].image[num] = R_FindImageFile( token, IMGTYPE_COLORALPHA, flags ); if ( !stage->bundle[0].image[num] ) { @@ -794,7 +785,7 @@ static qboolean ParseStage( shaderStage_t *stage, char **text ) token = COM_ParseExt( text, qfalse ); if ( !token[0] ) { - ri.Printf( PRINT_WARNING, "WARNING: missing parameter for 'videoMmap' keyword in shader '%s'\n", shader.name ); + ri.Printf( PRINT_WARNING, "WARNING: missing parameter for 'videoMap' keyword in shader '%s'\n", shader.name ); return qfalse; } stage->bundle[0].videoMapHandle = ri.CIN_PlayCinematic( token, 0, 0, 256, 256, (CIN_loop | CIN_silent | CIN_shader)); @@ -911,6 +902,7 @@ static qboolean ParseStage( shaderStage_t *stage, char **text ) else if(!Q_stricmp(token, "normalMap") || !Q_stricmp(token, "bumpMap")) { stage->type = ST_NORMALMAP; + VectorSet4(stage->normalScale, r_baseNormalX->value, r_baseNormalY->value, 1.0f, r_baseParallax->value); } else if(!Q_stricmp(token, "normalParallaxMap") || !Q_stricmp(token, "bumpParallaxMap")) { @@ -918,12 +910,12 @@ static qboolean ParseStage( shaderStage_t *stage, char **text ) stage->type = ST_NORMALPARALLAXMAP; else stage->type = ST_NORMALMAP; + VectorSet4(stage->normalScale, r_baseNormalX->value, r_baseNormalY->value, 1.0f, r_baseParallax->value); } else if(!Q_stricmp(token, "specularMap")) { stage->type = ST_SPECULARMAP; - stage->materialInfo[0] = 1.0f; - stage->materialInfo[1] = 1.0f; + VectorSet4(stage->specularScale, 1.0f, 1.0f, 1.0f, 1.0f); } else { @@ -942,7 +934,9 @@ static qboolean ParseStage( shaderStage_t *stage, char **text ) ri.Printf( PRINT_WARNING, "WARNING: missing parameter for specular reflectance in shader '%s'\n", shader.name ); continue; } - stage->materialInfo[0] = atof( token ); + stage->specularScale[0] = + stage->specularScale[1] = + stage->specularScale[2] = atof( token ); } // // specularExponent @@ -964,7 +958,7 @@ static qboolean ParseStage( shaderStage_t *stage, char **text ) // FIXME: assumes max exponent of 8192 and min of 1, must change here if altered in lightall_fp.glsl exponent = CLAMP(exponent, 1.0, 8192.0); - stage->materialInfo[1] = log(exponent) / log(8192.0); + stage->specularScale[3] = log(exponent) / log(8192.0); } // // gloss @@ -978,7 +972,103 @@ static qboolean ParseStage( shaderStage_t *stage, char **text ) continue; } - stage->materialInfo[1] = atof( token ); + stage->specularScale[3] = atof( token ); + } + // + // parallaxDepth + // + else if (!Q_stricmp(token, "parallaxdepth")) + { + token = COM_ParseExt(text, qfalse); + if ( token[0] == 0 ) + { + ri.Printf( PRINT_WARNING, "WARNING: missing parameter for parallaxDepth in shader '%s'\n", shader.name ); + continue; + } + + stage->normalScale[3] = atof( token ); + } + // + // normalScale + // or normalScale + // or normalScale + // + else if (!Q_stricmp(token, "normalscale")) + { + token = COM_ParseExt(text, qfalse); + if ( token[0] == 0 ) + { + ri.Printf( PRINT_WARNING, "WARNING: missing parameter for normalScale in shader '%s'\n", shader.name ); + continue; + } + + stage->normalScale[0] = atof( token ); + + token = COM_ParseExt(text, qfalse); + if ( token[0] == 0 ) + { + // one value, applies to X/Y + stage->normalScale[1] = stage->normalScale[0]; + continue; + } + + stage->normalScale[1] = atof( token ); + + token = COM_ParseExt(text, qfalse); + if ( token[0] == 0 ) + { + // two values, no height + continue; + } + + stage->normalScale[3] = atof( token ); + } + // + // specularScale + // or specularScale + // or specularScale + // + else if (!Q_stricmp(token, "specularscale")) + { + token = COM_ParseExt(text, qfalse); + if ( token[0] == 0 ) + { + ri.Printf( PRINT_WARNING, "WARNING: missing parameter for specularScale in shader '%s'\n", shader.name ); + continue; + } + + stage->specularScale[0] = atof( token ); + + token = COM_ParseExt(text, qfalse); + if ( token[0] == 0 ) + { + ri.Printf( PRINT_WARNING, "WARNING: missing parameter for specularScale in shader '%s'\n", shader.name ); + continue; + } + + stage->specularScale[1] = atof( token ); + + token = COM_ParseExt(text, qfalse); + if ( token[0] == 0 ) + { + // two values, rgb then gloss + stage->specularScale[3] = stage->specularScale[1]; + stage->specularScale[1] = + stage->specularScale[2] = stage->specularScale[0]; + continue; + } + + stage->specularScale[2] = atof( token ); + + token = COM_ParseExt(text, qfalse); + if ( token[0] == 0 ) + { + // three values, rgb + continue; + } + + stage->specularScale[2] = atof( token ); + } // // rgbGen @@ -1412,9 +1502,6 @@ static void ParseSkyParms( char **text ) { int i; imgFlags_t imgFlags = IMGFLAG_MIPMAP | IMGFLAG_PICMIP; - if (r_srgb->integer) - imgFlags |= IMGFLAG_SRGB; - // outerbox token = COM_ParseExt( text, qfalse ); if ( token[0] == 0 ) { @@ -2231,6 +2318,8 @@ static void CollapseStagesToLightall(shaderStage_t *diffuse, diffuse->bundle[TB_NORMALMAP] = normal->bundle[0]; if (parallax && r_parallaxMapping->integer) defs |= LIGHTDEF_USE_PARALLAXMAP; + + VectorCopy4(normal->normalScale, diffuse->normalScale); } else if ((lightmap || useLightVector || useLightVertex) && (diffuseImg = diffuse->bundle[TB_DIFFUSEMAP].image[0])) { @@ -2251,6 +2340,8 @@ static void CollapseStagesToLightall(shaderStage_t *diffuse, if (parallax && r_parallaxMapping->integer) defs |= LIGHTDEF_USE_PARALLAXMAP; + + VectorSet4(diffuse->normalScale, r_baseNormalX->value, r_baseNormalY->value, 1.0f, r_baseParallax->value); } } } @@ -2261,8 +2352,7 @@ static void CollapseStagesToLightall(shaderStage_t *diffuse, { //ri.Printf(PRINT_ALL, ", specularmap %s", specular->bundle[0].image[0]->imgName); diffuse->bundle[TB_SPECULARMAP] = specular->bundle[0]; - diffuse->materialInfo[0] = specular->materialInfo[0]; - diffuse->materialInfo[1] = specular->materialInfo[1]; + VectorCopy4(specular->specularScale, diffuse->specularScale); } } @@ -2568,29 +2658,6 @@ static qboolean CollapseStagesToGLSL(void) } } - // insert default material info if needed - for (i = 0; i < MAX_SHADER_STAGES; i++) - { - shaderStage_t *pStage = &stages[i]; - - if (!pStage->active) - continue; - - if (pStage->glslShaderGroup != tr.lightallShader) - continue; - - if ((pStage->glslShaderIndex & LIGHTDEF_LIGHTTYPE_MASK) == 0) - continue; - - if (!pStage->bundle[TB_SPECULARMAP].image[0] && r_specularMapping->integer) - { - if (!pStage->materialInfo[0]) - pStage->materialInfo[0] = r_baseSpecular->value; - if (!pStage->materialInfo[1]) - pStage->materialInfo[1] = r_baseGloss->value; - } - } - return numStages; } @@ -3216,6 +3283,13 @@ shader_t *R_FindShader( const char *name, int lightmapIndex, qboolean mipRawImag shader.lightmapIndex = lightmapIndex; for ( i = 0 ; i < MAX_SHADER_STAGES ; i++ ) { stages[i].bundle[0].texMods = texMods[i]; + + // default normal/specular + VectorSet4(stages[i].normalScale, 0.0f, 0.0f, 0.0f, 0.0f); + stages[i].specularScale[0] = + stages[i].specularScale[1] = + stages[i].specularScale[2] = r_baseSpecular->value; + stages[i].specularScale[3] = r_baseGloss->value; } // @@ -3247,9 +3321,6 @@ shader_t *R_FindShader( const char *name, int lightmapIndex, qboolean mipRawImag flags = IMGFLAG_NONE; - if (r_srgb->integer) - flags |= IMGFLAG_SRGB; - if (mipRawImage) { flags |= IMGFLAG_MIPMAP | IMGFLAG_PICMIP; @@ -3361,6 +3432,13 @@ qhandle_t RE_RegisterShaderFromImage(const char *name, int lightmapIndex, image_ shader.lightmapIndex = lightmapIndex; for ( i = 0 ; i < MAX_SHADER_STAGES ; i++ ) { stages[i].bundle[0].texMods = texMods[i]; + + // default normal/specular + VectorSet4(stages[i].normalScale, 0.0f, 0.0f, 0.0f, 0.0f); + stages[i].specularScale[0] = + stages[i].specularScale[1] = + stages[i].specularScale[2] = r_baseSpecular->value; + stages[i].specularScale[3] = r_baseGloss->value; } // diff --git a/code/renderergl2/tr_sky.c b/code/renderergl2/tr_sky.c index 6a220318..3b739df0 100644 --- a/code/renderergl2/tr_sky.c +++ b/code/renderergl2/tr_sky.c @@ -449,7 +449,7 @@ static void DrawSkySide( struct image_s *image, const int mins[2], const int max color[0] = color[1] = - color[2] = (r_softOverbright->integer ? 1.0 : tr.identityLight) * backEnd.refdef.colorScale; + color[2] = backEnd.refdef.colorScale; color[3] = 1.0f; GLSL_SetUniformVec4(sp, UNIFORM_BASECOLOR, color); diff --git a/code/renderergl2/tr_surface.c b/code/renderergl2/tr_surface.c index 72d2f8d6..825582bd 100644 --- a/code/renderergl2/tr_surface.c +++ b/code/renderergl2/tr_surface.c @@ -627,6 +627,8 @@ static void DoRailCore( const vec3_t start, const vec3_t end, const vec3_t up, f int vbase; float t = len / 256.0f; + RB_CHECKOVERFLOW( 4, 6 ); + vbase = tess.numVertexes; spanWidth2 = -spanWidth; diff --git a/code/renderergl2/tr_world.c b/code/renderergl2/tr_world.c index dba15c45..f4edbb03 100644 --- a/code/renderergl2/tr_world.c +++ b/code/renderergl2/tr_world.c @@ -644,7 +644,7 @@ R_ClusterPVS */ static const byte *R_ClusterPVS (int cluster) { if (!tr.world->vis || cluster < 0 || cluster >= tr.world->numClusters ) { - return tr.world->novis; + return NULL; } return tr.world->vis + cluster * tr.world->clusterBytes; @@ -698,29 +698,21 @@ static void R_MarkLeaves (void) { for(i = 0; i < MAX_VISCOUNTS; i++) { - if(tr.visClusters[i] == cluster) + // if the areamask or r_showcluster was modified, invalidate all visclusters + // this caused doors to open into undrawn areas + if (tr.refdef.areamaskModified || r_showcluster->modified) { - //tr.visIndex = i; - break; + tr.visClusters[i] = -2; } - } - - // if r_showcluster was just turned on, remark everything - if(i != MAX_VISCOUNTS && !tr.refdef.areamaskModified && !r_showcluster->modified)// && !r_dynamicBspOcclusionCulling->modified) - { - if(tr.visClusters[i] != tr.visClusters[tr.visIndex] && r_showcluster->integer) + else if(tr.visClusters[i] == cluster) { - ri.Printf(PRINT_ALL, "found cluster:%i area:%i index:%i\n", cluster, leaf->area, i); + if(tr.visClusters[i] != tr.visClusters[tr.visIndex] && r_showcluster->integer) + { + ri.Printf(PRINT_ALL, "found cluster:%i area:%i index:%i\n", cluster, leaf->area, i); + } + tr.visIndex = i; + return; } - tr.visIndex = i; - return; - } - - // if the areamask was modified, invalidate all visclusters - // this caused doors to open into undrawn areas - if (tr.refdef.areamaskModified) - { - memset(tr.visClusters, -2, sizeof(tr.visClusters)); } tr.visIndex = (tr.visIndex + 1) % MAX_VISCOUNTS; @@ -734,17 +726,6 @@ static void R_MarkLeaves (void) { } } - // set all nodes to visible if there is no vis - // this caused some levels to simply not render - if (r_novis->integer || !tr.world->vis || tr.visClusters[tr.visIndex] == -1) { - for (i=0 ; inumnodes ; i++) { - if (tr.world->nodes[i].contents != CONTENTS_SOLID) { - tr.world->nodes[i].visCounts[tr.visIndex] = tr.visCounts[tr.visIndex]; - } - } - return; - } - vis = R_ClusterPVS(tr.visClusters[tr.visIndex]); for (i=0,leaf=tr.world->nodes ; inumnodes ; i++, leaf++) { @@ -754,7 +735,7 @@ static void R_MarkLeaves (void) { } // check general pvs - if ( !(vis[cluster>>3] & (1<<(cluster&7))) ) { + if ( vis && !(vis[cluster>>3] & (1<<(cluster&7))) ) { continue; } diff --git a/code/server/sv_ccmds.c b/code/server/sv_ccmds.c index 62dd58c2..ca73290a 100644 --- a/code/server/sv_ccmds.c +++ b/code/server/sv_ccmds.c @@ -1141,6 +1141,25 @@ static void SV_ExceptDel_f(void) SV_DelBanFromList(qtrue); } +/* +** SV_Strlen -- skips color escape codes +*/ +static int SV_Strlen( const char *str ) { + const char *s = str; + int count = 0; + + while ( *s ) { + if ( Q_IsColorString( s ) ) { + s += 2; + } else { + count++; + s++; + } + } + + return count; +} + /* ================ SV_Status_f @@ -1161,20 +1180,20 @@ static void SV_Status_f( void ) { Com_Printf ("map: %s\n", sv_mapname->string ); - Com_Printf ("num score ping name lastmsg address qport rate\n"); - Com_Printf ("--- ----- ---- --------------- ------- --------------------- ----- -----\n"); + Com_Printf ("cl score ping name address rate \n"); + Com_Printf ("-- ----- ---- --------------- --------------------------------------- -----\n"); for (i=0,cl=svs.clients ; i < sv_maxclients->integer ; i++,cl++) { if (!cl->state) continue; - Com_Printf ("%3i ", i); + Com_Printf ("%2i ", i); ps = SV_GameClientNum( i ); Com_Printf ("%5i ", ps->persistant[PERS_SCORE]); if (cl->state == CS_CONNECTED) - Com_Printf ("CNCT "); + Com_Printf ("CON "); else if (cl->state == CS_ZOMBIE) - Com_Printf ("ZMBI "); + Com_Printf ("ZMB "); else { ping = cl->ping < 9999 ? cl->ping : 9999; @@ -1183,10 +1202,7 @@ static void SV_Status_f( void ) { Com_Printf ("%s", cl->name); - // TTimo adding a ^7 to reset the color - // NOTE: colored names in status breaks the padding (WONTFIX) - Com_Printf ("^7"); - l = 14 - strlen(cl->name); + l = 16 - SV_Strlen(cl->name); j = 0; do @@ -1195,11 +1211,11 @@ static void SV_Status_f( void ) { j++; } while(j < l); - Com_Printf ("%7i ", svs.time - cl->lastPacketTime ); + // TTimo adding a ^7 to reset the color s = NET_AdrToString( cl->netchan.remoteAddress ); - Com_Printf ("%s", s); - l = 22 - strlen(s); + Com_Printf ("^7%s", s); + l = 39 - strlen(s); j = 0; do @@ -1208,8 +1224,6 @@ static void SV_Status_f( void ) { j++; } while(j < l); - Com_Printf ("%5i", cl->netchan.qport); - Com_Printf (" %5i", cl->rate); Com_Printf ("\n"); diff --git a/code/server/sv_client.c b/code/server/sv_client.c index 2dcff87e..4b1895e5 100644 --- a/code/server/sv_client.c +++ b/code/server/sv_client.c @@ -1043,7 +1043,7 @@ int SV_WriteDownloadToClient(client_t *cl, msg_t *msg) if(cl->download) FS_FCloseFile(cl->download); - return 0; + return 1; } Com_Printf( "clientDownload: %d : beginning \"%s\"\n", (int) (cl - svs.clients), cl->downloadName ); diff --git a/code/server/sv_init.c b/code/server/sv_init.c index 51a307ae..d2ec4dc4 100644 --- a/code/server/sv_init.c +++ b/code/server/sv_init.c @@ -422,11 +422,6 @@ void SV_SpawnServer( char *server, qboolean killBots ) { // clear the whole hunk because we're (re)loading the server Hunk_Clear(); -#ifndef DEDICATED - // Restart renderer - CL_StartHunkUsers( qtrue ); -#endif - // clear collision map data CM_ClearMap(); @@ -614,6 +609,14 @@ void SV_SpawnServer( char *server, qboolean killBots ) { Hunk_SetMark(); +#ifndef DEDICATED + if ( com_dedicated->integer ) { + // restart renderer in order to show console for dedicated servers + // launched through the regular binary + CL_StartHunkUsers( qtrue ); + } +#endif + Com_Printf ("-----------------------------------\n"); } diff --git a/code/sys/sys_main.c b/code/sys/sys_main.c index 40e8a9f6..391ec0bb 100644 --- a/code/sys/sys_main.c +++ b/code/sys/sys_main.c @@ -218,6 +218,8 @@ static __attribute__ ((noreturn)) void Sys_Exit( int exitCode ) remove( pidFile ); } + NET_Shutdown( ); + Sys_PlatformExit( ); exit( exitCode ); diff --git a/opengl2-readme.txt b/opengl2-readme.txt index 999fd385..77721832 100644 --- a/opengl2-readme.txt +++ b/opengl2-readme.txt @@ -18,7 +18,6 @@ compatibility with existing Quake 3 mods. - Texture upsampling. - Advanced materials support. - Advanced shading and specular methods. - - sRGB support. - LATC and BPTC texture compression support. - Screen-space ambient occlusion. @@ -163,13 +162,6 @@ Cvars for HDR and tonemapping: 2.0 - Normal. (default) 3.0 - Brighter. - r_srgb - Treat all input textures as sRGB, and do - final rendering in a sRGB framebuffer. Only - required if assets were created with it in - mind. - 0 - No. (default) - 1 - Yes. - Cvars for advanced material usage: r_normalMapping - Enable normal mapping for materials that support it, and also specify advanced @@ -203,6 +195,44 @@ Cvars for advanced material usage: 0 - No. (default) 1 - Yes. + r_baseSpecular - Set the specular reflectance of materials + which don't include a specular map or + use the specularReflectance keyword. + 0 - No. + 0.04 - Realistic. (default) + 1.0 - Ack. + + r_baseGloss - Set the glossiness of materials which don't + include a specular map or use the + specularExponent keyword. + 0 - Rough. + 0.3 - Default. + 1.0 - Shiny. + + r_baseNormalX - Set the scale of the X values from normal + maps when the normalScale keyword is not + used. + -1 - Flip X. + 0 - Ignore X. + 1 - Normal X. (default) + 2 - Double X. + + r_baseNormalY - Set the scale of the Y values from normal + maps when the normalScale keyword is not + used. + -1 - Flip Y. + 0 - Ignore Y. + 1 - Normal Y. (default) + 2 - Double Y. + + r_baseParallax - Sets the scale of the parallax effect for + materials when the parallaxDepth keyword + is not used. + 0 - No depth. + 0.01 - Pretty smooth. + 0.05 - Standard depth. (default) + 0.1 - Looks broken. + Cvars for image interpolation and generation: r_imageUpsample - Use interpolation to artifically increase the resolution of all textures. Looks good @@ -279,7 +309,7 @@ Cvars for the sunlight and cascaded shadow maps: 2048 - 2048x2048, extreme. 4096 - 4096x4096, indistinguishable from 2048. - + Cvars that you probably don't care about or shouldn't mess with: r_mergeMultidraws - Optimize number of calls to glMultiDrawElements(). @@ -327,7 +357,20 @@ Cvars that you probably don't care about or shouldn't mess with: r_shadowCascadeZBias - Z-bias for shadow cascade frustums. -256 - Default. - + r_materialGamma - Gamma level for material textures. + (diffuse, specular) + 1.0 - Quake 3, fastest. (default) + + r_lightGamma - Gamma level for light. + (lightmap, lightgrid, vertex lights) + 1.0 - Quake 3, fastest. (default) + + r_framebufferGamma - Gamma level for framebuffers. + 1.0 - Quake 3, fastest. (default) + + r_tonemapGamma - Gamma applied after tonemapping. + 1.0 - Quake 3, fastest. (default) + Cvars that have broken bits: r_dlightMode - Change how dynamic lights look. 0 - Quake 3 style dlights, fake @@ -362,6 +405,8 @@ Here's an example of a material stored in one, showing off some new features: { stage normalparallaxmap map textures/abandon/grass3_1024_n.png + normalScale 1 1 + parallaxDepth 0.05 } { stage specularmap @@ -401,7 +446,16 @@ they mean: alpha channel of the specular map, so if it were set to 16, and the alpha channel of the specular map was set to 0.5, then the shininess would be set to 8. Default 256. - + + normalScale + - State the X and Y scales of the normal map. This is useful for increasing + or decreasing the "strength" of the normal map, or entering negative values + to flip the X and/or Y values. Default 1 1. + + parallaxDepth + - State the maximum depth of the parallax map. This is a fairly sensitive + value, and I recommend the default or lower. Default 0.05. + An important note is that normal and specular maps influence the diffuse map declared before them, so materials like this are possible: